You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3878 lines
1.5 MiB
3878 lines
1.5 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[1512],{98280:function(Xt,vt,je){"use strict";je.d(vt,{Z:function(){return Xs}});function Me(xe){"@babel/helpers - typeof";return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},Me(xe)}function at(xe,Pe){if(Me(xe)!="object"||!xe)return xe;var Te=xe[Symbol.toPrimitive];if(Te!==void 0){var Ke=Te.call(xe,Pe||"default");if(Me(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Pe==="string"?String:Number)(xe)}function o(xe){var Pe=at(xe,"string");return Me(Pe)=="symbol"?Pe:Pe+""}function _(xe,Pe,Te){return(Pe=o(Pe))in xe?Object.defineProperty(xe,Pe,{value:Te,enumerable:!0,configurable:!0,writable:!0}):xe[Pe]=Te,xe}function O(xe,Pe){var Te=Object.keys(xe);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(xe);Pe&&(Ke=Ke.filter(function(qe){return Object.getOwnPropertyDescriptor(xe,qe).enumerable})),Te.push.apply(Te,Ke)}return Te}function p(xe){for(var Pe=1;Pe<arguments.length;Pe++){var Te=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?O(Object(Te),!0).forEach(function(Ke){_(xe,Ke,Te[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xe,Object.getOwnPropertyDescriptors(Te)):O(Object(Te)).forEach(function(Ke){Object.defineProperty(xe,Ke,Object.getOwnPropertyDescriptor(Te,Ke))})}return xe}function f(xe){if(Array.isArray(xe))return xe}function h(xe,Pe){var Te=xe==null?null:typeof Symbol!="undefined"&&xe[Symbol.iterator]||xe["@@iterator"];if(Te!=null){var Ke,qe,gt,xt,Rt=[],kt=!0,Kt=!1;try{if(gt=(Te=Te.call(xe)).next,Pe===0){if(Object(Te)!==Te)return;kt=!1}else for(;!(kt=(Ke=gt.call(Te)).done)&&(Rt.push(Ke.value),Rt.length!==Pe);kt=!0);}catch(Sr){Kt=!0,qe=Sr}finally{try{if(!kt&&Te.return!=null&&(xt=Te.return(),Object(xt)!==xt))return}finally{if(Kt)throw qe}}return Rt}}function b(xe,Pe){(Pe==null||Pe>xe.length)&&(Pe=xe.length);for(var Te=0,Ke=Array(Pe);Te<Pe;Te++)Ke[Te]=xe[Te];return Ke}function g(xe,Pe){if(xe){if(typeof xe=="string")return b(xe,Pe);var Te={}.toString.call(xe).slice(8,-1);return Te==="Object"&&xe.constructor&&(Te=xe.constructor.name),Te==="Map"||Te==="Set"?Array.from(xe):Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te)?b(xe,Pe):void 0}}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(xe,Pe){return f(xe)||h(xe,Pe)||g(xe,Pe)||w()}function v(xe,Pe){if(xe==null)return{};var Te={};for(var Ke in xe)if({}.hasOwnProperty.call(xe,Ke)){if(Pe.indexOf(Ke)!==-1)continue;Te[Ke]=xe[Ke]}return Te}function m(xe,Pe){if(xe==null)return{};var Te,Ke,qe=v(xe,Pe);if(Object.getOwnPropertySymbols){var gt=Object.getOwnPropertySymbols(xe);for(Ke=0;Ke<gt.length;Ke++)Te=gt[Ke],Pe.indexOf(Te)===-1&&{}.propertyIsEnumerable.call(xe,Te)&&(qe[Te]=xe[Te])}return qe}function y(xe){if(Array.isArray(xe))return xe}function x(xe,Pe){var Te=xe==null?null:typeof Symbol!="undefined"&&xe[Symbol.iterator]||xe["@@iterator"];if(Te!=null){var Ke,qe,gt,xt,Rt=[],kt=!0,Kt=!1;try{if(gt=(Te=Te.call(xe)).next,Pe===0){if(Object(Te)!==Te)return;kt=!1}else for(;!(kt=(Ke=gt.call(Te)).done)&&(Rt.push(Ke.value),Rt.length!==Pe);kt=!0);}catch(Sr){Kt=!0,qe=Sr}finally{try{if(!kt&&Te.return!=null&&(xt=Te.return(),Object(xt)!==xt))return}finally{if(Kt)throw qe}}return Rt}}function S(xe,Pe){(Pe==null||Pe>xe.length)&&(Pe=xe.length);for(var Te=0,Ke=new Array(Pe);Te<Pe;Te++)Ke[Te]=xe[Te];return Ke}function I(xe,Pe){if(xe){if(typeof xe=="string")return S(xe,Pe);var Te=Object.prototype.toString.call(xe).slice(8,-1);if(Te==="Object"&&xe.constructor&&(Te=xe.constructor.name),Te==="Map"||Te==="Set")return Array.from(xe);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return S(xe,Pe)}}function C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E(xe,Pe){return y(xe)||x(xe,Pe)||I(xe,Pe)||C()}var k=je(67294),V=je.t(k,2),P=je(73935);function K(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var B={};function R(xe,Pe){}function j(xe,Pe){}function N(){B={}}function $(xe,Pe,Te){!Pe&&!B[Te]&&(xe(!1,Te),B[Te]=!0)}function z(xe,Pe){$(R,xe,Pe)}function F(xe,Pe){$(j,xe,Pe)}var M=null;function X(xe){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},X(xe)}var re=je(81640);function ne(xe,Pe,Te){var Ke=k.useRef({});return(!("value"in Ke.current)||Te(Ke.current.condition,Pe))&&(Ke.current.value=xe(),Ke.current.condition=Pe),Ke.current.value}function pe(xe,Pe){typeof xe=="function"?xe(Pe):X(xe)==="object"&&xe&&"current"in xe&&(xe.current=Pe)}function ie(){for(var xe=arguments.length,Pe=new Array(xe),Te=0;Te<xe;Te++)Pe[Te]=arguments[Te];var Ke=Pe.filter(function(qe){return qe});return Ke.length<=1?Ke[0]:function(qe){Pe.forEach(function(gt){pe(gt,qe)})}}function Ae(){for(var xe=arguments.length,Pe=new Array(xe),Te=0;Te<xe;Te++)Pe[Te]=arguments[Te];return ne(function(){return ie.apply(void 0,Pe)},Pe,function(Ke,qe){return Ke.length===qe.length&&Ke.every(function(gt,xt){return gt===qe[xt]})})}function Z(xe){var Pe,Te,Ke=(0,re.isMemo)(xe)?xe.type.type:xe.type;return!(typeof Ke=="function"&&!((Pe=Ke.prototype)!==null&&Pe!==void 0&&Pe.render)||typeof xe=="function"&&!((Te=xe.prototype)!==null&&Te!==void 0&&Te.render))}var fe=k.createContext(null),he=fe;function be(xe){if(Array.isArray(xe))return S(xe)}function le(xe){if(typeof Symbol!="undefined"&&xe[Symbol.iterator]!=null||xe["@@iterator"]!=null)return Array.from(xe)}function ue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(xe){return be(xe)||le(xe)||I(xe)||ue()}var Ee=K()?k.useLayoutEffect:k.useEffect,Oe=Ee,De=function(Pe,Te){var Ke=React.useRef(!0);Ee(function(){if(!Ke.current)return Pe()},Te),Ee(function(){return Ke.current=!1,function(){Ke.current=!0}},[])},ce=[];function G(xe,Pe){var Te=k.useState(function(){if(!K())return null;var lr=document.createElement("div");return lr}),Ke=E(Te,1),qe=Ke[0],gt=k.useRef(!1),xt=k.useContext(he),Rt=k.useState(ce),kt=E(Rt,2),Kt=kt[0],Sr=kt[1],fr=xt||(gt.current?void 0:function(lr){Sr(function(sn){var Mr=[lr].concat(ve(sn));return Mr})});function Ar(){qe.parentElement||document.body.appendChild(qe),gt.current=!0}function Qt(){var lr;(lr=qe.parentElement)===null||lr===void 0||lr.removeChild(qe),gt.current=!1}return Oe(function(){return xe?xt?xt(Ar):Ar():Qt(),Qt},[xe]),Oe(function(){Kt.length&&(Kt.forEach(function(lr){return lr()}),Sr(ce))},[Kt]),[qe,fr]}function ye(xe,Pe){if(!xe)return!1;if(xe.contains)return xe.contains(Pe);for(var Te=Pe;Te;){if(Te===xe)return!0;Te=Te.parentNode}return!1}var Y="data-rc-order",H="rc-util-key",Q=new Map;function J(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Pe=xe.mark;return Pe?Pe.startsWith("data-")?Pe:"data-".concat(Pe):H}function ee(xe){if(xe.attachTo)return xe.attachTo;var Pe=document.querySelector("head");return Pe||document.body}function W(xe){return xe==="queue"?"prependQueue":xe?"prepend":"append"}function L(xe){return Array.from((Q.get(xe)||xe).children).filter(function(Pe){return Pe.tagName==="STYLE"})}function q(xe){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!K())return null;var Te=Pe.csp,Ke=Pe.prepend,qe=document.createElement("style");qe.setAttribute(Y,W(Ke)),Te!=null&&Te.nonce&&(qe.nonce=Te==null?void 0:Te.nonce),qe.innerHTML=xe;var gt=ee(Pe),xt=gt.firstChild;if(Ke){if(Ke==="queue"){var Rt=L(gt).filter(function(kt){return["prepend","prependQueue"].includes(kt.getAttribute(Y))});if(Rt.length)return gt.insertBefore(qe,Rt[Rt.length-1].nextSibling),qe}gt.insertBefore(qe,xt)}else gt.appendChild(qe);return qe}function de(xe){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Te=ee(Pe);return L(Te).find(function(Ke){return Ke.getAttribute(J(Pe))===xe})}function Ie(xe){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Te=de(xe,Pe);if(Te){var Ke=ee(Pe);Ke.removeChild(Te)}}function He(xe,Pe){var Te=Q.get(xe);if(!Te||!ye(document,Te)){var Ke=q("",Pe),qe=Ke.parentNode;Q.set(xe,qe),xe.removeChild(Ke)}}function ze(){Q.clear()}function Je(xe,Pe){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ke=ee(Te);He(Ke,Te);var qe=de(Pe,Te);if(qe){var gt,xt;if((gt=Te.csp)!==null&>!==void 0&>.nonce&&qe.nonce!==((xt=Te.csp)===null||xt===void 0?void 0:xt.nonce)){var Rt;qe.nonce=(Rt=Te.csp)===null||Rt===void 0?void 0:Rt.nonce}return qe.innerHTML!==xe&&(qe.innerHTML=xe),qe}var kt=q(xe,Te);return kt.setAttribute(J(Te),Pe),kt}var dt;function ge(xe){if(typeof document=="undefined")return 0;if(xe||dt===void 0){var Pe=document.createElement("div");Pe.style.width="100%",Pe.style.height="200px";var Te=document.createElement("div"),Ke=Te.style;Ke.position="absolute",Ke.top="0",Ke.left="0",Ke.pointerEvents="none",Ke.visibility="hidden",Ke.width="200px",Ke.height="150px",Ke.overflow="hidden",Te.appendChild(Pe),document.body.appendChild(Te);var qe=Pe.offsetWidth;Te.style.overflow="scroll";var gt=Pe.offsetWidth;qe===gt&&(gt=Te.clientWidth),document.body.removeChild(Te),dt=qe-gt}return dt}function Be(xe){var Pe=xe.match(/^(.*)px$/),Te=Number(Pe==null?void 0:Pe[1]);return Number.isNaN(Te)?ge():Te}function _e(xe){if(typeof document=="undefined"||!xe||!(xe instanceof Element))return{width:0,height:0};var Pe=getComputedStyle(xe,"::-webkit-scrollbar"),Te=Pe.width,Ke=Pe.height;return{width:Be(Te),height:Be(Ke)}}function Fe(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Ve="rc-util-locker-".concat(Date.now()),Xe=0;function Ye(xe){var Pe=!!xe,Te=k.useState(function(){return Xe+=1,"".concat(Ve,"_").concat(Xe)}),Ke=E(Te,1),qe=Ke[0];Oe(function(){if(Pe){var gt=_e(document.body).width,xt=Fe();Je(`
|
|
html body {
|
|
overflow-y: hidden;
|
|
`.concat(xt?"width: calc(100% - ".concat(gt,"px);"):"",`
|
|
}`),qe)}else Ie(qe);return function(){Ie(qe)}},[Pe,qe])}var it=!1;function ot(xe){return typeof xe=="boolean"&&(it=xe),it}var ft=function(Pe){return Pe===!1?!1:!K()||!Pe?null:typeof Pe=="string"?document.querySelector(Pe):typeof Pe=="function"?Pe():Pe},Ct=k.forwardRef(function(xe,Pe){var Te=xe.open,Ke=xe.autoLock,qe=xe.getContainer,gt=xe.debug,xt=xe.autoDestroy,Rt=xt===void 0?!0:xt,kt=xe.children,Kt=k.useState(Te),Sr=E(Kt,2),fr=Sr[0],Ar=Sr[1],Qt=fr||Te;k.useEffect(function(){(Rt||Te)&&Ar(Te)},[Te,Rt]);var lr=k.useState(function(){return ft(qe)}),sn=E(lr,2),Mr=sn[0],$r=sn[1];k.useEffect(function(){var Sn=ft(qe);$r(Sn!=null?Sn:null)});var xr=G(Qt&&!Mr,gt),Ir=E(xr,2),ke=Ir[0],Dr=Ir[1],Ut=Mr!=null?Mr:ke;Ye(Ke&&Te&&K()&&(Ut===ke||Ut===document.body));var ti=null;if(kt&&Z(kt)&&Pe){var jr=kt;ti=jr.ref}var Nr=Ae(ti,Pe);if(!Qt||!K()||Mr===void 0)return null;var Xr=Ut===!1||ot(),qr=kt;return Pe&&(qr=k.cloneElement(kt,{ref:Nr})),k.createElement(he.Provider,{value:Dr},Xr?qr:(0,P.createPortal)(qr,Ut))}),jt=Ct,Ot=jt,Gt=je(94184),Bt=je.n(Gt),Lt=je(48555);function Pt(xe){return xe instanceof HTMLElement||xe instanceof SVGElement}function mr(xe){return xe&&_typeof(xe)==="object"&&Pt(xe.nativeElement)?xe.nativeElement:Pt(xe)?xe:null}function yr(xe){var Pe=mr(xe);if(Pe)return Pe;if(xe instanceof React.Component){var Te;return(Te=ReactDOM.findDOMNode)===null||Te===void 0?void 0:Te.call(ReactDOM,xe)}return null}function dr(xe){var Pe;return xe==null||(Pe=xe.getRootNode)===null||Pe===void 0?void 0:Pe.call(xe)}function Rr(xe){return dr(xe)instanceof ShadowRoot}function zr(xe){return Rr(xe)?dr(xe):null}function Cr(xe){var Pe=k.useRef();Pe.current=xe;var Te=k.useCallback(function(){for(var Ke,qe=arguments.length,gt=new Array(qe),xt=0;xt<qe;xt++)gt[xt]=arguments[xt];return(Ke=Pe.current)===null||Ke===void 0?void 0:Ke.call.apply(Ke,[Pe].concat(gt))},[]);return Te}function kr(xe){if(Array.isArray(xe))return xe}function rt(xe,Pe){var Te=xe==null?null:typeof Symbol!="undefined"&&xe[Symbol.iterator]||xe["@@iterator"];if(Te!=null){var Ke,qe,gt,xt,Rt=[],kt=!0,Kt=!1;try{if(gt=(Te=Te.call(xe)).next,Pe===0){if(Object(Te)!==Te)return;kt=!1}else for(;!(kt=(Ke=gt.call(Te)).done)&&(Rt.push(Ke.value),Rt.length!==Pe);kt=!0);}catch(Sr){Kt=!0,qe=Sr}finally{try{if(!kt&&Te.return!=null&&(xt=Te.return(),Object(xt)!==xt))return}finally{if(Kt)throw qe}}return Rt}}function Vr(xe,Pe){(Pe==null||Pe>xe.length)&&(Pe=xe.length);for(var Te=0,Ke=new Array(Pe);Te<Pe;Te++)Ke[Te]=xe[Te];return Ke}function Wt(xe,Pe){if(xe){if(typeof xe=="string")return Vr(xe,Pe);var Te=Object.prototype.toString.call(xe).slice(8,-1);if(Te==="Object"&&xe.constructor&&(Te=xe.constructor.name),Te==="Map"||Te==="Set")return Array.from(xe);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return Vr(xe,Pe)}}function dn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kn(xe,Pe){return kr(xe)||rt(xe,Pe)||Wt(xe,Pe)||dn()}function _r(xe){"@babel/helpers - typeof";return _r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},_r(xe)}function ur(xe,Pe){if(_r(xe)!=="object"||xe===null)return xe;var Te=xe[Symbol.toPrimitive];if(Te!==void 0){var Ke=Te.call(xe,Pe||"default");if(_r(Ke)!=="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Pe==="string"?String:Number)(xe)}function cn(xe){var Pe=ur(xe,"string");return _r(Pe)==="symbol"?Pe:String(Pe)}function br(xe,Pe,Te){return Pe=cn(Pe),Pe in xe?Object.defineProperty(xe,Pe,{value:Te,enumerable:!0,configurable:!0,writable:!0}):xe[Pe]=Te,xe}function or(xe,Pe){var Te=Object.keys(xe);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(xe);Pe&&(Ke=Ke.filter(function(qe){return Object.getOwnPropertyDescriptor(xe,qe).enumerable})),Te.push.apply(Te,Ke)}return Te}function Vt(xe){for(var Pe=1;Pe<arguments.length;Pe++){var Te=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?or(Object(Te),!0).forEach(function(Ke){br(xe,Ke,Te[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xe,Object.getOwnPropertyDescriptors(Te)):or(Object(Te)).forEach(function(Ke){Object.defineProperty(xe,Ke,Object.getOwnPropertyDescriptor(Te,Ke))})}return xe}function mn(){var xe=Vt({},V);return xe.useId}var sr=0;function Sa(){}var Qi=mn(),Hi=Qi?function(Pe){var Te=Qi();return Pe||Te}:function(Pe){var Te=k.useState("ssr-id"),Ke=kn(Te,2),qe=Ke[0],gt=Ke[1];return k.useEffect(function(){var xt=sr;sr+=1,gt("rc_unique_".concat(xt))},[]),Pe||qe};function Ia(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ci=Ia()?k.useLayoutEffect:k.useEffect,$n=function(Pe,Te){var Ke=k.useRef(!0);ci(function(){return Pe(Ke.current)},Te),ci(function(){return Ke.current=!1,function(){Ke.current=!0}},[])},Ge=function(Pe,Te){$n(function(Ke){if(!Ke)return Pe()},Te)},Or=$n,pn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var xe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(xe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(xe==null?void 0:xe.substr(0,4))};function qn(){return qn=Object.assign?Object.assign.bind():function(xe){for(var Pe=1;Pe<arguments.length;Pe++){var Te=arguments[Pe];for(var Ke in Te)({}).hasOwnProperty.call(Te,Ke)&&(xe[Ke]=Te[Ke])}return xe},qn.apply(null,arguments)}var Cn=je(62874),Yr=je(52481);function Di(xe,Pe,Te){var Ke=k.useRef({});return(!("value"in Ke.current)||Te(Ke.current.condition,Pe))&&(Ke.current.value=xe(),Ke.current.condition=Pe),Ke.current.value}var Ta=Symbol.for("react.element"),Eo=Symbol.for("react.transitional.element"),gn=Symbol.for("react.fragment");function Ra(xe){return xe&&_r(xe)==="object"&&(xe.$$typeof===Ta||xe.$$typeof===Eo)&&xe.type===gn}var ji=Number(k.version.split(".")[0]),wi=function(Pe,Te){typeof Pe=="function"?Pe(Te):_r(Pe)==="object"&&Pe&&"current"in Pe&&(Pe.current=Te)},Qr=function(){for(var Pe=arguments.length,Te=new Array(Pe),Ke=0;Ke<Pe;Ke++)Te[Ke]=arguments[Ke];var qe=Te.filter(Boolean);return qe.length<=1?qe[0]:function(gt){Te.forEach(function(xt){wi(xt,gt)})}},bt=function(){for(var Pe=arguments.length,Te=new Array(Pe),Ke=0;Ke<Pe;Ke++)Te[Ke]=arguments[Ke];return Di(function(){return Qr.apply(void 0,Te)},Te,function(qe,gt){return qe.length!==gt.length||qe.every(function(xt,Rt){return xt!==gt[Rt]})})},yn=function(Pe){var Te,Ke;if(!Pe)return!1;if(Gi(Pe)&&ji>=19)return!0;var qe=(0,Yr.isMemo)(Pe)?Pe.type.type:Pe.type;return!(typeof qe=="function"&&!((Te=qe.prototype)!==null&&Te!==void 0&&Te.render)&&qe.$$typeof!==Yr.ForwardRef||typeof Pe=="function"&&!((Ke=Pe.prototype)!==null&&Ke!==void 0&&Ke.render)&&Pe.$$typeof!==Yr.ForwardRef)};function Gi(xe){return(0,k.isValidElement)(xe)&&!Ra(xe)}var Du=function(Pe){return Gi(Pe)&&yn(Pe)},Bs=function(Pe){if(Pe&&Gi(Pe)){var Te=Pe;return Te.props.propertyIsEnumerable("ref")?Te.props.ref:Te.ref}return null};function Za(xe){var Pe=xe.prefixCls,Te=xe.align,Ke=xe.arrow,qe=xe.arrowPos,gt=Ke||{},xt=gt.className,Rt=gt.content,kt=qe.x,Kt=kt===void 0?0:kt,Sr=qe.y,fr=Sr===void 0?0:Sr,Ar=k.useRef();if(!Te||!Te.points)return null;var Qt={position:"absolute"};if(Te.autoArrow!==!1){var lr=Te.points[0],sn=Te.points[1],Mr=lr[0],$r=lr[1],xr=sn[0],Ir=sn[1];Mr===xr||!["t","b"].includes(Mr)?Qt.top=fr:Mr==="t"?Qt.top=0:Qt.bottom=0,$r===Ir||!["l","r"].includes($r)?Qt.left=Kt:$r==="l"?Qt.left=0:Qt.right=0}return k.createElement("div",{ref:Ar,className:Bt()("".concat(Pe,"-arrow"),xt),style:Qt},Rt)}function _s(xe){var Pe=xe.prefixCls,Te=xe.open,Ke=xe.zIndex,qe=xe.mask,gt=xe.motion;return qe?k.createElement(Cn.Z,qn({},gt,{motionAppear:!0,visible:Te,removeOnLeave:!0}),function(xt){var Rt=xt.className;return k.createElement("div",{style:{zIndex:Ke},className:Bt()("".concat(Pe,"-mask"),Rt)})}):null}var Ms=k.memo(function(xe){var Pe=xe.children;return Pe},function(xe,Pe){return Pe.cache}),Co=Ms,So=k.forwardRef(function(xe,Pe){var Te=xe.popup,Ke=xe.className,qe=xe.prefixCls,gt=xe.style,xt=xe.target,Rt=xe.onVisibleChanged,kt=xe.open,Kt=xe.keepDom,Sr=xe.fresh,fr=xe.onClick,Ar=xe.mask,Qt=xe.arrow,lr=xe.arrowPos,sn=xe.align,Mr=xe.motion,$r=xe.maskMotion,xr=xe.forceRender,Ir=xe.getPopupContainer,ke=xe.autoDestroy,Dr=xe.portal,Ut=xe.zIndex,ti=xe.onMouseEnter,jr=xe.onMouseLeave,Nr=xe.onPointerEnter,Xr=xe.onPointerDownCapture,qr=xe.ready,Sn=xe.offsetX,fn=xe.offsetY,fi=xe.offsetR,On=xe.offsetB,Qe=xe.onAlign,Fr=xe.onPrepare,Tr=xe.stretch,Hr=xe.targetWidth,Mt=xe.targetHeight,_n=typeof Te=="function"?Te():Te,wt=kt||Kt,nr=(Ir==null?void 0:Ir.length)>0,cr=k.useState(!Ir||!nr),Dn=c(cr,2),un=Dn[0],Ya=Dn[1];if(Or(function(){!un&&nr&&xt&&Ya(!0)},[un,nr,xt]),!un)return null;var xi="auto",Gn={left:"-1000vw",top:"-1000vh",right:xi,bottom:xi};if(qr||!kt){var Xn,pr=sn.points,en=sn.dynamicInset||((Xn=sn._experimental)===null||Xn===void 0?void 0:Xn.dynamicInset),Ei=en&&pr[0][1]==="r",Mn=en&&pr[0][0]==="b";Ei?(Gn.right=fi,Gn.left=xi):(Gn.left=Sn,Gn.right=xi),Mn?(Gn.bottom=On,Gn.top=xi):(Gn.top=fn,Gn.bottom=xi)}var jn={};return Tr&&(Tr.includes("height")&&Mt?jn.height=Mt:Tr.includes("minHeight")&&Mt&&(jn.minHeight=Mt),Tr.includes("width")&&Hr?jn.width=Hr:Tr.includes("minWidth")&&Hr&&(jn.minWidth=Hr)),kt||(jn.pointerEvents="none"),k.createElement(Dr,{open:xr||wt,getContainer:Ir&&function(){return Ir(xt)},autoDestroy:ke},k.createElement(_s,{prefixCls:qe,open:kt,zIndex:Ut,mask:Ar,motion:$r}),k.createElement(Lt.Z,{onResize:Qe,disabled:!kt},function(Yt){return k.createElement(Cn.Z,qn({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:xr,leavedClassName:"".concat(qe,"-hidden")},Mr,{onAppearPrepare:Fr,onEnterPrepare:Fr,visible:kt,onVisibleChanged:function(ri){var Ci;Mr==null||(Ci=Mr.onVisibleChanged)===null||Ci===void 0||Ci.call(Mr,ri),Rt(ri)}}),function(Pr,ri){var Ci=Pr.className,la=Pr.style,Pn=Bt()(qe,Ci,Ke);return k.createElement("div",{ref:Qr(Yt,Pe,ri),className:Pn,style:p(p(p(p({"--arrow-x":"".concat(lr.x||0,"px"),"--arrow-y":"".concat(lr.y||0,"px")},Gn),jn),la),{},{boxSizing:"border-box",zIndex:Ut},gt),onMouseEnter:ti,onMouseLeave:jr,onPointerEnter:Nr,onClick:fr,onPointerDownCapture:Xr},Qt&&k.createElement(Za,{prefixCls:qe,arrow:Qt,arrowPos:lr,align:sn}),k.createElement(Co,{cache:!kt&&!Sr},_n))})}))}),ju=So,Ns=k.forwardRef(function(xe,Pe){var Te=xe.children,Ke=xe.getTriggerDOMNode,qe=yn(Te),gt=k.useCallback(function(Rt){wi(Pe,Ke?Ke(Rt):Rt)},[Ke]),xt=bt(gt,Bs(Te));return qe?k.cloneElement(Te,{ref:xt}):Te}),Fs=Ns,Io=k.createContext(null),as=Io;function os(xe){return xe?Array.isArray(xe)?xe:[xe]:[]}function Ls(xe,Pe,Te,Ke){return k.useMemo(function(){var qe=os(Te!=null?Te:Pe),gt=os(Ke!=null?Ke:Pe),xt=new Set(qe),Rt=new Set(gt);return xe&&(xt.has("hover")&&(xt.delete("hover"),xt.add("click")),Rt.has("hover")&&(Rt.delete("hover"),Rt.add("click"))),[xt,Rt]},[xe,Pe,Te,Ke])}var Us=function(xe){if(!xe)return!1;if(xe instanceof Element){if(xe.offsetParent)return!0;if(xe.getBBox){var Pe=xe.getBBox(),Te=Pe.width,Ke=Pe.height;if(Te||Ke)return!0}if(xe.getBoundingClientRect){var qe=xe.getBoundingClientRect(),gt=qe.width,xt=qe.height;if(gt||xt)return!0}}return!1};function Ws(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Te=arguments.length>2?arguments[2]:void 0;return Te?xe[0]===Pe[0]:xe[0]===Pe[0]&&xe[1]===Pe[1]}function ss(xe,Pe,Te,Ke){for(var qe=Te.points,gt=Object.keys(xe),xt=0;xt<gt.length;xt+=1){var Rt,kt=gt[xt];if(Ws((Rt=xe[kt])===null||Rt===void 0?void 0:Rt.points,qe,Ke))return"".concat(Pe,"-placement-").concat(kt)}return""}function us(xe,Pe,Te,Ke){return Pe||(Te?{motionName:"".concat(xe,"-").concat(Te)}:Ke?{motionName:Ke}:null)}function ka(xe){return xe.ownerDocument.defaultView}function To(xe){for(var Pe=[],Te=xe==null?void 0:xe.parentElement,Ke=["hidden","scroll","clip","auto"];Te;){var qe=ka(Te).getComputedStyle(Te),gt=qe.overflowX,xt=qe.overflowY,Rt=qe.overflow;[gt,xt,Rt].some(function(kt){return Ke.includes(kt)})&&Pe.push(Te),Te=Te.parentElement}return Pe}function Oa(xe){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(xe)?Pe:xe}function Xi(xe){return Oa(parseFloat(xe),0)}function Ro(xe,Pe){var Te=p({},xe);return(Pe||[]).forEach(function(Ke){if(!(Ke instanceof HTMLBodyElement||Ke instanceof HTMLHtmlElement)){var qe=ka(Ke).getComputedStyle(Ke),gt=qe.overflow,xt=qe.overflowClipMargin,Rt=qe.borderTopWidth,kt=qe.borderBottomWidth,Kt=qe.borderLeftWidth,Sr=qe.borderRightWidth,fr=Ke.getBoundingClientRect(),Ar=Ke.offsetHeight,Qt=Ke.clientHeight,lr=Ke.offsetWidth,sn=Ke.clientWidth,Mr=Xi(Rt),$r=Xi(kt),xr=Xi(Kt),Ir=Xi(Sr),ke=Oa(Math.round(fr.width/lr*1e3)/1e3),Dr=Oa(Math.round(fr.height/Ar*1e3)/1e3),Ut=(lr-sn-xr-Ir)*ke,ti=(Ar-Qt-Mr-$r)*Dr,jr=Mr*Dr,Nr=$r*Dr,Xr=xr*ke,qr=Ir*ke,Sn=0,fn=0;if(gt==="clip"){var fi=Xi(xt);Sn=fi*ke,fn=fi*Dr}var On=fr.x+Xr-Sn,Qe=fr.y+jr-fn,Fr=On+fr.width+2*Sn-Xr-qr-Ut,Tr=Qe+fr.height+2*fn-jr-Nr-ti;Te.left=Math.max(Te.left,On),Te.top=Math.max(Te.top,Qe),Te.right=Math.min(Te.right,Fr),Te.bottom=Math.min(Te.bottom,Tr)}}),Te}function Da(xe){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Te="".concat(Pe),Ke=Te.match(/^(.*)\%$/);return Ke?xe*(parseFloat(Ke[1])/100):parseFloat(Te)}function ls(xe,Pe){var Te=Pe||[],Ke=c(Te,2),qe=Ke[0],gt=Ke[1];return[Da(xe.width,qe),Da(xe.height,gt)]}function Ai(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[xe[0],xe[1]]}function ua(xe,Pe){var Te=Pe[0],Ke=Pe[1],qe,gt;return Te==="t"?gt=xe.y:Te==="b"?gt=xe.y+xe.height:gt=xe.y+xe.height/2,Ke==="l"?qe=xe.x:Ke==="r"?qe=xe.x+xe.width:qe=xe.x+xe.width/2,{x:qe,y:gt}}function ei(xe,Pe){var Te={t:"b",b:"t",l:"r",r:"l"};return xe.map(function(Ke,qe){return qe===Pe?Te[Ke]||"c":Ke}).join("")}function Ja(xe,Pe,Te,Ke,qe,gt,xt){var Rt=k.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:qe[Ke]||{}}),kt=c(Rt,2),Kt=kt[0],Sr=kt[1],fr=k.useRef(0),Ar=k.useMemo(function(){return Pe?To(Pe):[]},[Pe]),Qt=k.useRef({}),lr=function(){Qt.current={}};xe||lr();var sn=Cr(function(){if(Pe&&Te&&xe){let In=function(Fi,Ri){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bo,Li=cr.x+Fi,ki=cr.y+Ri,An=Li+Ei,Fa=ki+en,fo=Math.max(Li,Yn.left),Et=Math.max(ki,Yn.top),Dt=Math.min(An,Yn.right),Kr=Math.min(Fa,Yn.bottom);return Math.max(0,(Dt-fo)*(Kr-Et))},Na=function(){Ur=cr.y+Lr,ha=Ur+en,ai=cr.x+Br,_i=ai+Ei};var xr,Ir,ke,Dr,Ut=Pe,ti=Ut.ownerDocument,jr=ka(Ut),Nr=jr.getComputedStyle(Ut),Xr=Nr.width,qr=Nr.height,Sn=Nr.position,fn=Ut.style.left,fi=Ut.style.top,On=Ut.style.right,Qe=Ut.style.bottom,Fr=Ut.style.overflow,Tr=p(p({},qe[Ke]),gt),Hr=ti.createElement("div");(xr=Ut.parentElement)===null||xr===void 0||xr.appendChild(Hr),Hr.style.left="".concat(Ut.offsetLeft,"px"),Hr.style.top="".concat(Ut.offsetTop,"px"),Hr.style.position=Sn,Hr.style.height="".concat(Ut.offsetHeight,"px"),Hr.style.width="".concat(Ut.offsetWidth,"px"),Ut.style.left="0",Ut.style.top="0",Ut.style.right="auto",Ut.style.bottom="auto",Ut.style.overflow="hidden";var Mt;if(Array.isArray(Te))Mt={x:Te[0],y:Te[1],width:0,height:0};else{var _n,wt,nr=Te.getBoundingClientRect();nr.x=(_n=nr.x)!==null&&_n!==void 0?_n:nr.left,nr.y=(wt=nr.y)!==null&&wt!==void 0?wt:nr.top,Mt={x:nr.x,y:nr.y,width:nr.width,height:nr.height}}var cr=Ut.getBoundingClientRect();cr.x=(Ir=cr.x)!==null&&Ir!==void 0?Ir:cr.left,cr.y=(ke=cr.y)!==null&&ke!==void 0?ke:cr.top;var Dn=ti.documentElement,un=Dn.clientWidth,Ya=Dn.clientHeight,xi=Dn.scrollWidth,Gn=Dn.scrollHeight,Xn=Dn.scrollTop,pr=Dn.scrollLeft,en=cr.height,Ei=cr.width,Mn=Mt.height,jn=Mt.width,Yt={left:0,top:0,right:un,bottom:Ya},Pr={left:-pr,top:-Xn,right:xi-pr,bottom:Gn-Xn},ri=Tr.htmlRegion,Ci="visible",la="visibleFirst";ri!=="scroll"&&ri!==la&&(ri=Ci);var Pn=ri===la,$a=Ro(Pr,Ar),hr=Ro(Yt,Ar),Bo=ri===Ci?hr:$a,ca=Pn?hr:Bo;Ut.style.left="auto",Ut.style.top="auto",Ut.style.right="0",Ut.style.bottom="0";var Bn=Ut.getBoundingClientRect();Ut.style.left=fn,Ut.style.top=fi,Ut.style.right=On,Ut.style.bottom=Qe,Ut.style.overflow=Fr,(Dr=Ut.parentElement)===null||Dr===void 0||Dr.removeChild(Hr);var Ki=Oa(Math.round(Ei/parseFloat(Xr)*1e3)/1e3),Pi=Oa(Math.round(en/parseFloat(qr)*1e3)/1e3);if(Ki===0||Pi===0||Pt(Te)&&!Us(Te))return;var fs=Tr.offset,Bi=Tr.targetOffset,fa=ls(cr,fs),Kn=c(fa,2),di=Kn[0],ni=Kn[1],Nt=ls(Mt,Bi),da=c(Nt,2),Zn=da[0],Zi=da[1];Mt.x-=Zn,Mt.y-=Zi;var ds=Tr.points||[],_o=c(ds,2),ps=_o[0],hs=_o[1],tn=Ai(hs),Nn=Ai(ps),qa=ua(Mt,tn),bn=ua(cr,Nn),Fn=p({},Tr),Br=qa.x-bn.x+di,Lr=qa.y-bn.y+ni,pi=In(Br,Lr),pa=In(Br,Lr,hr),eo=ua(Mt,["t","l"]),ii=ua(cr,["t","l"]),Mo=ua(Mt,["b","r"]),Pa=ua(cr,["b","r"]),hn=Tr.overflow||{},to=hn.adjustX,No=hn.adjustY,wn=hn.shiftX,hi=hn.shiftY,ro=function(Ri){return typeof Ri=="boolean"?Ri:Ri>=0},Ur,ha,ai,_i;Na();var Si=ro(No),no=Nn[0]===tn[0];if(Si&&Nn[0]==="t"&&(ha>ca.bottom||Qt.current.bt)){var vn=Lr;no?vn-=en-Mn:vn=eo.y-Pa.y-ni;var Ba=In(Br,vn),Ks=In(Br,vn,hr);Ba>pi||Ba===pi&&(!Pn||Ks>=pa)?(Qt.current.bt=!0,Lr=vn,ni=-ni,Fn.points=[ei(Nn,0),ei(tn,0)]):Qt.current.bt=!1}if(Si&&Nn[0]==="b"&&(Ur<ca.top||Qt.current.tb)){var Mi=Lr;no?Mi+=en-Mn:Mi=Mo.y-ii.y-ni;var va=In(Br,Mi),Fo=In(Br,Mi,hr);va>pi||va===pi&&(!Pn||Fo>=pa)?(Qt.current.tb=!0,Lr=Mi,ni=-ni,Fn.points=[ei(Nn,0),ei(tn,0)]):Qt.current.tb=!1}var io=ro(to),Ji=Nn[1]===tn[1];if(io&&Nn[1]==="l"&&(_i>ca.right||Qt.current.rl)){var _a=Br;Ji?_a-=Ei-jn:_a=eo.x-Pa.x-di;var ao=In(_a,Lr),Yi=In(_a,Lr,hr);ao>pi||ao===pi&&(!Pn||Yi>=pa)?(Qt.current.rl=!0,Br=_a,di=-di,Fn.points=[ei(Nn,1),ei(tn,1)]):Qt.current.rl=!1}if(io&&Nn[1]==="r"&&(ai<ca.left||Qt.current.lr)){var oi=Br;Ji?oi+=Ei-jn:oi=Mo.x-ii.x-di;var oo=In(oi,Lr),so=In(oi,Lr,hr);oo>pi||oo===pi&&(!Pn||so>=pa)?(Qt.current.lr=!0,Br=oi,di=-di,Fn.points=[ei(Nn,1),ei(tn,1)]):Qt.current.lr=!1}Na();var si=wn===!0?0:wn;typeof si=="number"&&(ai<hr.left&&(Br-=ai-hr.left-di,Mt.x+jn<hr.left+si&&(Br+=Mt.x-hr.left+jn-si)),_i>hr.right&&(Br-=_i-hr.right-di,Mt.x>hr.right-si&&(Br+=Mt.x-hr.right+si)));var Jn=hi===!0?0:hi;typeof Jn=="number"&&(Ur<hr.top&&(Lr-=Ur-hr.top-ni,Mt.y+Mn<hr.top+Jn&&(Lr+=Mt.y-hr.top+Mn-Jn)),ha>hr.bottom&&(Lr-=ha-hr.bottom-ni,Mt.y>hr.bottom-Jn&&(Lr+=Mt.y-hr.bottom+Jn)));var uo=cr.x+Br,lo=uo+Ei,Ni=cr.y+Lr,Zs=Ni+en,vs=Mt.x,ms=vs+jn,$i=Mt.y,Ma=$i+Mn,vi=Math.max(uo,vs),gs=Math.min(lo,ms),co=(vi+gs)/2,Lo=co-uo,nt=Math.max(Ni,$i),ui=Math.min(Zs,Ma),Jr=(nt+ui)/2,Zt=Jr-Ni;xt==null||xt(Pe,Fn);var Ii=Bn.right-cr.x-(Br+cr.width),Ln=Bn.bottom-cr.y-(Lr+cr.height);Ki===1&&(Br=Math.round(Br),Ii=Math.round(Ii)),Pi===1&&(Lr=Math.round(Lr),Ln=Math.round(Ln));var Ti={ready:!0,offsetX:Br/Ki,offsetY:Lr/Pi,offsetR:Ii/Ki,offsetB:Ln/Pi,arrowX:Lo/Ki,arrowY:Zt/Pi,scaleX:Ki,scaleY:Pi,align:Fn};Sr(Ti)}}),Mr=function(){fr.current+=1;var Ir=fr.current;Promise.resolve().then(function(){fr.current===Ir&&sn()})},$r=function(){Sr(function(Ir){return p(p({},Ir),{},{ready:!1})})};return Or($r,[Ke]),Or(function(){xe||$r()},[xe]),[Kt.ready,Kt.offsetX,Kt.offsetY,Kt.offsetR,Kt.offsetB,Kt.arrowX,Kt.arrowY,Kt.scaleX,Kt.scaleY,Kt.align,Mr]}function ko(xe){if(Array.isArray(xe))return b(xe)}function zs(xe){if(typeof Symbol!="undefined"&&xe[Symbol.iterator]!=null||xe["@@iterator"]!=null)return Array.from(xe)}function Oo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ja(xe){return ko(xe)||zs(xe)||g(xe)||Oo()}function Vs(xe,Pe,Te,Ke,qe){Or(function(){if(xe&&Pe&&Te){let fr=function(){Ke(),qe()};var gt=Pe,xt=Te,Rt=To(gt),kt=To(xt),Kt=ka(xt),Sr=new Set([Kt].concat(ja(Rt),ja(kt)));return Sr.forEach(function(Ar){Ar.addEventListener("scroll",fr,{passive:!0})}),Kt.addEventListener("resize",fr,{passive:!0}),Ke(),function(){Sr.forEach(function(Ar){Ar.removeEventListener("scroll",fr),Kt.removeEventListener("resize",fr)})}}},[xe,Pe,Te])}var Do={},Qs=[],Hn=function(Pe){Qs.push(Pe)};function cs(xe,Pe){if(0)var Te}function Hs(xe,Pe){if(0)var Te}function Gs(){Do={}}function jo(xe,Pe,Te){!Pe&&!Do[Te]&&(xe(!1,Te),Do[Te]=!0)}function Po(xe,Pe){jo(cs,xe,Pe)}function Pu(xe,Pe){jo(Hs,xe,Pe)}Po.preMessage=Hn,Po.resetWarned=Gs,Po.noteOnce=Pu;var _t=null;function vc(xe,Pe,Te,Ke,qe,gt,xt,Rt){var kt=k.useRef(xe);kt.current=xe;var Kt=k.useRef(!1);k.useEffect(function(){if(Pe&&Ke&&(!qe||gt)){var fr=function(){Kt.current=!1},Ar=function(ke){var Dr;kt.current&&!xt(((Dr=ke.composedPath)===null||Dr===void 0||(Dr=Dr.call(ke))===null||Dr===void 0?void 0:Dr[0])||ke.target)&&!Kt.current&&Rt(!1)},Qt=ka(Ke);Qt.addEventListener("pointerdown",fr,!0),Qt.addEventListener("mousedown",Ar,!0),Qt.addEventListener("contextmenu",Ar,!0);var lr=zr(Te);if(lr&&(lr.addEventListener("mousedown",Ar,!0),lr.addEventListener("contextmenu",Ar,!0)),0)var sn,Mr,$r,xr;return function(){Qt.removeEventListener("pointerdown",fr,!0),Qt.removeEventListener("mousedown",Ar,!0),Qt.removeEventListener("contextmenu",Ar,!0),lr&&(lr.removeEventListener("mousedown",Ar,!0),lr.removeEventListener("contextmenu",Ar,!0))}}},[Pe,Te,Ke,qe,gt]);function Sr(){Kt.current=!0}return Sr}var mc=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function gc(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ot,Pe=k.forwardRef(function(Te,Ke){var qe=Te.prefixCls,gt=qe===void 0?"rc-trigger-popup":qe,xt=Te.children,Rt=Te.action,kt=Rt===void 0?"hover":Rt,Kt=Te.showAction,Sr=Te.hideAction,fr=Te.popupVisible,Ar=Te.defaultPopupVisible,Qt=Te.onPopupVisibleChange,lr=Te.afterPopupVisibleChange,sn=Te.mouseEnterDelay,Mr=Te.mouseLeaveDelay,$r=Mr===void 0?.1:Mr,xr=Te.focusDelay,Ir=Te.blurDelay,ke=Te.mask,Dr=Te.maskClosable,Ut=Dr===void 0?!0:Dr,ti=Te.getPopupContainer,jr=Te.forceRender,Nr=Te.autoDestroy,Xr=Te.destroyPopupOnHide,qr=Te.popup,Sn=Te.popupClassName,fn=Te.popupStyle,fi=Te.popupPlacement,On=Te.builtinPlacements,Qe=On===void 0?{}:On,Fr=Te.popupAlign,Tr=Te.zIndex,Hr=Te.stretch,Mt=Te.getPopupClassNameFromAlign,_n=Te.fresh,wt=Te.alignPoint,nr=Te.onPopupClick,cr=Te.onPopupAlign,Dn=Te.arrow,un=Te.popupMotion,Ya=Te.maskMotion,xi=Te.popupTransitionName,Gn=Te.popupAnimation,Xn=Te.maskTransitionName,pr=Te.maskAnimation,en=Te.className,Ei=Te.getTriggerDOMNode,Mn=m(Te,mc),jn=Nr||Xr||!1,Yt=k.useState(!1),Pr=c(Yt,2),ri=Pr[0],Ci=Pr[1];Or(function(){Ci(pn())},[]);var la=k.useRef({}),Pn=k.useContext(as),$a=k.useMemo(function(){return{registerSubPopup:function(Dt,Kr){la.current[Dt]=Kr,Pn==null||Pn.registerSubPopup(Dt,Kr)}}},[Pn]),hr=Hi(),Bo=k.useState(null),ca=c(Bo,2),Bn=ca[0],Ki=ca[1],Pi=k.useRef(null),fs=Cr(function(Et){Pi.current=Et,Pt(Et)&&Bn!==Et&&Ki(Et),Pn==null||Pn.registerSubPopup(hr,Et)}),Bi=k.useState(null),fa=c(Bi,2),Kn=fa[0],di=fa[1],ni=k.useRef(null),Nt=Cr(function(Et){Pt(Et)&&Kn!==Et&&(di(Et),ni.current=Et)}),da=k.Children.only(xt),Zn=(da==null?void 0:da.props)||{},Zi={},ds=Cr(function(Et){var Dt,Kr,rn=Kn;return(rn==null?void 0:rn.contains(Et))||((Dt=zr(rn))===null||Dt===void 0?void 0:Dt.host)===Et||Et===rn||(Bn==null?void 0:Bn.contains(Et))||((Kr=zr(Bn))===null||Kr===void 0?void 0:Kr.host)===Et||Et===Bn||Object.values(la.current).some(function(Zr){return(Zr==null?void 0:Zr.contains(Et))||Et===Zr})}),_o=us(gt,un,Gn,xi),ps=us(gt,Ya,pr,Xn),hs=k.useState(Ar||!1),tn=c(hs,2),Nn=tn[0],qa=tn[1],bn=fr!=null?fr:Nn,Fn=Cr(function(Et){fr===void 0&&qa(Et)});Or(function(){qa(fr||!1)},[fr]);var Br=k.useRef(bn);Br.current=bn;var Lr=k.useRef([]);Lr.current=[];var pi=Cr(function(Et){var Dt;Fn(Et),((Dt=Lr.current[Lr.current.length-1])!==null&&Dt!==void 0?Dt:bn)!==Et&&(Lr.current.push(Et),Qt==null||Qt(Et))}),pa=k.useRef(),eo=function(){clearTimeout(pa.current)},ii=function(Dt){var Kr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;eo(),Kr===0?pi(Dt):pa.current=setTimeout(function(){pi(Dt)},Kr*1e3)};k.useEffect(function(){return eo},[]);var Mo=k.useState(!1),Pa=c(Mo,2),hn=Pa[0],to=Pa[1];Or(function(Et){(!Et||bn)&&to(!0)},[bn]);var No=k.useState(null),wn=c(No,2),hi=wn[0],ro=wn[1],Ur=k.useState(null),ha=c(Ur,2),ai=ha[0],_i=ha[1],Si=function(Dt){_i([Dt.clientX,Dt.clientY])},no=Ja(bn,Bn,wt&&ai!==null?ai:Kn,fi,Qe,Fr,cr),vn=c(no,11),Ba=vn[0],Ks=vn[1],Mi=vn[2],va=vn[3],Fo=vn[4],io=vn[5],Ji=vn[6],_a=vn[7],ao=vn[8],Yi=vn[9],oi=vn[10],oo=Ls(ri,kt,Kt,Sr),so=c(oo,2),si=so[0],Jn=so[1],uo=si.has("click"),lo=Jn.has("click")||Jn.has("contextMenu"),Ni=Cr(function(){hn||oi()}),Zs=function(){Br.current&&wt&&lo&&ii(!1)};Vs(bn,Kn,Bn,Ni,Zs),Or(function(){Ni()},[ai,fi]),Or(function(){bn&&!(Qe!=null&&Qe[fi])&&Ni()},[JSON.stringify(Fr)]);var vs=k.useMemo(function(){var Et=ss(Qe,gt,Yi,wt);return Bt()(Et,Mt==null?void 0:Mt(Yi))},[Yi,Mt,Qe,gt,wt]);k.useImperativeHandle(Ke,function(){return{nativeElement:ni.current,popupElement:Pi.current,forceAlign:Ni}});var ms=k.useState(0),$i=c(ms,2),Ma=$i[0],vi=$i[1],gs=k.useState(0),co=c(gs,2),Lo=co[0],nt=co[1],ui=function(){if(Hr&&Kn){var Dt=Kn.getBoundingClientRect();vi(Dt.width),nt(Dt.height)}},Jr=function(){ui(),Ni()},Zt=function(Dt){to(!1),oi(),lr==null||lr(Dt)},Ii=function(){return new Promise(function(Dt){ui(),ro(function(){return Dt})})};Or(function(){hi&&(oi(),hi(),ro(null))},[hi]);function Ln(Et,Dt,Kr,rn){Zi[Et]=function(Zr){var Uo;rn==null||rn(Zr),ii(Dt,Kr);for(var ys=arguments.length,Js=new Array(ys>1?ys-1:0),Wo=1;Wo<ys;Wo++)Js[Wo-1]=arguments[Wo];(Uo=Zn[Et])===null||Uo===void 0||Uo.call.apply(Uo,[Zn,Zr].concat(Js))}}(uo||lo)&&(Zi.onClick=function(Et){var Dt;Br.current&&lo?ii(!1):!Br.current&&uo&&(Si(Et),ii(!0));for(var Kr=arguments.length,rn=new Array(Kr>1?Kr-1:0),Zr=1;Zr<Kr;Zr++)rn[Zr-1]=arguments[Zr];(Dt=Zn.onClick)===null||Dt===void 0||Dt.call.apply(Dt,[Zn,Et].concat(rn))});var Ti=vc(bn,lo,Kn,Bn,ke,Ut,ds,ii),In=si.has("hover"),Na=Jn.has("hover"),Fi,Ri;In&&(Ln("onMouseEnter",!0,sn,function(Et){Si(Et)}),Ln("onPointerEnter",!0,sn,function(Et){Si(Et)}),Fi=function(Dt){(bn||hn)&&Bn!==null&&Bn!==void 0&&Bn.contains(Dt.target)&&ii(!0,sn)},wt&&(Zi.onMouseMove=function(Et){var Dt;(Dt=Zn.onMouseMove)===null||Dt===void 0||Dt.call(Zn,Et)})),Na&&(Ln("onMouseLeave",!1,$r),Ln("onPointerLeave",!1,$r),Ri=function(){ii(!1,$r)}),si.has("focus")&&Ln("onFocus",!0,xr),Jn.has("focus")&&Ln("onBlur",!1,Ir),si.has("contextMenu")&&(Zi.onContextMenu=function(Et){var Dt;Br.current&&Jn.has("contextMenu")?ii(!1):(Si(Et),ii(!0)),Et.preventDefault();for(var Kr=arguments.length,rn=new Array(Kr>1?Kr-1:0),Zr=1;Zr<Kr;Zr++)rn[Zr-1]=arguments[Zr];(Dt=Zn.onContextMenu)===null||Dt===void 0||Dt.call.apply(Dt,[Zn,Et].concat(rn))}),en&&(Zi.className=Bt()(Zn.className,en));var Yn=p(p({},Zn),Zi),Li={},ki=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ki.forEach(function(Et){Mn[Et]&&(Li[Et]=function(){for(var Dt,Kr=arguments.length,rn=new Array(Kr),Zr=0;Zr<Kr;Zr++)rn[Zr]=arguments[Zr];(Dt=Yn[Et])===null||Dt===void 0||Dt.call.apply(Dt,[Yn].concat(rn)),Mn[Et].apply(Mn,rn)})});var An=k.cloneElement(da,p(p({},Yn),Li)),Fa={x:io,y:Ji},fo=Dn?p({},Dn!==!0?Dn:{}):null;return k.createElement(k.Fragment,null,k.createElement(Lt.Z,{disabled:!bn,ref:Nt,onResize:Jr},k.createElement(Fs,{getTriggerDOMNode:Ei},An)),k.createElement(as.Provider,{value:$a},k.createElement(ju,{portal:xe,ref:fs,prefixCls:gt,popup:qr,className:Bt()(Sn,vs),style:fn,target:Kn,onMouseEnter:Fi,onMouseLeave:Ri,onPointerEnter:Fi,zIndex:Tr,open:bn,keepDom:hn,fresh:_n,onClick:nr,onPointerDownCapture:Ti,mask:ke,motion:_o,maskMotion:ps,onVisibleChanged:Zt,onPrepare:Ii,forceRender:jr,autoDestroy:jn,getPopupContainer:ti,align:Yi,arrow:fo,arrowPos:Fa,ready:Ba,offsetX:Ks,offsetY:Mi,offsetR:va,offsetB:Fo,onAlign:Ni,stretch:Hr,targetWidth:Ma/_a,targetHeight:Lo/ao})))});return Pe}var Xs=gc(Ot)},31632:function(Xt,vt){"use strict";var je;var Me=typeof Symbol=="function"&&Symbol.for,at=Me?Symbol.for("react.element"):60103,o=Me?Symbol.for("react.portal"):60106,_=Me?Symbol.for("react.fragment"):60107,O=Me?Symbol.for("react.strict_mode"):60108,p=Me?Symbol.for("react.profiler"):60114,f=Me?Symbol.for("react.provider"):60109,h=Me?Symbol.for("react.context"):60110,b=Me?Symbol.for("react.async_mode"):60111,g=Me?Symbol.for("react.concurrent_mode"):60111,w=Me?Symbol.for("react.forward_ref"):60112,c=Me?Symbol.for("react.suspense"):60113,v=Me?Symbol.for("react.suspense_list"):60120,m=Me?Symbol.for("react.memo"):60115,y=Me?Symbol.for("react.lazy"):60116,x=Me?Symbol.for("react.block"):60121,S=Me?Symbol.for("react.fundamental"):60117,I=Me?Symbol.for("react.responder"):60118,C=Me?Symbol.for("react.scope"):60119;function E(V){if(typeof V=="object"&&V!==null){var P=V.$$typeof;switch(P){case at:switch(V=V.type,V){case b:case g:case _:case p:case O:case c:return V;default:switch(V=V&&V.$$typeof,V){case h:case w:case y:case m:case f:return V;default:return P}}case o:return P}}}function k(V){return E(V)===g}je=b,je=g,je=h,je=f,je=at,je=w,je=_,je=y,je=m,je=o,je=p,je=O,je=c,je=function(V){return k(V)||E(V)===b},je=k,je=function(V){return E(V)===h},je=function(V){return E(V)===f},je=function(V){return typeof V=="object"&&V!==null&&V.$$typeof===at},je=function(V){return E(V)===w},je=function(V){return E(V)===_},je=function(V){return E(V)===y},vt.isMemo=function(V){return E(V)===m},je=function(V){return E(V)===o},je=function(V){return E(V)===p},je=function(V){return E(V)===O},je=function(V){return E(V)===c},je=function(V){return typeof V=="string"||typeof V=="function"||V===_||V===g||V===p||V===O||V===c||V===v||typeof V=="object"&&V!==null&&(V.$$typeof===y||V.$$typeof===m||V.$$typeof===f||V.$$typeof===h||V.$$typeof===w||V.$$typeof===S||V.$$typeof===I||V.$$typeof===C||V.$$typeof===x)},je=E},81640:function(Xt,vt,je){"use strict";Xt.exports=je(31632)},48482:function(Xt,vt){"use strict";var je;var Me=Symbol.for("react.element"),at=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.server_context"),b=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function x(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case Me:switch(S=S.type,S){case o:case O:case _:case g:case w:return S;default:switch(S=S&&S.$$typeof,S){case h:case f:case b:case v:case c:case p:return S;default:return I}}case at:return I}}}je=f,je=p,je=Me,vt.ForwardRef=b,je=o,je=v,je=c,je=at,je=O,je=_,je=g,je=w,je=function(){return!1},je=function(){return!1},je=function(S){return x(S)===f},je=function(S){return x(S)===p},je=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===Me},je=function(S){return x(S)===b},je=function(S){return x(S)===o},je=function(S){return x(S)===v},vt.isMemo=function(S){return x(S)===c},je=function(S){return x(S)===at},je=function(S){return x(S)===O},je=function(S){return x(S)===_},je=function(S){return x(S)===g},je=function(S){return x(S)===w},je=function(S){return typeof S=="string"||typeof S=="function"||S===o||S===O||S===_||S===g||S===w||S===m||typeof S=="object"&&S!==null&&(S.$$typeof===v||S.$$typeof===c||S.$$typeof===p||S.$$typeof===f||S.$$typeof===b||S.$$typeof===y||S.getModuleId!==void 0)},je=x},52481:function(Xt,vt,je){"use strict";Xt.exports=je(48482)},59451:function(Xt,vt,je){"use strict";je.d(vt,{cT:function(){return R},pe:function(){return P}});var Me=je(67294),at=je(35059),o=je(2453),_=je(33170),O=je(81354),p=je.n(O),f=je(25934),h=je(35973),b=je(56448),g=je.n(b),w=Object.defineProperty,c=Object.defineProperties,v=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,S=(N,$,z)=>$ in N?w(N,$,{enumerable:!0,configurable:!0,writable:!0,value:z}):N[$]=z,I=(N,$)=>{for(var z in $||($={}))y.call($,z)&&S(N,z,$[z]);if(m)for(var z of m($))x.call($,z)&&S(N,z,$[z]);return N},C=(N,$)=>c(N,v($)),E=(N,$)=>{var z={};for(var F in N)y.call(N,F)&&$.indexOf(F)<0&&(z[F]=N[F]);if(N!=null&&m)for(var F of m(N))$.indexOf(F)<0&&x.call(N,F)&&(z[F]=N[F]);return z},k=(N,$,z)=>new Promise((F,M)=>{var X=pe=>{try{ne(z.next(pe))}catch(ie){M(ie)}},re=pe=>{try{ne(z.throw(pe))}catch(ie){M(ie)}},ne=pe=>pe.done?F(pe.value):Promise.resolve(pe.value).then(X,re);ne((z=z.apply(N,$)).next())});const{Dragger:V}=at.default,P=N=>{const $="bf3c199c2470cb477d907b1e0917c17b",z="5183666c72eec9e4";var F=p().enc.Utf8.parse($);let M=p().enc.Utf8.parse(z);var X=p().AES.decrypt(N,F,{iv:M,mode:p().mode.CBC});return X.toString(p().enc.Utf8)};let K;const B=N=>k(void 0,[N],function*({identifier:$,oldFilename:z,newFilename:F}){var M,X,re,ne,pe,ie;const Ae=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});Ae.data=JSON.parse(P(Ae.data));const Z=new OSS({endpoint:(M=Ae==null?void 0:Ae.data)==null?void 0:M.end_point,region:(X=Ae==null?void 0:Ae.data)==null?void 0:X.region,accessKeyId:(re=Ae==null?void 0:Ae.data)==null?void 0:re.access_key_id,accessKeySecret:(ne=Ae==null?void 0:Ae.data)==null?void 0:ne.access_key_secret,bucket:(pe=Ae==null?void 0:Ae.data)==null?void 0:pe.bucket,stsToken:(ie=Ae==null?void 0:Ae.data)==null?void 0:ie.security_token});return new Promise((fe,he)=>{console.log(11111,`${$}/${z}`,`${$}/${F}`,Ae.data),Z.copy(`/${$}/${z}`,`/${$}/${F}`).then(be=>{console.log("\u62F7\u8D1D\u6210\u529F",be)}).catch(be=>{console.log(be)})})}),R=(N,$,z)=>k(void 0,null,function*(){var F,M,X,re,ne,pe;$.file_name=N.name;const ie=yield(0,_.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",P(ie.data)),ie.data=JSON.parse(P(ie.data));const Ae=N.name.split(".");Ae.pop();const Z=$.realFileName?Ae.join(""):(0,f.Z)(),fe=new(g())({endpoint:(F=ie==null?void 0:ie.data)==null?void 0:F.end_point,region:(M=ie==null?void 0:ie.data)==null?void 0:M.region,accessKeyId:(X=ie==null?void 0:ie.data)==null?void 0:X.access_key_id,accessKeySecret:(re=ie==null?void 0:ie.data)==null?void 0:re.access_key_secret,bucket:(ne=ie==null?void 0:ie.data)==null?void 0:ne.bucket,stsToken:(pe=ie==null?void 0:ie.data)==null?void 0:pe.security_token});return new Promise((he,be)=>{var le;fe.multipartUpload(`${Z}`,new Blob([N],{type:N.type}),C(I({timeout:200*1e3,partSize:102400},z),{callback:{url:(le=ie==null?void 0:ie.data)==null?void 0:le.callback_url,host:ie==null?void 0:ie.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_.rz)($)}})).then(function(ue){var ve;N.response=(ve=ue.data)==null?void 0:ve.data,he(ue==null?void 0:ue.data)}).catch(function(ue){be(ue),console.log("err:",ue)})})}),j=N=>{var $=N,{user:z,cancelUpload:F}=$,M=E($,["user","cancelUpload"]);const[X,re]=(0,Me.useState)([]);let[ne,pe]=(0,Me.useState)();const ie={onRemove:Z=>{re([...X.filter(fe=>fe.name!==Z.name)]),M.onChange(X.filter(fe=>fe.name!==Z.name))},disabled:M.disabled,multiple:!0,fileList:X==null?void 0:X.map(Z=>Z.file),customRequest:()=>{},beforeUpload:Z=>k(void 0,null,function*(){let fe=M.maxSize||1073741824;if(X.filter(he=>he.name===Z.name).length){o.ZP.info(`${Z.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(Z==null?void 0:Z.size)>fe?(o.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${fe/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(X.push({name:Z.name,file:Z}),re([...X]),M.onChange(X),!1)})},Ae=(Z,fe)=>k(void 0,null,function*(){var he,be,le,ue,ve,Ee;fe.file_name=Z.name;const Oe=Z.name,De=yield(0,_.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(De.data=JSON.parse(P(De.data)),(De==null?void 0:De.status)!==0){X[X.findIndex(ye=>ye.name===Oe)].status="error",X[X.findIndex(ye=>ye.name===Oe)].file.status="error",M.onChange(X),o.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ne=new(g())({endpoint:(he=De==null?void 0:De.data)==null?void 0:he.end_point,region:(be=De==null?void 0:De.data)==null?void 0:be.region,accessKeyId:(le=De==null?void 0:De.data)==null?void 0:le.access_key_id,accessKeySecret:(ue=De==null?void 0:De.data)==null?void 0:ue.access_key_secret,bucket:(ve=De==null?void 0:De.data)==null?void 0:ve.bucket,stsToken:(Ee=De==null?void 0:De.data)==null?void 0:Ee.security_token}),console.log(Z,"file"),pe(ne);const ce=Z.name.split(".");ce.pop();const G=Oe.indexOf(".")>-1?fe.realFileName?ce.join("."):(0,f.Z)():Oe;return new Promise((ye,Y)=>{var H;try{ne.multipartUpload(`${M.identifier}/${G}${Oe.indexOf(".")>-1?"."+Oe.split(".").pop():""}`,new Blob([Z.file],{type:Z.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Q,J,ee)=>{try{console.log("\u8FDB\u5EA6",Q,J,ee);const W=X.findIndex(L=>L.name===Oe);X[W].file.percent=Q*100,X[W].tempCheckpoint=J,re([...X])}catch(W){}},checkpoint:X[X.findIndex(Q=>Q.name===Oe)].tempCheckpoint,callback:{customValue:{id:Oe+""},url:(H=De==null?void 0:De.data)==null?void 0:H.callback_url,host:De==null?void 0:De.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_.rz)(fe)}}).then(function(Q){var J,ee,W;const L=X.findIndex(de=>de.name===Oe);let q="done";if(((J=Q.data)==null?void 0:J.status)===0){Z.response=(ee=Q.data)==null?void 0:ee.data;const de=X.findIndex(Ie=>Ie.name===Oe);X[de].status="done",X[de].file.status="done"}else o.ZP.warning((W=Q.data)==null?void 0:W.message),q="error";X[L].status=q,X[L].file.status=q,M.onChange(X),ye(Q==null?void 0:Q.data)}).catch(function(Q){X[X.findIndex(J=>J.name===Oe)].status="error",X[X.findIndex(J=>J.name===Oe)].file.status="error",o.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),re([...X]),M.onChange(X),Y(Q),console.log("err:",Q)})}catch(Q){}})});return(0,Me.useEffect)(()=>{X.every(Z=>Z==="done"||Z==="error")&&M.onComplete(X)},[X]),(0,Me.useEffect)(()=>{F&&(ne==null||ne.cancel())},[F]),(0,Me.useEffect)(()=>{M.uploading&&X.map(Z=>k(void 0,null,function*(){var fe;if((!Z.status||Z.status==="error")&&!F){Z.status="uploading",Z.file.status="uploading";const he=yield Ae(Z,{login:(fe=z==null?void 0:z.userInfo)==null?void 0:fe.login,container_type:M.container_type,container_id:M.container_id,description:M.description,realFileName:M.realFileName})}}))},[M.uploading]),Me.createElement(V,C(I({},ie),{height:M.height,className:M.className}),Me.createElement("p",{className:"ant-upload-hint"},M.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};vt.ZP=(0,h.connect)(({loading:N,globalSetting:$,user:z})=>({globalSetting:$,loading:N.models.competitions,user:z}))(j)},46415:function(Xt,vt,je){"use strict";je.r(vt),je.d(vt,{default:function(){return ob}});var Me=je(67294),at=je(35973),o=je(55054),_=je(42119),O=je(2453),p=je(85804),f=je(71230),h=je(15746),b=je(62844),g={flex_box_center:"flex_box_center___uIDcP",flex_space_between:"flex_space_between___l5roZ",flex_box_vertical_center:"flex_box_vertical_center___mj8nW",flex_box_center_end:"flex_box_center_end___v4Eig",flex_box_column:"flex_box_column___SQn0H",bg:"bg___H5S8d",steps:"steps___mrlSw",qrcode:"qrcode___xRSbG"},w=je(28706),c=je(15835),v=je(79361),m=je.n(v),y=je(34155),x=je(48764).lW;var S=function(n,t){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])})(n,t)};function I(n,t){function e(){this.constructor=n}S(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function C(n,t,e,r){return new(e||(e=Promise))(function(i,a){function s(d){try{l(r.next(d))}catch(A){a(A)}}function u(d){try{l(r.throw(d))}catch(A){a(A)}}function l(d){d.done?i(d.value):new e(function(A){A(d.value)}).then(s,u)}l((r=r.apply(n,t||[])).next())})}function E(n,t){var e,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(d){return function(A){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,r&&(i=2&A[0]?r.return:A[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,A[1])).done)return i;switch(r=0,i&&(A=[2&A[0],i.value]),A[0]){case 0:case 1:i=A;break;case 4:return s.label++,{value:A[1],done:!1};case 5:s.label++,r=A[1],A=[0];continue;case 7:A=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(A[0]===6||A[0]===2)){s=0;continue}if(A[0]===3&&(!i||A[1]>i[0]&&A[1]<i[3])){s.label=A[1];break}if(A[0]===6&&s.label<i[1]){s.label=i[1],i=A;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(A);break}i[2]&&s.ops.pop(),s.trys.pop();continue}A=t.call(n,s)}catch(T){A=[6,T],r=0}finally{e=i=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([l,d])}}}var k=function(){function n(t){this.global=t,this.flags={},this.flagRegistry={},this.urlFlags={},this.populateURLFlags()}return n.prototype.setPlatform=function(t,e){this.platform!=null&&console.warn("Platform "+this.platformName+" has already been set. Overwriting the platform with "+e+"."),this.platformName=t,this.platform=e},n.prototype.registerFlag=function(t,e,r){if(this.flagRegistry[t]={evaluationFn:e,setHook:r},this.urlFlags[t]!=null){var i=this.urlFlags[t];console.warn("Setting feature override from URL "+t+": "+i+"."),this.set(t,i)}},n.prototype.get=function(t){return t in this.flags?this.flags[t]:(this.flags[t]=this.evaluateFlag(t),this.flags[t])},n.prototype.getNumber=function(t){return this.get(t)},n.prototype.getBool=function(t){return this.get(t)},n.prototype.getFlags=function(){return this.flags},Object.defineProperty(n.prototype,"features",{get:function(){return this.flags},enumerable:!0,configurable:!0}),n.prototype.set=function(t,e){if(this.flagRegistry[t]==null)throw new Error("Cannot set flag "+t+" as it has not been registered.");this.flags[t]=e,this.flagRegistry[t].setHook!=null&&this.flagRegistry[t].setHook(e)},n.prototype.evaluateFlag=function(t){if(this.flagRegistry[t]==null)throw new Error("Cannot evaluate flag '"+t+"': no evaluation function found.");return this.flagRegistry[t].evaluationFn()},n.prototype.setFlags=function(t){this.flags=Object.assign({},t)},n.prototype.reset=function(){this.flags={},this.urlFlags={},this.populateURLFlags()},n.prototype.populateURLFlags=function(){var t=this;if(this.global!==void 0&&this.global.location!==void 0&&this.global.location.search!==void 0){var e,r,i=(e=this.global.location.search,r={},e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,function(a){for(var s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];return V(r,s[0],s[1]),s.join("=")}),r);"tfjsflags"in i&&i.tfjsflags.split(",").forEach(function(a){var s=a.split(":"),u=s[0],l=s[1];t.urlFlags[u]=function(d,A){if((A=A.toLowerCase())==="true"||A==="false")return A==="true";if(""+ +A===A)return+A;throw new Error("Could not parse value flag value "+A+" for flag "+d+".")}(u,l)})}},n}();function V(n,t,e){n[decodeURIComponent(t)]=decodeURIComponent(e||"")}function P(){return K}var K=null,B=new Map,R=new Map;function j(n,t){var e=re(n,t);return B.get(e)}function N(n){return R.get(n)}function $(n){for(var t=B.entries(),e=[];;){var r=t.next(),i=r.done,a=r.value;if(i)break;var s=a[0],u=a[1];s.split("_")[0]===n&&e.push(u)}return e}function z(n){var t=n.kernelName,e=n.backendName,r=re(t,e);if(B.has(r))throw new Error("The kernel '"+t+"' for backend '"+e+"' is already registered");B.set(r,n)}function F(n){var t=n.kernelName;R.has(t)&&console.warn("Overriding the gradient for '"+t+"'"),R.set(t,n)}function M(n,t){var e=re(n,t);if(!B.has(e))throw new Error("The kernel '"+n+"' for backend '"+t+"' is not registered");B.delete(e)}function X(n){if(!R.has(n))throw new Error("The gradient '"+n+"' for backend is not registered");R.delete(n)}function re(n,t){return t+"_"+n}function ne(n){for(var t=n.length,e=0,r=0;t>0;)r=Math.random()*t|0,e=n[--t],n[t]=n[r],n[r]=e}function pe(n,t,e){return Math.max(n,Math.min(t,e))}function ie(n){return n%2==0?n:n+1}function Ae(n){for(var t=0,e=0;e<n.length;e++)t+=n[e];return t}function Z(n,t){if(!n)throw new Error(typeof t=="string"?t:t())}function fe(n,t,e){e===void 0&&(e=""),Z(ue(n,t),function(){return e+" Shapes "+n+" and "+t+" must match"})}function he(n){Z(n!=null,function(){return"The input to the tensor constructor must be a non-null value."})}function be(n,t,e){if(t===void 0&&(t=[]),e===void 0&&(e=!1),t==null&&(t=[]),Array.isArray(n)||L(n)&&!e)for(var r=0;r<n.length;++r)be(n[r],t,e);else t.push(n);return t}function le(n){if(n.length===0)return 1;for(var t=n[0],e=1;e<n.length;e++)t*=n[e];return t}function ue(n,t){if(n===t)return!0;if(n==null||t==null||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function ve(n){return n%1==0}function Ee(n){if(Math.tanh!=null)return Math.tanh(n);if(n===1/0)return 1;if(n===-1/0)return-1;var t=Math.exp(2*n);return(t-1)/(t+1)}function Oe(n){var t=Math.ceil(Math.sqrt(n));return[t,Math.ceil(n/t)]}function De(n,t){return t<=n.length?n:n+" ".repeat(t-n.length)}function ce(n,t,e){return t===void 0&&(t=function(r){return 0}),new Promise(function(r,i){var a=0,s=function(){if(n())r();else{a++;var u=t(a);e!=null&&a>=e?i():setTimeout(s,u)}};s()})}function G(n,t){for(var e=1,r=-1,i=0;i<n.length;++i)if(n[i]>=0)e*=n[i];else if(n[i]===-1){if(r!==-1)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(n[i]<0)throw Error("Shapes can not be < 0. Found "+n[i]+" at dim "+i);if(r===-1){if(t>0&&t!==e)throw Error("Size("+t+") must match the product of shape "+n);return n}if(e===0)throw Error("Cannot infer the missing size in ["+n+"] when there are 0 elements");if(t%e!=0)throw Error("The implicit shape can't be a fractional number. Got "+t+" / "+e);var a=n.slice();return a[r]=t/e,a}function ye(n,t){var e=t.length;return Z((n=n==null?t.map(function(r,i){return i}):[].concat(n)).every(function(r){return r>=-e&&r<e}),function(){return"All values in axis param must be in range [-"+e+", "+e+") but got axis "+n}),Z(n.every(function(r){return ve(r)}),function(){return"All values in axis param must be integers but got axis "+n}),n.map(function(r){return r<0?e+r:r})}function Y(n,t){for(var e=[],r=[],i=t!=null&&Array.isArray(t)&&t.length===0,a=t==null||i?null:ye(t,n).sort(),s=0,u=0;u<n.length;++u){if(a!=null){if(a[s]===u&&n[u]!==1)throw new Error("Can't squeeze axis "+u+" since its dim '"+n[u]+"' is not 1");(a[s]==null||a[s]>u)&&n[u]===1&&(e.push(n[u]),r.push(u)),a[s]<=u&&s++}n[u]!==1&&(e.push(n[u]),r.push(u))}return{newShape:e,keptDims:r}}function H(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else{if(n!=="bool")throw new Error("Unknown data type "+n);e=new Uint8Array(t)}return e}function Q(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else if(n==="bool")e=new Uint8Array(t);else{if(n!=="string")throw new Error("Unknown data type "+n);e=new Array(t)}return e}function J(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+t+" being uploaded contains "+r+".")}}function ee(n){return n==="bool"||n==="complex64"||n==="float32"||n==="int32"||n==="string"}function W(n,t){return t!=="complex64"&&(t!=="float32"||n==="complex64")&&(t!=="int32"||n==="float32"||n==="complex64")&&(t!=="bool"||n!=="bool")}function L(n){return n instanceof Float32Array||n instanceof Int32Array||n instanceof Uint8Array}function q(n){if(n==="float32"||n==="int32")return 4;if(n==="complex64")return 8;if(n==="bool")return 1;throw new Error("Unknown dtype "+n)}function de(n){if(n==null)return 0;var t=0;return n.forEach(function(e){return t+=e.length}),t}function Ie(n){return typeof n=="string"||n instanceof String}function He(n){return typeof n=="boolean"}function ze(n){return typeof n=="number"}function Je(n){return Array.isArray(n)?Je(n[0]):n instanceof Float32Array?"float32":n instanceof Int32Array||n instanceof Uint8Array?"int32":ze(n)?"float32":Ie(n)?"string":He(n)?"bool":"float32"}function dt(n){return!!(n&&n.constructor&&n.call&&n.apply)}function ge(n,t){for(var e=t;e<n;++e)if(n%e==0)return e;return n}function Be(n){var t=n.length;if(t<2)return[];var e=new Array(t-1);e[t-2]=n[t-1];for(var r=t-3;r>=0;--r)e[r]=e[r+1]*n[r+1];return e}function _e(n,t,e){if(t==="string")throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(n)&&(n=be(n)),e&&J(n,t),function(a,s){return a instanceof Float32Array&&s==="float32"||a instanceof Int32Array&&s==="int32"||a instanceof Uint8Array&&s==="bool"}(n,t))return n;if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool"){for(var r=new Uint8Array(n.length),i=0;i<r.length;++i)Math.round(n[i])!==0&&(r[i]=1);return r}throw new Error("Unknown data type "+t)}function Fe(n,t){if(n.length===0)return t[0];var e=n.reduce(function(r,i){return r*i});if(e===0)return[];if(e!==t.length)throw new Error("["+n+"] does not match the input size.");return function r(i,a,s){var u=new Array;if(a.length===1)for(var l=a[0],d=0;d<l;d++)u[d]=s[i+d];else{l=a[0];var A=a.slice(1),T=A.reduce(function(D,U){return D*U});for(d=0;d<l;d++)u[d]=r(i+d*T,A,s)}return u}(0,n,t)}function Ve(n,t){for(var e=Xe(n,t),r=0;r<e.length;r++)e[r]=1;return e}function Xe(n,t){if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool")return new Uint8Array(n);throw new Error("Unknown data type "+t)}function Ye(){return P().platform.now()}function it(n){n.forEach(function(t){Z(Number.isInteger(t)&&t>=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+n+"]."})})}function ot(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",P().platform.encode(n,t)}function ft(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",P().platform.decode(n,t)}function Ct(n,t,e){if(t===0)return 0;if(t===1)return n[0];for(var r=n[n.length-1],i=0;i<n.length-1;++i)r+=e[i]*n[i];return r}function jt(n,t,e){if(t===0)return[];if(t===1)return[n];for(var r=new Array(t),i=0;i<r.length-1;++i)r[i]=Math.floor(n/e[i]),n-=r[i]*e[i];return r[r.length-1]=n,r}var Ot=Object.freeze({shuffle:ne,clamp:pe,nearestLargerEven:ie,sum:Ae,randUniform:function(n,t){var e=Math.random();return t*e+(1-e)*n},distSquared:function(n,t){for(var e=0,r=0;r<n.length;r++){var i=Number(n[r])-Number(t[r]);e+=i*i}return e},assert:Z,assertShapesMatch:fe,assertNonNull:he,flatten:be,sizeFromShape:le,isScalarShape:function(n){return n.length===0},arraysEqual:ue,isInt:ve,tanh:Ee,sizeToSquarishShape:Oe,createShuffledIndices:function(n){for(var t=new Uint32Array(n),e=0;e<n;++e)t[e]=e;return ne(t),t},rightPad:De,repeatedTry:ce,inferFromImplicitShape:G,parseAxisParam:ye,squeezeShape:Y,getTypedArrayFromDType:H,getArrayFromDType:Q,checkConversionForErrors:J,isValidDtype:ee,hasEncodingLoss:W,isTypedArray:L,bytesPerElement:q,bytesFromStringArray:de,isString:Ie,isBoolean:He,isNumber:ze,inferDtype:Je,isFunction:dt,nearestDivisor:ge,computeStrides:Be,toTypedArray:_e,toNestedArray:Fe,makeOnesTypedArray:Ve,makeZerosTypedArray:Xe,now:Ye,assertNonNegativeIntegerDimensions:it,fetch:function(n,t){return P().platform.fetch(n,t)},encodeString:ot,decodeString:ft,locToIndex:Ct,indexToLoc:jt}),Gt=function(){function n(t,e){this.backendTimer=t,this.logger=e,e==null&&(this.logger=new Bt)}return n.prototype.profileKernel=function(t,e,r){var i,a=this,s=this.backendTimer.time(function(){i=r()});return i.forEach(function(u){u.data().then(function(l){(function(d,A,T){if(A!=="float32")return!1;for(var D=0;D<d.length;D++){var U=d[D];if(isNaN(U)||!isFinite(U))return console.warn("Found "+U+" in the result of '"+T+"'"),!0}})(l,u.dtype,t),s.then(function(d){var A="";d.getExtraProfileInfo!=null&&(A=d.getExtraProfileInfo()),a.logger.logKernelProfile(t,u,l,d.kernelMs,e,A)})})}),i},n}(),Bt=function(){function n(){}return n.prototype.logKernelProfile=function(t,e,r,i,a,s){var u=typeof i=="number"?De(i+"ms",9):i.error,l=De(t,25),d=e.rank,A=e.size,T=De(e.shape.toString(),14),D="";for(var U in a){var te=a[U].shape||e.shape,oe=te.length;D+=U+": "+oe+"D "+(oe>0?te:"")+" "}console.log("%c"+l+" %c"+u+" %c"+d+"D "+T+" %c"+A+" %c"+D+" %c"+s,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},n}(),Lt=20,Pt=3,mr=7;function yr(n,t,e,r){var i=Be(t),a=function(d,A,T,D){var U=le(A),te=D[D.length-1],oe=new Array(te).fill(0),ae=A.length,se=T==="complex64"?zr(d):d;if(ae>1)for(var we=0;we<U/te;we++)for(var Ce=we*te,me=0;me<te;me++)oe[me]=Math.max(oe[me],dr(se[Ce+me],0,T).length);return oe}(n,t,e,i),s=t.length,u=function d(A,T,D,U,te,oe){oe===void 0&&(oe=!0);var ae=D==="complex64"?2:1,se=T[0],we=T.length;if(we===0)return D==="complex64"?[dr(zr(A)[0],0,D)]:D==="bool"?[Rr(A[0])]:[A[0].toString()];if(we===1){if(se>Lt){var Ce=Pt*ae,me=Array.from(A.slice(0,Ce)),Se=Array.from(A.slice((se-Pt)*ae,se*ae));return D==="complex64"&&(me=zr(me),Se=zr(Se)),["["+me.map(function(st,pt){return dr(st,te[pt],D)}).join(", ")+", ..., "+Se.map(function(st,pt){return dr(st,te[se-Pt+pt],D)}).join(", ")+"]"]}return["["+(D==="complex64"?zr(A):Array.from(A)).map(function(st,pt){return dr(st,te[pt],D)}).join(", ")+"]"]}var Re=T.slice(1),Ue=U.slice(1),We=U[0]*ae,Ne=[];if(se>Lt){for(var Le=0;Le<Pt;Le++){var $e=(Ze=Le*We)+We;Ne.push.apply(Ne,d(A.slice(Ze,$e),Re,D,Ue,te,!1))}for(Ne.push("..."),Le=se-Pt;Le<se;Le++)$e=(Ze=Le*We)+We,Ne.push.apply(Ne,d(A.slice(Ze,$e),Re,D,Ue,te,Le===se-1))}else for(Le=0;Le<se;Le++){var Ze;$e=(Ze=Le*We)+We,Ne.push.apply(Ne,d(A.slice(Ze,$e),Re,D,Ue,te,Le===se-1))}var et=we===2?",":"";for(Ne[0]="["+Ne[0]+et,Le=1;Le<Ne.length-1;Le++)Ne[Le]=" "+Ne[Le]+et;var tt=`,
|
|
`;for(Le=2;Le<we;Le++)tt+=`
|
|
`;return Ne[Ne.length-1]=" "+Ne[Ne.length-1]+"]"+(oe?"":tt),Ne}(n,t,e,i,a),l=["Tensor"];return r&&(l.push(" dtype: "+e),l.push(" rank: "+s),l.push(" shape: ["+t+"]"),l.push(" values:")),l.push(u.map(function(d){return" "+d}).join(`
|
|
`)),l.join(`
|
|
`)}function dr(n,t,e){return De(Array.isArray(n)?parseFloat(n[0].toFixed(mr))+" + "+parseFloat(n[1].toFixed(mr))+"j":Ie(n)?"'"+n+"'":e==="bool"?Rr(n):parseFloat(n.toFixed(mr)).toString(),t)}function Rr(n){return n===0?"false":"true"}function zr(n){for(var t=[],e=0;e<n.length;e+=2)t.push([n[e],n[e+1]]);return t}var Cr=function(){function n(t,e,r){var i=this;if(this.dtype=e,this.shape=t.slice(),this.size=le(t),r!=null){var a=r.length;Z(a===this.size,function(){return"Length of values '"+a+"' does not match the size inferred by the shape '"+i.size+"'."})}if(e==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=r||Q(e,this.size),this.strides=Be(t)}return n.prototype.set=function(t){for(var e=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];r.length===0&&(r=[0]),Z(r.length===this.rank,function(){return"The number of provided coordinates ("+r.length+") must match the rank ("+e.rank+")"});var a=this.locToIndex(r);this.values[a]=t},n.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.length===0&&(t=[0]);for(var r=0,i=0,a=t;i<a.length;i++){var s=a[i];if(s<0||s>=this.shape[r]){var u="Requested out of range element at "+t+". Buffer shape="+this.shape;throw new Error(u)}r++}for(var l=t[t.length-1],d=0;d<t.length-1;++d)l+=this.strides[d]*t[d];return this.values[l]},n.prototype.locToIndex=function(t){if(this.rank===0)return 0;if(this.rank===1)return t[0];for(var e=t[t.length-1],r=0;r<t.length-1;++r)e+=this.strides[r]*t[r];return e},n.prototype.indexToLoc=function(t){if(this.rank===0)return[];if(this.rank===1)return[t];for(var e=new Array(this.shape.length),r=0;r<e.length-1;++r)e[r]=Math.floor(t/this.strides[r]),t-=e[r]*this.strides[r];return e[e.length-1]=t,e},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.toTensor=function(){return kr().makeTensor(this.values,this.shape,this.dtype)},n}(),kr=null,rt=null,Vr=null,Wt=function(){function n(t,e,r,i){this.kept=!1,this.isDisposedInternal=!1,this.shape=t.slice(),this.dtype=e||"float32",this.size=le(t),this.strides=Be(t),this.dataId=r,this.id=i,this.rankType=this.rank<5?this.rank.toString():"higher"}return n.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},n.prototype.asScalar=function(){return this.throwIfDisposed(),Z(this.size===1,function(){return"The array must have only 1 element."}),this.reshape([])},n.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},n.prototype.as2D=function(t,e){return this.throwIfDisposed(),this.reshape([t,e])},n.prototype.as3D=function(t,e,r){return this.throwIfDisposed(),this.reshape([t,e,r])},n.prototype.as4D=function(t,e,r,i){return this.throwIfDisposed(),this.reshape([t,e,r,i])},n.prototype.as5D=function(t,e,r,i,a){return this.throwIfDisposed(),this.reshape([t,e,r,i,a])},n.prototype.asType=function(t){return this.throwIfDisposed(),rt.cast(this,t)},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.buffer=function(){return C(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,rt.buffer(this.shape,this.dtype,t)]}})})},n.prototype.bufferSync=function(){return rt.buffer(this.shape,this.dtype,this.dataSync())},n.prototype.array=function(){return C(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,Fe(this.shape,t)]}})})},n.prototype.arraySync=function(){return Fe(this.shape,this.dataSync())},n.prototype.data=function(){return C(this,void 0,void 0,function(){var t,e;return E(this,function(r){switch(r.label){case 0:return this.throwIfDisposed(),t=kr().read(this.dataId),this.dtype!=="string"?[3,2]:[4,t];case 1:e=r.sent();try{return[2,e.map(function(i){return ft(i)})]}catch(i){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}r.label=2;case 2:return[2,t]}})})},n.prototype.dataSync=function(){this.throwIfDisposed();var t=kr().readSync(this.dataId);if(this.dtype==="string")try{return t.map(function(e){return ft(e)})}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return t},n.prototype.bytes=function(){return C(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return this.throwIfDisposed(),[4,kr().read(this.dataId)];case 1:return t=e.sent(),this.dtype==="string"?[2,t]:[2,new Uint8Array(t.buffer)]}})})},n.prototype.dispose=function(){this.isDisposed||(kr().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),n.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},n.prototype.toFloat=function(){return this.asType("float32")},n.prototype.toInt=function(){return this.asType("int32")},n.prototype.toBool=function(){return this.asType("bool")},n.prototype.print=function(t){return t===void 0&&(t=!1),rt.print(this,t)},n.prototype.reshape=function(t){return this.throwIfDisposed(),rt.reshape(this,t)},n.prototype.reshapeAs=function(t){return this.throwIfDisposed(),this.reshape(t.shape)},n.prototype.expandDims=function(t){return t===void 0&&(t=0),rt.expandDims(this,t)},n.prototype.cumsum=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1),rt.cumsum(this,t,e,r)},n.prototype.squeeze=function(t){return this.throwIfDisposed(),rt.squeeze(this,t)},n.prototype.clone=function(){return this.throwIfDisposed(),rt.clone(this)},n.prototype.oneHot=function(t,e,r){return this.throwIfDisposed(),rt.oneHot(this,t,e,r)},n.prototype.toString=function(t){return t===void 0&&(t=!1),yr(this.dataSync(),this.shape,this.dtype,t)},n.prototype.tile=function(t){return this.throwIfDisposed(),rt.tile(this,t)},n.prototype.gather=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),rt.gather(this,t,e)},n.prototype.matMul=function(t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!1),this.throwIfDisposed(),rt.matMul(this,t,e,r)},n.prototype.dot=function(t){return this.throwIfDisposed(),rt.dot(this,t)},n.prototype.norm=function(t,e,r){return t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1),this.throwIfDisposed(),rt.norm(this,t,e,r)},n.prototype.slice=function(t,e){return this.throwIfDisposed(),rt.slice(this,t,e)},n.prototype.reverse=function(t){return this.throwIfDisposed(),rt.reverse(this,t)},n.prototype.concat=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),t instanceof n&&(t=[t]),rt.concat([this].concat(t),e)},n.prototype.split=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),rt.split(this,t,e)},n.prototype.stack=function(t,e){return e===void 0&&(e=0),rt.stack([this,t],e)},n.prototype.unstack=function(t){return t===void 0&&(t=0),rt.unstack(this,t)},n.prototype.pad=function(t,e){return e===void 0&&(e=0),rt.pad(this,t,e)},n.prototype.batchNormalization=function(t,e,r,i,a){return r===void 0&&(r=.001),Vr("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(t,e,a,i,r)},n.prototype.batchNorm=function(t,e,r,i,a){return a===void 0&&(a=.001),this.throwIfDisposed(),rt.batchNorm(this,t,e,r,i,a)},n.prototype.all=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.all(this,t,e)},n.prototype.any=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.any(this,t,e)},n.prototype.logSumExp=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.logSumExp(this,t,e)},n.prototype.sum=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.sum(this,t,e)},n.prototype.prod=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.prod(this,t,e)},n.prototype.mean=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.mean(this,t,e)},n.prototype.min=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.min(this,t,e)},n.prototype.max=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),rt.max(this,t,e)},n.prototype.argMin=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),rt.argMin(this,t)},n.prototype.argMax=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),rt.argMax(this,t)},n.prototype.cast=function(t){return this.throwIfDisposed(),rt.cast(this,t)},n.prototype.add=function(t){return this.throwIfDisposed(),rt.add(this,t)},n.prototype.addStrict=function(t){return this.throwIfDisposed(),rt.addStrict(this,t)},n.prototype.atan2=function(t){return this.throwIfDisposed(),rt.atan2(this,t)},n.prototype.sub=function(t){return this.throwIfDisposed(),rt.sub(this,t)},n.prototype.subStrict=function(t){return this.throwIfDisposed(),rt.subStrict(this,t)},n.prototype.pow=function(t){return this.throwIfDisposed(),rt.pow(this,t)},n.prototype.powStrict=function(t){return this.throwIfDisposed(),rt.powStrict(this,t)},n.prototype.mul=function(t){return this.throwIfDisposed(),rt.mul(this,t)},n.prototype.mulStrict=function(t){return this.throwIfDisposed(),rt.mulStrict(this,t)},n.prototype.div=function(t){return this.throwIfDisposed(),rt.div(this,t)},n.prototype.divNoNan=function(t){return this.throwIfDisposed(),rt.divNoNan(this,t)},n.prototype.floorDiv=function(t){return this.throwIfDisposed(),rt.floorDiv(this,t)},n.prototype.divStrict=function(t){return this.throwIfDisposed(),rt.divStrict(this,t)},n.prototype.minimum=function(t){return this.throwIfDisposed(),rt.minimum(this,t)},n.prototype.minimumStrict=function(t){return this.throwIfDisposed(),rt.minimumStrict(this,t)},n.prototype.maximum=function(t){return this.throwIfDisposed(),rt.maximum(this,t)},n.prototype.maximumStrict=function(t){return this.throwIfDisposed(),rt.maximumStrict(this,t)},n.prototype.mod=function(t){return this.throwIfDisposed(),rt.mod(this,t)},n.prototype.modStrict=function(t){return this.throwIfDisposed(),rt.modStrict(this,t)},n.prototype.squaredDifferenceStrict=function(t){return this.throwIfDisposed(),rt.squaredDifferenceStrict(this,t)},n.prototype.transpose=function(t){return this.throwIfDisposed(),rt.transpose(this,t)},n.prototype.notEqual=function(t){return this.throwIfDisposed(),rt.notEqual(this,t)},n.prototype.notEqualStrict=function(t){return this.throwIfDisposed(),rt.notEqualStrict(this,t)},n.prototype.less=function(t){return this.throwIfDisposed(),rt.less(this,t)},n.prototype.lessStrict=function(t){return this.throwIfDisposed(),rt.lessStrict(this,t)},n.prototype.equal=function(t){return this.throwIfDisposed(),rt.equal(this,t)},n.prototype.equalStrict=function(t){return this.throwIfDisposed(),rt.equalStrict(this,t)},n.prototype.lessEqual=function(t){return this.throwIfDisposed(),rt.lessEqual(this,t)},n.prototype.lessEqualStrict=function(t){return this.throwIfDisposed(),rt.lessEqualStrict(this,t)},n.prototype.greater=function(t){return this.throwIfDisposed(),rt.greater(this,t)},n.prototype.greaterStrict=function(t){return this.throwIfDisposed(),rt.greaterStrict(this,t)},n.prototype.greaterEqual=function(t){return this.throwIfDisposed(),rt.greaterEqual(this,t)},n.prototype.greaterEqualStrict=function(t){return this.throwIfDisposed(),rt.greaterEqualStrict(this,t)},n.prototype.logicalAnd=function(t){return this.throwIfDisposed(),rt.logicalAnd(this,t)},n.prototype.logicalOr=function(t){return this.throwIfDisposed(),rt.logicalOr(this,t)},n.prototype.logicalNot=function(){return this.throwIfDisposed(),rt.logicalNot(this)},n.prototype.logicalXor=function(t){return this.throwIfDisposed(),rt.logicalXor(this,t)},n.prototype.where=function(t,e){return this.throwIfDisposed(),rt.where(t,this,e)},n.prototype.neg=function(){return this.throwIfDisposed(),rt.neg(this)},n.prototype.ceil=function(){return this.throwIfDisposed(),rt.ceil(this)},n.prototype.floor=function(){return this.throwIfDisposed(),rt.floor(this)},n.prototype.sign=function(){return this.throwIfDisposed(),rt.sign(this)},n.prototype.isNaN=function(){return this.throwIfDisposed(),rt.isNaN(this)},n.prototype.isInf=function(){return this.throwIfDisposed(),rt.isInf(this)},n.prototype.isFinite=function(){return this.throwIfDisposed(),rt.isFinite(this)},n.prototype.exp=function(){return this.throwIfDisposed(),rt.exp(this)},n.prototype.expm1=function(){return this.throwIfDisposed(),rt.expm1(this)},n.prototype.log=function(){return this.throwIfDisposed(),rt.log(this)},n.prototype.log1p=function(){return this.throwIfDisposed(),rt.log1p(this)},n.prototype.sqrt=function(){return this.throwIfDisposed(),rt.sqrt(this)},n.prototype.rsqrt=function(){return this.throwIfDisposed(),rt.rsqrt(this)},n.prototype.square=function(){return this.throwIfDisposed(),rt.square(this)},n.prototype.reciprocal=function(){return this.throwIfDisposed(),rt.reciprocal(this)},n.prototype.abs=function(){return this.throwIfDisposed(),rt.abs(this)},n.prototype.clipByValue=function(t,e){return this.throwIfDisposed(),rt.clipByValue(this,t,e)},n.prototype.relu=function(){return this.throwIfDisposed(),rt.relu(this)},n.prototype.relu6=function(){return this.throwIfDisposed(),rt.relu6(this)},n.prototype.elu=function(){return this.throwIfDisposed(),rt.elu(this)},n.prototype.selu=function(){return this.throwIfDisposed(),rt.selu(this)},n.prototype.leakyRelu=function(t){return t===void 0&&(t=.2),this.throwIfDisposed(),rt.leakyRelu(this,t)},n.prototype.prelu=function(t){return this.throwIfDisposed(),rt.prelu(this,t)},n.prototype.sigmoid=function(){return this.throwIfDisposed(),rt.sigmoid(this)},n.prototype.logSigmoid=function(){return this.throwIfDisposed(),rt.logSigmoid(this)},n.prototype.softplus=function(){return this.throwIfDisposed(),rt.softplus(this)},n.prototype.zerosLike=function(){return this.throwIfDisposed(),rt.zerosLike(this)},n.prototype.onesLike=function(){return this.throwIfDisposed(),rt.onesLike(this)},n.prototype.sin=function(){return this.throwIfDisposed(),rt.sin(this)},n.prototype.cos=function(){return this.throwIfDisposed(),rt.cos(this)},n.prototype.tan=function(){return this.throwIfDisposed(),rt.tan(this)},n.prototype.asin=function(){return this.throwIfDisposed(),rt.asin(this)},n.prototype.acos=function(){return this.throwIfDisposed(),rt.acos(this)},n.prototype.atan=function(){return this.throwIfDisposed(),rt.atan(this)},n.prototype.sinh=function(){return this.throwIfDisposed(),rt.sinh(this)},n.prototype.cosh=function(){return this.throwIfDisposed(),rt.cosh(this)},n.prototype.tanh=function(){return this.throwIfDisposed(),rt.tanh(this)},n.prototype.asinh=function(){return this.throwIfDisposed(),rt.asinh(this)},n.prototype.acosh=function(){return this.throwIfDisposed(),rt.acosh(this)},n.prototype.atanh=function(){return this.throwIfDisposed(),rt.atanh(this)},n.prototype.erf=function(){return this.throwIfDisposed(),rt.erf(this)},n.prototype.round=function(){return this.throwIfDisposed(),rt.round(this)},n.prototype.step=function(t){return t===void 0&&(t=0),this.throwIfDisposed(),rt.step(this,t)},n.prototype.softmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),rt.softmax(this,t)},n.prototype.logSoftmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),rt.logSoftmax(this,t)},n.prototype.resizeBilinear=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),rt.image.resizeBilinear(this,t,e)},n.prototype.resizeNearestNeighbor=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),rt.image.resizeNearestNeighbor(this,t,e)},n.prototype.conv1d=function(t,e,r,i,a,s){return i===void 0&&(i="NWC"),a===void 0&&(a=1),this.throwIfDisposed(),rt.conv1d(this,t,e,r,i,a,s)},n.prototype.conv2d=function(t,e,r,i,a,s){return i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]),this.throwIfDisposed(),rt.conv2d(this,t,e,r,i,a,s)},n.prototype.conv2dTranspose=function(t,e,r,i,a){return this.throwIfDisposed(),rt.conv2dTranspose(this,t,e,r,i,a)},n.prototype.depthwiseConv2D=function(t,e,r,i,a,s){return i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]),this.throwIfDisposed(),rt.depthwiseConv2d(this,t,e,r,i,a,s)},n.prototype.separableConv2d=function(t,e,r,i,a,s){return a===void 0&&(a=[1,1]),s===void 0&&(s="NHWC"),this.throwIfDisposed(),rt.separableConv2d(this,t,e,r,i,a,s)},n.prototype.avgPool=function(t,e,r,i){return this.throwIfDisposed(),rt.avgPool(this,t,e,r,i)},n.prototype.maxPool=function(t,e,r,i){return this.throwIfDisposed(),rt.maxPool(this,t,e,r,i)},n.prototype.localResponseNormalization=function(t,e,r,i){return t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5),rt.localResponseNormalization(this,t,e,r,i)},n.prototype.pool=function(t,e,r,i,a){return this.throwIfDisposed(),rt.pool(this,t,e,r,i,a)},n.prototype.variable=function(t,e,r){return t===void 0&&(t=!0),this.throwIfDisposed(),kr().makeVariable(this,t,e,r)},n.prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),rt.unsortedSegmentSum(this,t,e)},n.prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),rt.batchToSpaceND(this,t,e)},n.prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),rt.spaceToBatchND(this,t,e)},n.prototype.topk=function(t,e){return t===void 0&&(t=1),e===void 0&&(e=!0),this.throwIfDisposed(),rt.topk(this,t,e)},n.prototype.stridedSlice=function(t,e,r,i,a,s,u,l){return i===void 0&&(i=0),a===void 0&&(a=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),this.throwIfDisposed(),rt.stridedSlice(this,t,e,r,i,a,s,u,l)},n.prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),rt.depthToSpace(this,t,e)},n.prototype.fft=function(){return this.throwIfDisposed(),rt.spectral.fft(this)},n.prototype.ifft=function(){return this.throwIfDisposed(),rt.spectral.ifft(this)},n.prototype.rfft=function(){return this.throwIfDisposed(),rt.spectral.rfft(this)},n.prototype.irfft=function(){return this.throwIfDisposed(),rt.spectral.irfft(this)},n}();Object.defineProperty(Wt,Symbol.hasInstance,{value:function(n){return!!n&&n.dataId!=null&&n.shape!=null&&n.dtype!=null}});var dn,kn,_r,ur,cn,br=function(n){function t(e,r,i,a){var s=n.call(this,e.shape,e.dtype,e.dataId,a)||this;return s.trainable=r,s.name=i,s}return I(t,n),t.prototype.assign=function(e){if(e.dtype!==this.dtype)throw new Error("dtype of the new value ("+e.dtype+") and previous value ("+this.dtype+") must match");if(!ue(e.shape,this.shape))throw new Error("shape of the new value ("+e.shape+") and previous value ("+this.shape+") must match");kr().disposeTensor(this),this.dataId=e.dataId,kr().incRef(this,null)},t.prototype.dispose=function(){kr().disposeVariable(this),this.isDisposedInternal=!0},t}(Wt);Object.defineProperty(br,Symbol.hasInstance,{value:function(n){return n instanceof Wt&&n.assign!=null&&n.assign instanceof Function}}),function(n){n.R0="R0",n.R1="R1",n.R2="R2",n.R3="R3",n.R4="R4",n.R5="R5",n.R6="R6"}(dn||(dn={})),function(n){n.float32="float32",n.int32="int32",n.bool="int32",n.complex64="complex64"}(kn||(kn={})),function(n){n.float32="float32",n.int32="int32",n.bool="bool",n.complex64="complex64"}(_r||(_r={})),function(n){n.float32="float32",n.int32="float32",n.bool="float32",n.complex64="complex64"}(ur||(ur={})),function(n){n.float32="complex64",n.int32="complex64",n.bool="complex64",n.complex64="complex64"}(cn||(cn={}));var or={float32:ur,int32:kn,bool:_r,complex64:cn};function Vt(n,t){if(n==="string"||t==="string"){if(n==="string"&&t==="string")return"string";throw new Error("Can not upcast "+n+" with "+t)}return or[n][t]}function mn(n){return Vt(n,"int32")}function sr(n,t){if(n.dtype===t.dtype)return[n,t];var e=Vt(n.dtype,t.dtype);return[n.cast(e),t.cast(e)]}function Sa(n,t){Z(n.dtype===t.dtype,function(){return"The dtypes of the first("+n.dtype+") and second("+t.dtype+") input must match"})}function Qi(n){var t=[];return function e(r,i,a){if(r!=null){if(r instanceof Wt)return void i.push(r);if(s=r,!(!Array.isArray(s)&&typeof s!="object")){var s,u=r;for(var l in u){var d=u[l];a.has(d)||(a.add(d),e(d,i,a))}}}}(n,t,new Set),t}var Hi,Ia=Object.freeze({makeTypesMatch:sr,assertTypesMatch:Sa,isTensorInList:function(n,t){return t.some(function(e){return e.id===n.id})},getTensorsInContainer:Qi}),ci=function(){function n(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return n.prototype.dispose=function(){for(var t in this.registeredVariables)this.registeredVariables[t].dispose()},n}(),$n=function(){function n(t){this.ENV=t,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new ci}return n.prototype.ready=function(){return C(this,void 0,void 0,function(){var t,e,r;return E(this,function(i){switch(i.label){case 0:if(this.pendingBackendInit!=null)return[2,this.pendingBackendInit.then(function(){})];if(this.backendInstance!=null)return[2];t=this.getSortedBackends(),e=0,i.label=1;case 1:return e<t.length?(r=t[e],[4,this.initializeBackend(r).success]):[3,5];case 2:return i.sent()?[4,this.setBackend(r)]:[3,4];case 3:return i.sent(),[2];case 4:return e++,[3,1];case 5:throw new Error("Could not initialize any backends, all backend initializations failed.")}})})},Object.defineProperty(n.prototype,"backend",{get:function(){if(this.pendingBackendInit!=null)throw new Error("Backend '"+this.backendName+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");if(this.backendInstance==null){var t=this.initializeBackendsAndReturnBest(),e=t.name;if(t.asyncInit)throw new Error("The highest priority backend '"+e+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");this.setBackend(e)}return this.backendInstance},enumerable:!0,configurable:!0}),n.prototype.backendNames=function(){return Object.keys(this.registryFactory)},n.prototype.findBackend=function(t){return!(t in this.registry)&&(!(t in this.registryFactory)||this.initializeBackend(t).asyncInit)?null:this.registry[t]},n.prototype.findBackendFactory=function(t){return t in this.registryFactory?this.registryFactory[t].factory:null},n.prototype.registerBackend=function(t,e,r){return r===void 0&&(r=1),t in this.registryFactory?(console.warn(t+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[t]={factory:e,priority:r},!0)},n.prototype.setBackend=function(t){return C(this,void 0,void 0,function(){var e,r,i;return E(this,function(a){switch(a.label){case 0:if(this.registryFactory[t]==null)throw new Error("Backend name '"+t+"' not found in registry");return this.backendName=t,this.registry[t]!=null?[3,4]:(this.backendInstance=null,e=this.initializeBackend(t),r=e.success,e.asyncInit?[4,r]:[3,2]);case 1:return i=a.sent(),[3,3];case 2:i=r,a.label=3;case 3:if(!i)return[2,!1];a.label=4;case 4:return this.backendInstance=this.registry[t],this.setupRegisteredKernels(),this.profiler=new Gt(this.backendInstance),[2,!0]}})})},n.prototype.setupRegisteredKernels=function(){var t=this;$(this.backendName).forEach(function(e){e.setupFunc!=null&&e.setupFunc(t.backendInstance)})},n.prototype.disposeRegisteredKernels=function(t){var e=this;$(t).forEach(function(r){r.disposeFunc!=null&&r.disposeFunc(e.registry[t])})},n.prototype.initializeBackend=function(t){var e=this,r=this.registryFactory[t];if(r==null)throw new Error("Cannot initialize backend "+t+", no registration found.");try{var i=r.factory();if(Promise.resolve(i)===i){var a=++this.pendingBackendInitId,s=i.then(function(u){return!(a<e.pendingBackendInitId)&&(e.registry[t]=u,e.pendingBackendInit=null,!0)}).catch(function(u){return!(a<e.pendingBackendInitId)&&(e.pendingBackendInit=null,console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),!1)});return this.pendingBackendInit=s,{success:s,asyncInit:!0}}return this.registry[t]=i,{success:!0,asyncInit:!1}}catch(u){return console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),{success:!1,asyncInit:!1}}},n.prototype.removeBackend=function(t){if(!(t in this.registryFactory))throw new Error(t+" backend not found in registry");this.backendName===t&&this.pendingBackendInit!=null&&this.pendingBackendInitId++,t in this.registry&&(this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t]),delete this.registryFactory[t],this.backendName===t&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)},n.prototype.getSortedBackends=function(){var t=this;if(Object.keys(this.registryFactory).length===0)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort(function(e,r){return t.registryFactory[r].priority-t.registryFactory[e].priority})},n.prototype.initializeBackendsAndReturnBest=function(){for(var t=this.getSortedBackends(),e=0;e<t.length;e++){var r=t[e],i=this.initializeBackend(r),a=i.success,s=i.asyncInit;if(s||a)return{name:r,asyncInit:s}}throw new Error("Could not initialize any backends, all backend initializations failed.")},n.prototype.moveData=function(t,e){var r=this.state.tensorInfo.get(e),i=r.backend,a=this.readSync(e);i.disposeData(e),r.backend=t,t.move(e,a,r.shape,r.dtype),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++},n.prototype.tidy=function(t,e){var r,i=this,a=null;if(e==null){if(typeof t!="function")throw new Error("Please provide a function to tidy()");e=t}else{if(typeof t!="string"&&!(t instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if(typeof e!="function")throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");a=t}return this.scopedRun(function(){return i.startScope(a)},function(){return i.endScope(r)},function(){return(r=e())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),r})},n.prototype.scopedRun=function(t,e,r){t();try{var i=r();return e(),i}catch(a){throw e(),a}},n.prototype.nextTensorId=function(){return n.nextTensorId++},n.prototype.nextVariableId=function(){return n.nextVariableId++},n.prototype.clone=function(t){var e=this.makeTensorFromDataId(t.dataId,t.shape,t.dtype),r={x:t};return this.addTapeNode(this.state.activeScope.name,r,[e],function(i){return{x:function(){return i.toFloat()}}},[]),e},n.prototype.runKernel=function(t,e,r,i,a){return this.runKernelFunc(null,e,null,t,r,i,a)},n.prototype.shouldCheckForMemLeaks=function(){return this.ENV.getBool("IS_TEST")},n.prototype.checkKernelForMemLeak=function(t,e,r){var i=this.backend.numDataIds(),a=0;r.forEach(function(l){a+=l.dtype==="complex64"?3:1});var s=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],u=i-e-a-s;if(u>0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+u+" data ids) after running '"+t+"'")},n.prototype.runKernelFunc=function(t,e,r,i,a,s,u){var l,d=this;s===void 0&&(s=[]),u===void 0&&(u=[]);var A=[],T=this.isTapeOn();i==null&&(i=this.state.activeScope!=null?this.state.activeScope.name:"");var D,U=function(we){T&&(A=we.map(function(Ce){return d.keep(d.clone(Ce))}))},te=this.state.numBytes,oe=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var ae,se=j(i,this.backendName);return D=se!=null?function(){var we=d.backend.numDataIds();ae=se.kernelFunc({inputs:e,attrs:a,backend:d.backend});var Ce=Array.isArray(ae)?ae:[ae];d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,we,Ce);var me=Ce.map(function(Re){var Ue=Re.dataId,We=Re.shape,Ne=Re.dtype;return d.makeTensorFromDataId(Ue,We,Ne)}),Se=me.filter(function(Re,Ue){return u[Ue]});return U((s||[]).slice().concat(Se)),me}:function(){var we=d.backend.numDataIds();ae=d.tidy(function(){return t(d.backend,U)});var Ce=Array.isArray(ae)?ae:[ae];return d.shouldCheckForMemLeaks()&&d.checkKernelForMemLeak(i,we,Ce),Ce},this.scopedRun(function(){return d.state.kernelDepth++},function(){return d.state.kernelDepth--},function(){l=d.ENV.getBool("DEBUG")?d.profiler.profileKernel(i,e,function(){return D()}):D()}),T&&this.addTapeNode(i,e,l,r,A),this.state.profiling&&this.state.activeProfile.kernels.push({name:i,bytesAdded:this.state.numBytes-te,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-oe,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(e).map(function(we){return e[we].shape}),outputShapes:l.map(function(we){return we.shape})}),Array.isArray(ae)?l:l[0]},n.prototype.makeTensor=function(t,e,r,i){if(t==null)throw new Error("Values passed to engine.makeTensor() are null");r=r||"float32",i=i||this.backend;var a=t;r==="string"&&Ie(t[0])&&(a=t.map(function(A){return ot(A)}));var s=i.write(a,e,r),u=new Wt(e,r,s,this.nextTensorId());if(this.incRef(u,i),r==="string"){var l=this.state.tensorInfo.get(s),d=de(a);this.state.numBytes+=d-l.bytes,l.bytes=d}return u},n.prototype.makeTensorFromDataId=function(t,e,r,i){var a=new Wt(e,r=r||"float32",t,this.nextTensorId());return this.incRef(a,i),a},n.prototype.makeVariable=function(t,e,r,i){e===void 0&&(e=!0),r=r||this.nextVariableId().toString(),i!=null&&i!==t.dtype&&(t=t.asType(i));var a=new br(t,e,r,this.nextTensorId());if(this.state.registeredVariables[a.name]!=null)throw new Error("Variable with name "+a.name+" was already registered");return this.state.registeredVariables[a.name]=a,this.incRef(a,this.backend),a},n.prototype.incRef=function(t,e){var r=this.state.tensorInfo.has(t.dataId)?this.state.tensorInfo.get(t.dataId).refCount:0;if(this.state.numTensors++,t.dtype==="string"&&this.state.numStringTensors++,r===0){this.state.numDataBuffers++;var i=0;t.dtype!=="complex64"&&t.dtype!=="string"&&(i=t.size*q(t.dtype)),this.state.tensorInfo.set(t.dataId,{backend:e||this.backend,dtype:t.dtype,shape:t.shape,bytes:i,refCount:0}),this.state.numBytes+=i}this.state.tensorInfo.get(t.dataId).refCount++,t instanceof br||this.track(t)},n.prototype.disposeTensor=function(t){if(this.state.tensorInfo.has(t.dataId)){this.state.numTensors--,t.dtype==="string"&&this.state.numStringTensors--;var e=this.state.tensorInfo.get(t.dataId);e.refCount<=1?(t.dtype!=="complex64"&&(this.state.numBytes-=e.bytes),this.state.numDataBuffers--,e.backend.disposeData(t.dataId),this.state.tensorInfo.delete(t.dataId)):this.state.tensorInfo.get(t.dataId).refCount--}},n.prototype.disposeVariables=function(){for(var t in this.state.registeredVariables){var e=this.state.registeredVariables[t];this.disposeVariable(e)}},n.prototype.disposeVariable=function(t){this.disposeTensor(t),this.state.registeredVariables[t.name]!=null&&delete this.state.registeredVariables[t.name]},n.prototype.memory=function(){var t=this.backend.memory();return t.numTensors=this.state.numTensors,t.numDataBuffers=this.state.numDataBuffers,t.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(t.unreliable=!0,t.reasons==null&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t},n.prototype.profile=function(t){return C(this,void 0,void 0,function(){var e,r;return E(this,function(i){return this.state.profiling=!0,e=this.state.numBytes,r=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=t(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map(function(a){return a.totalBytesSnapshot})),this.state.activeProfile.newBytes=this.state.numBytes-e,this.state.activeProfile.newTensors=this.state.numTensors-r,[2,this.state.activeProfile]})})},n.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&this.state.kernelDepth===0},n.prototype.addTapeNode=function(t,e,r,i,a){var s=this,u={id:this.state.nextTapeNodeId++,kernelName:t,inputs:e,outputs:r,saved:a},l=N(t);l!=null&&(i=l.gradFunc),i!=null&&(u.gradient=function(d){return d=d.map(function(A,T){if(A==null){var D=r[T],U=Xe(D.size,D.dtype);return s.makeTensor(U,D.shape,D.dtype)}return A}),i(d.length>1?d:d[0],a)}),this.state.activeTape.push(u)},n.prototype.keep=function(t){return t.kept=!0,t},n.prototype.startTape=function(){this.state.gradientDepth===0&&(this.state.activeTape=[]),this.state.gradientDepth++},n.prototype.endTape=function(){this.state.gradientDepth--},n.prototype.startScope=function(t){var e={track:[],name:"unnamed scope",id:this.state.nextScopeId++};t&&(e.name=t),this.state.scopeStack.push(e),this.state.activeScope=e},n.prototype.endScope=function(t){for(var e=this,r=Qi(t),i=new Set(r.map(function(l){return l.id})),a=0;a<this.state.activeScope.track.length;a++){var s=this.state.activeScope.track[a];s.kept||i.has(s.id)||s.dispose()}var u=this.state.scopeStack.pop();this.state.activeScope=this.state.scopeStack.length===0?null:this.state.scopeStack[this.state.scopeStack.length-1],r.forEach(function(l){l.kept||l.scopeId!==u.id||e.track(l)})},n.prototype.gradients=function(t,e,r,i){var a=this;if(i===void 0&&(i=!1),Z(e.length>0,function(){return"gradients() received an empty list of xs."}),r!=null&&r.dtype!=="float32")throw new Error("dy must have 'float32' dtype, but has '"+r.dtype+"'");var s=this.scopedRun(function(){return a.startTape()},function(){return a.endTape()},function(){return a.tidy("forward",t)});Z(s instanceof Wt,function(){return"The result y returned by f() must be a tensor."});var u=function(l,d,A){for(var T={},D={},U=0;U<d.length;U++)T[d[U].id]=!0;for(U=0;U<l.length;U++){var te=(Re=l[U]).inputs;for(var oe in te){for(var ae=te[oe],se=!1,we=0;we<d.length;we++)if(T[ae.id]){Re.outputs.forEach(function(Le){return T[Le.id]=!0}),se=!0,D[Re.id]=!0;break}if(se)break}}var Ce={};Ce[A.id]=!0;var me={};for(U=l.length-1;U>=0;U--)for(te=(Re=l[U]).inputs,we=0;we<Re.outputs.length;we++)if(Ce[Re.outputs[we].id]){for(var oe in te)Ce[te[oe].id]=!0,me[Re.id]=!0;break}var Se=[];for(U=0;U<l.length;U++){var Re;if(D[(Re=l[U]).id]&&me[Re.id]){var Ue={};for(var oe in Re.inputs){var We=Re.inputs[oe];T[We.id]&&(Ue[oe]=We)}var Ne=Object.assign({},Re);Ne.inputs=Ue,Ne.outputs=Re.outputs,Se.push(Ne)}}return Se}(this.state.activeTape,e,s);if(!i&&u.length===0&&e.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var l,d,A={};A[s.id]=r==null?(l=s.shape,d=Ve(le(l),"float32"),Ge.makeTensor(d,l,"float32")):r,function(D,U,te){for(var oe=function(se){var we=U[se],Ce=[];if(we.outputs.forEach(function(Ue){var We=D[Ue.id];We!=null?Ce.push(We):Ce.push(null)}),we.gradient==null)throw new Error("Cannot compute gradient: gradient function not found for "+we.kernelName+".");var me=we.gradient(Ce),Se=function(Ue){if(!(Ue in me))throw new Error("Cannot backprop through input "+Ue+". Available gradients found: "+Object.keys(me)+".");var We=te(function(){return me[Ue]()});if(We.dtype!=="float32")throw new Error("Error in gradient for op "+we.kernelName+". The gradient of input "+Ue+" must have 'float32' dtype, but has '"+We.dtype+"'");var Ne=we.inputs[Ue];if(!ue(We.shape,Ne.shape))throw new Error("Error in gradient for op "+we.kernelName+". The gradient of input '"+Ue+"' has shape '"+We.shape+"', which does not match the shape of the input '"+Ne.shape+"'");if(D[Ne.id]==null)D[Ne.id]=We;else{var Le=D[Ne.id];D[Ne.id]=Le.add(We),Le.dispose()}};for(var Re in we.inputs)Se(Re)},ae=U.length-1;ae>=0;ae--)oe(ae)}(A,u,function(D){return a.tidy(D)});var T=e.map(function(D){return A[D.id]});return a.state.gradientDepth===0&&(a.state.activeTape.forEach(function(D){for(var U=0,te=D.saved;U<te.length;U++)te[U].dispose()}),a.state.activeTape=null),{value:s,grads:T}})},n.prototype.customGrad=function(t){var e=this;return Z(dt(t),function(){return"The f passed in customGrad(f) must be a function."}),function(){for(var r,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];Z(i.every(function(u){return u instanceof Wt}),function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"});var s={};return i.forEach(function(u,l){s[l]=u}),e.runKernelFunc(function(u,l){return Z((r=t.apply(void 0,i.concat([l]))).value instanceof Wt,function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"}),Z(dt(r.gradFunc),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."}),r.value},s,function(u,l){var d=r.gradFunc(u,l),A=Array.isArray(d)?d:[d];Z(A.length===i.length,function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."}),Z(A.every(function(D){return D instanceof Wt}),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."});var T={};return A.forEach(function(D,U){T[U]=function(){return D}}),T})}},n.prototype.readSync=function(t){return this.state.tensorInfo.get(t).backend.readSync(t)},n.prototype.read=function(t){return this.state.tensorInfo.get(t).backend.read(t)},n.prototype.time=function(t){return C(this,void 0,void 0,function(){var e,r;return E(this,function(i){switch(i.label){case 0:return e=Ye(),[4,this.backend.time(t)];case 1:return(r=i.sent()).wallMs=Ye()-e,[2,r]}})})},n.prototype.track=function(t){return this.state.activeScope!=null&&(t.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(t)),t},Object.defineProperty(n.prototype,"registeredVariables",{get:function(){return this.state.registeredVariables},enumerable:!0,configurable:!0}),n.prototype.reset=function(){for(var t in this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new ci,this.registry)this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null},n.nextTensorId=0,n.nextVariableId=0,n}(),Ge=function(){var n=function(){if(Hi==null){var e=void 0;if(typeof window!="undefined")e=window;else if(typeof je.g!="undefined")e=je.g;else if(typeof y!="undefined")e=y;else{if(typeof self=="undefined")throw new Error("Could not find a global object");y=self}Hi=e}return Hi}();if(n._tfengine==null){var t=new k(n);n._tfengine=new $n(t)}return function(e){K=e}(n._tfengine.ENV),kr=function(){return n._tfengine},n._tfengine}();function Or(){return typeof window!="undefined"&&window.document!=null||typeof WorkerGlobalScope!="undefined"}var pn=P();pn.registerFlag("DEBUG",function(){return!1},function(n){n&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}),pn.registerFlag("IS_BROWSER",function(){return Or()}),pn.registerFlag("IS_NODE",function(){return typeof y!="undefined"&&y.versions!==void 0&&y.versions.node!==void 0}),pn.registerFlag("IS_CHROME",function(){return typeof navigator!="undefined"&&navigator!=null&&navigator.userAgent!=null&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}),pn.registerFlag("PROD",function(){return!1}),pn.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",function(){return pn.getBool("DEBUG")}),pn.registerFlag("DEPRECATION_WARNINGS_ENABLED",function(){return!0}),pn.registerFlag("IS_TEST",function(){return!1});var qn,Cn,Yr,Di={},Ta={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function Eo(n,t){Di[n]=t}function gn(n){n in Di||(Di[n]=function(e){if(e!==1&&e!==2)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var r=function(i){if(typeof OffscreenCanvas!="undefined"&&i===2)return new OffscreenCanvas(300,150);if(typeof document!="undefined")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return r.addEventListener("webglcontextlost",function(i){i.preventDefault(),delete Di[e]},!1),e===1?r.getContext("webgl",Ta)||r.getContext("experimental-webgl",Ta):r.getContext("webgl2",Ta)}(n));var t=Di[n];return t.isContextLost()?(delete Di[n],gn(n)):(t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.disable(t.BLEND),t.disable(t.DITHER),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SAMPLE_COVERAGE),t.enable(t.SCISSOR_TEST),t.enable(t.CULL_FACE),t.cullFace(t.BACK),Di[n])}function Ra(n,t){return[t,n]}function ji(n){var t=le(n);return Oe(Math.ceil(t/4))}function wi(n,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(n/2))]}function Qr(n,t){var e,r,i,a,s,u,l,d,A,T=n;return P().getNumber("WEBGL_VERSION")===2?(e=T.R32F,r=T.R16F,i=T.RGBA16F,a=T.RGBA32F,s=T.RED,u=4,l=1,d=T.HALF_FLOAT,A=T.FLOAT):(e=n.RGBA,r=n.RGBA,i=n.RGBA,a=T.RGBA,s=n.RGBA,u=4,l=4,d=t!=null?t.HALF_FLOAT_OES:null,A=n.FLOAT),{internalFormatFloat:e,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:a,textureFormatFloat:s,downloadTextureFormat:n.RGBA,downloadUnpackNumChannels:u,defaultNumChannels:l,textureTypeHalfFloat:d,textureTypeFloat:A}}function bt(n,t,e){var r=e();return t&&function(i){var a=i.getError();if(a!==i.NO_ERROR)throw new Error("WebGL Error: "+Bs(i,a))}(n),r}(function(n){n[n.DENSE=0]="DENSE",n[n.SHARED_BATCH=1]="SHARED_BATCH"})(qn||(qn={})),function(n){n[n.RENDER=0]="RENDER",n[n.UPLOAD=1]="UPLOAD",n[n.PIXELS=2]="PIXELS",n[n.DOWNLOAD=3]="DOWNLOAD"}(Cn||(Cn={})),function(n){n[n.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",n[n.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",n[n.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",n[n.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",n[n.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(Yr||(Yr={}));var yn=596e-10,Gi=65504;function Du(n){return!!(P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||n===0||yn<Math.abs(n)&&Math.abs(n)<Gi)}function Bs(n,t){switch(t){case n.NO_ERROR:return"NO_ERROR";case n.INVALID_ENUM:return"INVALID_ENUM";case n.INVALID_VALUE:return"INVALID_VALUE";case n.INVALID_OPERATION:return"INVALID_OPERATION";case n.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case n.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case n.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}function Za(n,t,e){return Ai(n,t,function(){return n.getExtension(e)},'Extension "'+e+'" not supported on this browser.')}function _s(n,t,e){var r=Ai(n,t,function(){return n.createShader(n.VERTEX_SHADER)},"Unable to create vertex WebGLShader.");if(bt(n,t,function(){return n.shaderSource(r,e)}),bt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw console.log(n.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function Ms(n,t,e){var r=Ai(n,t,function(){return n.createShader(n.FRAGMENT_SHADER)},"Unable to create fragment WebGLShader.");if(bt(n,t,function(){return n.shaderSource(r,e)}),bt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw function(i,a){var s=ju.exec(a);if(s==null)return console.log("Couldn't parse line number in error: "+a),void console.log(i);for(var u=+s[1],l=i.split(`
|
|
`),d=l.length.toString().length+2,A=l.map(function(ae,se){return De((se+1).toString(),d)+ae}),T=0,D=0;D<A.length;D++)T=Math.max(A[D].length,T);var U=A.slice(0,u-1),te=A.slice(u-1,u),oe=A.slice(u);console.log(U.join(`
|
|
`)),console.log(a.split(`
|
|
`)[0]),console.log("%c "+De(te[0],T),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(oe.join(`
|
|
`))}(e,n.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var Co,So,ju=/ERROR: [0-9]+:([0-9]+):/g;function Ns(n,t){return Ai(n,t,function(){return n.createProgram()},"Unable to create WebGLProgram.")}function Fs(n,t,e){if(bt(n,t,function(){return n.linkProgram(e)}),n.getProgramParameter(e,n.LINK_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Failed to link vertex and fragment shaders.")}function Io(n,t,e){if(bt(n,t,function(){return n.validateProgram(e)}),n.getProgramParameter(e,n.VALIDATE_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Shader program validation failed.")}function as(n,t,e){var r=Ai(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return bt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),bt(n,t,function(){return n.bufferData(n.ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function os(n,t,e){var r=Ai(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return bt(n,t,function(){return n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r)}),bt(n,t,function(){return n.bufferData(n.ELEMENT_ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function Ls(n,t){return Ai(n,t,function(){return n.createTexture()},"Unable to create WebGLTexture.")}function Us(n,t){var e=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(n<=0||t<=0){var r="["+n+"x"+t+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(n>e||t>e)throw r="["+n+"x"+t+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU "+("["+e+"x"+e+"]")+".")}function Ws(n,t){return Ai(n,t,function(){return n.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function ss(n,t,e,r,i,a,s,u){var l=n.getAttribLocation(e,r);return l!==-1&&(bt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,i)}),bt(n,t,function(){return n.vertexAttribPointer(l,a,n.FLOAT,!1,s,u)}),bt(n,t,function(){return n.enableVertexAttribArray(l)}),!0)}function us(n,t,e,r){ua(n,r),bt(n,t,function(){return n.activeTexture(n.TEXTURE0+r)}),bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)})}function ka(n,t,e,r){return Ai(n,t,function(){return n.getUniformLocation(e,r)},'uniform "'+r+'" not present in program.')}function To(n,t,e){return n.getUniformLocation(t,e)}function Oa(n,t,e,r,i,a){bt(n,t,function(){return us(n,t,r,a)}),bt(n,t,function(){return n.uniform1i(i,a)})}function Xi(n,t,e,r){bt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,r)}),bt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0)})}function Ro(n,t,e){bt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,e)}),bt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,null,0)})}function Da(n){var t=n.checkFramebufferStatus(n.FRAMEBUFFER);if(t!==n.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+ls(n,t))}function ls(n,t){switch(t){case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}function Ai(n,t,e,r){var i=bt(n,t,function(){return e()});if(i==null)throw new Error(r);return i}function ua(n,t){var e=n.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+n.TEXTURE0;if(r<n.TEXTURE0||r>e)throw new Error("textureUnit must be in "+("[gl.TEXTURE0, gl.TEXTURE"+e+"]")+".")}function ei(n,t){return t===void 0&&(t=2),le(n.slice(0,n.length-t))}function Ja(n){if(n.length===0)throw Error("Cannot get rows and columns of an empty shape array.");return[n.length>1?n[n.length-2]:1,n[n.length-1]]}function ko(n){var t=[1,1,1];return n.length===0||n.length===1&&n[0]===1||(t=[ei(n)].concat(Ja(n))),t}function zs(n,t){var e;t===void 0&&(t=!1);var r=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(r*=2,(n=n.map(function(d,A){return A>=n.length-2?ie(n[A]):n[A]})).length===1&&(n=[2,n[0]])),n.length!==2){var i=Y(n);n=i.newShape}var a=le(n);if(n.length<=1&&a<=r)return[1,a];if(n.length===2&&n[0]<=r&&n[1]<=r)return n;if(n.length===3&&n[0]*n[1]<=r&&n[2]<=r)return[n[0]*n[1],n[2]];if(n.length===3&&n[0]<=r&&n[1]*n[2]<=r)return[n[0],n[1]*n[2]];if(n.length===4&&n[0]*n[1]*n[2]<=r&&n[3]<=r)return[n[0]*n[1]*n[2],n[3]];if(n.length===4&&n[0]<=r&&n[1]*n[2]*n[3]<=r)return[n[0],n[1]*n[2]*n[3]];if(t){var s=ei(n),u=2,l=2;return n.length&&(u=(e=Ja(n))[0],l=e[1]),Oe(a=s*(u/2)*(l/2)).map(function(d){return 2*d})}return Oe(a)}function Oo(n){return n%2==0}function ja(n,t){if(ue(n=n.slice(-2),t=t.slice(-2))||!n.length||!t.length||n[0]===0||n[1]===0||t[0]===0||t[1]===0)return!0;if(n.length!==t.length){var e=n.slice(-1)[0],r=t.slice(-1)[0];if(e===r||Oo(e)&&Oo(r)&&(n[0]===1||t[0]===1))return!0}return n[1]===t[1]&&Oo(n[0])&&Oo(t[0])}function Vs(n){if(Co==null){var t=gn(n);Co=t.getParameter(t.MAX_TEXTURE_SIZE)}return Co}function Do(n){if(So==null){var t=gn(n);So=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,So)}function Qs(n){if(n===0)return 0;var t=gn(n);return Hn(t,"EXT_disjoint_timer_query_webgl2")&&n===2?2:Hn(t,"EXT_disjoint_timer_query")?1:0}function Hn(n,t){return n.getExtension(t)!=null}function cs(n){try{if(gn(n)!=null)return!0}catch(t){return!1}return!1}function Hs(n){if(n===0)return!1;var t=gn(n);if(n===1){if(!Hn(t,"OES_texture_float"))return!1}else if(!Hn(t,"EXT_color_buffer_float"))return!1;return jo(t)}function Gs(n){if(n===0)return!1;var t=gn(n);if(n!==1){if(Hn(t,"EXT_color_buffer_float"))return jo(t);if(Hn(t,"EXT_color_buffer_half_float")){var e=t.getExtension("EXT_color_buffer_half_float");return function(r,i){var a=Qr(r,i),s=r.createTexture();r.bindTexture(r.TEXTURE_2D,s),r.texImage2D(r.TEXTURE_2D,0,a.internalFormatHalfFloat,1,1,0,a.textureFormatFloat,a.textureTypeHalfFloat,null);var u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,s,0);var l=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;return r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteTexture(s),r.deleteFramebuffer(u),l}(t,e)}return!1}return!!Hn(t,"OES_texture_float")&&!!Hn(t,"WEBGL_color_buffer_float")&&jo(t)}function jo(n){var t=Qr(n),e=n.createTexture();n.bindTexture(n.TEXTURE_2D,e),n.texImage2D(n.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);var r=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,r),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);var i=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE;return n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteTexture(e),n.deleteFramebuffer(r),i}function Po(n){return n===2&&gn(n).fenceSync!=null}var Pu=Object.freeze({callAndCheck:bt,canBeRepresented:Du,getWebGLErrorMessage:Bs,getExtensionOrThrow:Za,createVertexShader:_s,createFragmentShader:Ms,createProgram:Ns,linkProgram:Fs,validateProgram:Io,createStaticVertexBuffer:as,createStaticIndexBuffer:os,getNumChannels:function(){return P().getNumber("WEBGL_VERSION")===2?1:4},createTexture:Ls,validateTextureSize:Us,createFramebuffer:Ws,bindVertexBufferToProgramAttribute:ss,bindTextureUnit:us,unbindTextureUnit:function(n,t,e){ua(n,e),bt(n,t,function(){return n.activeTexture(n.TEXTURE0+e)}),bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:ka,getProgramUniformLocation:To,bindTextureToProgramUniformSampler:Oa,bindCanvasToFramebuffer:function(n,t){bt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,null)}),bt(n,t,function(){return n.viewport(0,0,n.canvas.width,n.canvas.height)}),bt(n,t,function(){return n.scissor(0,0,n.canvas.width,n.canvas.height)})},bindColorTextureToFramebuffer:Xi,unbindColorTextureFromFramebuffer:Ro,validateFramebuffer:Da,getFramebufferErrorMessage:ls,getBatchDim:ei,getRowsCols:Ja,getShapeAs3D:ko,getTextureShapeFromLogicalShape:zs,isReshapeFree:ja,getWebGLMaxTextureSize:Vs,resetMaxTextureSize:function(){Co=null},resetMaxTexturesInShader:function(){So=null},getMaxTexturesInShader:Do,getWebGLDisjointQueryTimerVersion:Qs,hasExtension:Hn,isWebGLVersionEnabled:cs,isCapableOfRenderingToFloatTexture:Hs,isDownloadFloatTextureEnabled:Gs,isWebGLFenceEnabled:Po}),_t=P();function vc(){P().set("PROD",!0)}function mc(){P().set("DEBUG",!0)}function gc(){P().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function Xs(n){P().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(n+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function xe(){Ge.disposeVariables()}function Pe(){return Ge}function Te(){return Ge.memory()}function Ke(n){return Ge.profile(n)}function qe(n,t){return Ge.tidy(n,t)}function gt(n){Qi(n).forEach(function(t){return t.dispose()})}function xt(n){return Ge.keep(n)}function Rt(n){return Ge.time(n)}function kt(n){return Ge.setBackend(n)}function Kt(){return Ge.ready()}function Sr(){return Ge.backendName}function fr(n){Ge.removeBackend(n)}function Ar(n){return Ge.findBackend(n)}function Qt(n){return Ge.findBackendFactory(n)}function lr(n,t,e){return e===void 0&&(e=1),Ge.registerBackend(n,t,e)}function sn(){return Ge.backend}function Mr(n,t){P().setPlatform(n,t)}function $r(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];P().getBool("IS_TEST")||console.warn.apply(console,n)}function xr(n,t){var e=n;if(L(n))return t==="string"?[]:[n.length];if(!Array.isArray(n))return[];for(var r=[];Array.isArray(e)||L(e)&&t!=="string";)r.push(e.length),e=e[0];return Array.isArray(n)&&P().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function i(a,s,u){if(u=u||[],!Array.isArray(a)&&!L(a))return void Z(s.length===0,function(){return"Element arr["+u.join("][")+"] is a primitive, but should be an array/TypedArray of "+s[0]+" elements"});Z(s.length>0,function(){return"Element arr["+u.join("][")+"] should be a primitive, but is an array of "+a.length+" elements"}),Z(a.length===s[0],function(){return"Element arr["+u.join("][")+"] should have "+s[0]+" elements, but has "+a.length+" elements"});for(var l=s.slice(1),d=0;d<a.length;++d)i(a[d],l,u.concat(d))}(n,r,[]),r}function Ir(n,t,e,r){if(n!=null&&(n!=="numeric"&&n!==t||n==="numeric"&&t==="string"))throw new Error("Argument '"+e+"' passed to '"+r+"' must be "+n+" tensor, but got "+t+" tensor")}function ke(n,t,e,r){if(r===void 0&&(r="numeric"),n instanceof Wt)return Ir(r,n.dtype,t,e),n;var i=Je(n);if(i!=="string"&&["bool","int32","float32"].indexOf(r)>=0&&(i=r),Ir(r,i,t,e),n==null||!L(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string"){var a=n==null?"null":n.constructor.name;throw new Error("Argument '"+t+"' passed to '"+e+"' must be a Tensor or TensorLike, but got '"+a+"'")}var s=xr(n,i);L(n)||Array.isArray(n)||(n=[n]);var u=i!=="string"?_e(n,i,P().getBool("DEBUG")):be(n,[],!0);return Ge.makeTensor(u,s,i)}function Dr(n,t,e,r){if(r===void 0&&(r="numeric"),!Array.isArray(n))throw new Error("Argument "+t+" passed to "+e+" must be a `Tensor[]` or `TensorLike[]`");return n.map(function(i,a){return ke(i,t+"["+a+"]",e)},r)}function Ut(n,t){for(var e=0;e<n.length;++e)if(n[n.length-e-1]!==t-1-e)return!1;return!0}function ti(n,t,e){for(var r=n.length+t.length,i=[],a=0,s=0,u=0;u<r;u++)e.indexOf(u)===-1?i.push(n[a++]):i.push(t[s++]);return i}function jr(n,t){for(var e=[],r=n.length,i=0;i<r;i++)t.indexOf(i)===-1&&e.push(n[i]);return[e,t.map(function(a){return n[a]})]}function Nr(n,t){return ti(n,t.map(function(e){return 1}),t)}function Xr(n,t,e){Z(Ut(t,e),function(){return n+" supports only inner-most axes for now. Got axes "+t+" and rank-"+e+" input."})}function qr(n,t){if(Ut(n,t))return null;for(var e=[],r=0;r<t;++r)n.indexOf(r)===-1&&e.push(r);return n.forEach(function(i){return e.push(i)}),e}function Sn(n){return n.map(function(t,e){return[e,t]}).sort(function(t,e){return t[1]-e[1]}).map(function(t){return t[0]})}function fn(n,t){for(var e=[],r=t-n;r<t;++r)e.push(r);return e}function fi(n,t){var e=n[0].length;n.forEach(function(i,a){Z(i.length===e,function(){return"Error in concat"+e+"D: rank of tensors["+a+"] must be the same as the rank of the rest ("+e+")"})}),Z(t>=0&&t<e,function(){return"Error in concat"+e+"D: axis must be between 0 and "+(e-1)+"."});var r=n[0];n.forEach(function(i,a){for(var s=0;s<e;s++)Z(s===t||i[s]===r[s],function(){return"Error in concat"+e+"D: Shape of tensors["+a+"] ("+i+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+a+"."})})}function On(n,t){for(var e=n[0].slice(),r=1;r<n.length;r++)e[t]+=n[r][t];return e}function Qe(n){var t=Object.keys(n);if(t.length!==1)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");var e=t[0],r=n[e];e.endsWith("_")&&(e=e.substring(0,e.length-1));var i=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];Ge.startScope(e);try{var u=r.apply(void 0,a);return u instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),Ge.endScope(u),u}catch(l){throw Ge.endScope(null),l}};return Object.defineProperty(i,"name",{value:e,configurable:!0}),i}_t.registerFlag("HAS_WEBGL",function(){return _t.getNumber("WEBGL_VERSION")>0}),_t.registerFlag("WEBGL_VERSION",function(){return cs(2)?2:cs(1)?1:0}),_t.registerFlag("WEBGL_BUFFER_SUPPORTED",function(){return _t.get("WEBGL_VERSION")===2}),_t.registerFlag("WEBGL_CPU_FORWARD",function(){return!0}),_t.registerFlag("WEBGL_FORCE_F16_TEXTURES",function(){return!1}),_t.registerFlag("WEBGL_PACK",function(){return _t.getBool("HAS_WEBGL")}),_t.registerFlag("WEBGL_PACK_NORMALIZATION",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_PACK_CLIP",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_PACK_DEPTHWISECONV",function(){return!1}),_t.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_PACK_REDUCE",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_LAZILY_UNPACK",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_CONV_IM2COL",function(){return _t.getBool("WEBGL_PACK")}),_t.registerFlag("WEBGL_MAX_TEXTURE_SIZE",function(){return Vs(_t.getNumber("WEBGL_VERSION"))}),_t.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",function(){return Do(_t.getNumber("WEBGL_VERSION"))}),_t.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",function(){var n=_t.getNumber("WEBGL_VERSION");return n===0?0:Qs(n)}),_t.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",function(){return _t.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(n=navigator.userAgent||navigator.vendor||window.opera,!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4))));var n}),_t.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",function(){return Hs(_t.getNumber("WEBGL_VERSION"))}),_t.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",function(){return!_t.getBool("WEBGL_FORCE_F16_TEXTURES")&&_t.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")}),_t.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",function(){return Gs(_t.getNumber("WEBGL_VERSION"))}),_t.registerFlag("WEBGL_FENCE_API_ENABLED",function(){return Po(_t.getNumber("WEBGL_VERSION"))}),_t.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",function(){return _t.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0}),Vr=Xs;var Fr=Qe({complex_:function(n,t){var e=ke(n,"real","complex"),r=ke(t,"imag","complex");return fe(e.shape,r.shape,"real and imag shapes, "+e.shape+" and "+r.shape+", must match in call to tf.complex()."),Ge.runKernelFunc(function(i){return i.complex(e,r)},{$real:e,$imag:r})}}),Tr=Qe({real_:function(n){var t=ke(n,"input","real");return Ge.runKernelFunc(function(e){return e.real(t)},{$input:t})}}),Hr=Qe({imag_:function(n){var t=ke(n,"input","imag");return Ge.runKernelFunc(function(e){return e.imag(t)},{$input:t})}});function Mt(n,t,e){return _n(n,t,xr(n,e),e)}function _n(n,t,e,r){if(r==null&&(r=Je(n)),r==="complex64")throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!L(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string")throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(t!=null){it(t);var i=le(t),a=le(e);Z(i===a,function(){return"Based on the provided shape, ["+t+"], the tensor should have "+i+" values but has "+a});for(var s=0;s<e.length;++s){var u=e[s],l=s!==e.length-1||u!==le(t.slice(s));Z(e[s]===t[s]||!l,function(){return"Error creating a new Tensor. Inferred shape ("+e+") does not match the provided shape ("+t+"). "})}}return L(n)||Array.isArray(n)||(n=[n]),t=t||e,n=r!=="string"?_e(n,r,P().getBool("DEBUG")):be(n,[],!0),Ge.makeTensor(n,t,r)}function wt(n,t){if((L(n)&&t!=="string"||Array.isArray(n))&&t!=="complex64")throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if(t==="string"&&L(n)&&!(n instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return _n(n,[],[],t)}function nr(n,t){he(n);var e=xr(n,t);if(e.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");return _n(n,null,e,t)}function cr(n,t,e){if(he(n),t!=null&&t.length!==2)throw new Error("tensor2d() requires shape to have two numbers");var r=xr(n,e);if(r.length!==2&&r.length!==1)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return _n(n,t,r,e)}function Dn(n,t,e){if(he(n),t!=null&&t.length!==3)throw new Error("tensor3d() requires shape to have three numbers");var r=xr(n,e);if(r.length!==3&&r.length!==1)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return _n(n,t,r,e)}function un(n,t,e){if(he(n),t!=null&&t.length!==4)throw new Error("tensor4d() requires shape to have four numbers");var r=xr(n,e);if(r.length!==4&&r.length!==1)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return _n(n,t,r,e)}function Ya(n,t,e){if(he(n),t!=null&&t.length!==5)throw new Error("tensor5d() requires shape to have five numbers");var r=xr(n,e);if(r.length!==5&&r.length!==1)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return _n(n,t,r,e)}function xi(n,t,e){if(he(n),t!=null&&t.length!==6)throw new Error("tensor6d() requires shape to have six numbers");var r=xr(n,e);if(r.length!==6&&r.length!==1)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return _n(n,t=t||r,r,e)}function Gn(n,t,e,r){return t===void 0&&(t=!0),Ge.makeVariable(n,t,e,r)}function Xn(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=Xn(n,"float32"),r=pr(n,"float32");return Fr(e,r)}var i=Ve(le(n),t);return Ge.makeTensor(i,n,t)}function pr(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=pr(n,"float32"),r=pr(n,"float32");return Fr(e,r)}var i=Xe(le(n),t);return Ge.makeTensor(i,n,t)}function en(n,t,e){return Ge.runKernelFunc(function(r){return r.fill(n,t,e)},{})}function Ei(n,t,e){if(e<=0)throw new Error("The number of values should be positive.");return Ge.runKernelFunc(function(r){return r.linspace(n,t,e)},{})}function Mn(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e===0)throw new Error("Cannot have a step of zero");if(n===t||n<t&&e<0||t<n&&e>1)return pr([0],r);var i=Xe(Math.abs(Math.ceil((t-n)/e)),r);t<n&&e===1&&(e=-1),i[0]=n;for(var a=1;a<i.length;a++)i[a]=i[a-1]+e;return nr(i,r)}var jn=Qe({onesLike_:function(n){var t=ke(n,"x","onesLike");if(t.dtype==="complex64"){var e=jn(Tr(t)),r=Yt(Hr(t));return Fr(e,r)}return Ge.runKernelFunc(function(i){return i.onesLike(t)},{$x:t},function(i,a){return{$x:function(){return Yt(i)}}})}}),Yt=Qe({zerosLike_:function(n){var t=ke(n,"x","zerosLike");return Ge.runKernelFunc(function(e){return e.zerosLike(t)},{$x:t},function(e,r){return{$x:function(){return Yt(e)}}})}}),Pr=Qe({concat_:function(n,t){t===void 0&&(t=0),Z(n.length>=1,function(){return"Pass at least one tensor to concat"});var e=Dr(n,"tensors","concat");e[0].dtype==="complex64"&&e.forEach(function(u){if(u.dtype!=="complex64")throw new Error(`Cannot concatenate complex64 tensors with a tensor
|
|
with dtype `+u.dtype+". ")}),t=ye(t,e[0].shape)[0];var r=On(e.map(function(u){return u.shape}),t);if(le(r)===0)return Mt([],r);if((e=e.filter(function(u){return u.size>0})).length===1)return e[0];var i=e.map(function(u){return u.shape});fi(i,t);var a=e,s={axis:t};return Ge.runKernelFunc(function(u){return u.concat(e,t)},a,function(u){var l=i.map(function(d){return d[t]});return $a(u,l,t).map(function(d){return function(){return d}})},"Concat",s)}}),ri=Qe({concat1d_:function(n){return Pr(n,0)}}),Ci=Qe({concat2d_:function(n,t){return Pr(n,t)}}),la=Qe({concat3d_:function(n,t){return Pr(n,t)}}),Pn=Qe({concat4d_:function(n,t){return Pr(n,t)}}),$a=Qe({split_:function(n,t,e){e===void 0&&(e=0);var r,i=ke(n,"x","split");return e=ye(e,i.shape)[0],typeof t=="number"?(Z(i.shape[e]%t==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(t).fill(i.shape[e]/t)):(Z(i.shape[e]===t.reduce(function(a,s){return a+s}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=t),Ge.runKernelFunc(function(a){return a.split(i,r,e)},{$x:i},function(a){return{$x:function(){return Pr(a,e)}}})}});typeof globalThis!="undefined"||typeof window!="undefined"||typeof je.g!="undefined"&&je.g;function hr(n,t){return n(t={exports:{}},t.exports),t.exports}var Bo=hr(function(n){(function(t,e,r){function i(u){var l,d=this,A=(l=4022871197,function(T){T=T.toString();for(var D=0;D<T.length;D++){var U=.02519603282416938*(l+=T.charCodeAt(D));U-=l=U>>>0,l=(U*=l)>>>0,l+=4294967296*(U-=l)}return 23283064365386963e-26*(l>>>0)});d.next=function(){var T=2091639*d.s0+23283064365386963e-26*d.c;return d.s0=d.s1,d.s1=d.s2,d.s2=T-(d.c=0|T)},d.c=1,d.s0=A(" "),d.s1=A(" "),d.s2=A(" "),d.s0-=A(u),d.s0<0&&(d.s0+=1),d.s1-=A(u),d.s1<0&&(d.s1+=1),d.s2-=A(u),d.s2<0&&(d.s2+=1),A=null}function a(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function s(u,l){var d=new i(u),A=l&&l.state,T=d.next;return T.int32=function(){return 4294967296*d.next()|0},T.double=function(){return T()+11102230246251565e-32*(2097152*T()|0)},T.quick=T,A&&(typeof A=="object"&&a(A,d),T.state=function(){return a(d,{})}),T}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.alea=s})(0,n,!1)}),ca=hr(function(n){(function(t,e,r){function i(u){var l=this,d="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var T=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^T^T>>>8},u===(0|u)?l.x=u:d+=u;for(var A=0;A<d.length+64;A++)l.x^=0|d.charCodeAt(A),l.next()}function a(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l}function s(u,l){var d=new i(u),A=l&&l.state,T=function(){return(d.next()>>>0)/4294967296};return T.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},T.int32=d.next,T.quick=T,A&&(typeof A=="object"&&a(A,d),T.state=function(){return a(d,{})}),T}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor128=s})(0,n,!1)}),Bn=hr(function(n){(function(t,e,r){function i(u){var l=this,d="";l.next=function(){var T=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^T^T<<1)|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,u===(0|u)?l.x=u:d+=u;for(var A=0;A<d.length+64;A++)l.x^=0|d.charCodeAt(A),A==d.length&&(l.d=l.x<<10^l.x>>>4),l.next()}function a(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l.v=u.v,l.d=u.d,l}function s(u,l){var d=new i(u),A=l&&l.state,T=function(){return(d.next()>>>0)/4294967296};return T.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},T.int32=d.next,T.quick=T,A&&(typeof A=="object"&&a(A,d),T.state=function(){return a(d,{})}),T}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorwow=s})(0,n,!1)}),Ki=hr(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var d,A,T=l.x,D=l.i;return d=T[D],A=(d^=d>>>7)^d<<24,A^=(d=T[D+1&7])^d>>>10,A^=(d=T[D+3&7])^d>>>3,A^=(d=T[D+4&7])^d<<7,d=T[D+7&7],A^=(d^=d<<13)^d<<9,T[D]=A,l.i=D+1&7,A},function(d,A){var T,D=[];if(A===(0|A))D[0]=A;else for(A=""+A,T=0;T<A.length;++T)D[7&T]=D[7&T]<<15^A.charCodeAt(T)+D[T+1&7]<<13;for(;D.length<8;)D.push(0);for(T=0;T<8&&D[T]===0;++T);for(T==8?D[7]=-1:D[T],d.x=D,d.i=0,T=256;T>0;--T)d.next()}(l,u)}function a(u,l){return l.x=u.x.slice(),l.i=u.i,l}function s(u,l){u==null&&(u=+new Date);var d=new i(u),A=l&&l.state,T=function(){return(d.next()>>>0)/4294967296};return T.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},T.int32=d.next,T.quick=T,A&&(A.x&&a(A,d),T.state=function(){return a(d,{})}),T}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorshift7=s})(0,n,!1)}),Pi=hr(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var d,A,T=l.w,D=l.X,U=l.i;return l.w=T=T+1640531527|0,A=D[U+34&127],d=D[U=U+1&127],A^=A<<13,d^=d<<17,A^=A>>>15,d^=d>>>12,A=D[U]=A^d,l.i=U,A+(T^T>>>16)|0},function(d,A){var T,D,U,te,oe,ae=[],se=128;for(A===(0|A)?(D=A,A=null):(A+="\0",D=0,se=Math.max(se,A.length)),U=0,te=-32;te<se;++te)A&&(D^=A.charCodeAt((te+32)%A.length)),te===0&&(oe=D),D^=D<<10,D^=D>>>15,D^=D<<4,D^=D>>>13,te>=0&&(oe=oe+1640531527|0,U=(T=ae[127&te]^=D+oe)==0?U+1:0);for(U>=128&&(ae[127&(A&&A.length||0)]=-1),U=127,te=512;te>0;--te)D=ae[U+34&127],T=ae[U=U+1&127],D^=D<<13,T^=T<<17,D^=D>>>15,T^=T>>>12,ae[U]=D^T;d.w=oe,d.X=ae,d.i=U}(l,u)}function a(u,l){return l.i=u.i,l.w=u.w,l.X=u.X.slice(),l}function s(u,l){u==null&&(u=+new Date);var d=new i(u),A=l&&l.state,T=function(){return(d.next()>>>0)/4294967296};return T.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},T.int32=d.next,T.quick=T,A&&(A.X&&a(A,d),T.state=function(){return a(d,{})}),T}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor4096=s})(0,n,!1)}),fs=hr(function(n){(function(t,e,r){function i(u){var l=this,d="";l.next=function(){var T=l.b,D=l.c,U=l.d,te=l.a;return T=T<<25^T>>>7^D,D=D-U|0,U=U<<24^U>>>8^te,te=te-T|0,l.b=T=T<<20^T>>>12^D,l.c=D=D-U|0,l.d=U<<16^D>>>16^te,l.a=te-T|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,u===Math.floor(u)?(l.a=u/4294967296|0,l.b=0|u):d+=u;for(var A=0;A<d.length+20;A++)l.b^=0|d.charCodeAt(A),l.next()}function a(u,l){return l.a=u.a,l.b=u.b,l.c=u.c,l.d=u.d,l}function s(u,l){var d=new i(u),A=l&&l.state,T=function(){return(d.next()>>>0)/4294967296};return T.double=function(){do var D=((d.next()>>>11)+(d.next()>>>0)/4294967296)/2097152;while(D===0);return D},T.int32=d.next,T.quick=T,A&&(typeof A=="object"&&a(A,d),T.state=function(){return a(d,{})}),T}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.tychei=s})(0,n,!1)}),Bi=hr(function(n){(function(t,e){var r,i=this,a=256,s=6,u="random",l=e.pow(a,s),d=e.pow(2,52),A=2*d,T=a-1;function D(se,we,Ce){var me=[],Se=oe(function We(Ne,Le){var $e,Ze=[],et=typeof Ne;if(Le&&et=="object")for($e in Ne)try{Ze.push(We(Ne[$e],Le-1))}catch(tt){}return Ze.length?Ze:et=="string"?Ne:Ne+"\0"}((we=we==1?{entropy:!0}:we||{}).entropy?[se,ae(t)]:se==null?function(){try{var We;return r&&(We=r.randomBytes)?We=We(a):(We=new Uint8Array(a),(i.crypto||i.msCrypto).getRandomValues(We)),ae(We)}catch($e){var Ne=i.navigator,Le=Ne&&Ne.plugins;return[+new Date,i,Le,i.screen,ae(t)]}}():se,3),me),Re=new U(me),Ue=function(){for(var We=Re.g(s),Ne=l,Le=0;We<d;)We=(We+Le)*a,Ne*=a,Le=Re.g(1);for(;We>=A;)We/=2,Ne/=2,Le>>>=1;return(We+Le)/Ne};return Ue.int32=function(){return 0|Re.g(4)},Ue.quick=function(){return Re.g(4)/4294967296},Ue.double=Ue,oe(ae(Re.S),t),(we.pass||Ce||function(We,Ne,Le,$e){return $e&&($e.S&&te($e,Re),We.state=function(){return te(Re,{})}),Le?(e[u]=We,Ne):We})(Ue,Se,"global"in we?we.global:this==e,we.state)}function U(se){var we,Ce=se.length,me=this,Se=0,Re=me.i=me.j=0,Ue=me.S=[];for(Ce||(se=[Ce++]);Se<a;)Ue[Se]=Se++;for(Se=0;Se<a;Se++)Ue[Se]=Ue[Re=T&Re+se[Se%Ce]+(we=Ue[Se])],Ue[Re]=we;(me.g=function(We){for(var Ne,Le=0,$e=me.i,Ze=me.j,et=me.S;We--;)Ne=et[$e=T&$e+1],Le=Le*a+et[T&(et[$e]=et[Ze=T&Ze+Ne])+(et[Ze]=Ne)];return me.i=$e,me.j=Ze,Le})(a)}function te(se,we){return we.i=se.i,we.j=se.j,we.S=se.S.slice(),we}function oe(se,we){for(var Ce,me=se+"",Se=0;Se<me.length;)we[T&Se]=T&(Ce^=19*we[T&Se])+me.charCodeAt(Se++);return ae(we)}function ae(se){return String.fromCharCode.apply(0,se)}if(e["seed"+u]=D,oe(e.random(),t),n.exports){n.exports=D;try{r=je(64902)}catch(se){}}})([],Math)});Bi.alea=Bo,Bi.xor128=ca,Bi.xorwow=Bn,Bi.xorshift7=Ki,Bi.xor4096=Pi,Bi.tychei=fs;var fa=Bi.alea,Kn=function(){function n(t,e,r,i,a){this.mean=t,this.stdDev=e,this.dtype=r,this.nextVal=NaN,this.truncated=i,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var s=a||Math.random();this.random=fa(s.toString())}return n.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var t=this.nextVal;return this.nextVal=NaN,t}for(var e,r,i=!1;!i;){var a=void 0,s=void 0,u=void 0;do u=(a=2*this.random()-1)*a+(s=2*this.random()-1)*s;while(u>=1||u===0);var l=Math.sqrt(-2*Math.log(u)/u);e=this.mean+this.stdDev*a*l,r=this.mean+this.stdDev*s*l,this.truncated&&!this.isValidTruncated(e)||(i=!0)}return this.truncated&&!this.isValidTruncated(r)||(this.nextVal=this.convertValue(r)),this.convertValue(e)},n.prototype.convertValue=function(t){return this.dtype==null||this.dtype==="float32"?t:Math.round(t)},n.prototype.isValidTruncated=function(t){return t<=this.upper&&t>=this.lower},n}(),di=function(){function n(t,e,r,i){this.alpha=t,this.beta=1/e,this.dtype=r;var a=i||Math.random();this.randu=fa(a.toString()),this.randn=new Kn(0,1,r,!1,this.randu()),this.d=t<1?t+2/3:t-1/3,this.c=1/Math.sqrt(9*this.d)}return n.prototype.nextValue=function(){for(var t,e,r,i,a,s;;){do i=this.randn.nextValue(),s=1+this.c*i;while(s<=0);if(s*=s*s,e=1-.331*(t=i*i)*t,r=.5*t+this.d*(1-s+Math.log(s)),(a=this.randu())<e||Math.log(a)<r)break}return s=1/this.beta*this.d*s,this.alpha<1&&(s*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(s)},n.prototype.convertValue=function(t){return this.dtype==="float32"?t:Math.round(t)},n}(),ni=function(){function n(t,e,r,i){var a=this;if(t===void 0&&(t=0),e===void 0&&(e=1),this.canReturnFloat=function(){return a.dtype==null||a.dtype==="float32"},this.min=t,this.range=e-t,this.dtype=r,i==null&&(i=Math.random()),typeof i=="number"&&(i=i.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error("The difference between "+t+" - "+e+" <= 1 and dtype is not float");this.random=fa(i)}return n.prototype.convertValue=function(t){return this.canReturnFloat()?t:Math.round(t)},n.prototype.nextValue=function(){return this.convertValue(this.min+this.range*this.random())},n}();function Nt(n,t,e){return t===void 0&&(t="float32"),t=t||"float32",it(n),new Cr(n,t,e)}function da(n,t){t===void 0&&(t=!1),console.log(n.toString(t))}var Zn=Qe({batchToSpaceND_:function(n,t,e){var r=ke(n,"x","batchToSpaceND"),i=t.reduce(function(a,s){return a*s});return Z(r.rank>=1+t.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+t.length}),Z(e.length===t.length,function(){return"crops.length is "+e.length+" but should be equal to blockShape.length "+t.length}),Z(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+t.join(" * ")+" === "+i}),Ge.runKernelFunc(function(a){return a.batchToSpaceND(r,t,e)},{$x:r},function(a){return{$x:function(){return a.spaceToBatchND(t,e)}}})}}),Zi=Qe({broadcastTo_:function(n,t){var e=ke(n,"broadcastTo","x"),r=e.shape;if(t.some(function(l){return!(l>0)||l%1!=0}))throw new Error("broadcastTo(): Invalid broadcast shape ["+t+"].");if(t.length<e.rank)throw new Error("broadcastTo(): shape.length="+t.length+" < input.rank="+e.rank+".");if(t.length>e.rank){for(var i=e.shape.slice();i.length<t.length;)i.unshift(1);e=e.reshape(i)}for(var a=Array.from(t),s=t.length-1;s>=0;s--)if(e.shape[s]===t[s])a[s]=1;else if(e.shape[s]!==1)throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+t+"].");var u=a.map(function(l,d){return l>1?d:-1}).filter(function(l){return l>=0});return u.length===0?e.clone():Ge.runKernelFunc(function(l){return l.tile(e,a)},{input:e},function(l){return{input:function(){return l.sum(u,!0)}}})}}),ds=Qe({cast_:function(n,t){var e=ke(n,"x","cast");if(!ee(t))throw new Error("Failed to cast to unknown dtype "+t);if(t==="string"&&e.dtype!=="string"||t!=="string"&&e.dtype==="string")throw new Error("Only strings can be casted to strings");var r={dtype:t};return Ge.runKernelFunc(function(i){return i.cast(e,t)},{x:e},function(i){return{x:function(){return i.clone()}}},"Cast",r)}}),_o=Qe({clone_:function(n){var t=ke(n,"x","clone",null);return Ge.runKernelFunc(function(){return Ge.makeTensorFromDataId(t.dataId,t.shape,t.dtype)},{$x:t},function(e){return{$x:function(){return e.toFloat()}}})}}),ps=Qe({cumsum_:function(n,t,e,r){t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1);var i=ke(n,"x","cumsum"),a=qr([t|=0],i.rank),s=i;a!=null&&(s=i.transpose(a));var u=fn(1,i.rank)[0],l=Ge.runKernelFunc(function(d){return d.cumsum(s,u,e,r)},{permutedX:s},function(d){return{permutedX:function(){return d.cumsum(t,e,!r)}}});return a!=null&&(l=l.transpose(a)),l}}),hs=Qe({depthToSpace_:function(n,t,e){e===void 0&&(e="NHWC");var r=ke(n,"x","depthToSpace"),i=e==="NHWC"?r.shape[1]:r.shape[2],a=e==="NHWC"?r.shape[2]:r.shape[3],s=e==="NHWC"?r.shape[3]:r.shape[1];return Z(i*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
|
|
`+i+" and "+t+` for depthToSpace with input shape
|
|
`+r.shape}),Z(a*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
|
|
`+a+" and "+t+` for depthToSpace with input shape
|
|
`+r.shape}),Z(s%(t*t)==0,function(){return"Dimension size must be evenly divisible by "+t*t+" but is "+s+" for depthToSpace with input shape "+r.shape}),Ge.runKernelFunc(function(u){return u.depthToSpace(r,t,e)},{$x:r})}}),tn=Qe({expandDims_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","expandDims",null);Z(t<=e.rank,function(){return"Axis must be <= rank of the tensor"});var r=e.shape.slice();return t<0&&(Z(-(e.rank+1)<=t,function(){return"Axis must be in the interval ["+-(e.rank+1)+", "+e.rank+"]"}),t=e.rank+t+1),r.splice(t,0,1),hn(e,r)}}),Nn=Qe({eye_:function(n,t,e,r){r===void 0&&(r="float32"),t==null&&(t=n);for(var i=Nt([n,t],r),a=n<=t?n:t,s=0;s<a;++s)i.set(1,s,s);var u=i.toTensor().as2D(n,t);if(e==null)return u;if(e.length===1)return hi(tn(u,0),[e[0],1,1]);if(e.length===2)return hi(tn(tn(u,0),0),[e[0],e[1],1,1]);if(e.length===3)return hi(tn(tn(tn(u,0),0),0),[e[0],e[1],e[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+e.length+"D.")}}),qa=Qe({multinomial_:function(n,t,e,r){r===void 0&&(r=!1);var i=ke(n,"logits","multinomial"),a=i.size,s=i.rank;if(a<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+a+".");if(s>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+s);e=e||Math.random();var u=s===1?i.as2D(1,-1):i,l=Ge.runKernelFunc(function(d){return d.multinomial(u,r,t,e)},{logits2D:u});return s===1?l.as1D():l}}),bn=Qe({oneHot_:function(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=0),t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);var i=ke(n,"indices","oneHot","int32"),a=i.shape.concat([t]);return i=i.flatten(),Ge.runKernelFunc(function(s){return s.oneHot(i,t,e,r)},{$indices:i},function(s){return{$indices:function(){return pr(i.shape,"float32")}}}).reshape(a)}}),Fn=Qe({pad_:function(n,t,e){e===void 0&&(e=0);var r=ke(n,"x","pad");if(r.rank===0)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var i={paddings:t,constantValue:e};return Ge.runKernelFunc(function(a){return a.pad(r,t,e)},{x:r},function(a){var s=t.map(function(u){return u[0]});return{x:function(){return a.slice(s,r.shape)}}},"PadV2",i)}}),Br=Qe({pad1d_:function(n,t,e){return e===void 0&&(e=0),Z(t.length===2,function(){return"Invalid number of paddings. Must be length of 2."}),Fn(n,[t],e)}}),Lr=Qe({pad2d_:function(n,t,e){return e===void 0&&(e=0),Z(t.length===2&&t[0].length===2&&t[1].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),Fn(n,t,e)}}),pi=Qe({pad3d_:function(n,t,e){return e===void 0&&(e=0),Z(t.length===3&&t[0].length===2&&t[1].length===2&&t[2].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),Fn(n,t,e)}}),pa=Qe({pad4d_:function(n,t,e){return e===void 0&&(e=0),Z(t.length===4&&t[0].length===2&&t[1].length===2&&t[2].length===2&&t[3].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),Fn(n,t,e)}}),eo=Qe({rand_:function(n,t,e){var r=le(n),i=null;if(e==null||e==="float32")i=new Float32Array(r);else if(e==="int32")i=new Int32Array(r);else{if(e!=="bool")throw new Error("Unknown data type "+e);i=new Uint8Array(r)}for(var a=0;a<r;a++)i[a]=t();return Ge.makeTensor(i,n,e)}}),ii=Qe({randomNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var a=new Kn(t,e,r,!1,i),s=Nt(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),Mo=Qe({randomGamma_:function(n,t,e,r,i){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e==null&&(e=1),r==null&&(r="float32"),r!=="float32"&&r!=="int32")throw new Error("Unsupported data type "+r);for(var a=new di(t,e,r,i),s=Nt(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),Pa=Qe({randomUniform_:function(n,t,e,r,i){t===void 0&&(t=0),e===void 0&&(e=1),r===void 0&&(r="float32");for(var a=Nt(n,r),s=new ni(t,e,null,i),u=0;u<a.values.length;u++)a.values[u]=s.nextValue();return a.toTensor()}}),hn=Qe({reshape_:function(n,t){var e=ke(n,"x","reshape",null);t=G(t,e.size),Z(e.size===le(t),function(){return"new shape and old shape must have the same number of elements."});var r={shape:t};return Ge.runKernelFunc(function(i){return i.reshape(e,t)},{x:e},function(i){return{x:function(){return i.reshape(e.shape)}}},"Reshape",r)}}),to=Qe({spaceToBatchND_:function(n,t,e){var r=ke(n,"x","spaceToBatchND");return Z(r.rank>=1+t.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+t.length}),Z(e.length===t.length,function(){return"paddings.shape[0] "+e.length+" must be equal to [blockShape] "+t.length}),Z(r.shape.reduce(function(i,a,s){return s>0&&s<=t.length?i&&(a+e[s-1][0]+e[s-1][1])%t[s-1]==0:i},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+e.toString()+" must be divisible by blockShapes "+t.toString()}),Ge.runKernelFunc(function(i){return i.spaceToBatchND(r,t,e)},{$x:r},function(i){return{$x:function(){return i.batchToSpaceND(t,e)}}})}}),No=Qe({squeeze_:function(n,t){var e=ke(n,"x","squeeze");return hn(e,Y(e.shape,t).newShape)}}),wn=Qe({stack_:function(n,t){t===void 0&&(t=0);var e=Dr(n,"tensors","stack");if(Z(e.length>=1,function(){return"Pass at least one tensor to tf.stack"}),e.length===1)return e[0].expandDims(t);var r=e[0].rank,i=e[0].shape,a=e[0].dtype;Z(t<=r,function(){return"Axis must be <= rank of the tensor"}),e.forEach(function(u){fe(i,u.shape,"All tensors passed to stack must have matching shapes")}),e.forEach(function(u){Z(a===u.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var s=e.map(function(u){return u.expandDims(t)});return Pr(s,t)}}),hi=Qe({tile_:function(n,t){var e=ke(n,"x","tile",null);Z(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of reps "+t+"."});var r=[e],i={reps:t};return Ge.runKernelFunc(function(a,s){var u=a.tile(e,t);return s([e]),u},{x:e},function(a,s){var u=s[0];return{x:function(){var l=Yt(u);if(u.rank===1)for(var d=0;d<t[0];++d)l=l.add(a.slice([d*u.shape[0]],[u.shape[0]]));else if(u.rank===2)for(d=0;d<t[0];++d)for(var A=0;A<t[1];++A)l=l.add(a.slice([d*u.shape[0],A*u.shape[1]],[u.shape[0],u.shape[1]]));else if(u.rank===3)for(d=0;d<t[0];++d)for(A=0;A<t[1];++A)for(var T=0;T<t[2];++T)l=l.add(a.slice([d*u.shape[0],A*u.shape[1],T*u.shape[2]],[u.shape[0],u.shape[1],u.shape[2]]));else{if(u.rank!==4)throw new Error("Gradient for tile operation is not implemented for rank-"+u.rank+" tensors yet.");for(d=0;d<t[0];++d)for(A=0;A<t[1];++A)for(T=0;T<t[2];++T)for(var D=0;D<t[3];++D)l=l.add(a.slice([d*u.shape[0],A*u.shape[1],T*u.shape[2],D*u.shape[3]],[u.shape[0],u.shape[1],u.shape[2],u.shape[3]]))}return l}}},"Tile",i,r)}}),ro=Qe({truncatedNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var a=new Kn(t,e,r,!0,i),s=Nt(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),Ur=Qe({unstack_:function(n,t){t===void 0&&(t=0),t=t||0;var e=ke(n,"x","unstack");Z(t>=-e.shape.length&&t<e.shape.length,function(){return"Axis = "+t+" is not in [-"+e.shape.length+", "+e.shape.length+")"}),t<0&&(t+=e.shape.length);var r={axis:t};return Ge.runKernelFunc(function(i){return i.unstack(e,t)},{x:e},function(i){return{x:function(){return wn(i,t)}}},"Unpack",r)}}),ha=function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,T;return E(this,function(D){switch(D.label){case 0:return e=ke(n,"x","setdiff1d"),r=ke(t,"y","setdiff1d"),Z(e.dtype===r.dtype,function(){return"x and y should have the same dtype, but got x ("+e.dtype+") and y ("+r.dtype+")."}),Z(e.rank===1,function(){return"x should be 1D tensor, but got x ("+e.shape+")."}),Z(r.rank===1,function(){return"y should be 1D tensor, but got y ("+r.shape+")."}),[4,e.data()];case 1:return i=D.sent(),[4,r.data()];case 2:for(a=D.sent(),s=new Set(a),u=0,A=0;A<i.length;A++)s.has(i[A])||u++;for(l=new Cr([u],e.dtype),d=new Cr([u],"int32"),A=0,T=0;A<i.length;A++)s.has(i[A])||(l.values[T]=i[A],d.values[T]=A,T++);return[2,[l.toTensor(),d.toTensor()]]}})})};function ai(n,t,e,r){r===void 0&&(r=!0);var i=[];if(r)(i=i.concat(t.slice(0))).push(n[0]/e),i=i.concat(n.slice(1));else{i=i.concat(n[0]);for(var a=t.length,s=0;s<a;++s)i=i.concat([n[s+1]/t[s],t[s]]);i=i.concat(n.slice(a+1))}return i}function _i(n,t,e){e===void 0&&(e=!0);var r=[];if(e){r.push(t);for(var i=t+1;i<n;++i)i<=2*t?(r.push(i),r.push(i-(t+1))):r.push(i)}else{var a=[],s=[];for(i=1;i<n;++i)i>=2*t+1||i%2==1?s.push(i):a.push(i);r.push.apply(r,a),r.push(0),r.push.apply(r,s)}return r}function Si(n,t,e,r){r===void 0&&(r=!0);var i=[];r?i.push(n[0]/e):i.push(n[0]*e);for(var a=1;a<n.length;++a)a<=t.length?r?i.push(t[a-1]*n[a]):i.push(n[a]/t[a-1]):i.push(n[a]);return i}function no(n,t){for(var e=[0],r=0;r<t;++r)e.push(n[r][0]);return e}function vn(n,t,e){for(var r=n.slice(0,1),i=0;i<e;++i)r.push(n[i+1]-t[i][0]-t[i][1]);return r}function Ba(n,t){if(n.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+n.rank+".");if(t.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(t.dtype!=="int32")throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.shape[t.rank-1]>n.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[t.rank-1]+" vs. "+n.rank);if(n.size===0)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+n.shape+".");for(var e=t.shape,r=e[e.length-1],i=1,a=0;a<e.length-1;++a)i*=e[a];var s=n.shape,u=e.slice();u.pop();var l=1;for(a=r;a<n.rank;++a)l*=s[a],u.push(s[a]);var d=Be(n.shape).map(function(A){return A/l}).concat([1]).slice(0,r);return[u,i,l,d]}var Ks=Object.freeze({prepareAndValidate:Ba}),Mi=30;function va(n){return n<=Mi?n:ge(n,Math.floor(Math.sqrt(n)))}function Fo(n,t,e){var r=t.rank>1?t.shape[t.rank-1]:1,i=t.rank>1?t.rank-1:1,a="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+e.shape+", indices.shape: "+t.shape+", shape: "+n+", sliceDim: "+r+", and batchDim: "+i+".";if(e.rank<i)throw new Error(a+" update.rank < "+i+". ");if(n.length<r+(e.rank-i))throw new Error(a+" Output shape length < "+(r+(e.rank-i)));if(e.rank!==i+n.length-r)throw new Error(a+" update.rank != "+(i+n.length-r));for(var s=0;s<i;++s)if(e.shape[s]!==t.shape[s])throw new Error(a+" updates.shape["+s+"] ("+e.shape[s]+") != indices.shape["+s+"] ("+t.shape[s]+").");for(s=0;s<e.rank-i;++s)if(e.shape[s+i]!==n[s+r])throw new Error(a+" updates.shape["+(s+i)+"] ("+e.shape[s+i]+") != shape["+(s+i)+"] ("+n[s+i]+")")}function io(n,t,e){if(t.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(n.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+n.rank+".");if(t.dtype!=="int32")throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(e.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+e);if(e.length===0){if(t.size===0)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(n.size===0)throw new Error("Updates specified for empty output. updates shape: "+n.shape)}Fo(e,t,n)}function Ji(n,t,e){for(var r=t.shape.length,i=r>1?t.shape[r-1]:1,a=e.length,s=1,u=i;u<a;++u)s*=e[u];var l=i<1?1:i;return{sliceRank:i,numUpdates:le(t.shape)/l,sliceSize:s,strides:Be(e.slice(0,i)).concat([1]),outputSize:le(e)}}var _a=Object.freeze({validateUpdateShape:Fo,validateInput:io,calculateShapes:Ji});function ao(n,t,e){Z(n.rank===t.length,function(){return"Error in slice"+n.rank+"D: Length of begin "+t+" must match the rank of the array ("+n.rank+")."}),Z(n.rank===e.length,function(){return"Error in slice"+n.rank+"D: Length of size "+e+" must match the rank of the array ("+n.rank+")."});for(var r=function(a){Z(t[a]+e[a]<=n.shape[a],function(){return"Error in slice"+n.rank+"D: begin["+a+"] + size["+a+"] ("+(t[a]+e[a])+") would overflow input.shape["+a+"] ("+n.shape[a]+")"})},i=0;i<n.rank;++i)r(i)}function Yi(n){for(var t=[],e=0;n>0;)1&n&&t.push(e),n/=2,e++;return t}function oi(n,t,e){for(var r=[],i=0;i<n.length;i++)r[i]=Math.ceil((t[i]-n[i])/e[i]);return r}function oo(n,t,e,r,i){var a=t[i],s=e[i]||1;(n&1<<i||a==null)&&(a=s>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var u=r[i];return a<0&&(a+=u),a=pe(0,a,u-1)}function so(n,t,e,r,i){var a=t[i],s=e[i]||1;(n&1<<i||a==null)&&(a=s>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var u=r[i];return a<0&&(a+=u),a=s>0?pe(0,a,u):pe(-1,a,u-1)}function si(n,t,e){for(var r=e.length,i=0;i<e.length;i++)if(e[i]>1){r=i;break}for(i=r+1;i<e.length;i++)if(t[i]>0||e[i]!==n[i])return!1;return!0}function Jn(n,t){for(var e=n.length>0?n[n.length-1]:1,r=0;r<n.length-1;r++)e+=n[r]*t[r];return e}var uo=Object.freeze({assertParamsValid:ao,maskToAxes:Yi,computeOutShape:oi,startForAxis:oo,stopForAxis:so,isSliceContinous:si,computeFlatOffset:Jn});function lo(n){return Z(dt(n),function(){return"The f passed in grad(f) must be a function"}),function(t,e){var r=ke(t,"x","tf.grad",null),i=e!=null?ke(e,"dy","tf.grad"):null;return Ge.tidy(function(){var a=Ge.gradients(function(){return n(r)},[r],i),s=a.value,u=a.grads;return i!=null&&fe(s.shape,i.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),Ma(u),u[0]})}}function Ni(n){return Z(dt(n),function(){return"The f passed in grads(f) must be a function"}),function(t,e){Z(Array.isArray(t),function(){return"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s"});var r=Dr(t,"args","tf.grads",null),i=e!=null?ke(e,"dy","tf.grads"):null;return Ge.tidy(function(){var a=Ge.gradients(function(){return n.apply(void 0,r)},r,i),s=a.value,u=a.grads;return i!=null&&fe(s.shape,i.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Ma(u),u})}}function Zs(n){return Z(dt(n),function(){return"The f passed in valueAndGrad(f) must be a function"}),function(t,e){Z(t instanceof Wt,function(){return"The x passed in valueAndGrad(f)(x) must be a tensor"}),Z(e==null||e instanceof Wt,function(){return"The dy passed in valueAndGrad(f)(x, dy) must be a tensor"});var r=Ge.gradients(function(){return n(t)},[t],e),i=r.grads,a=r.value;return Ma(i),{grad:i[0],value:a}}}function vs(n){return Z(dt(n),function(){return"The f passed in valueAndGrads(f) must be a function"}),function(t,e){Z(Array.isArray(t)&&t.every(function(i){return i instanceof Wt}),function(){return"The args passed in valueAndGrads(f)(args) must be array of tensors"}),Z(e==null||e instanceof Wt,function(){return"The dy passed in valueAndGrads(f)(args, dy) must be a tensor"});var r=Ge.gradients(function(){return n.apply(void 0,t)},t,e);return e!=null&&fe(r.value.shape,e.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Ma(r.grads),r}}function ms(n,t){Z(dt(n),function(){return"The f passed in variableGrads(f) must be a function"}),Z(t==null||Array.isArray(t)&&t.every(function(A){return A instanceof br}),function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"});var e=t!=null;if(!e)for(var r in t=[],Ge.registeredVariables)t.push(Ge.registeredVariables[r]);var i=e?t.filter(function(A){return!A.trainable}):null,a=t.length;Z((t=t.filter(function(A){return A.trainable})).length>0,function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+a+" variables is trainable."});var s=Ge.gradients(n,t,null,!0),u=s.value,l=s.grads;Z(l.some(function(A){return A!=null}),function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."}),Z(u.rank===0,function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+u.rank+" tensor"});var d={};return t.forEach(function(A,T){l[T]!=null&&(d[A.name]=l[T])}),i!=null&&i.forEach(function(A){return d[A.name]=null}),{value:u,grads:d}}function $i(n){return Ge.customGrad(n)}function Ma(n){if(n.filter(function(t){return t==null}).length>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that
|
|
the f you passed encloses all operations that lead from x to y.`)}var vi=Qe({softmax_:function(n,t){t===void 0&&(t=-1);var e=ke(n,"logits","softmax","float32");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and dim was "+t);return Ge.runKernelFunc(function(r,i){var a=r.softmax(e,t);return i([a]),a},{logits:e},function(r,i){var a=i[0],s=r.mul(a);return{logits:function(){return s.sub(s.sum([t],!0).mul(a))}}},"Softmax",{dim:t},[],[!0])}}),gs=Qe({logSoftmax_:function(n,t){t===void 0&&(t=-1);var e=ke(n,"logits","logSoftmax");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and axis was "+t);return $i(function(r,i){var a=r.max(t,!0),s=r.sub(a),u=s.toFloat().sub(s.exp().sum(t,!0).log());return i([u]),{value:u,gradFunc:function(l,d){var A=d[0].exp();return l.sub(l.sum(t,!0).mul(A))}}})(e)}}),co=function(){function n(t,e){this.backend=t,this.dataMover=e,this.data=new WeakMap,this.dataIdsCount=0}return n.prototype.get=function(t){return this.data.has(t)||this.dataMover.moveData(this.backend,t),this.data.get(t)},n.prototype.set=function(t,e){this.dataIdsCount++,this.data.set(t,e)},n.prototype.has=function(t){return this.data.has(t)},n.prototype.delete=function(t){return this.dataIdsCount--,this.data.delete(t)},n.prototype.numDataIds=function(){return this.dataIdsCount},n}(),Lo=function(){function n(){}return n.prototype.time=function(t){return nt("time")},n.prototype.read=function(t){return nt("read")},n.prototype.readSync=function(t){return nt("readSync")},n.prototype.numDataIds=function(){return nt("numDataIds")},n.prototype.disposeData=function(t){return nt("disposeData")},n.prototype.write=function(t,e,r){return nt("write")},n.prototype.move=function(t,e,r,i){return nt("move")},n.prototype.memory=function(){return nt("memory")},n.prototype.floatPrecision=function(){return nt("floatPrecision")},n.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},n.prototype.batchMatMul=function(t,e,r,i){return nt("batchMatMul")},n.prototype.fusedBatchMatMul=function(t){return t.a,t.b,t.transposeA,t.transposeB,t.bias,t.activation,t.preluActivationWeights,nt("fusedBatchMatMul")},n.prototype.slice=function(t,e,r){return nt("slice")},n.prototype.stridedSlice=function(t,e,r,i){return nt("stridedSlice")},n.prototype.unstack=function(t,e){return nt("unstack")},n.prototype.reverse=function(t,e){return nt("reverse")},n.prototype.concat=function(t,e){return nt("concat")},n.prototype.neg=function(t){return nt("neg")},n.prototype.add=function(t,e){return nt("add")},n.prototype.addN=function(t){return nt("addN")},n.prototype.subtract=function(t,e){return nt("subtract")},n.prototype.multiply=function(t,e){return nt("multiply")},n.prototype.realDivide=function(t,e){return nt("realDivide")},n.prototype.floorDiv=function(t,e){return nt("floorDiv")},n.prototype.sum=function(t,e){return nt("sum")},n.prototype.prod=function(t,e){return nt("prod")},n.prototype.unsortedSegmentSum=function(t,e,r){return nt("unsortedSegmentSum")},n.prototype.argMin=function(t,e){return nt("argMin")},n.prototype.argMax=function(t,e){return nt("argMax")},n.prototype.equal=function(t,e){return nt("equal")},n.prototype.notEqual=function(t,e){return nt("notEqual")},n.prototype.less=function(t,e){return nt("less")},n.prototype.lessEqual=function(t,e){return nt("lessEqual")},n.prototype.greater=function(t,e){return nt("greater")},n.prototype.greaterEqual=function(t,e){return nt("greaterEqual")},n.prototype.logicalNot=function(t){return nt("logicalNot")},n.prototype.logicalAnd=function(t,e){return nt("logicalAnd")},n.prototype.logicalOr=function(t,e){return nt("logicalOr")},n.prototype.where=function(t){return nt("where")},n.prototype.select=function(t,e,r){return nt("select")},n.prototype.topk=function(t,e,r){return nt("topk")},n.prototype.min=function(t,e){return nt("min")},n.prototype.minimum=function(t,e){return nt("minimum")},n.prototype.mod=function(t,e){return nt("mod")},n.prototype.max=function(t,e){return nt("max")},n.prototype.maximum=function(t,e){return nt("maximum")},n.prototype.all=function(t,e){return nt("all")},n.prototype.any=function(t,e){return nt("any")},n.prototype.squaredDifference=function(t,e){return nt("squaredDifference")},n.prototype.ceil=function(t){return nt("ceil")},n.prototype.floor=function(t){return nt("floor")},n.prototype.round=function(t){return nt("round")},n.prototype.sign=function(t){return nt("sign")},n.prototype.isNaN=function(t){return nt("isNaN")},n.prototype.isInf=function(t){return nt("isInf")},n.prototype.isFinite=function(t){return nt("isFinite")},n.prototype.pow=function(t,e){return nt("pow")},n.prototype.exp=function(t){return nt("exp")},n.prototype.expm1=function(t){return nt("expm1")},n.prototype.softmax=function(t,e){return nt("softmax")},n.prototype.log=function(t){return nt("log")},n.prototype.log1p=function(t){return nt("log1p")},n.prototype.sqrt=function(t){return nt("sqrt")},n.prototype.rsqrt=function(t){return nt("rsqrt")},n.prototype.square=function(t){return nt("square")},n.prototype.reciprocal=function(t){return nt("reciprocal")},n.prototype.relu=function(t){return nt("relu")},n.prototype.relu6=function(t){return nt("relu6")},n.prototype.prelu=function(t,e){return nt("prelu")},n.prototype.elu=function(t){return nt("elu")},n.prototype.eluDer=function(t,e){return nt("eluDer")},n.prototype.selu=function(t){return nt("selu")},n.prototype.int=function(t){return nt("int")},n.prototype.clip=function(t,e,r){return nt("clip")},n.prototype.abs=function(t){return nt("abs")},n.prototype.complexAbs=function(t){return nt("complexAbs")},n.prototype.sigmoid=function(t){return nt("sigmoid")},n.prototype.softplus=function(t){return nt("softplus")},n.prototype.sin=function(t){return nt("sin")},n.prototype.cos=function(t){return nt("cos")},n.prototype.tan=function(t){return nt("tan")},n.prototype.asin=function(t){return nt("asin")},n.prototype.acos=function(t){return nt("acos")},n.prototype.atan=function(t){return nt("atan")},n.prototype.atan2=function(t,e){return nt("atan2")},n.prototype.sinh=function(t){return nt("sinh")},n.prototype.cosh=function(t){return nt("cosh")},n.prototype.tanh=function(t){return nt("tanh")},n.prototype.asinh=function(t){return nt("asinh")},n.prototype.acosh=function(t){return nt("acosh")},n.prototype.atanh=function(t){return nt("atanh")},n.prototype.erf=function(t){return nt("erf")},n.prototype.step=function(t,e){return nt("step")},n.prototype.fusedConv2d=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,nt("fusedConv2d")},n.prototype.conv2d=function(t,e,r){return nt("conv2d")},n.prototype.conv2dDerInput=function(t,e,r){return nt("conv2dDerInput")},n.prototype.conv2dDerFilter=function(t,e,r){return nt("conv2dDerFilter")},n.prototype.fusedDepthwiseConv2D=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,nt("fusedDepthwiseConv2D")},n.prototype.depthwiseConv2D=function(t,e,r){return nt("depthwiseConv2D")},n.prototype.depthwiseConv2DDerInput=function(t,e,r){return nt("depthwiseConv2DDerInput")},n.prototype.depthwiseConv2DDerFilter=function(t,e,r){return nt("depthwiseConv2DDerFilter")},n.prototype.conv3d=function(t,e,r){return nt("conv3d")},n.prototype.conv3dDerInput=function(t,e,r){return nt("conv3dDerInput")},n.prototype.conv3dDerFilter=function(t,e,r){return nt("conv3dDerFilter")},n.prototype.maxPool=function(t,e){return nt("maxPool")},n.prototype.maxPoolBackprop=function(t,e,r,i){return nt("maxPoolBackprop")},n.prototype.avgPool=function(t,e){return nt("avgPool")},n.prototype.avgPoolBackprop=function(t,e,r){return nt("avgPoolBackprop")},n.prototype.avgPool3d=function(t,e){return nt("avgPool3d")},n.prototype.avgPool3dBackprop=function(t,e,r){return nt("avgPool3dBackprop")},n.prototype.maxPool3d=function(t,e){return nt("maxPool3d")},n.prototype.maxPool3dBackprop=function(t,e,r,i){return nt("maxPool3dBackprop")},n.prototype.reshape=function(t,e){return nt("reshape")},n.prototype.cast=function(t,e){return nt("cast")},n.prototype.tile=function(t,e){return nt("tile")},n.prototype.pad=function(t,e,r){return nt("pad")},n.prototype.transpose=function(t,e){return nt("transpose")},n.prototype.gather=function(t,e,r){return nt("gather")},n.prototype.gatherND=function(t,e){return nt("gatherND")},n.prototype.scatterND=function(t,e,r){return nt("scatterND")},n.prototype.batchToSpaceND=function(t,e,r){return nt("batchToSpaceND")},n.prototype.spaceToBatchND=function(t,e,r){return nt("spaceToBatchND")},n.prototype.resizeBilinear=function(t,e,r,i){return nt("resizeBilinear")},n.prototype.resizeBilinearBackprop=function(t,e,r){return nt("resizeBilinearBackprop")},n.prototype.resizeNearestNeighbor=function(t,e,r,i){return nt("resizeNearestNeighbor")},n.prototype.resizeNearestNeighborBackprop=function(t,e,r){return nt("resizeNearestNeighborBackprop")},n.prototype.batchNormalization=function(t,e,r,i,a,s){return nt("batchNormalization")},n.prototype.localResponseNormalization4D=function(t,e,r,i,a){return nt("localResponseNormalization4D")},n.prototype.LRNGrad=function(t,e,r,i,a,s,u){return nt("LRNGrad")},n.prototype.multinomial=function(t,e,r,i){return nt("multinomial")},n.prototype.oneHot=function(t,e,r,i){return nt("oneHot")},n.prototype.cumsum=function(t,e,r,i){return nt("cumsum")},n.prototype.nonMaxSuppression=function(t,e,r,i,a){return nt("nonMaxSuppression")},n.prototype.fft=function(t){return nt("fft")},n.prototype.ifft=function(t){return nt("ifft")},n.prototype.complex=function(t,e){return nt("complex")},n.prototype.real=function(t){return nt("real")},n.prototype.imag=function(t){return nt("imag")},n.prototype.cropAndResize=function(t,e,r,i,a,s){return nt("cropAndResize")},n.prototype.depthToSpace=function(t,e,r){return nt("depthToSpace")},n.prototype.split=function(t,e,r){return nt("split")},n.prototype.sparseToDense=function(t,e,r,i){return nt("sparseToDense")},n.prototype.diag=function(t){return nt("diag")},n.prototype.fill=function(t,e,r){return nt("fill")},n.prototype.onesLike=function(t){return nt("onesLike")},n.prototype.zerosLike=function(t){return nt("zerosLike")},n.prototype.linspace=function(t,e,r){return nt("linspace")},n.prototype.dispose=function(){return nt("dispose")},n}();function nt(n){throw new Error("'"+n+"' not yet implemented or not found in the registry. Did you forget to import the kernel?")}function ui(n,t){for(var e=n.length,r=[],i=0;i<e;i++){var a=e-1-i,s=n[a]||1;(t[t.length-1-i]||1)>1&&s===1&&r.unshift(a)}return r}function Jr(n,t){for(var e=[],r=0;r<t.length;r++){var i=n[n.length-r-1],a=t.length-r-1,s=t[a];(i==null||i===1&&s>1)&&e.unshift(a)}return e}function Zt(n,t){for(var e=[],r=Math.max(n.length,t.length),i=0;i<r;i++){var a=n[n.length-i-1];a==null&&(a=1);var s=t[t.length-i-1];if(s==null&&(s=1),a===1)e.unshift(s);else if(s===1)e.unshift(a);else{if(a!==s)throw Error("Operands could not be broadcast together with shapes "+n+" and "+t+".");e.unshift(a)}}return e}function Ii(n,t,e,r,i,a,s){s===void 0&&(s="channelsLast");var u,l=Fi(t),d=l[0],A=l[1];if(s==="channelsLast")u=[d,A,n[3],n[3]];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);u=[d,A,n[1],n[1]]}return Ti(n,u,e,r,i,a,!1,s)}function Ln(n,t,e,r,i,a,s){s===void 0&&(s="NDHWC");var u,l,d=Ri(t),A=d[0],T=d[1],D=d[2];if(s==="NDHWC")l="channelsLast",u=[A,T,D,n[4],n[4]];else{if(s!=="NCDHW")throw new Error("Unknown dataFormat "+s);l="channelsFirst",u=[A,T,D,n[1],n[1]]}return In(n,u,e,r,i,!1,l,a)}function Ti(n,t,e,r,i,a,s,u){s===void 0&&(s=!1),u===void 0&&(u="channelsLast");var l=[-1,-1,-1,-1],d=l[0],A=l[1],T=l[2],D=l[3];if(u==="channelsLast")d=n[0],A=n[1],T=n[2],D=n[3];else{if(u!=="channelsFirst")throw new Error("Unknown dataFormat "+u);d=n[0],D=n[1],A=n[2],T=n[3]}var U,te=t[0],oe=t[1],ae=t[3],se=Fi(e),we=se[0],Ce=se[1],me=Fi(r),Se=me[0],Re=me[1],Ue=Yn(te,Se),We=Yn(oe,Re),Ne=function(tt,st,pt,ct,lt,mt,ut,yt){var At,St,Ft;if(typeof tt=="number"){At={top:tt,bottom:tt,left:tt,right:tt,type:tt===0?"VALID":"NUMBER"};var Ht=function(rr,Er,vr,Wr,an){Wr==null&&(Wr=Na(rr,Er,vr));var on=rr[0],aa=rr[1],oa=Li((on-Er+2*Wr)/vr+1,an);Z(ve(oa),function(){return"The output # of rows ("+oa+") must be an integer. Change the stride and/or zero pad parameters"});var bi=Li((aa-Er+2*Wr)/vr+1,an);return Z(ve(bi),function(){return"The output # of columns ("+bi+") must be an integer. Change the stride and/or zero pad parameters"}),[oa,bi]}([st,pt],mt,ct,tt,yt);St=Ht[0],Ft=Ht[1]}else if(tt==="same"){St=Math.ceil(st/ct),Ft=Math.ceil(pt/lt);var $t=Math.max(0,(St-1)*ct+mt-st),ir=Math.max(0,(Ft-1)*lt+ut-pt),tr=Math.floor($t/2),ar=$t-tr,qt=Math.floor(ir/2);At={top:tr,bottom:ar,left:qt,right:ir-qt,type:"SAME"}}else{if(tt!=="valid")throw Error("Unknown padding parameter: "+tt);At={top:0,bottom:0,left:0,right:0,type:"VALID"},St=Math.ceil((st-mt+1)/ct),Ft=Math.ceil((pt-ut+1)/lt)}return{padInfo:At,outHeight:St,outWidth:Ft}}(i,A,T,we,Ce,Ue,We,a),Le=Ne.padInfo,$e=Ne.outHeight,Ze=Ne.outWidth,et=s?ae*D:ae;return u==="channelsFirst"?U=[d,et,$e,Ze]:u==="channelsLast"&&(U=[d,$e,Ze,et]),{batchSize:d,dataFormat:u,inHeight:A,inWidth:T,inChannels:D,outHeight:$e,outWidth:Ze,outChannels:et,padInfo:Le,strideHeight:we,strideWidth:Ce,filterHeight:te,filterWidth:oe,effectiveFilterHeight:Ue,effectiveFilterWidth:We,dilationHeight:Se,dilationWidth:Re,inShape:n,outShape:U,filterShape:t}}function In(n,t,e,r,i,a,s,u){a===void 0&&(a=!1),s===void 0&&(s="channelsLast");var l=[-1,-1,-1,-1,-1],d=l[0],A=l[1],T=l[2],D=l[3],U=l[4];if(s==="channelsLast")d=n[0],A=n[1],T=n[2],D=n[3],U=n[4];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);d=n[0],U=n[1],A=n[2],T=n[3],D=n[4]}var te,oe=t[0],ae=t[1],se=t[2],we=t[4],Ce=Ri(e),me=Ce[0],Se=Ce[1],Re=Ce[2],Ue=Ri(r),We=Ue[0],Ne=Ue[1],Le=Ue[2],$e=Yn(oe,We),Ze=Yn(ae,Ne),et=Yn(se,Le),tt=function(ut,yt,At,St,Ft,Ht,$t,ir,tr,ar,qt){var rr,Er,vr,Wr;if(typeof ut=="number"){rr={top:ut,bottom:ut,left:ut,right:ut,front:ut,back:ut,type:ut===0?"VALID":"NUMBER"};var an=function(ns,Ca,cc,is,sa,fc){sa==null&&(sa=Na(ns,Ca,is));var sb=ns[0],ub=ns[1],lb=ns[2],dc=Li((sb-Ca+2*sa)/is+1,fc);Z(ve(dc),function(){return"The output # of depths ("+dc+") must be an integer. Change the stride and/or zero pad parameters"});var pc=Li((ub-Ca+2*sa)/is+1,fc);Z(ve(pc),function(){return"The output # of rows ("+pc+") must be an integer. Change the stride and/or zero pad parameters"});var hc=Li((lb-Ca+2*sa)/is+1,fc);return Z(ve(hc),function(){return"The output # of columns ("+hc+") must be an integer. Change the stride and/or zero pad parameters"}),[dc,pc,hc,cc]}([yt,At,St,1],ir,1,Ft,ut,qt);Er=an[0],vr=an[1],Wr=an[2]}else if(ut==="same"){Er=Math.ceil(yt/Ft),vr=Math.ceil(At/Ht),Wr=Math.ceil(St/$t);var on=(Er-1)*Ft+ir-yt,aa=(vr-1)*Ht+tr-At,oa=(Wr-1)*$t+ar-St,bi=Math.floor(on/2),rs=on-bi,xa=Math.floor(aa/2),Ka=aa-xa,Ea=Math.floor(oa/2);rr={top:xa,bottom:Ka,left:Ea,right:oa-Ea,front:bi,back:rs,type:"SAME"}}else{if(ut!=="valid")throw Error("Unknown padding parameter: "+ut);rr={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},Er=Math.ceil((yt-ir+1)/Ft),vr=Math.ceil((At-tr+1)/Ht),Wr=Math.ceil((St-ar+1)/$t)}return{padInfo:rr,outDepth:Er,outHeight:vr,outWidth:Wr}}(i,A,T,D,me,Se,Re,$e,Ze,et,u),st=tt.padInfo,pt=tt.outDepth,ct=tt.outHeight,lt=tt.outWidth,mt=a?we*U:we;return s==="channelsFirst"?te=[d,mt,pt,ct,lt]:s==="channelsLast"&&(te=[d,pt,ct,lt,mt]),{batchSize:d,dataFormat:s,inDepth:A,inHeight:T,inWidth:D,inChannels:U,outDepth:pt,outHeight:ct,outWidth:lt,outChannels:mt,padInfo:st,strideDepth:me,strideHeight:Se,strideWidth:Re,filterDepth:oe,filterHeight:ae,filterWidth:se,effectiveFilterDepth:$e,effectiveFilterHeight:Ze,effectiveFilterWidth:et,dilationDepth:We,dilationHeight:Ne,dilationWidth:Le,inShape:n,outShape:te,filterShape:t}}function Na(n,t,e,r){r===void 0&&(r=1);var i=Yn(t,r);return Math.floor((n[0]*(e-1)-e+i)/2)}function Fi(n){return typeof n=="number"?[n,n,n]:n.length===2?[n[0],n[1],1]:n}function Ri(n){return typeof n=="number"?[n,n,n]:n}function Yn(n,t){return t<=1?n:n+(n-1)*(t-1)}function Li(n,t){if(!t)return n;switch(t){case"round":return Math.round(n);case"ceil":return Math.ceil(n);case"floor":return Math.floor(n);default:throw new Error("Unknown roundingMode "+t)}}function ki(n){var t=Fi(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function An(n,t){return ki(n)||ki(t)}function Fa(n){if(n==="NHWC")return"channelsLast";if(n==="NCHW")return"channelsFirst";throw new Error("Unknown dataFormat "+n)}function fo(n,t,e){if(t==="complex64"){if(n.dtype==="complex64")return n.clone();var r=pr(n.shape),i=n.toFloat(),a=e.complex(i,r);return r.dispose(),i.dispose(),a}if(!W(n.dtype,t))return Ge.makeTensorFromDataId(n.dataId,n.shape,t);if(n.dtype==="complex64"){var s=e.real(n);return a=s.cast(t),s.dispose(),a}if(t==="int32")return e.int(n);if(t==="bool"){var u=wt(0,n.dtype);return a=e.notEqual(n,u),u.dispose(),a}throw new Error("Error in Cast: failed to cast "+n.dtype+" to "+t)}function Et(n,t){return Ge.makeTensorFromDataId(n.dataId,t,n.dtype)}function Dt(n,t,e){var r=(t-n)/(e-1),i=Xe(e,"float32");i[0]=n;for(var a=1;a<i.length;a++)i[a]=i[a-1]+r;return nr(i,"float32")}var Kr=Object.freeze({castTensor:fo,reshapeTensor:Et,linspaceImpl:Dt,upcastType:Vt,axesAreInnerMostDims:Ut,combineLocations:ti,computeOutAndReduceShapes:jr,expandShapeToKeepDim:Nr,assertAxesAreInnerMostDims:Xr,getAxesPermutation:qr,getUndoAxesPermutation:Sn,getInnerMostAxes:fn,getBroadcastDims:ui,getReductionAxes:Jr,assertAndGetBroadcastShape:Zt,assertParamsConsistent:fi,computeOutShape:On,computePool2DInfo:Ii,computePool3DInfo:Ln,computeConv2DInfo:Ti,computeConv3DInfo:In,computeDefaultPad:Na,tupleValuesAreOne:ki,eitherStridesOrDilationsAreOne:An,convertConv2DDataFormat:Fa,PARALLELIZE_THRESHOLD:Mi,computeOptimalWindowSize:va});function rn(n,t){if(n.length!==t.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+n.length+", imag: "+t.length+".");for(var e=new Float32Array(2*n.length),r=0;r<e.length;r+=2)e[r]=n[r/2],e[r+1]=t[r/2];return e}function Zr(n,t){return{real:n[2*t],imag:n[2*t+1]}}function Uo(n,t,e,r){n[2*r]=t,n[2*r+1]=e}function ys(n,t,e){var r=(e?2:-2)*Math.PI*(n/t);return{real:Math.cos(r),imag:Math.sin(r)}}function Js(n,t,e){var r=function(a,s,u){return function(l,d,A){for(var T=0,D=l.length,U=0,te=!1;T<D;){var oe=A(d,l[U=T+(D-T>>>1)]);oe>0?T=U+1:(D=U,te=!oe)}return te?T:-T-1}(a,s,u||Wo)}(n,t,e),i=r<0?-(r+1):r;n.splice(i,0,t)}function Wo(n,t){return n>t?1:n<t?-1:0}function Bu(n,t,e,r,i){return yc(n,t,e,r,i,0).selectedIndices}function _u(n,t,e,r,i,a){var s=yc(n,t,e,r,i,a,!0);return s.numValidOutputs.dispose(),{selectedIndices:s.selectedIndices,selectedScores:s.selectedScores}}function yc(n,t,e,r,i,a,s,u){s===void 0&&(s=!1),u===void 0&&(u=!1);for(var l=Array.from(t).map(function(me,Se){return{score:me,boxIndex:Se,suppressBeginIndex:0}}).filter(function(me){return me.score>i}).sort(bc),d=a>0?-.5/a:0,A=[],T=[];A.length<e&&l.length>0;){var D=l.pop(),U=D.score,te=D.boxIndex,oe=D.suppressBeginIndex;if(U<i)break;for(var ae=!1,se=A.length-1;se>=oe;--se){var we=Ep(n,te,A[se]);if(we>=r){ae=!0;break}if(D.score=D.score*Cp(r,d,we),D.score<=i)break}D.suppressBeginIndex=A.length,ae||(D.score===U?(A.push(te),T.push(D.score)):D.score>i&&Js(l,D,bc))}var Ce=A.length;return u&&(A.fill(0,Ce),T.fill(0,Ce)),{selectedIndices:nr(A,"int32"),selectedScores:nr(T,"float32"),numValidOutputs:wt(Ce,"int32")}}function Ep(n,t,e){var r=n.subarray(4*t,4*t+4),i=n.subarray(4*e,4*e+4),a=Math.min(r[0],r[2]),s=Math.min(r[1],r[3]),u=Math.max(r[0],r[2]),l=Math.max(r[1],r[3]),d=Math.min(i[0],i[2]),A=Math.min(i[1],i[3]),T=Math.max(i[0],i[2]),D=Math.max(i[1],i[3]),U=(u-a)*(l-s),te=(T-d)*(D-A);if(U<=0||te<=0)return 0;var oe=Math.max(a,d),ae=Math.max(s,A),se=Math.min(u,T),we=Math.min(l,D),Ce=Math.max(se-oe,0)*Math.max(we-ae,0);return Ce/(U+te-Ce)}function Cp(n,t,e){var r=Math.exp(t*e*e);return e<=n?r:0}function bc(n,t){return n.score-t.score||n.score===t.score&&t.boxIndex-n.boxIndex}function wc(n,t,e){var r=new Array(n.rank).fill(0),i=n.shape.slice();return t.map(function(a){i[e]=a;var s=n.slice(r,i);return r[e]+=a,s})}function Ac(n,t){for(var e=new Array(n.rank),r=0;r<e.length;r++)e[r]=n.shape[r]*t[r];var i=Nt(e,n.dtype);for(r=0;r<i.values.length;++r){for(var a=i.indexToLoc(r),s=new Array(n.rank),u=0;u<s.length;u++)s[u]=a[u]%n.shape[u];var l=n.locToIndex(s);i.values[r]=n.values[l]}return i.toTensor()}function xc(n,t,e,r,i){for(var a=t[t.length-1],s=[n.length/a,a],u=s[0],l=s[1],d=H(e,u*r),A=H("int32",u*r),T=0;T<u;T++){for(var D=T*l,U=n.subarray(D,D+l),te=[],oe=0;oe<U.length;oe++)te.push({value:U[oe],index:oe});te.sort(function(me,Se){return Se.value-me.value});var ae=T*r,se=d.subarray(ae,ae+r),we=A.subarray(ae,ae+r);for(oe=0;oe<r;oe++)se[oe]=te[oe].value,we[oe]=te[oe].index}var Ce=t.slice();return Ce[Ce.length-1]=r,[Mt(d,Ce,e),Mt(A,Ce,"int32")]}function Mu(n,t){for(var e=[],r=0;r<t.length;r++)t[r]&&e.push(r);var i=Nt(n,"int32"),a=Nt([e.length,n.length],"int32");for(r=0;r<e.length;r++){var s=i.indexToLoc(e[r]),u=r*n.length;a.values.set(s,u)}return a.toTensor()}var Sp=function(n,t){this.outputShape=[],this.outputShape=n,this.variableNames=t.map(function(i,a){return"T"+a});var e=[];this.variableNames.forEach(function(i){e.push("float v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
|
|
void main() {
|
|
`+e.join(`
|
|
`)+`
|
|
|
|
float result = `+r+`;
|
|
setOutput(result);
|
|
}
|
|
`},Ip=function(n,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.variableNames=t.map(function(i,a){return"T"+a});var e=[];this.variableNames.forEach(function(i){e.push("vec4 v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
|
|
void main() {
|
|
`+e.join(`
|
|
`)+`
|
|
|
|
vec4 result = `+r+`;
|
|
setOutput(result);
|
|
}
|
|
`},Tp=function(n,t,e){this.variableNames=["A"];var r=n.windowSize,i=n.batchSize,a=n.inSize,s=Math.ceil(a/r);e||this.variableNames.push("bestIndicesA"),this.outputShape=[i,s];var u=t==="max"?">":"<",l=e?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int outIdx = coords[1];
|
|
int inOffset = outIdx * `+r+`;
|
|
|
|
int bestIndex = inOffset;
|
|
float bestValue = getA(batch, bestIndex);
|
|
|
|
for (int i = 0; i < `+r+`; i++) {
|
|
int inIdx = `+l+`;
|
|
float candidate = getA(batch, inIdx);
|
|
if (candidate `+u+` bestValue) {
|
|
bestValue = candidate;
|
|
bestIndex = inIdx;
|
|
}
|
|
}
|
|
setOutput(float(bestIndex));
|
|
}
|
|
`};function Ec(n,t){return["x","y","z","w","u","v"].slice(0,t).map(function(e){return n+"."+e})}function li(n,t){return t===1?[n]:Ec(n,t)}function Un(){var n,t,e,r,i,a,s,u,l,d;return P().getNumber("WEBGL_VERSION")===2?(n="#version 300 es",t="in",e="out",r="in",i="texture",a="outputColor",s="out vec4 outputColor;",u=`
|
|
bool isnan_custom(float val) {
|
|
return (val > 0.0 || val < 0.0) ? false : val != 0.0;
|
|
}
|
|
|
|
bvec4 isnan_custom(vec4 val) {
|
|
return bvec4(isnan_custom(val.x),
|
|
isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));
|
|
}
|
|
|
|
#define isnan(value) isnan_custom(value)
|
|
`,l="",d=`
|
|
#define round(value) newRound(value)
|
|
int newRound(float value) {
|
|
return int(floor(value + 0.5));
|
|
}
|
|
|
|
ivec4 newRound(vec4 value) {
|
|
return ivec4(floor(value + vec4(0.5)));
|
|
}
|
|
`):(n="",t="attribute",e="varying",r="varying",i="texture2D",a="gl_FragColor",s="",u=`
|
|
#define isnan(value) isnan_custom(value)
|
|
bool isnan_custom(float val) {
|
|
return (val > 0. || val < 1. || val == 0.) ? false : true;
|
|
}
|
|
bvec4 isnan_custom(vec4 val) {
|
|
return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));
|
|
}
|
|
`,l=`
|
|
uniform float INFINITY;
|
|
|
|
bool isinf(float val) {
|
|
return abs(val) == INFINITY;
|
|
}
|
|
bvec4 isinf(vec4 val) {
|
|
return equal(abs(val), vec4(INFINITY));
|
|
}
|
|
`,d=`
|
|
int round(float value) {
|
|
return int(floor(value + 0.5));
|
|
}
|
|
|
|
ivec4 round(vec4 value) {
|
|
return ivec4(floor(value + vec4(0.5)));
|
|
}
|
|
`),{version:n,attribute:t,varyingVs:e,varyingFs:r,texture2D:i,output:a,defineOutput:s,defineSpecialNaN:u,defineSpecialInf:l,defineRound:d}}function po(n,t,e){e===void 0&&(e="index");var r=Be(t);return r.map(function(i,a){return"int "+n[a]+" = "+e+" / "+i+"; "+(a===r.length-1?"int "+n[a+1]+" = "+e+" - "+n[a]+" * "+i:"index -= "+n[a]+" * "+i)+";"}).join("")}function Nu(n){var t=Be(n).map(function(e){return e.toString()});return`
|
|
int getFlatIndex(ivec3 coords) {
|
|
return coords.x * `+t[0]+" + coords.y * "+t[1]+` + coords.z;
|
|
}
|
|
`}var Cc=`
|
|
const float FLOAT_MAX = 1.70141184e38;
|
|
const float FLOAT_MIN = 1.17549435e-38;
|
|
|
|
lowp vec4 encode_float(highp float v) {
|
|
if (isnan(v)) {
|
|
return vec4(255, 255, 255, 255);
|
|
}
|
|
|
|
highp float av = abs(v);
|
|
|
|
if(av < FLOAT_MIN) {
|
|
return vec4(0.0, 0.0, 0.0, 0.0);
|
|
} else if(v > FLOAT_MAX) {
|
|
return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;
|
|
} else if(v < -FLOAT_MAX) {
|
|
return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;
|
|
}
|
|
|
|
highp vec4 c = vec4(0,0,0,0);
|
|
|
|
highp float e = floor(log2(av));
|
|
highp float m = exp2(fract(log2(av))) - 1.0;
|
|
|
|
c[2] = floor(128.0 * m);
|
|
m -= c[2] / 128.0;
|
|
c[1] = floor(32768.0 * m);
|
|
m -= c[1] / 32768.0;
|
|
c[0] = floor(8388608.0 * m);
|
|
|
|
highp float ebias = e + 127.0;
|
|
c[3] = floor(ebias / 2.0);
|
|
ebias -= c[3] * 2.0;
|
|
c[2] += floor(ebias) * 128.0;
|
|
|
|
c[3] += 128.0 * step(0.0, -v);
|
|
|
|
return c / 255.0;
|
|
}
|
|
`;function Rp(n,t,e,r){var i=[];n.forEach(function(U){var te=le(U.shapeInfo.logicalShape);U.shapeInfo.isUniform?i.push("uniform float "+U.name+(te>1?"["+te+"]":"")+";"):(i.push("uniform sampler2D "+U.name+";"),i.push("uniform int offset"+U.name+";"))});var a,s,u=i.join(`
|
|
`),l=n.map(function(U){return function(te,oe,ae){ae===void 0&&(ae=!1);var se="";se+=ae?Sc(te):zo(te);var we=te.shapeInfo.logicalShape,Ce=oe.logicalShape;return we.length<=Ce.length&&(se+=ae?function(me,Se){var Re,Ue=me.name,We=Ue.charAt(0).toUpperCase()+Ue.slice(1),Ne="get"+We+"AtOutCoords",Le=me.shapeInfo.logicalShape.length,$e=Se.logicalShape.length,Ze=ui(me.shapeInfo.logicalShape,Se.logicalShape),et=Gr($e),tt=$e-Le,st=["x","y","z","w","u","v"];Re=Le===0?"":$e<2&&Ze.length>=1?"coords = 0;":Ze.map(function(At){return"coords."+st[At+tt]+" = 0;"}).join(`
|
|
`);var pt="";pt=$e<2&&Le>0?"coords":me.shapeInfo.logicalShape.map(function(At,St){return"coords."+st[St+tt]}).join(", ");var ct="return outputValue;",lt=le(me.shapeInfo.logicalShape)===1,mt=le(Se.logicalShape)===1;if(Le!==1||lt||mt){if(lt&&!mt)ct=$e===1?`
|
|
return vec4(outputValue.x, outputValue.x, 0., 0.);
|
|
`:`
|
|
return vec4(outputValue.x);
|
|
`;else if(Ze.length){var ut=Le-2,yt=Le-1;Ze.indexOf(ut)>-1&&Ze.indexOf(yt)>-1?ct="return vec4(outputValue.x);":Ze.indexOf(ut)>-1?ct="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":Ze.indexOf(yt)>-1&&(ct="return vec4(outputValue.xx, outputValue.zz);")}}else ct=`
|
|
return vec4(outputValue.xy, outputValue.xy);
|
|
`;return`
|
|
vec4 `+Ne+`() {
|
|
`+et+` coords = getOutputCoords();
|
|
`+Re+`
|
|
vec4 outputValue = get`+We+"("+pt+`);
|
|
`+ct+`
|
|
}
|
|
`}(te,oe):function(me,Se){var Re=me.name,Ue=Re.charAt(0).toUpperCase()+Re.slice(1),We="get"+Ue+"AtOutCoords",Ne=Se.texShape,Le=me.shapeInfo.texShape,$e=me.shapeInfo.logicalShape.length,Ze=Se.logicalShape.length;if(!me.shapeInfo.isUniform&&$e===Ze&&me.shapeInfo.flatOffset==null&&ue(Le,Ne))return`
|
|
float `+We+`() {
|
|
return sampleTexture(`+Re+`, resultUV);
|
|
}
|
|
`;var et,tt=Gr(Ze),st=ui(me.shapeInfo.logicalShape,Se.logicalShape),pt=Ze-$e,ct=["x","y","z","w","u","v"];et=$e===0?"":Ze<2&&st.length>=1?"coords = 0;":st.map(function(mt){return"coords."+ct[mt+pt]+" = 0;"}).join(`
|
|
`);var lt="";return lt=Ze<2&&$e>0?"coords":me.shapeInfo.logicalShape.map(function(mt,ut){return"coords."+ct[ut+pt]}).join(", "),`
|
|
float `+We+`() {
|
|
`+tt+` coords = getOutputCoords();
|
|
`+et+`
|
|
return get`+Ue+"("+lt+`);
|
|
}
|
|
`}(te,oe)),se}(U,t,r)}).join(`
|
|
`),d=t.texShape,A=Un(),T=function(U){return`
|
|
float sampleTexture(sampler2D textureSampler, vec2 uv) {
|
|
return `+U.texture2D+`(textureSampler, uv).r;
|
|
}
|
|
`}(A),D=function(U){return U.version+`
|
|
precision highp float;
|
|
precision highp int;
|
|
precision highp sampler2D;
|
|
`+U.varyingFs+` vec2 resultUV;
|
|
`+U.defineOutput+`
|
|
const vec2 halfCR = vec2(0.5, 0.5);
|
|
|
|
struct ivec5
|
|
{
|
|
int x;
|
|
int y;
|
|
int z;
|
|
int w;
|
|
int u;
|
|
};
|
|
|
|
struct ivec6
|
|
{
|
|
int x;
|
|
int y;
|
|
int z;
|
|
int w;
|
|
int u;
|
|
int v;
|
|
};
|
|
|
|
uniform float NAN;
|
|
`+U.defineSpecialNaN+`
|
|
`+U.defineSpecialInf+`
|
|
`+U.defineRound+`
|
|
|
|
int imod(int x, int y) {
|
|
return x - y * (x / y);
|
|
}
|
|
|
|
int idiv(int a, int b, float sign) {
|
|
int res = a / b;
|
|
int mod = imod(a, b);
|
|
if (sign < 0. && mod != 0) {
|
|
res -= 1;
|
|
}
|
|
return res;
|
|
}
|
|
|
|
//Based on the work of Dave Hoskins
|
|
//https://www.shadertoy.com/view/4djSRW
|
|
#define HASHSCALE1 443.8975
|
|
float random(float seed){
|
|
vec2 p = resultUV * seed;
|
|
vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);
|
|
p3 += dot(p3, p3.yzx + 19.19);
|
|
return fract((p3.x + p3.y) * p3.z);
|
|
}
|
|
|
|
`+kp+`
|
|
`+Op+`
|
|
`+Dp+`
|
|
`}(A);return t.isPacked?(a=function(U,te){switch(U.length){case 0:return`
|
|
int getOutputCoords() {
|
|
return 0;
|
|
}
|
|
`;case 1:return function(me,Se){var Re=[Math.ceil(Se[0]/2),Math.ceil(Se[1]/2)];return Re[0]===1?`
|
|
int getOutputCoords() {
|
|
return 2 * int(resultUV.x * `+Re[1]+`.0);
|
|
}
|
|
`:Re[1]===1?`
|
|
int getOutputCoords() {
|
|
return 2 * int(resultUV.y * `+Re[0]+`.0);
|
|
}
|
|
`:`
|
|
int getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+Re[0]+", "+Re[1]+`));
|
|
return 2 * (resTexRC.x * `+Re[1]+` + resTexRC.y);
|
|
}
|
|
`}(0,te);case 2:return function(me,Se){var Re=[Math.ceil(Se[0]/2),Math.ceil(Se[1]/2)];if(ue(me,Se))return`
|
|
ivec2 getOutputCoords() {
|
|
return 2 * ivec2(resultUV.yx * vec2(`+Re[0]+", "+Re[1]+`));
|
|
}
|
|
`;var Ue=Math.ceil(me[1]/2);return`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+Re[0]+", "+Re[1]+`));
|
|
|
|
int index = resTexRC.x * `+Re[1]+` + resTexRC.y;
|
|
int r = 2 * (index / `+Ue+`);
|
|
int c = imod(index, `+Ue+`) * 2;
|
|
|
|
return ivec2(r, c);
|
|
}
|
|
`}(U,te);case 3:return oe=U,ae=te,se=[Math.ceil(ae[0]/2),Math.ceil(ae[1]/2)],we=Math.ceil(oe[2]/2),Ce=we*Math.ceil(oe[1]/2),`
|
|
ivec3 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+se[0]+", "+se[1]+`));
|
|
int index = resTexRC.x * `+se[1]+` + resTexRC.y;
|
|
|
|
int b = index / `+Ce+`;
|
|
index -= b * `+Ce+`;
|
|
|
|
int r = 2 * (index / `+we+`);
|
|
int c = imod(index, `+we+`) * 2;
|
|
|
|
return ivec3(b, r, c);
|
|
}
|
|
`;default:return function(me,Se){for(var Re=[Math.ceil(Se[0]/2),Math.ceil(Se[1]/2)],Ue=Math.ceil(me[me.length-1]/2),We=Ue*Math.ceil(me[me.length-2]/2),Ne=We,Le="",$e="b, r, c",Ze=2;Ze<me.length-1;Ze++)Ne*=me[me.length-Ze-1],Le=`
|
|
int b`+Ze+" = index / "+Ne+`;
|
|
index -= b`+Ze+" * "+Ne+`;
|
|
`+Le,$e="b"+Ze+", "+$e;return`
|
|
ivec`+me.length+` getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+Re[0]+", "+Re[1]+`));
|
|
int index = resTexRC.x * `+Re[1]+` + resTexRC.y;
|
|
|
|
`+Le+`
|
|
|
|
int b = index / `+We+`;
|
|
index -= b * `+We+`;
|
|
|
|
int r = 2 * (index / `+Ue+`);
|
|
int c = imod(index, `+Ue+`) * 2;
|
|
|
|
return ivec`+me.length+"("+$e+`);
|
|
}
|
|
`}(U,te)}var oe,ae,se,we,Ce}(t.logicalShape,d),s=function(U){return`
|
|
void setOutput(vec4 val) {
|
|
`+U.output+` = val;
|
|
}
|
|
`}(A)):(a=function(U,te){switch(U.length){case 0:return`
|
|
int getOutputCoords() {
|
|
return 0;
|
|
}
|
|
`;case 1:return function(se,we){return we[0]===1?`
|
|
int getOutputCoords() {
|
|
return int(resultUV.x * `+we[1]+`.0);
|
|
}
|
|
`:we[1]===1?`
|
|
int getOutputCoords() {
|
|
return int(resultUV.y * `+we[0]+`.0);
|
|
}
|
|
`:`
|
|
int getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
return resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
}
|
|
`}(0,te);case 2:return function(se,we){return ue(se,we)?`
|
|
ivec2 getOutputCoords() {
|
|
return ivec2(resultUV.yx * vec2(`+we[0]+", "+we[1]+`));
|
|
}
|
|
`:se[1]===1?`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
return ivec2(index, 0);
|
|
}
|
|
`:se[0]===1?`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
return ivec2(0, index);
|
|
}
|
|
`:`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
int r = index / `+se[1]+`;
|
|
int c = index - r * `+se[1]+`;
|
|
return ivec2(r, c);
|
|
}
|
|
`}(U,te);case 3:return oe=te,ae=po(["r","c","d"],U),`
|
|
ivec3 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+oe[0]+", "+oe[1]+`));
|
|
int index = resTexRC.x * `+oe[1]+` + resTexRC.y;
|
|
`+ae+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
`;case 4:return function(se,we){var Ce=po(["r","c","d","d2"],se);return`
|
|
ivec4 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
`+Ce+`
|
|
return ivec4(r, c, d, d2);
|
|
}
|
|
`}(U,te);case 5:return function(se,we){var Ce=po(["r","c","d","d2","d3"],se);return`
|
|
ivec5 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx * vec2(`+we[0]+`,
|
|
`+we[1]+`));
|
|
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
|
|
`+Ce+`
|
|
|
|
ivec5 outShape = ivec5(r, c, d, d2, d3);
|
|
return outShape;
|
|
}
|
|
`}(U,te);case 6:return function(se,we){var Ce=po(["r","c","d","d2","d3","d4"],se);return`
|
|
ivec6 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
|
|
`+Ce+`
|
|
|
|
ivec6 result = ivec6(r, c, d, d2, d3, d4);
|
|
return result;
|
|
}
|
|
`}(U,te);default:throw new Error(U.length+"-D output sampling is not yet supported")}var oe,ae}(t.logicalShape,d),s=function(U){return`
|
|
void setOutput(float val) {
|
|
`+U.output+` = vec4(val, 0, 0, 0);
|
|
}
|
|
`}(A)),r&&(D+=jp),[D,T,s,u,a,l,e].join(`
|
|
`)}function zo(n){var t=n.shapeInfo.logicalShape;switch(t.length){case 0:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return"float "+i+"() {return "+r+";}";var a=e.shapeInfo.texShape,s=a[0],u=a[1];if(s===1&&u===1)return`
|
|
float `+i+`() {
|
|
return sampleTexture(`+r+`, halfCR);
|
|
}
|
|
`;var l=e.shapeInfo.texShape,d=l[0],A=l[1],T=ho(r);return`
|
|
float `+i+`() {
|
|
vec2 uv = uvFromFlat(`+d+", "+A+", "+T+`);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`}(n);case 1:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return`
|
|
float `+i+`(int index) {
|
|
`+Vo(e)+`
|
|
}
|
|
`;var a=e.shapeInfo.texShape,s=a[0],u=a[1];if(u===1&&s===1)return`
|
|
float `+i+`(int index) {
|
|
return sampleTexture(`+r+`, halfCR);
|
|
}
|
|
`;var l=ho(r);return u===1?`
|
|
float `+i+`(int index) {
|
|
vec2 uv = vec2(0.5, (float(index + `+l+") + 0.5) / "+s+`.0);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`:s===1?`
|
|
float `+i+`(int index) {
|
|
vec2 uv = vec2((float(index + `+l+") + 0.5) / "+u+`.0, 0.5);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`:`
|
|
float `+i+`(int index) {
|
|
vec2 uv = uvFromFlat(`+s+", "+u+", index + "+l+`);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`}(n);case 2:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=e.shapeInfo.texShape;if(s!=null&&ue(r,s)){var u=s[0],l=s[1];return`
|
|
float `+a+`(int row, int col) {
|
|
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+l+".0, "+u+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}var d=Y(r),A=d.newShape,T=d.keptDims,D=A;if(D.length<r.length){var U=Qo(e,D);return`
|
|
`+zo(U)+`
|
|
float `+a+`(int row, int col) {
|
|
return `+a+"("+Ho(["row","col"],T)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col) {
|
|
int index = round(dot(vec2(row, col), vec2(`+r[1]+`, 1)));
|
|
`+Vo(e)+`
|
|
}
|
|
`;var te=s[0],oe=s[1],ae=ho(i);return oe===1?`
|
|
float `+a+`(int row, int col) {
|
|
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
|
|
vec2 uv = vec2(0.5, (index + 0.5) / `+te+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`:te===1?`
|
|
float `+a+`(int row, int col) {
|
|
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
|
|
vec2 uv = vec2((index + 0.5) / `+oe+`.0, 0.5);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`:`
|
|
float `+a+`(int row, int col) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+r[1]+" + col + "+ae+`;
|
|
vec2 uv = uvFromFlat(`+te+", "+oe+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 3:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[1]*r[2],u=r[2],l=Y(r),d=l.newShape,A=l.keptDims,T=d;if(T.length<r.length){var D=Qo(e,T);return`
|
|
`+zo(D)+`
|
|
float `+a+`(int row, int col, int depth) {
|
|
return `+a+"("+Ho(["row","col","depth"],A)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
int index = round(dot(vec3(row, col, depth),
|
|
vec3(`+s+", "+u+`, 1)));
|
|
`+Vo(e)+`
|
|
}
|
|
`;var U=e.shapeInfo.texShape,te=U[0],oe=U[1],ae=e.shapeInfo.flatOffset;if(oe===s&&ae==null)return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
float texR = float(row);
|
|
float texC = dot(vec2(col, depth), vec2(`+u+`, 1));
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+oe+".0, "+te+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(oe===u&&ae==null)return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
float texR = dot(vec2(row, col), vec2(`+r[1]+`, 1));
|
|
float texC = float(depth);
|
|
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+oe+".0, "+te+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var se=ho(i);return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+s+" + col * "+u+" + depth + "+se+`;
|
|
vec2 uv = uvFromFlat(`+te+", "+oe+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 4:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[3],u=r[2]*s,l=r[1]*u,d=Y(r),A=d.newShape,T=d.keptDims;if(A.length<r.length){var D=Qo(e,A);return`
|
|
`+zo(D)+`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
return `+a+"("+Ho(["row","col","depth","depth2"],T)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
int index = round(dot(vec4(row, col, depth, depth2),
|
|
vec4(`+l+", "+u+", "+s+`, 1)));
|
|
`+Vo(e)+`
|
|
}
|
|
`;var U=e.shapeInfo.flatOffset,te=e.shapeInfo.texShape,oe=te[0],ae=te[1];if(ae===l&&U==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
float texR = float(row);
|
|
float texC =
|
|
dot(vec3(col, depth, depth2),
|
|
vec3(`+u+", "+s+`, 1));
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+ae+".0, "+oe+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(ae===s&&U==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
float texR = dot(vec3(row, col, depth),
|
|
vec3(`+r[1]*r[2]+", "+r[2]+`, 1));
|
|
float texC = float(depth2);
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+ae+".0, "+oe+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var se=ho(i);return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+l+" + col * "+u+` +
|
|
depth * `+s+` + depth2;
|
|
vec2 uv = uvFromFlat(`+oe+", "+ae+", index + "+se+`);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 5:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[4],u=r[3]*s,l=r[2]*u,d=r[1]*l,A=Y(r),T=A.newShape,D=A.keptDims;if(T.length<r.length){var U=Qo(e,T);return`
|
|
`+zo(U)+`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
return `+a+"("+Ho(["row","col","depth","depth2","depth3"],D)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
float index = dot(
|
|
vec4(row, col, depth, depth2),
|
|
vec4(`+d+", "+l+", "+u+", "+s+`)) +
|
|
depth3;
|
|
`+Vo(e)+`
|
|
}
|
|
`;var te=e.shapeInfo.flatOffset,oe=e.shapeInfo.texShape,ae=oe[0],se=oe[1];if(se===d&&te==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
int texR = row;
|
|
float texC = dot(vec4(col, depth, depth2, depth3),
|
|
vec4(`+l+", "+u+", "+s+`, 1));
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+se+".0, "+ae+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(se===s&&te==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
float texR = dot(
|
|
vec4(row, col, depth, depth2),
|
|
vec4(`+r[1]*r[2]*r[3]+`,
|
|
`+r[2]*r[3]+", "+r[3]+`, 1));
|
|
int texC = depth3;
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+se+".0, "+ae+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var we=ho(i);return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+d+" + col * "+l+" + depth * "+u+` +
|
|
depth2 * `+s+" + depth3 + "+we+`;
|
|
vec2 uv = uvFromFlat(`+ae+", "+se+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 6:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=Y(r),u=s.newShape,l=s.keptDims;if(u.length<r.length){var d=Qo(e,u);return`
|
|
`+zo(d)+`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
return `+a+"("+Ho(["row","col","depth","depth2","depth3","depth4"],l)+`);
|
|
}
|
|
`}var A=r[5],T=r[4]*A,D=r[3]*T,U=r[2]*D,te=r[1]*U;if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
int index = round(dot(
|
|
vec4(row, col, depth, depth2),
|
|
vec4(`+te+", "+U+", "+D+", "+T+`)) +
|
|
dot(
|
|
vec2(depth3, depth4),
|
|
vec2(`+A+`, 1)));
|
|
`+Vo(e)+`
|
|
}
|
|
`;var oe=e.shapeInfo.flatOffset,ae=e.shapeInfo.texShape,se=ae[0],we=ae[1];if(we===te&&oe==null)return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
int texR = row;
|
|
float texC = dot(vec4(col, depth, depth2, depth3),
|
|
vec4(`+U+", "+D+", "+T+", "+A+`)) +
|
|
float(depth4);
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+we+".0, "+se+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(we===A&&oe==null)return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
float texR = dot(vec4(row, col, depth, depth2),
|
|
vec4(`+r[1]*r[2]*r[3]*r[4]+`,
|
|
`+r[2]*r[3]*r[4]+`,
|
|
`+r[3]*r[4]+`,
|
|
`+r[4]+`)) + float(depth3);
|
|
int texC = depth4;
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+we+".0, "+se+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var Ce=ho(i);return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+te+" + col * "+U+" + depth * "+D+` +
|
|
depth2 * `+T+" + depth3 * "+A+" + depth4 + "+Ce+`;
|
|
vec2 uv = uvFromFlat(`+se+", "+we+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);default:throw new Error(t.length+"-D input sampling is not yet supported")}}function Sc(n){var t,e,r;switch(n.shapeInfo.logicalShape.length){case 0:return t=n.name,e="get"+t.charAt(0).toUpperCase()+t.slice(1),r=Un(),`
|
|
vec4 `+e+`() {
|
|
return `+r.texture2D+"("+t+`, halfCR);
|
|
}
|
|
`;case 1:return function(i){var a=i.name,s="get"+a.charAt(0).toUpperCase()+a.slice(1),u=i.shapeInfo.texShape,l=[Math.ceil(u[0]/2),Math.ceil(u[1]/2)],d=Un();return`
|
|
vec4 `+s+`(int index) {
|
|
vec2 uv = packedUVfrom1D(
|
|
`+l[0]+", "+l[1]+`, index);
|
|
return `+d.texture2D+"("+a+`, uv);
|
|
}
|
|
`}(n);case 2:return function(i){var a=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,d=l[0],A=l[1],T=Un();if(l!=null&&ue(a,l))return`
|
|
vec4 `+u+`(int row, int col) {
|
|
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+A+".0, "+d+`.0);
|
|
|
|
return `+T.texture2D+"("+s+`, uv);
|
|
}
|
|
`;var D=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)],U=Math.ceil(a[1]/2);return`
|
|
vec4 `+u+`(int row, int col) {
|
|
vec2 uv = packedUVfrom2D(`+U+", "+D[0]+", "+D[1]+`, row, col);
|
|
return `+T.texture2D+"("+s+`, uv);
|
|
}
|
|
`}(n);case 3:return function(i){var a=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,d=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)];if(a[0]===1){var A=a.slice(1),T=Qo(i,A);return`
|
|
`+Sc(T)+`
|
|
vec4 `+u+`(int b, int row, int col) {
|
|
return `+u+"("+Ho(["b","row","col"],[1,2])+`);
|
|
}
|
|
`}var D=d[0],U=d[1],te=Math.ceil(a[2]/2),oe=te*Math.ceil(a[1]/2),ae=Un();return`
|
|
vec4 `+u+`(int b, int row, int col) {
|
|
vec2 uv = packedUVfrom3D(
|
|
`+D+", "+U+", "+oe+", "+te+`, b, row, col);
|
|
return `+ae.texture2D+"("+s+`, uv);
|
|
}
|
|
`}(n);default:return function(i){for(var a=i.shapeInfo.logicalShape,s=a.length,u=i.name,l="get"+u.charAt(0).toUpperCase()+u.slice(1),d=i.shapeInfo.texShape,A=[Math.ceil(d[0]/2),Math.ceil(d[1]/2)],T=A[0],D=A[1],U=Math.ceil(a[s-1]/2),te=U*Math.ceil(a[s-2]/2),oe="int b, int row, int col",ae="b * "+te+" + (row / 2) * "+U+" + (col / 2)",se=2;se<s-1;se++)oe="int b"+se+", "+oe,te*=a[s-se-1],ae="b"+se+" * "+te+" + "+ae;var we=Un();return`
|
|
vec4 `+l+"("+oe+`) {
|
|
int index = `+ae+`;
|
|
int texR = index / `+D+`;
|
|
int texC = index - texR * `+D+`;
|
|
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+D+", "+T+`);
|
|
return `+we.texture2D+"("+u+`, uv);
|
|
}
|
|
`}(n)}}var kp=`
|
|
vec2 uvFromFlat(int texNumR, int texNumC, int index) {
|
|
int texR = index / texNumC;
|
|
int texC = index - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
vec2 packedUVfrom1D(int texNumR, int texNumC, int index) {
|
|
int texelIndex = index / 2;
|
|
int texR = texelIndex / texNumC;
|
|
int texC = texelIndex - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
`,Op=`
|
|
vec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,
|
|
int texNumC, int row, int col) {
|
|
int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);
|
|
int texR = texelIndex / texNumC;
|
|
int texC = texelIndex - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
`,Dp=`
|
|
vec2 packedUVfrom3D(int texNumR, int texNumC,
|
|
int texelsInBatch, int texelsInLogicalRow, int b,
|
|
int row, int col) {
|
|
int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);
|
|
int texR = index / texNumC;
|
|
int texC = index - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
`,jp=`
|
|
float getChannel(vec4 frag, vec2 innerDims) {
|
|
vec2 modCoord = mod(innerDims, 2.);
|
|
return modCoord.x == 0. ?
|
|
(modCoord.y == 0. ? frag.r : frag.g) :
|
|
(modCoord.y == 0. ? frag.b : frag.a);
|
|
}
|
|
float getChannel(vec4 frag, int dim) {
|
|
float modCoord = mod(float(dim), 2.);
|
|
return modCoord == 0. ? frag.r : frag.g;
|
|
}
|
|
`;function ho(n){return"offset"+n}function Vo(n){var t=n.name,e=le(n.shapeInfo.logicalShape);return e<2?"return "+t+";":`
|
|
for (int i = 0; i < `+e+`; i++) {
|
|
if (i == index) {
|
|
return `+t+`[i];
|
|
}
|
|
}
|
|
`}function Gr(n){if(n<=1)return"int";if(n===2)return"ivec2";if(n===3)return"ivec3";if(n===4)return"ivec4";if(n===5)return"ivec5";if(n===6)return"ivec6";throw Error("GPU for rank "+n+" is not yet supported")}function Qo(n,t){var e=JSON.parse(JSON.stringify(n));return e.shapeInfo.logicalShape=t,e}function Ho(n,t){return t.map(function(e){return n[e]}).join(", ")}var Pp=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,Z(n.length>2,function(){return"Packed arg"+(e.charAt(0).toUpperCase()+e.slice(1))+" supports only inputs with rank above 2."});var i=n[n.length-1],a=Math.ceil(i/t);this.outputShape=n.slice(0,-1),a>1&&this.outputShape.push(a),r||this.variableNames.push("bestIndicesA");var s,u,l=this.outputShape,d=l.length,A=Gr(d),T=li("coords",d);if(a===1){var D=Gr(u=d+1);s=`
|
|
`+D+" sourceLocR = "+D+"("+T.join()+`, 0);
|
|
++`+T[d-1]+`;
|
|
`+D+" sourceLocG = "+D+"("+T.join()+`, 0);
|
|
++`+T[d-2]+`;
|
|
`+D+" sourceLocA = "+D+"("+T.join()+`, 0);
|
|
--`+T[d-1]+`;
|
|
`+D+" sourceLocB = "+D+"("+T.join()+`, 0);
|
|
--`+T[d-2]+";"}else u=d,s=`
|
|
`+A+` sourceLocR = coords;
|
|
++`+T[d-1]+`;
|
|
`+A+` sourceLocG = coords;
|
|
++`+T[d-2]+`;
|
|
`+A+` sourceLocA = coords;
|
|
--`+T[d-1]+`;
|
|
`+A+` sourceLocB = coords;
|
|
--`+T[d-2]+";";var U=["x","y","z","w","u","v"].slice(0,u),te="."+U[u-1],oe=U.map(function(We){return"int "+We}),ae=li("sourceLocR",u-1).concat("inIdx.r"),se=li("sourceLocG",u-1).concat("inIdx.g"),we=li("sourceLocB",u-1).concat("inIdx.b"),Ce=li("sourceLocA",u-1).concat("inIdx.a"),me=e==="max"?"greaterThan":"lessThan",Se=r?"":`
|
|
inIdx = round(vec4(getBestIndicesAChannel(`+ae.join()+`),
|
|
getBestIndicesAChannel(`+se.join()+`),
|
|
getBestIndicesAChannel(`+we.join()+`),
|
|
getBestIndicesAChannel(`+Ce.join()+")));",Re=`vec4(
|
|
getAChannel(`+ae.join()+`),
|
|
hasNextCol ? getAChannel(`+se.join()+`) : 0.,
|
|
hasNextRow ? getAChannel(`+we.join()+`) : 0.,
|
|
hasNextRow && hasNextCol ? getAChannel(`+Ce.join()+") : 0.)",Ue=r?"":`
|
|
float getBestIndicesAChannel(`+oe.join()+`) {
|
|
return getChannel(getBestIndicesA(`+U.join()+`),
|
|
vec2(`+U.slice(-2).join()+`));
|
|
}`;this.userCode=`
|
|
float getAChannel(`+oe.join()+`) {
|
|
return getChannel(getA(`+U.join()+`),
|
|
vec2(`+U.slice(-2).join()+`));
|
|
}
|
|
`+Ue+`
|
|
void main() {
|
|
`+A+` coords = getOutputCoords();
|
|
bool hasNextCol = `+T[d-1]+" < "+(l[d-1]-1)+`;
|
|
bool hasNextRow = `+T[d-2]+" < "+(l[d-2]-1)+`;
|
|
`+s+`
|
|
ivec4 srcIdx = ivec4(sourceLocR`+te+", sourceLocG"+te+`,
|
|
sourceLocB`+te+", sourceLocA"+te+") * "+t+`;
|
|
ivec4 inIdx = srcIdx;
|
|
vec4 bestIndex = vec4(inIdx);
|
|
vec4 bestValue = `+Re+`;
|
|
|
|
for (int i = 0; i < `+t+`; i++) {
|
|
inIdx = srcIdx;
|
|
`+Se+`
|
|
vec4 candidate = `+Re+`;
|
|
bvec4 nan = isnan(candidate);
|
|
bvec4 replace = bvec4(
|
|
vec4(`+me+`(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));
|
|
|
|
bestValue = vec4(replace.x ? candidate.x : bestValue.x,
|
|
replace.y ? candidate.y : bestValue.y,
|
|
replace.z ? candidate.z : bestValue.z,
|
|
replace.w ? candidate.w : bestValue.w);
|
|
bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));
|
|
srcIdx++;
|
|
}
|
|
setOutput(bestIndex);
|
|
}
|
|
`},Bp=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterHeight,l=n.effectiveFilterWidth,d=u-1-n.padInfo.top,A=l-1-n.padInfo.left,T=1/(t*e);this.userCode=`
|
|
const ivec2 pads = ivec2(`+d+", "+A+`);
|
|
const float avgMultiplier = float(`+T+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 dyRCCorner = coords.yz - pads;
|
|
int dyRCorner = dyRCCorner.x;
|
|
int dyCCorner = dyRCCorner.y;
|
|
|
|
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+u+`;
|
|
wR += `+a+`) {
|
|
float dyR = float(dyRCorner + wR) / `+r+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+l+`;
|
|
wC+= `+s+`) {
|
|
float dyC = float(dyCCorner + wC) / `+i+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(b, idyR, idyC, d);
|
|
|
|
dotProd += dyValue * avgMultiplier;
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},_p=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.effectiveFilterDepth,T=n.effectiveFilterHeight,D=n.effectiveFilterWidth,U=A-1-n.padInfo.front,te=T-1-n.padInfo.top,oe=D-1-n.padInfo.left,ae=1/(t*e*r);this.userCode=`
|
|
const ivec3 pads = ivec3(`+U+", "+te+", "+oe+`);
|
|
const float avgMultiplier = float(`+ae+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
|
|
int dyDCorner = dyCorner.x;
|
|
int dyRCorner = dyCorner.y;
|
|
int dyCCorner = dyCorner.z;
|
|
|
|
// Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get
|
|
// dx(xD, xR, xC, ch).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
|
|
for (int wD = 0; wD < `+A+`;
|
|
wD += `+u+`) {
|
|
float dyD = float(dyDCorner + wD) / `+i+`.0;
|
|
|
|
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyD = int(dyD);
|
|
|
|
for (int wR = 0; wR < `+T+`;
|
|
wR += `+l+`) {
|
|
float dyR = float(dyRCorner + wR) / `+a+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
|
|
fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+D+`;
|
|
wC += `+d+`) {
|
|
float dyC = float(dyCCorner + wC) / `+s+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
|
|
|
|
dotProd += dyValue * avgMultiplier;
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Mp=function(n,t,e,r,i,a){this.outputShape=[],this.variableNames=["x","mean","variance"],Zt(n,t),Zt(n,e);var s="0.0";r!=null&&(Zt(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="1.0";i!=null&&(Zt(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
float x = getXAtOutCoords();
|
|
float mean = getMeanAtOutCoords();
|
|
float variance = getVarianceAtOutCoords();
|
|
float offset = `+s+`;
|
|
float scale = `+u+`;
|
|
float inv = scale * inversesqrt(variance + float(`+a+`));
|
|
setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));
|
|
}
|
|
`},Np=function(n,t,e,r,i,a){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],Zt(n,t),Zt(n,e);var s="vec4(0.0)";r!=null&&(Zt(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="vec4(1.0)";i!=null&&(Zt(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
vec4 offset = `+s+`;
|
|
vec4 scale = `+u+`;
|
|
|
|
vec4 x = getXAtOutCoords();
|
|
vec4 mean = getMeanAtOutCoords();
|
|
vec4 variance = getVarianceAtOutCoords();
|
|
|
|
vec4 inv = scale * inversesqrt(variance + vec4(`+a+`));
|
|
|
|
setOutput((x - mean) * inv + offset);
|
|
}
|
|
`},Fp="return areal * breal - aimag * bimag;",Lp="return areal * bimag + aimag * breal;",Ic=function(n,t,e){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=Zt(t,e),this.userCode=`
|
|
float binaryOpComplex(
|
|
float areal, float aimag, float breal, float bimag) {
|
|
`+n+`
|
|
}
|
|
|
|
void main() {
|
|
float areal = getARealAtOutCoords();
|
|
float aimag = getAImagAtOutCoords();
|
|
float breal = getBRealAtOutCoords();
|
|
float bimag = getBImagAtOutCoords();
|
|
setOutput(binaryOpComplex(areal, aimag, breal, bimag));
|
|
}
|
|
`},Fu="return a + b;",Lu="return a - b;",Tc="return a * b;",Rc="return (a < 0.) ? b * a : a;",ln=function(n,t,e){this.variableNames=["A","B"],this.outputShape=Zt(t,e),this.userCode=`
|
|
float binaryOperation(float a, float b) {
|
|
`+n+`
|
|
}
|
|
|
|
void main() {
|
|
float a = getAAtOutCoords();
|
|
float b = getBAtOutCoords();
|
|
setOutput(binaryOperation(a, b));
|
|
}
|
|
`},kc=`
|
|
vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));
|
|
return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);
|
|
`,ma=function(n,t,e,r){r===void 0&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=Zt(t,e);var i=this.outputShape.length,a="";if(r)if(i===0||le(this.outputShape)===1)a=`
|
|
result.y = 0.;
|
|
result.z = 0.;
|
|
result.w = 0.;
|
|
`;else if(a=`
|
|
`+Gr(i)+` coords = getOutputCoords();
|
|
`,i===1)a+=`
|
|
result.y = (coords + 1) >= `+this.outputShape[0]+` ? 0. : result.y;
|
|
result.z = 0.;
|
|
result.w = 0.;
|
|
`;else{var s=li("coords",i);a+=`
|
|
bool nextRowOutOfBounds =
|
|
(`+s[i-2]+" + 1) >= "+this.outputShape[i-2]+`;
|
|
bool nextColOutOfBounds =
|
|
(`+s[i-1]+" + 1) >= "+this.outputShape[i-1]+`;
|
|
result.y = nextColOutOfBounds ? 0. : result.y;
|
|
result.z = nextRowOutOfBounds ? 0. : result.z;
|
|
result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;
|
|
`}this.userCode=`
|
|
vec4 binaryOperation(vec4 a, vec4 b) {
|
|
`+n+`
|
|
}
|
|
|
|
void main() {
|
|
vec4 a = getAAtOutCoords();
|
|
vec4 b = getBAtOutCoords();
|
|
|
|
vec4 result = binaryOperation(a, b);
|
|
`+a+`
|
|
|
|
setOutput(result);
|
|
}
|
|
`},Up=function(){function n(t){this.variableNames=["A"],this.outputShape=t,this.userCode=`
|
|
uniform float minVal;
|
|
uniform float maxVal;
|
|
|
|
void main() {
|
|
float value = getAAtOutCoords();
|
|
if (isnan(value)) {
|
|
setOutput(value);
|
|
return;
|
|
}
|
|
|
|
setOutput(clamp(value, minVal, maxVal));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,a){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(a,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(a,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Wp=function(){function n(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.userCode=`
|
|
uniform float minVal;
|
|
uniform float maxVal;
|
|
|
|
void main() {
|
|
vec4 value = getAAtOutCoords();
|
|
|
|
if (any(isnan(value))) {
|
|
setOutput(value);
|
|
return;
|
|
}
|
|
|
|
setOutput(clamp(value, vec4(minVal), vec4(maxVal)));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,a){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(a,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(a,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),zp=function(n){this.variableNames=["real","imag"],this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
float re = abs(getRealAtOutCoords());
|
|
float im = abs(getImagAtOutCoords());
|
|
float mx = max(re, im);
|
|
|
|
// sadly the length function in glsl is not underflow-safe
|
|
// (at least not on Intel GPUs). So the safe solution is
|
|
// to ensure underflow-safety in all cases.
|
|
setOutput(
|
|
mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))
|
|
);
|
|
}
|
|
`},Vp=function(n){this.outputShape=[],this.outputShape=On(n,1),this.variableNames=n.map(function(u,l){return"T"+l});var t=new Array(n.length-1);t[0]=n[0][1];for(var e=1;e<t.length;e++)t[e]=t[e-1]+n[e][1];var r=["if (yC < "+t[0]+") setOutput(getT0(yR, yC));"];for(e=1;e<t.length;e++){var i=t[e-1];r.push("else if (yC < "+t[e]+") setOutput(getT"+e+"(yR, yC-"+i+"));")}var a=t.length,s=t[t.length-1];r.push("else setOutput(getT"+a+"(yR, yC-"+s+"));"),this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int yR = coords.x;
|
|
int yC = coords.y;
|
|
|
|
`+r.join(`
|
|
`)+`
|
|
}
|
|
`},Qp=function(n,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=On(n,t);var e=this.outputShape,r=e.length,i=Gr(r),a=li("coords",r),s=["x","y","z","w","u","v"].slice(0,r);this.variableNames=n.map(function(ae,se){return"T"+se});var u=new Array(n.length-1);u[0]=n[0][t];for(var l=1;l<u.length;l++)u[l]=u[l-1]+n[l][t];var d=s[t],A=s.slice(-2),T=s.join(),D="if ("+d+" < "+u[0]+`) {
|
|
return getChannel(
|
|
getT0(`+T+"), vec2("+A.join()+`));
|
|
}`;for(l=1;l<u.length;l++){var U=u[l-1];D+=`
|
|
if (`+d+" < "+u[l]+" && "+d+" >= "+u[l-1]+`) {
|
|
return getChannel(
|
|
getT`+l+"("+Ys(s,d,U)+`),
|
|
vec2(`+Ys(A,d,U)+`));
|
|
}`}var te=u.length,oe=u[u.length-1];D+=`
|
|
return getChannel(
|
|
getT`+te+"("+Ys(s,d,oe)+`),
|
|
vec2(`+Ys(A,d,oe)+"));",this.userCode=`
|
|
float getValue(`+s.map(function(ae){return"int "+ae})+`) {
|
|
`+D+`
|
|
}
|
|
|
|
void main() {
|
|
`+i+` coords = getOutputCoords();
|
|
vec4 result = vec4(getValue(`+a+`), 0., 0., 0.);
|
|
|
|
`+a[r-1]+" = "+a[r-1]+` + 1;
|
|
if (`+a[r-1]+" < "+e[r-1]+`) {
|
|
result.g = getValue(`+a+`);
|
|
}
|
|
|
|
`+a[r-2]+" = "+a[r-2]+` + 1;
|
|
if (`+a[r-2]+" < "+e[r-2]+`) {
|
|
result.a = getValue(`+a+`);
|
|
}
|
|
|
|
`+a[r-1]+" = "+a[r-1]+` - 1;
|
|
if (`+a[r-2]+" < "+e[r-2]+` &&
|
|
`+a[r-1]+" < "+e[r-1]+`) {
|
|
result.b = getValue(`+a+`);
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`};function Ys(n,t,e){var r=n.indexOf(t);return n.map(function(i,a){return a===r?i+" - "+e:i}).join()}var Hp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,a=n.dataFormat==="channelsLast";this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int wR = coords.x;
|
|
int wC = coords.y;
|
|
int d1 = coords.z;
|
|
int d2 = coords.w;
|
|
|
|
// Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
|
|
for (int b = 0; b < `+n.batchSize+`; b++) {
|
|
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
|
|
int xR = wR + yR * `+t+" - "+r+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
|
|
int xC = wC + yC * `+e+" - "+i+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
if (`+a+`) {
|
|
float dyValue = getDy(b, yR, yC, d2);
|
|
float xValue = getX(b, xR, xC, d1);
|
|
dotProd += (xValue * dyValue);
|
|
} else {
|
|
float dyValue = getDy(b, d2, yR, yC);
|
|
float xValue = getX(b, d1, xR, xC);
|
|
dotProd += (xValue * dyValue);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Gp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=n.dataFormat==="channelsLast",s=t-1-n.padInfo.top,u=e-1-n.padInfo.left,l=a?1:2,d=a?2:3,A=a?3:1;this.userCode=`
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d1 = coords[`+A+`];
|
|
|
|
ivec2 dyCorner = ivec2(coords[`+l+"], coords["+d+`]) - pads;
|
|
int dyRCorner = dyCorner.x;
|
|
int dyCCorner = dyCorner.y;
|
|
|
|
// Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+t+`; wR++) {
|
|
float dyR = float(dyRCorner + wR) / `+r+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
int wRPerm = `+t+` - 1 - wR;
|
|
|
|
for (int wC = 0; wC < `+e+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+i+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
int wCPerm = `+e+` - 1 - wC;
|
|
|
|
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
|
|
|
|
if (`+a+`) {
|
|
float xValue = getDy(batch, idyR, idyC, d2);
|
|
float wValue = getW(wRPerm, wCPerm, d1, d2);
|
|
dotProd += xValue * wValue;
|
|
} else {
|
|
float xValue = getDy(batch, d2, idyR, idyC);
|
|
float wValue = getW(wRPerm, wCPerm, d1, d2);
|
|
dotProd += xValue * wValue;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Xp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.padInfo.front,a=n.padInfo.top,s=n.padInfo.left;this.userCode=`
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int wF = coords.x;
|
|
int wR = coords.y;
|
|
int wC = coords.z;
|
|
int d1 = coords.w;
|
|
int d2 = coords.u;
|
|
|
|
float dotProd = 0.0;
|
|
|
|
for (int b = 0; b < `+n.batchSize+`; b++) {
|
|
for (int yF = 0; yF < `+n.outDepth+`; yF++) {
|
|
int xF = wF + yF * `+t+" - "+i+`;
|
|
|
|
if (xF < 0 || xF >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
|
|
int xR = wR + yR * `+e+" - "+a+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
|
|
int xC = wC + yC * `+r+" - "+s+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float dyValue = getDy(b, yF, yR, yC, d2);
|
|
float xValue = getX(b, xF, xR, xC, d1);
|
|
dotProd += (xValue * dyValue);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Kp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=t-1-n.padInfo.front,l=e-1-n.padInfo.top,d=r-1-n.padInfo.left;this.userCode=`
|
|
const ivec3 pads = ivec3(`+u+", "+l+", "+d+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int d1 = coords.u;
|
|
|
|
|
|
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
|
|
int dyFCorner = dyCorner.x;
|
|
int dyRCorner = dyCorner.y;
|
|
int dyCCorner = dyCorner.z;
|
|
|
|
float dotProd = 0.0;
|
|
for (int wF = 0; wF < `+t+`; wF++) {
|
|
float dyF = float(dyFCorner + wF) / `+i+`.0;
|
|
|
|
if (dyF < 0.0 || dyF >= `+n.outDepth+`.0 || fract(dyF) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyF = int(dyF);
|
|
|
|
int wFPerm = `+t+` - 1 - wF;
|
|
|
|
for (int wR = 0; wR < `+e+`; wR++) {
|
|
float dyR = float(dyRCorner + wR) / `+a+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
|
|
fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
int wRPerm = `+e+` - 1 - wR;
|
|
|
|
for (int wC = 0; wC < `+r+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+s+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
int wCPerm = `+r+` - 1 - wC;
|
|
|
|
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
|
|
float xValue = getDy(batch, idyF, idyR, idyC, d2);
|
|
float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);
|
|
dotProd += xValue * wValue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Zp=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,a=n.outChannels/n.inChannels;this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int wR = coords.x;
|
|
int wC = coords.y;
|
|
int d1 = coords.z;
|
|
int dm = coords.w;
|
|
int d2 = d1 * `+a+` + dm;
|
|
|
|
float dotProd = 0.0;
|
|
|
|
// TO DO: Vec4 over the batch size
|
|
for (int b = 0; b < `+n.batchSize+`; b++) {
|
|
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
|
|
int xR = wR + yR * `+t+" - "+r+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
|
|
int xC = wC + yC * `+e+" - "+i+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float dyValue = getDy(b, yR, yC, d2);
|
|
float xValue = getX(b, xR, xC, d1);
|
|
dotProd += (xValue * dyValue);
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Jp=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=t-1-n.padInfo.top,s=e-1-n.padInfo.left,u=n.outChannels/n.inChannels;this.userCode=`
|
|
const ivec2 pads = ivec2(`+a+", "+s+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d1 = coords[3];
|
|
ivec2 dyCorner = coords.yz - pads;
|
|
int dyRCorner = dyCorner.x;
|
|
int dyCCorner = dyCorner.y;
|
|
|
|
float dotProd = 0.0;
|
|
|
|
for (int wR = 0; wR < `+t+`; wR++) {
|
|
float dyR = float(dyRCorner + wR) / `+r+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
int wRPerm = `+t+` - 1 - wR;
|
|
|
|
for (int wC = 0; wC < `+e+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+i+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
int wCPerm = `+e+` - 1 - wC;
|
|
|
|
// TO DO: Vec4 over the channelMul
|
|
for (int dm = 0; dm < `+u+`; dm++) {
|
|
int d2 = d1 * `+u+` + dm;
|
|
float xValue = getDy(batch, idyR, idyC, d2);
|
|
float wValue = getW(wRPerm, wCPerm, d1, dm);
|
|
dotProd += xValue * wValue;
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Oc=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.padInfo.top,a=n.padInfo.left,s=n.strideHeight,u=n.strideWidth,l=n.dilationHeight,d=n.dilationWidth,A=n.filterHeight,T=n.filterWidth,D=4*Math.floor(n.inChannels/4),U=n.inChannels%4,te=n.dataFormat==="channelsLast",oe=te?1:2,ae=te?2:3,se=te?3:1,we="",Ce="";e&&(we=r?`float activation(float a) {
|
|
float b = getPreluActivationWeightsAtOutCoords();
|
|
`+e+`
|
|
}`:`
|
|
float activation(float x) {
|
|
`+e+`
|
|
}
|
|
`,Ce="result = activation(result);");var me=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+we+`
|
|
|
|
const ivec2 strides = ivec2(`+s+", "+u+`);
|
|
const ivec2 pads = ivec2(`+i+", "+a+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d2 = coords[`+se+`];
|
|
|
|
ivec2 xRCCorner =
|
|
ivec2(coords[`+oe+"], coords["+ae+`]) * strides - pads;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+A+`; wR++) {
|
|
int xR = xRCorner + wR * `+l+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+T+`; wC++) {
|
|
int xC = xCCorner + wC * `+d+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int d1 = 0; d1 < `+D+`; d1 += 4) {
|
|
vec4 wValues = vec4(
|
|
getW(wR, wC, d1, d2),
|
|
getW(wR, wC, d1 + 1, d2),
|
|
getW(wR, wC, d1 + 2, d2),
|
|
getW(wR, wC, d1 + 3, d2)
|
|
);
|
|
|
|
if (`+te+`) {
|
|
vec4 xValues = vec4(
|
|
getX(batch, xR, xC, d1),
|
|
getX(batch, xR, xC, d1 + 1),
|
|
getX(batch, xR, xC, d1 + 2),
|
|
getX(batch, xR, xC, d1 + 3)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else {
|
|
vec4 xValues = vec4(
|
|
getX(batch, d1, xR, xC),
|
|
getX(batch, d1 + 1, xR, xC),
|
|
getX(batch, d1 + 2, xR, xC),
|
|
getX(batch, d1 + 3, xR, xC)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
}
|
|
|
|
if (`+(U===1)+`) {
|
|
|
|
if (`+te+`) {
|
|
dotProd +=
|
|
getX(batch, xR, xC, `+D+`) *
|
|
getW(wR, wC, `+D+`, d2);
|
|
} else {
|
|
dotProd +=
|
|
getX(batch, `+D+`, xR, xC) *
|
|
getW(wR, wC, `+D+`, d2);
|
|
}
|
|
|
|
} else if (`+(U===2)+`) {
|
|
vec2 wValues = vec2(
|
|
getW(wR, wC, `+D+`, d2),
|
|
getW(wR, wC, `+D+` + 1, d2)
|
|
);
|
|
|
|
if (`+te+`) {
|
|
vec2 xValues = vec2(
|
|
getX(batch, xR, xC, `+D+`),
|
|
getX(batch, xR, xC, `+D+` + 1)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else {
|
|
vec2 xValues = vec2(
|
|
getX(batch, `+D+`, xR, xC),
|
|
getX(batch, `+D+` + 1, xR, xC)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
|
|
} else if (`+(U===3)+`) {
|
|
vec3 wValues = vec3(
|
|
getW(wR, wC, `+D+`, d2),
|
|
getW(wR, wC, `+D+` + 1, d2),
|
|
getW(wR, wC, `+D+` + 2, d2)
|
|
);
|
|
|
|
if (`+te+`) {
|
|
vec3 xValues = vec3(
|
|
getX(batch, xR, xC, `+D+`),
|
|
getX(batch, xR, xC, `+D+` + 1),
|
|
getX(batch, xR, xC, `+D+` + 2)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else {
|
|
vec3 xValues = vec3(
|
|
getX(batch, `+D+`, xR, xC),
|
|
getX(batch, `+D+` + 1, xR, xC),
|
|
getX(batch, `+D+` + 2, xR, xC)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
float result = dotProd;
|
|
`+me+`
|
|
`+Ce+`
|
|
setOutput(result);
|
|
}
|
|
`},Yp=function(n){this.variableNames=["x","W"],this.outputShape=n.outShape;var t=n.padInfo.front,e=n.padInfo.top,r=n.padInfo.left,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.filterDepth,T=n.filterHeight,D=n.filterWidth,U=4*Math.floor(n.inChannels/4),te=n.inChannels%4;this.userCode=`
|
|
const ivec3 strides = ivec3(`+i+", "+a+", "+s+`);
|
|
const ivec3 pads = ivec3(`+t+", "+e+", "+r+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int d2 = coords.u;
|
|
|
|
ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
|
|
int xFCorner = xFRCCorner.x;
|
|
int xRCorner = xFRCCorner.y;
|
|
int xCCorner = xFRCCorner.z;
|
|
|
|
// Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get
|
|
// y(yF, yR, yC, d2). ? = to be determined. : = across all
|
|
// values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wF = 0; wF < `+A+`; wF++) {
|
|
int xF = xFCorner + wF * `+u+`;
|
|
|
|
if (xF < 0 || xF >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wR = 0; wR < `+T+`; wR++) {
|
|
int xR = xRCorner + wR * `+l+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+D+`; wC++) {
|
|
int xC = xCCorner + wC * `+d+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int d1 = 0; d1 < `+U+`; d1 += 4) {
|
|
vec4 xValues = vec4(
|
|
getX(batch, xF, xR, xC, d1),
|
|
getX(batch, xF, xR, xC, d1 + 1),
|
|
getX(batch, xF, xR, xC, d1 + 2),
|
|
getX(batch, xF, xR, xC, d1 + 3)
|
|
);
|
|
vec4 wValues = vec4(
|
|
getW(wF, wR, wC, d1, d2),
|
|
getW(wF, wR, wC, d1 + 1, d2),
|
|
getW(wF, wR, wC, d1 + 2, d2),
|
|
getW(wF, wR, wC, d1 + 3, d2)
|
|
);
|
|
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
|
|
if (`+(te===1)+`) {
|
|
dotProd +=
|
|
getX(batch, xF, xR, xC, `+U+`) *
|
|
getW(wF, wR, wC, `+U+`, d2);
|
|
} else if (`+(te===2)+`) {
|
|
vec2 xValues = vec2(
|
|
getX(batch, xF, xR, xC, `+U+`),
|
|
getX(batch, xF, xR, xC, `+U+` + 1)
|
|
);
|
|
vec2 wValues = vec2(
|
|
getW(wF, wR, wC, `+U+`, d2),
|
|
getW(wF, wR, wC, `+U+` + 1, d2)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else if (`+(te===3)+`) {
|
|
vec3 xValues = vec3(
|
|
getX(batch, xF, xR, xC, `+U+`),
|
|
getX(batch, xF, xR, xC, `+U+` + 1),
|
|
getX(batch, xF, xR, xC, `+U+` + 2)
|
|
);
|
|
vec3 wValues = vec3(
|
|
getW(wF, wR, wC, `+U+`, d2),
|
|
getW(wF, wR, wC, `+U+` + 1, d2),
|
|
getW(wF, wR, wC, `+U+` + 2, d2)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Dc=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.inHeight,a=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,d=n.strideWidth,A=n.dilationHeight,T=n.dilationWidth,D=n.filterHeight,U=n.filterWidth,te=n.outChannels/n.inChannels,oe="",ae="";e&&(oe=r?`float activation(float a) {
|
|
float b = getPreluActivationWeightsAtOutCoords();
|
|
`+e+`
|
|
}`:`
|
|
float activation(float x) {
|
|
`+e+`
|
|
}
|
|
`,ae="result = activation(result);");var se=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+oe+`
|
|
|
|
const ivec2 strides = ivec2(`+l+", "+d+`);
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int d2 = coords.w;
|
|
int d1 = d2 / `+te+`;
|
|
int q = d2 - d1 * `+te+`;
|
|
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
// TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.
|
|
for (int wR = 0; wR < `+D+`; wR++) {
|
|
int xR = xRCorner + wR * `+A+`;
|
|
|
|
if (xR < 0 || xR >= `+i+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+U+`; wC++) {
|
|
int xC = xCCorner + wC * `+T+`;
|
|
|
|
if (xC < 0 || xC >= `+a+`) {
|
|
continue;
|
|
}
|
|
|
|
float xVal = getX(batch, xR, xC, d1);
|
|
float wVal = getW(wR, wC, d1, q);
|
|
dotProd += xVal * wVal;
|
|
}
|
|
}
|
|
|
|
float result = dotProd;
|
|
`+se+`
|
|
`+ae+`
|
|
setOutput(result);
|
|
}
|
|
`},jc=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n.outShape;for(var i=n.inHeight,a=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,d=n.strideWidth,A=n.dilationHeight,T=n.dilationWidth,D=n.filterHeight,U=n.filterWidth,te=U,oe="int xR; int xC; int xCOffset;",ae=0;ae<D;ae++)for(var se=0;se<U;se++)oe+=`
|
|
vec4 xTexelR`+ae+"C"+2*se+` = vec4(0.);
|
|
vec4 wR`+ae+"C"+se+` = vec4(0.);
|
|
vec4 xR`+ae+"C"+se+" = vec4(0.);";for(ae=0;ae<D;ae++)for(var we=0;we<te;we++){if(oe+=`
|
|
xR = xRCorner + `+ae*A+`;
|
|
xC = xCCorner + `+(se=2*we)*T+`;
|
|
`,d===1){if(se<U&&(oe+=u%2==1?`
|
|
xCOffset = xC + 1;
|
|
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
|
|
|
|
// Need to manually clear unused channels in case
|
|
// we're reading from recycled texture.
|
|
if(xCOffset + 1 >= `+a+`) {
|
|
xTexelR`+ae+"C"+se+`.zw = vec2(0.);
|
|
}
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
xCOffset = xC + 1 - 2;
|
|
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+a+`) {
|
|
vec4 previous = getX(batch, xR, xCOffset, d1);
|
|
|
|
// Need to manually clear unused channels in case
|
|
// we're reading from recycled texture.
|
|
if(xCOffset + 1 >= `+a+`) {
|
|
previous.zw = vec2(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+" = vec4(previous.zw, xTexelR"+ae+"C"+se+`.xy);
|
|
} else {
|
|
xR`+ae+"C"+se+" = vec4(0, 0, xTexelR"+ae+"C"+se+`.xy);
|
|
}
|
|
`:`
|
|
if(xR >= 0 && xR < `+i+" && xC >= 0 && xC < "+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xC, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+" = xTexelR"+ae+"C"+se+`;
|
|
`,se+1<U)){var Ce=u%2==0?ie(T):T;T%2==0&&u%2==1||T%2!=0&&u%2!=1?(oe+=`
|
|
xCOffset = xC + `+u%2+" + "+Ce+`;
|
|
|
|
if(xR >= 0 && xR < `+i+` &&
|
|
xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
|
|
}
|
|
`,T>1&&(oe+=`
|
|
xCOffset -= 2;
|
|
if(xR >= 0 && xR < `+i+` &&
|
|
xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
`),oe+=`
|
|
xR`+ae+"C"+(se+1)+` = vec4(
|
|
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.xy);
|
|
`):oe+=`
|
|
xCOffset = xC + `+Ce+`;
|
|
|
|
if(xR >= 0 && xR < `+i+` &&
|
|
xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
|
|
}
|
|
|
|
xR`+ae+"C"+(se+1)+" = xTexelR"+ae+"C"+(se+2)+`;
|
|
`}}else se<U&&(oe+=`
|
|
if(xR >= 0 && xR < `+i+`) {
|
|
`,u%2==1?(oe+=`
|
|
xCOffset = xC + 1 - `+d+`;
|
|
if(xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
if(xC + 1 >= 0 && xC + 1 < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xC + 1, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+(se+2)+` = vec4(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+` = vec4(
|
|
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.zw);
|
|
`,se+1<U&&(oe+=`
|
|
vec4 final = vec4(0.);
|
|
xCOffset = xC + 1 + `+d+`;
|
|
if(xCOffset >= 0 && xCOffset < `+a+`) {
|
|
final = getX(batch, xR, xCOffset, d1);
|
|
}
|
|
xR`+ae+"C"+(se+1)+" = vec4(xTexelR"+ae+"C"+(se+2)+`.xy, final.xy);
|
|
`)):(oe+=`
|
|
if(xC >= 0 && xC < `+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xC, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
xCOffset = xC + `+d+`;
|
|
if(xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+(se+2)+` = vec4(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+` = vec4(
|
|
xTexelR`+ae+"C"+se+".xy, xTexelR"+ae+"C"+(se+2)+`.xy);
|
|
`,se+1<U&&(oe+=`
|
|
xR`+ae+"C"+(se+1)+` = vec4(
|
|
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.zw);
|
|
`)),oe+="}");se<U&&(oe+=`
|
|
vec4 wTexelR`+ae+"C"+se+" = getW("+ae+", "+se+`, d1, q);
|
|
wR`+ae+"C"+se+" = vec4(wTexelR"+ae+"C"+se+".xz, wTexelR"+ae+"C"+se+`.xz);
|
|
`,se+1<U&&(oe+=`
|
|
vec4 wTexelR`+ae+"C"+(se+1)+" = getW("+ae+", "+(se+1)+`, d1, q);
|
|
wR`+ae+"C"+(se+1)+` =
|
|
vec4(wTexelR`+ae+"C"+(se+1)+".xz, wTexelR"+ae+"C"+(se+1)+".xz);"))}for(ae=0;ae<D;ae++)for(se=0;se<U;se++)oe+="dotProd += xR"+ae+"C"+se+" * wR"+ae+"C"+se+";";var me="",Se="";e&&(me=r?`vec4 activation(vec4 a) {
|
|
vec4 b = getPreluActivationWeightsAtOutCoords();
|
|
`+e+`
|
|
}`:`vec4 activation(vec4 x) {
|
|
`+e+`
|
|
}`,Se="result = activation(result);");var Re=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+me+`
|
|
|
|
const ivec2 strides = ivec2(`+l+", "+d+`);
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int d2 = coords.w;
|
|
int d1 = d2;
|
|
int q = 0;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
vec4 dotProd = vec4(0.);
|
|
|
|
`+oe+`
|
|
|
|
vec4 result = dotProd;
|
|
`+Re+`
|
|
`+Se+`
|
|
setOutput(result);
|
|
}
|
|
`},$p=function(n,t,e,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var a=n[0],s=n[1],u=n[2],l=n[3],d=t[0],A=e[0],T=e[1];this.outputShape=[d,A,T,l];var D=r==="bilinear"?1:0,U=[s-1+".0",u-1+".0"],te=U[0],oe=U[1],ae=A>1?[""+(s-1)/(A-1),"(y2-y1) * height_ratio","y1*"+te+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+te],se=ae[0],we=ae[1],Ce=ae[2],me=T>1?[""+(u-1)/(T-1),"(x2-x1) * width_ratio","x1*"+oe+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+oe],Se=me[0],Re=me[1],Ue=me[2];this.userCode=`
|
|
const float height_ratio = float(`+se+`);
|
|
const float width_ratio = float(`+Se+`);
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int y = coords[1];
|
|
int x = coords[2];
|
|
int d = coords[3];
|
|
|
|
// get box vals
|
|
float y1 = getBoxes(b,0);
|
|
float x1 = getBoxes(b,1);
|
|
float y2 = getBoxes(b,2);
|
|
float x2 = getBoxes(b,3);
|
|
|
|
// get image in batch index
|
|
int bInd = round(getBoxInd(b));
|
|
if(bInd < 0 || bInd >= `+a+`) {
|
|
return;
|
|
}
|
|
|
|
float height_scale = `+we+`;
|
|
float width_scale = `+Re+`;
|
|
|
|
float in_y = `+Ce+`;
|
|
if( in_y < 0.0 || in_y > `+te+` ) {
|
|
setOutput(float(`+i+`));
|
|
return;
|
|
}
|
|
float in_x = `+Ue+`;
|
|
if( in_x < 0.0 || in_x > `+oe+` ) {
|
|
setOutput(float(`+i+`));
|
|
return;
|
|
}
|
|
|
|
vec2 sourceFracIndexCR = vec2(in_x,in_y);
|
|
if(`+D+` == 1) {
|
|
// Compute the four integer indices.
|
|
ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);
|
|
ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));
|
|
|
|
float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);
|
|
float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);
|
|
float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);
|
|
float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);
|
|
|
|
vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);
|
|
|
|
float top = topLeft + (topRight - topLeft) * fracCR.x;
|
|
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;
|
|
float newValue = top + (bottom - top) * fracCR.y;
|
|
setOutput(newValue);
|
|
} else {
|
|
// Compute the coordinators of nearest neighbor point.
|
|
ivec2 sourceNearestCR = ivec2(floor(
|
|
sourceFracIndexCR + vec2(0.5,0.5)));
|
|
float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);
|
|
setOutput(newValue);
|
|
}
|
|
}
|
|
`},qp=function(n,t,e){this.variableNames=["x"],this.outputShape=n;var r=n.length,i=n[n.length-1],a=e?"<":">";this.userCode=`
|
|
int getIndex(int i) {
|
|
`+(e?"return "+i+" -i - 1;":"return i;")+`
|
|
}
|
|
|
|
void main() {
|
|
`+Gr(r)+` coords = getOutputCoords();
|
|
int end = `+Pc(r,"coords")+`;
|
|
float val = 0.0;
|
|
for (int i = `+i+` - 1; i >= 0; i -= 1) {
|
|
int idx = getIndex(i);
|
|
if (idx `+a+` end) {
|
|
continue;
|
|
}
|
|
if (idx == end && `+t+`) {
|
|
continue;
|
|
}
|
|
`+Pc(r,"coords")+` = idx;
|
|
val += getX(`+function(s,u){if(s===1)return""+u;if(s===2)return u+".x, "+u+".y";if(s===3)return u+".x, "+u+".y, "+u+".z";if(s===4)return u+".x, "+u+".y, "+u+".z, "+u+".w";throw Error("Cumulative sum for rank "+s+" is not yet supported")}(r,"coords")+`);
|
|
}
|
|
setOutput(val);
|
|
}
|
|
`};function Pc(n,t){if(n===1)return""+t;if(n===2)return t+".y";if(n===3)return t+".z";if(n===4)return t+".w";throw Error("Cumulative sum for rank "+n+" is not yet supported")}var eh=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=qn.DENSE;var t=ji(n),e=Un();this.outputShape=n,this.userCode=`
|
|
ivec3 outCoordsFromFlatIndex(int index) {
|
|
`+po(["r","c","d"],n)+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+t[0]+", "+t[1]+`));
|
|
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
for (int i=0; i<4; i++) {
|
|
int flatIndex = index + i;
|
|
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
|
|
result[i] = getA(rc.x, rc.y, rc.z);
|
|
}
|
|
|
|
`+e.output+` = result;
|
|
}
|
|
`},th=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=qn.DENSE;var t=ji(n),e=Un();this.outputShape=n,this.userCode=`
|
|
ivec3 outCoordsFromFlatIndex(int index) {
|
|
`+po(["r","c","d"],n)+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+t[0]+", "+t[1]+`));
|
|
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
for (int i=0; i<4; i++) {
|
|
int flatIndex = index + i;
|
|
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
|
|
result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));
|
|
}
|
|
|
|
`+e.output+` = result;
|
|
}
|
|
`},rh=function(){function n(t,e,r){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=r,this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int h = `+this.getHeightCoordString()+`;
|
|
int w = `+this.getWidthCoordString()+`;
|
|
int d = `+this.getDepthCoordString()+`;
|
|
|
|
int in_h = h / `+e+`;
|
|
int offset_h = imod(h, `+e+`);
|
|
int in_w = w / `+e+`;
|
|
int offset_w = imod(w, `+e+`);
|
|
int offset_d = (offset_h * `+e+` + offset_w) *
|
|
`+this.getOutputDepthSize()+`;
|
|
int in_d = d + offset_d;
|
|
|
|
float result = `+this.getInputSamplingString()+`;
|
|
setOutput(result);
|
|
}
|
|
`}return n.prototype.getHeightCoordString=function(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"},n.prototype.getWidthCoordString=function(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"},n.prototype.getDepthCoordString=function(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"},n.prototype.getOutputDepthSize=function(){return this.dataFormat==="NHWC"?this.outputShape[3]:this.outputShape[1]},n.prototype.getInputSamplingString=function(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},n}(),nh=function(n){this.variableNames=["X"],this.outputShape=[n,n],this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;
|
|
setOutput(val);
|
|
}
|
|
`},ih=function(n){this.variableNames=["A"],this.outTexUsage=Cn.DOWNLOAD;var t=Un();this.outputShape=n,this.userCode=`
|
|
`+Cc+`
|
|
|
|
void main() {
|
|
float x = getAAtOutCoords();
|
|
`+t.output+` = encode_float(x);
|
|
}
|
|
`},ah=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Cn.DOWNLOAD;var t=Un();this.outputShape=n,this.userCode=`
|
|
`+Cc+`
|
|
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));
|
|
`+t.output+` = encode_float(x);
|
|
}
|
|
`},oh=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"];var r=Un(),i=t[0],a=t[1];this.outputShape=n;var s="result";e&&(s="floor(result * 255. + 0.5)"),this.userCode=`
|
|
`+Nu(n)+`
|
|
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
|
|
int flatIndex = getFlatIndex(coords);
|
|
int offset = imod(flatIndex, 4);
|
|
|
|
flatIndex = idiv(flatIndex, 4, 1.);
|
|
|
|
int r = flatIndex / `+a+`;
|
|
int c = imod(flatIndex, `+a+`);
|
|
vec2 uv = (vec2(c, r) + halfCR) / vec2(`+a+".0, "+i+`.0);
|
|
vec4 values = `+r.texture2D+`(A, uv);
|
|
|
|
float result;
|
|
|
|
if(offset == 0) {
|
|
result = values[0];
|
|
} else if(offset == 1) {
|
|
result = values[1];
|
|
} else if(offset == 2) {
|
|
result = values[2];
|
|
} else {
|
|
result = values[3];
|
|
}
|
|
|
|
`+r.output+" = vec4("+s+`, 0., 0., 0.);
|
|
}
|
|
`},sh=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=Un(),i=t[0],a=t[1];this.outputShape=n;var s="",u="result";e&&(u="floor(result * 255. + 0.5)");for(var l=0;l<=1;l++)for(var d=0;d<=1;d++){var A=2*l+d;s+=`
|
|
localCoords = coords;
|
|
if(localCoords[2] + `+d+" < "+n[2]+`) {
|
|
localCoords[2] += `+d+`;
|
|
if(localCoords[1] + `+l+" < "+n[1]+`) {
|
|
localCoords[1] += `+l+`;
|
|
|
|
flatIndex = getFlatIndex(localCoords);
|
|
offset = imod(flatIndex, 4);
|
|
|
|
flatIndex = idiv(flatIndex, 4, 1.);
|
|
|
|
r = flatIndex / `+a+`;
|
|
c = imod(flatIndex, `+a+`);
|
|
uv = (vec2(c, r) + halfCR) / vec2(`+a+".0, "+i+`.0);
|
|
values = `+r.texture2D+`(A, uv);
|
|
|
|
if(offset == 0) {
|
|
result[`+A+`] = values[0];
|
|
} else if(offset == 1) {
|
|
result[`+A+`] = values[1];
|
|
} else if(offset == 2) {
|
|
result[`+A+`] = values[2];
|
|
} else {
|
|
result[`+A+`] = values[3];
|
|
}
|
|
}
|
|
}
|
|
`}this.userCode=`
|
|
`+Nu(n)+`
|
|
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
|
|
vec4 result = vec4(0.);
|
|
int flatIndex, r, c, offset;
|
|
ivec3 localCoords;
|
|
vec2 uv;
|
|
vec4 values;
|
|
|
|
`+s+`
|
|
|
|
`+r.output+" = "+u+`;
|
|
}
|
|
`},uh="return real * expR - imag * expI;",lh="return real * expI + imag * expR;",Bc=function(n,t,e){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t;var i=e?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,a=e?r+".0":"1.0";this.userCode=`
|
|
const float exponentMultiplier = `+i+`;
|
|
|
|
float unaryOpComplex(float real, float expR, float imag, float expI) {
|
|
`+n+`
|
|
}
|
|
|
|
float mulMatDFT(int batch, int index) {
|
|
float indexRatio = float(index) / float(`+r+`);
|
|
float exponentMultiplierTimesIndexRatio =
|
|
exponentMultiplier * indexRatio;
|
|
|
|
float result = 0.0;
|
|
|
|
for (int i = 0; i < `+r+`; i++) {
|
|
// x = (-2|2 * PI / N) * index * i;
|
|
float x = exponentMultiplierTimesIndexRatio * float(i);
|
|
float expR = cos(x);
|
|
float expI = sin(x);
|
|
float real = getReal(batch, i);
|
|
float imag = getImag(batch, i);
|
|
|
|
result +=
|
|
unaryOpComplex(real, expR, imag, expI) / `+a+`;
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
setOutput(mulMatDFT(coords[0], coords[1]));
|
|
}
|
|
`},ch=function(){function n(t,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=t,this.userCode=`
|
|
uniform float value;
|
|
void main() {
|
|
// Input can be obtained from uniform value.
|
|
setOutput(value);
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.valueLoc==null&&(e.valueLoc=r.getUniformLocationNoThrow(i,"value")),r.gl.uniform1f(e.valueLoc,t)}},n}(),fh=function(n,t,e){this.variableNames=["A","indices"];var r=n.slice();r[e]=t,this.outputShape=r,this.rank=r.length;var i=Gr(this.rank),a=function(s,u){var l=s.length;if(l>4)throw Error("Gather for rank "+l+" is not yet supported");if(l===1)return"int(getIndices(resRC))";for(var d=["resRC.x","resRC.y","resRC.z","resRC.w"],A=[],T=0;T<s.length;T++)T===u?A.push("int(getIndices("+d[T]+"))"):A.push(""+d[T]);return A.join()}(n,e);this.userCode=`
|
|
void main() {
|
|
`+i+` resRC = getOutputCoords();
|
|
setOutput(getA(`+a+`));
|
|
}
|
|
`},dh=function(n,t,e){this.sliceDim=n,this.strides=t,this.variableNames=["x","indices"],this.outputShape=e;var r=Gr(t.length),i=Gr(e.length),a=this.sliceDim>1?"strides[j]":"strides";this.userCode=`
|
|
`+r+" strides = "+r+"("+this.strides+`);
|
|
void main() {
|
|
`+i+` coords = getOutputCoords();
|
|
int flattenIndex = 0;
|
|
for (int j = 0; j < `+this.sliceDim+`; j++) {
|
|
int index = round(getIndices(coords[0], j));
|
|
flattenIndex += index * `+a+`;
|
|
}
|
|
setOutput(getX(flattenIndex, coords[1]));
|
|
}
|
|
`};function _c(n,t){var e=Un();return _s(n,t,e.version+`
|
|
precision highp float;
|
|
`+e.attribute+` vec3 clipSpacePos;
|
|
`+e.attribute+` vec2 uv;
|
|
`+e.varyingVs+` vec2 resultUV;
|
|
|
|
void main() {
|
|
gl_Position = vec4(clipSpacePos, 1);
|
|
resultUV = uv;
|
|
}`)}function Mc(n,t){return as(n,t,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Nc(n,t){return os(n,t,new Uint16Array([0,1,2,2,1,3]))}function bs(n,t,e,r,i,a,s){Us(e,r);var u=Ls(n,t),l=n.TEXTURE_2D;return bt(n,t,function(){return n.bindTexture(l,u)}),bt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE)}),bt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE)}),bt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MIN_FILTER,n.NEAREST)}),bt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MAG_FILTER,n.NEAREST)}),bt(n,t,function(){return n.texImage2D(l,0,i,e,r,0,a,s,null)}),bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)}),u}function Fc(n,t,e,r,i){var a=Ra(e,r);return bs(n,t,a[0],a[1],i.internalFormatFloat,i.textureFormatFloat,n.FLOAT)}function Lc(n,t,e,r,i){var a=Ra(e,r);return bs(n,t,a[0],a[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function Uc(n,t,e,r,i){var a=Ra(e,r);return bs(n,t,a[0],a[1],n.RGBA,n.RGBA,n.UNSIGNED_BYTE)}function Wc(n,t,e,r,i){var a=wi(e,r);return bs(n,t,a[0],a[1],i.internalFormatPackedFloat,n.RGBA,n.FLOAT)}function zc(n,t,e,r,i){var a=wi(e,r);return bs(n,t,a[0],a[1],i.internalFormatPackedHalfFloat,n.RGBA,i.textureTypeHalfFloat)}function Vc(n,t,e,r){return bt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),ss(n,t,e,"clipSpacePos",r,3,20,0)&&ss(n,t,e,"uv",r,2,20,12)}function Qc(n,t,e,r,i,a,s){var u,l,d;bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),a instanceof Uint8Array?(u=new Uint8Array(r*i*4),l=n.UNSIGNED_BYTE,d=n.RGBA):(u=new Float32Array(r*i*4),l=n.FLOAT,d=s.internalFormatPackedFloat),u.set(a),bt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,d,r,i,0,n.RGBA,l,u)}),bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function Hc(n,t,e,r){bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),r.data instanceof Uint8Array?bt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,r.width,r.height,0,n.RGBA,n.UNSIGNED_BYTE,r.data)}):bt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r)}),bt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function Gc(n,t,e,r,i){var a=n.createBuffer();bt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,a)});var s=16*e*r;return bt(n,t,function(){return n.bufferData(n.PIXEL_PACK_BUFFER,s,n.STREAM_READ)}),bt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,0)}),bt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,null)}),a}function Xc(n,t,e){var r=n,i=new Float32Array(e);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,i),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),i}function Kc(n,t,e,r,i){var a=Ra(e,r),s=a[0],u=a[1],l=new Uint8Array(e*r*4);return bt(n,t,function(){return n.readPixels(0,0,s,u,i.downloadTextureFormat,n.UNSIGNED_BYTE,l)}),new Float32Array(l.buffer)}function Zc(n,t,e,r,i,a,s,u){var l=n,d=new Float32Array(function(A,T){var D=wi(A,T);return D[0]*D[1]*4}(a,s));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,d),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),d}function Jc(n,t,e,r){var i=new Float32Array(e*r*4);return bt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,i)}),i}var ph=Object.freeze({createVertexShader:_c,createVertexBuffer:Mc,createIndexBuffer:Nc,createFloat32MatrixTexture:Fc,createFloat16MatrixTexture:Lc,createUnsignedBytesMatrixTexture:Uc,createPackedMatrixTexture:Wc,createFloat16PackedMatrixTexture:zc,bindVertexProgramAttributeStreams:Vc,uploadDenseMatrixToTexture:Qc,uploadPixelDataToTexture:Hc,createBufferFromOutputTexture:Gc,downloadFloat32MatrixFromBuffer:Xc,downloadByteEncodedFloatMatrixFromOutputTexture:Kc,downloadPackedMatrixFromBuffer:Zc,downloadMatrixFromPackedOutputTexture:Jc}),Yc=function(){function n(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=P().getNumber("WEBGL_VERSION");t!=null?(this.gl=t,Eo(e,t)):this.gl=gn(e);var r="WEBGL_color_buffer_float";if(P().getNumber("WEBGL_VERSION")===1){if(this.textureFloatExtension=Za(this.gl,this.debug,"OES_texture_float"),Hn(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=Za(this.gl,this.debug,"OES_texture_half_float");else if(P().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(r),Hn(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=Za(this.gl,this.debug,"EXT_color_buffer_half_float");else if(P().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(r="EXT_color_buffer_float",Hn(this.gl,r))this.colorBufferFloatExtension=this.gl.getExtension(r);else{if(!Hn(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=Mc(this.gl,this.debug),this.indexBuffer=Nc(this.gl,this.debug),this.framebuffer=Ws(this.gl,this.debug),this.textureConfig=Qr(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(n.prototype,"debug",{get:function(){return P().getBool("DEBUG")},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){var t=this;if(!this.disposed){this.program!=null&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),this.outputTexture!=null&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;bt(e,this.debug,function(){return e.finish()}),bt(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),bt(e,this.debug,function(){return e.deleteFramebuffer(t.framebuffer)}),bt(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),bt(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),bt(e,this.debug,function(){return e.deleteBuffer(t.indexBuffer)}),this.disposed=!0}},n.prototype.createFloat32MatrixTexture=function(t,e){return this.throwIfDisposed(),Fc(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createFloat16MatrixTexture=function(t,e){return this.throwIfDisposed(),Lc(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createUnsignedBytesMatrixTexture=function(t,e){return this.throwIfDisposed(),Uc(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.uploadPixelDataToTexture=function(t,e){this.throwIfDisposed(),Hc(this.gl,this.debug,t,e)},n.prototype.uploadDenseMatrixToTexture=function(t,e,r,i){this.throwIfDisposed(),Qc(this.gl,this.debug,t,e,r,i,this.textureConfig)},n.prototype.createFloat16PackedMatrixTexture=function(t,e){return this.throwIfDisposed(),zc(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createPackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Wc(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.deleteMatrixTexture=function(t){var e=this;this.throwIfDisposed(),this.outputTexture===t&&(Ro(this.gl,this.debug,this.framebuffer),this.outputTexture=null),bt(this.gl,this.debug,function(){return e.gl.deleteTexture(t)})},n.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return Kc(i.gl,i.debug,e,r,i.textureConfig)})},n.prototype.downloadPackedMatrixFromBuffer=function(t,e,r,i,a,s){return Zc(this.gl,t,0,0,0,a,s,this.textureConfig)},n.prototype.downloadFloat32MatrixFromBuffer=function(t,e){return Xc(this.gl,t,e)},n.prototype.createBufferFromTexture=function(t,e,r){this.bindTextureToFrameBuffer(t);var i=Gc(this.gl,this.debug,e,r,this.textureConfig);return this.unbindTextureToFrameBuffer(),i},n.prototype.createAndWaitForFence=function(){var t=this.createFence(this.gl);return this.pollFence(t)},n.prototype.createFence=function(t){var e,r,i=this;if(P().getBool("WEBGL_FENCE_API_ENABLED")){var a=t,s=a.fenceSync(a.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),r=function(){var u=a.clientWaitSync(s,0,0);return u===a.ALREADY_SIGNALED||u===a.CONDITION_SATISFIED},e=s}else P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),r=function(){return i.isQueryAvailable(e,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):r=function(){return!0};return{query:e,isFencePassed:r}},n.prototype.downloadMatrixFromPackedTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return Jc(i.gl,i.debug,e,r)})},n.prototype.createProgram=function(t){this.throwIfDisposed();var e=this.gl,r=Ms(e,this.debug,t),i=_c(e,this.debug),a=Ns(e,this.debug);return bt(e,this.debug,function(){return e.attachShader(a,i)}),bt(e,this.debug,function(){return e.attachShader(a,r)}),Fs(e,this.debug,a),this.debug&&Io(e,this.debug,a),this.vertexAttrsAreBound||(this.setProgram(a),this.vertexAttrsAreBound=Vc(e,this.debug,this.program,this.vertexBuffer)),a},n.prototype.deleteProgram=function(t){var e=this;this.throwIfDisposed(),t===this.program&&(this.program=null),t!=null&&bt(this.gl,this.debug,function(){return e.gl.deleteProgram(t)})},n.prototype.setProgram=function(t){var e=this;this.throwIfDisposed(),this.program=t,this.program!=null&&this.debug&&Io(this.gl,this.debug,this.program),bt(this.gl,this.debug,function(){return e.gl.useProgram(t)})},n.prototype.getUniformLocation=function(t,e,r){return r===void 0&&(r=!0),this.throwIfDisposed(),r?ka(this.gl,this.debug,t,e):To(this.gl,t,e)},n.prototype.getAttributeLocation=function(t,e){var r=this;return this.throwIfDisposed(),bt(this.gl,this.debug,function(){return r.gl.getAttribLocation(t,e)})},n.prototype.getUniformLocationNoThrow=function(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)},n.prototype.setInputMatrixTexture=function(t,e,r){this.throwIfDisposed(),this.throwIfNoProgram(),Oa(this.gl,this.debug,this.program,t,e,r)},n.prototype.setOutputMatrixTexture=function(t,e,r){this.setOutputMatrixTextureDriver(t,r,e)},n.prototype.setOutputPackedMatrixTexture=function(t,e,r){this.throwIfDisposed();var i=wi(e,r),a=i[0],s=i[1];this.setOutputMatrixTextureDriver(t,a,s)},n.prototype.setOutputMatrixWriteRegion=function(t,e,r,i){this.setOutputMatrixWriteRegionDriver(r,t,i,e)},n.prototype.setOutputPackedMatrixWriteRegion=function(t,e,r,i){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},n.prototype.debugValidate=function(){this.program!=null&&Io(this.gl,this.debug,this.program),Da(this.gl)},n.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var t=this.gl;this.debug&&this.debugValidate(),bt(t,this.debug,function(){return t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)})},n.prototype.blockUntilAllProgramsCompleted=function(){var t=this;this.throwIfDisposed(),bt(this.gl,this.debug,function(){return t.gl.finish()})},n.prototype.getQueryTimerExtension=function(){return this.disjointQueryTimerExtension==null&&(this.disjointQueryTimerExtension=Za(this.gl,this.debug,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},n.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},n.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},n.prototype.beginQuery=function(){if(P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){var t=this.gl,e=this.getQueryTimerExtensionWebGL2(),r=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,r),r}var i=this.getQueryTimerExtensionWebGL1(),a=i.createQueryEXT();return i.beginQueryEXT(i.TIME_ELAPSED_EXT,a),a},n.prototype.endQuery=function(){if(P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")!==2){var t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}else{var e=this.gl,r=this.getQueryTimerExtensionWebGL2();e.endQuery(r.TIME_ELAPSED_EXT)}},n.prototype.waitForQueryAndGetTime=function(t){return C(this,void 0,void 0,function(){var e=this;return E(this,function(r){switch(r.label){case 0:return[4,ce(function(){return e.disposed||e.isQueryAvailable(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return r.sent(),[2,this.getQueryTime(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},n.prototype.getQueryTime=function(t,e){if(e===0)return null;if(e===2){var r=this.gl;return r.getQueryParameter(t,r.QUERY_RESULT)/1e6}var i=this.getQueryTimerExtensionWebGL1();return i.getQueryObjectEXT(t,i.QUERY_RESULT_EXT)/1e6},n.prototype.isQueryAvailable=function(t,e){if(e===0)return!0;if(e===2){var r=this.gl,i=this.getQueryTimerExtensionWebGL2(),a=r.getQueryParameter(t,r.QUERY_RESULT_AVAILABLE);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),a&&!this.disjoint}return a=(i=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(t,i.QUERY_RESULT_AVAILABLE_EXT),this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),a&&!this.disjoint},n.prototype.pollFence=function(t){var e=this;return new Promise(function(r){e.addItemToPoll(function(){return t.isFencePassed()},function(){return r()})})},n.prototype.pollItems=function(){for(var t=function(r){for(var i=0;i<r.length&&r[i]();++i);return i-1}(this.itemsToPoll.map(function(r){return r.isDoneFn})),e=0;e<=t;++e)(0,this.itemsToPoll[e].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(t+1)},n.prototype.addItemToPoll=function(t,e){var r=this;this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1||ce(function(){return r.pollItems(),r.itemsToPoll.length===0})},n.prototype.bindTextureToFrameBuffer=function(t){this.throwIfDisposed(),Xi(this.gl,this.debug,t,this.framebuffer),this.debug&&Da(this.gl)},n.prototype.unbindTextureToFrameBuffer=function(){this.outputTexture!=null?(Xi(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&Da(this.gl)):Ro(this.gl,this.debug,this.framebuffer)},n.prototype.downloadMatrixDriver=function(t,e){this.bindTextureToFrameBuffer(t);var r=e();return this.unbindTextureToFrameBuffer(),r},n.prototype.setOutputMatrixTextureDriver=function(t,e,r){this.throwIfDisposed();var i=this.gl;Xi(i,this.debug,t,this.framebuffer),this.debug&&Da(i),this.outputTexture=t,bt(i,this.debug,function(){return i.viewport(0,0,e,r)}),bt(i,this.debug,function(){return i.scissor(0,0,e,r)})},n.prototype.setOutputMatrixWriteRegionDriver=function(t,e,r,i){var a=this;this.throwIfDisposed(),bt(this.gl,this.debug,function(){return a.gl.scissor(t,e,r,i)})},n.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},n.prototype.throwIfNoProgram=function(){if(this.program==null)throw new Error("No GPU program is currently set.")},n}();function $c(n,t){if(n.length!==t.length)throw Error("Binary was compiled with "+n.length+" inputs, but was executed with "+t.length+" inputs");n.forEach(function(e,r){var i=e.logicalShape,a=t[r],s=a.shape;if(!ue(i,s))throw Error("Binary was compiled with different shapes than the current args. Shapes "+i+" and "+s+" must match");if(!e.isUniform||!a.isUniform){var u=e.texShape,l=a.isUniform?null:a.texData.texShape;if(!ue(u,l))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+u+" and "+l+" must match")}})}var hh=function(n,t,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var r=e.filterWidth,i=e.inChannels,a=e.strideWidth,s=e.strideHeight,u=e.padInfo,l=e.outWidth,d=e.dilationWidth,A=e.dilationHeight,T=e.dataFormat,D=u.left,U=u.top,te=i*r,oe=Un(),ae=T==="channelsLast",se=ae?0:1,we=ae?1:2,Ce="",me=0;me<=1;me++)for(var Se=0;Se<=1;Se++)Ce+=`
|
|
blockIndex = rc.y + `+Se+`;
|
|
pos = rc.x + `+me+`;
|
|
|
|
if(blockIndex < `+n[1]+" && pos < "+n[0]+`) {
|
|
offsetY = int(blockIndex / (`+l+")) * "+s+" - "+U+`;
|
|
d0 = offsetY + `+A+" * (pos / "+te+`);
|
|
|
|
if(d0 < `+t[se]+` && d0 >= 0) {
|
|
|
|
offsetX = int(mod(float(blockIndex), `+l+".) * "+a+". - "+D+`.);
|
|
d1 = offsetX + `+d+" * (int(mod(float(pos), "+te+".) / "+i+`.));
|
|
|
|
if(d1 < `+t[we]+` && d1 >= 0) {
|
|
|
|
ch = int(mod(float(pos), `+i+`.));
|
|
|
|
if (`+ae+`) {
|
|
innerDims = vec2(d1, ch);
|
|
result[`+(2*me+Se)+`] = getChannel(
|
|
getA(d0, int(innerDims.x),
|
|
int(innerDims.y)), innerDims);
|
|
} else {
|
|
innerDims = vec2(d0, d1);
|
|
result[`+(2*me+Se)+`] = getChannel(
|
|
getA(ch, int(innerDims.x),
|
|
int(innerDims.y)), innerDims);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;this.userCode=`
|
|
void main() {
|
|
ivec2 rc = getOutputCoords();
|
|
|
|
vec4 result = vec4(0);
|
|
|
|
int blockIndex, pos, offsetY, d0, offsetX, d1, ch;
|
|
vec2 innerDims;
|
|
|
|
`+Ce+`
|
|
|
|
`+oe.output+` = result;
|
|
}
|
|
`},vh=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[];var a,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";a=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
int d = coords[3];
|
|
float x = getX(b, r, c, d);
|
|
float sum = 0.0;
|
|
for (int j = -`+s+"; j <= "+s+`; j++) {
|
|
int idx = d + j;
|
|
if (idx >= 0 && idx <= `+u+`) {
|
|
float z = getX(b, r, c, idx);
|
|
sum += z * z;
|
|
}
|
|
}
|
|
float val = x * `+a+`;
|
|
setOutput(val);
|
|
}
|
|
`},mh=function(n,t,e,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=n,this.depth=n[3],this.depthRadius=t,this.bias=e,this.alpha=r,this.beta=i,this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
|
|
float result = 0.0;
|
|
for (int d = 0; d < `+this.depth+`; ++d) {
|
|
int depthBegin = int(max(0.0, float(d - `+t+`)));
|
|
int depthEnd = int(min(float(`+this.depth+`),
|
|
float(d + `+t+` + 1)));
|
|
|
|
const int MIN_DEPTH_BEGIN = 0;
|
|
const int MAX_DEPTH_END = `+this.depth+`;
|
|
|
|
float norm = 0.0;
|
|
for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {
|
|
if (k < depthBegin){
|
|
continue;
|
|
}
|
|
else if (k >= depthBegin && k < depthEnd) {
|
|
norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);
|
|
}
|
|
else {
|
|
break;
|
|
}
|
|
}
|
|
|
|
norm = float(`+r+") * norm + float("+e+`);
|
|
|
|
for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){
|
|
if (k < depthBegin){
|
|
continue;
|
|
}
|
|
else if (k >= depthBegin && k < depthEnd){
|
|
float dyi = -2.0 * float(`+r+`)
|
|
* float(`+i+`)
|
|
* getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)
|
|
/ norm;
|
|
if (k == d) {
|
|
dyi += pow(norm, -1.0 * `+i+`);
|
|
}
|
|
if (k == coords[3]) {
|
|
dyi *= getDy(b, r, c, d);
|
|
result += dyi;
|
|
}
|
|
}
|
|
else {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`},gh=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var a,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";a=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords.x;
|
|
int r = coords.y;
|
|
int c = coords.z;
|
|
int d = coords.w;
|
|
|
|
bool hasNextCol = d < `+this.outputShape[3]+`;
|
|
bool hasNextRow = c < `+this.outputShape[2]+`;
|
|
|
|
vec4 sum = vec4(0.);
|
|
vec4 xFragAtOutputCoords = getX(b, r, c, d);
|
|
|
|
vec4 xAtOutputCoords = vec4(
|
|
getChannel(xFragAtOutputCoords, vec2(c, d)),
|
|
hasNextCol ?
|
|
getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,
|
|
hasNextRow ?
|
|
getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0
|
|
);
|
|
|
|
int firstChannel = d - `+s+`;
|
|
vec2 cache = vec2(0.);
|
|
if(firstChannel >= 0){
|
|
vec4 firstChannelFrag = getX(b, r, c, firstChannel);
|
|
cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));
|
|
if(hasNextRow){
|
|
cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));
|
|
}
|
|
}
|
|
|
|
ivec2 depth = ivec2(d, d + 1);
|
|
for (int j = - `+s+"; j <= "+s+`; j++) {
|
|
ivec2 idx = depth + j;
|
|
bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));
|
|
bvec2 belowUpperBound = lessThanEqual(idx, ivec2(`+u+`));
|
|
|
|
bool depthInRange = aboveLowerBound.x && belowUpperBound.x;
|
|
bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;
|
|
|
|
if(depthInRange || depthPlusOneInRange){
|
|
vec4 z = vec4(0.);
|
|
vec4 xFragAtCurrentDepth;
|
|
z.xz = cache.xy;
|
|
if(depthPlusOneInRange && hasNextCol){
|
|
xFragAtCurrentDepth = idx.y != d ?
|
|
getX(b, r, c, idx.y) : xFragAtOutputCoords;
|
|
z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));
|
|
if(hasNextRow){
|
|
z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));
|
|
}
|
|
}
|
|
cache.xy = z.yw;
|
|
sum += z * z;
|
|
}
|
|
}
|
|
vec4 result = xAtOutputCoords * `+a+`;
|
|
setOutput(result);
|
|
}
|
|
`},yh=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideHeight,e=n.strideWidth,r=n.dilationHeight,i=n.effectiveFilterHeight,a=n.effectiveFilterWidth,s=i-1-n.padInfo.top,u=a-1-n.padInfo.left,l=i*a-1;this.userCode=`
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 dyRCCorner = coords.yz - pads;
|
|
int dyRCorner = dyRCCorner.x;
|
|
int dyCCorner = dyRCCorner.y;
|
|
|
|
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+i+`;
|
|
wR += `+r+`) {
|
|
float dyR = float(dyRCorner + wR) / `+t+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+a+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+e+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(b, idyR, idyC, d);
|
|
int maxPosValue = `+l+` - int(getMaxPos(b, idyR, idyC, d));
|
|
|
|
// Get the current value, check it against the value from the
|
|
// position matrix.
|
|
int curPosValue = wR * `+a+` + wC;
|
|
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
|
|
|
|
dotProd += dyValue * mask;
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},bh=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.dilationDepth,a=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterDepth,l=n.effectiveFilterHeight,d=n.effectiveFilterWidth,A=u-1-n.padInfo.front,T=l-1-n.padInfo.top,D=d-1-n.padInfo.left,U=u*l*d-1;this.userCode=`
|
|
const ivec3 pads = ivec3(`+A+", "+T+", "+D+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
|
|
int dyDCorner = dyCorner.x;
|
|
int dyRCorner = dyCorner.y;
|
|
int dyCCorner = dyCorner.z;
|
|
|
|
// Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get
|
|
// dx(xD, xR, xC, ch).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
|
|
for (int wD = 0; wD < `+u+`;
|
|
wD += `+i+`) {
|
|
float dyD = float(dyDCorner + wD) / `+t+`.0;
|
|
|
|
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyD = int(dyD);
|
|
|
|
for (int wR = 0; wR < `+l+`;
|
|
wR += `+a+`) {
|
|
float dyR = float(dyRCorner + wR) / `+e+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
|
|
fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+d+`;
|
|
wC += `+s+`) {
|
|
float dyC = float(dyCCorner + wC) / `+r+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
|
|
int maxPosValue = `+U+` -
|
|
int(getMaxPos(batch, idyD, idyR, idyC, ch));
|
|
|
|
// Get the current value, check it against the value from the
|
|
// position matrix.
|
|
int curPosValue =
|
|
wD * `+l+" * "+d+` +
|
|
wR * `+d+` + wC;
|
|
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
|
|
|
|
dotProd += dyValue * mask;
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Uu=function(n,t,e,r,i,a,s){e===void 0&&(e=!1),r===void 0&&(r=!1),i===void 0&&(i=!1),a===void 0&&(a=null),s===void 0&&(s=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;var u=e?n[1]:n[2],l=Math.ceil(u/2),d=e?"i * 2, rc.y":"rc.y, i * 2",A=r?"rc.z, i * 2":"i * 2, rc.z",T=e?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],D=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],U="",te="";a&&(U=s?`vec4 activation(vec4 a) {
|
|
vec4 b = getPreluActivationWeightsAtOutCoords();
|
|
`+a+`
|
|
}`:`vec4 activation(vec4 x) {
|
|
`+a+`
|
|
}`,te="result = activation(result);");var oe=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+U+`
|
|
|
|
const float sharedDimension = `+l+`.0;
|
|
|
|
vec4 dot2x2ARowBCol(ivec3 rc) {
|
|
vec4 result = vec4(0);
|
|
for (int i = 0; i < `+l+`; i++) {
|
|
vec4 a = getMatrixA(rc.x, `+d+`);
|
|
vec4 b = getMatrixB(rc.x, `+A+`);
|
|
|
|
// These swizzled products need to be separately added.
|
|
// See: https://github.com/tensorflow/tfjs/issues/1735
|
|
result += (`+T[0]+" * "+D[0]+`);
|
|
result += (`+T[1]+" * "+D[1]+`);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
void main() {
|
|
ivec3 rc = getOutputCoords();
|
|
vec4 result = dot2x2ARowBCol(rc);
|
|
|
|
`+oe+`
|
|
|
|
`+te+`
|
|
|
|
setOutput(result);
|
|
}
|
|
`},wh=function(){function n(t,e,r){this.variableNames=["probs"],this.outputShape=[t,r],this.userCode=`
|
|
uniform float seed;
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
|
|
float r = random(seed);
|
|
float cdf = 0.0;
|
|
|
|
for (int i = 0; i < `+(e-1)+`; i++) {
|
|
cdf += getProbs(batch, i);
|
|
|
|
if (r < cdf) {
|
|
setOutput(float(i));
|
|
return;
|
|
}
|
|
}
|
|
|
|
// If no other event happened, last event happened.
|
|
setOutput(float(`+(e-1)+`));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.seedLoc==null&&(e.seedLoc=r.getUniformLocation(i,"seed")),r.gl.uniform1f(e.seedLoc,t)}},n}(),Ah=function(n,t,e,r){this.variableNames=["indices"],this.outputShape=[n,t],this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int index = round(getIndices(coords.x));
|
|
setOutput(mix(float(`+r+"), float("+e+`),
|
|
float(index == coords.y)));
|
|
}
|
|
`},xh=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=n;var t=n.length;if(t===0)this.userCode=`
|
|
void main() {
|
|
setOutput(vec4(getA(), 0., 0., 0.));
|
|
}
|
|
`;else{var e=li("rc",t),r=Gr(t),i=function(u,l,d){if(u===1)return"rc > "+l[0];for(var A="",T=u-2;T<u;T++)A+=d[T]+" >= "+l[T],T<u-1&&(A+="||");return A}(t,n,e),a=function(u,l,d,A){if(u===1)return"";var T=A.slice(-2);return`
|
|
int r = `+T[0]+`;
|
|
int c = `+T[1]+`;
|
|
int rp1 = r + 1;
|
|
int cp1 = c + 1;
|
|
|
|
bool cEdge = cp1 >= `+l+`;
|
|
bool rEdge = rp1 >= `+d+`;
|
|
`}(t,n[n.length-1],n[n.length-2],e),s=function(u,l){var d=u.length,A=function(T,D){for(var U=[],te=0;te<=1;te++)for(var oe=0;oe<=1;oe++){for(var ae=(te===0?"r":"rp1")+", "+(oe===0?"c":"cp1"),se=2;se<T;se++)ae=D[D.length-1-se]+","+ae;U.push(ae)}return U}(d,l);return d===1?`getA(rc),
|
|
rc + 1 >= `+u[0]+` ? 0. : getA(rc + 1),
|
|
0, 0`:"getA("+A[0]+`),
|
|
cEdge ? 0. : getA(`+A[1]+`),
|
|
rEdge ? 0. : getA(`+A[2]+`),
|
|
rEdge || cEdge ? 0. : getA(`+A[3]+")"}(n,e);this.userCode=`
|
|
void main() {
|
|
`+r+` rc = getOutputCoords();
|
|
|
|
if(`+i+`) {
|
|
setOutput(vec4(0));
|
|
} else {
|
|
`+a+`
|
|
|
|
setOutput(vec4(`+s+`));
|
|
}
|
|
}
|
|
`}},Eh=function(n,t,e){this.variableNames=["x"],this.outputShape=t.map(function(l,d){return l[0]+n[d]+l[1]});var r=n.length,i=Gr(r),a=t.map(function(l){return l[0]}).join(","),s=t.map(function(l,d){return l[0]+n[d]}).join(","),u=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=r!==1?`
|
|
`+i+" start = "+i+"("+a+`);
|
|
`+i+" end = "+i+"("+s+`);
|
|
|
|
void main() {
|
|
`+i+` outC = getOutputCoords();
|
|
if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {
|
|
setOutput(float(`+e+`));
|
|
} else {
|
|
`+i+` coords = outC - start;
|
|
setOutput(getX(`+u+`));
|
|
}
|
|
}
|
|
`:`
|
|
int start = `+a+`;
|
|
int end = `+s+`;
|
|
|
|
void main() {
|
|
int outC = getOutputCoords();
|
|
if (outC < start || outC >= end) {
|
|
setOutput(float(`+e+`));
|
|
} else {
|
|
setOutput(getX(outC - start));
|
|
}
|
|
}
|
|
`},Ch=function(n,t,e){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map(function(ae,se){return ae[0]+n[se]+ae[1]});for(var r=n.length,i=Gr(r),a=t.map(function(ae){return ae[0]}).join(","),s=t.map(function(ae,se){return ae[0]+n[se]}).join(","),u=li("rc",r),l=li("source",r),d=u[r-1]+" < "+this.outputShape[r-1],A=r===1?"source":"vec2("+l.slice(-2).join()+")",T=[i+" rc = outputLoc;",u[r-1]+` += 1;
|
|
if(`+d+`) {
|
|
`,r===1?"":`}
|
|
rc = outputLoc;
|
|
`+u[r-2]+` += 1;
|
|
if(`+u[r-2]+" < "+this.outputShape[r-2]+") {",r===1?"":" "+u[r-1]+` += 1;
|
|
if(`+d+") {"],D=r===1?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",U="",te=0,oe=r===1?2:4;te<oe;te++)U+=`
|
|
`+T[te]+`
|
|
if (`+D+`) {
|
|
result[`+te+"] = float("+e+`);
|
|
} else {
|
|
`+i+` source = rc - start;
|
|
result[`+te+"] = getChannel(getX("+l.join()+"), "+A+`);
|
|
}
|
|
`;U+=r===1?"} ":"}}",this.userCode=`
|
|
const `+i+" start = "+i+"("+a+`);
|
|
const `+i+" end = "+i+"("+s+`);
|
|
|
|
void main() {
|
|
`+i+` outputLoc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
`+U+`
|
|
setOutput(result);
|
|
}
|
|
`},Wu=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideHeight,a=n.strideWidth,s=n.dilationHeight,u=n.dilationWidth,l=n.effectiveFilterHeight,d=n.effectiveFilterWidth,A=n.padInfo.top,T=n.padInfo.left;this.outputShape=n.outShape;var D=t==="avg",U="0.0";if(D||(U="-1.0 / 1e-20"),e)this.userCode=`
|
|
const ivec2 strides = ivec2(`+i+", "+a+`);
|
|
const ivec2 pads = ivec2(`+A+", "+T+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// max/min x(?, ?, d) to get y(yR, yC, d).
|
|
// ? = to be determined
|
|
float minMaxValue = 0.0;
|
|
float minMaxValueFound = 0.0;
|
|
int minMaxPosition = 0;
|
|
float avgValue = 0.0;
|
|
|
|
for (int wR = 0; wR < `+l+`;
|
|
wR += `+s+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+d+`;
|
|
wC += `+u+`) {
|
|
int xC = xCCorner + wC;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float value = getX(batch, xR, xC, d);
|
|
|
|
// If a min / max value has already been found, use it. If not,
|
|
// use the current value.
|
|
float currMinMaxValue = mix(
|
|
value, minMaxValue, minMaxValueFound);
|
|
if (value >= currMinMaxValue) {
|
|
minMaxValue = value;
|
|
minMaxValueFound = 1.0;
|
|
minMaxPosition = wR * `+d+` + wC;
|
|
}
|
|
}
|
|
}
|
|
setOutput(float(minMaxPosition));
|
|
}
|
|
`;else{var te=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(te="avgValue / count");var oe=4*Math.floor(r/4),ae=r%4,se=`
|
|
if (`+D+`) {
|
|
avgValue += dot(values, ones);
|
|
} else {
|
|
minMaxValue = max(values, minMaxValue);
|
|
}
|
|
`;this.userCode=`
|
|
const ivec2 strides = ivec2(`+i+", "+a+`);
|
|
const ivec2 pads = ivec2(`+A+", "+T+`);
|
|
const float initializationValue = `+U+`;
|
|
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
float count = 0.0;
|
|
|
|
float getValue(int batch, int xR, int xC, int d) {
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
return initializationValue;
|
|
}
|
|
count += 1.0;
|
|
return getX(batch, xR, xC, d);
|
|
}
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// max/min x(?, ?, d) to get y(yR, yC, d).
|
|
// ? = to be determined
|
|
vec4 minMaxValue = vec4(`+U+`);
|
|
float avgValue = 0.0;
|
|
count = 0.0;
|
|
|
|
for (int wR = 0; wR < `+l+`;
|
|
wR += `+s+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+oe+`; wC += 4) {
|
|
int xC = xCCorner + wC * `+u+`;
|
|
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
getValue(batch, xR, xC + `+u+`, d),
|
|
getValue(batch, xR, xC + 2 * `+u+`, d),
|
|
getValue(batch, xR, xC + 3 * `+u+`, d)
|
|
);
|
|
|
|
`+se+`
|
|
}
|
|
|
|
int xC = xCCorner + `+oe+`;
|
|
if (`+(ae===1)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+se+`
|
|
} else if (`+(ae===2)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
getValue(batch, xR, xC + `+u+`, d),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+se+`
|
|
} else if (`+(ae===3)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
getValue(batch, xR, xC + `+u+`, d),
|
|
getValue(batch, xR, xC + 2 * `+u+`, d),
|
|
initializationValue
|
|
);
|
|
|
|
`+se+`
|
|
}
|
|
}
|
|
setOutput(`+te+`);
|
|
}
|
|
`}},zu=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,d=n.dilationWidth,A=n.effectiveFilterDepth,T=n.effectiveFilterHeight,D=n.effectiveFilterWidth,U=n.padInfo.front,te=n.padInfo.top,oe=n.padInfo.left;this.outputShape=n.outShape;var ae=t==="avg",se="0.0";if(ae||(se="-1.0 / 1e-20"),e)this.userCode=`
|
|
const ivec3 strides =
|
|
ivec3(`+i+", "+a+", "+s+`);
|
|
const ivec3 pads = ivec3(`+U+", "+te+", "+oe+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
|
|
int xDCorner = xCorner.x;
|
|
int xRCorner = xCorner.y;
|
|
int xCCorner = xCorner.z;
|
|
|
|
// max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).
|
|
// ? = to be determined
|
|
float minMaxValue = 0.0;
|
|
float minMaxValueFound = 0.0;
|
|
int minMaxPosition = 0;
|
|
|
|
for (int wD = 0; wD < `+A+`;
|
|
wD += `+u+`) {
|
|
int xD = xDCorner + wD;
|
|
|
|
if (xD < 0 || xD >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wR = 0; wR < `+T+`;
|
|
wR += `+l+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+D+`;
|
|
wC += `+d+`) {
|
|
int xC = xCCorner + wC;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float value = getX(batch, xD, xR, xC, ch);
|
|
|
|
// If a min / max value has already been found, use it. If not,
|
|
// use the current value.
|
|
float currMinMaxValue = mix(
|
|
value, minMaxValue, minMaxValueFound);
|
|
if (value >= currMinMaxValue) {
|
|
minMaxValue = value;
|
|
minMaxValueFound = 1.0;
|
|
minMaxPosition =
|
|
wD * `+T+" * "+D+` +
|
|
wR * `+D+` + wC;;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(float(minMaxPosition));
|
|
}
|
|
`;else{var we=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(we="avgValue / count");var Ce=4*Math.floor(r/4),me=r%4,Se=`
|
|
if (`+ae+`) {
|
|
avgValue += dot(values, ones);
|
|
} else {
|
|
minMaxValue = max(values, minMaxValue);
|
|
}
|
|
`;this.userCode=`
|
|
const ivec3 strides =
|
|
ivec3(`+i+", "+a+", "+s+`);
|
|
const ivec3 pads = ivec3(`+U+", "+te+", "+oe+`);
|
|
const float initializationValue = `+se+`;
|
|
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
float count = 0.0;
|
|
|
|
float getValue(int batch, int xD, int xR, int xC, int ch) {
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
return initializationValue;
|
|
}
|
|
count += 1.0;
|
|
return getX(batch, xD, xR, xC, ch);
|
|
}
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
|
|
int xDCorner = xCorner.x;
|
|
int xRCorner = xCorner.y;
|
|
int xCCorner = xCorner.z;
|
|
|
|
// max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).
|
|
// ? = to be determined
|
|
vec4 minMaxValue = vec4(`+se+`);
|
|
float avgValue = 0.0;
|
|
count = 0.0;
|
|
|
|
for (int wD = 0; wD < `+A+`;
|
|
wD += `+u+`) {
|
|
int xD = xDCorner + wD;
|
|
|
|
if (xD < 0 || xD >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wR = 0; wR < `+T+`;
|
|
wR += `+l+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+Ce+`; wC += 4) {
|
|
int xC = xCCorner + wC * `+d+`;
|
|
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
getValue(batch, xD, xR, xC + `+d+`, ch),
|
|
getValue(batch, xD, xR, xC + 2 * `+d+`, ch),
|
|
getValue(batch, xD, xR, xC + 3 * `+d+`, ch)
|
|
);
|
|
|
|
`+Se+`
|
|
}
|
|
|
|
int xC = xCCorner + `+Ce+`;
|
|
if (`+(me===1)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+Se+`
|
|
} else if (`+(me===2)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
getValue(batch, xD, xR, xC + `+d+`, ch),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+Se+`
|
|
} else if (`+(me===3)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
getValue(batch, xD, xR, xC + `+d+`, ch),
|
|
getValue(batch, xD, xR, xC + 2 * `+d+`, ch),
|
|
initializationValue
|
|
);
|
|
|
|
`+Se+`
|
|
}
|
|
}
|
|
setOutput(`+we+`);
|
|
}
|
|
}
|
|
`}},Sh=function(n,t){this.variableNames=["x"];var e=n.windowSize,r=n.batchSize,i=n.inSize,a=Math.ceil(i/e);this.outputShape=[r,a];var s="0.0",u="";t==="prod"?s="1.0":t==="min"?(s="1.0 / 1e-20",u="min"):t==="max"&&(s="-1.0 / 1e-20",u="max");var l=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="sum"?l="sumValue":t==="prod"?l="prodValue":t==="all"?l="allValue":t==="any"&&(l="anyValue");var d=4*Math.floor(e/4),A=e%4,T=`
|
|
if (`+(t==="sum")+`) {
|
|
sumValue += dot(values, ones);
|
|
} else if (`+(t==="prod")+`) {
|
|
vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);
|
|
prodValue *= tmp[0] * tmp[1];
|
|
} else {
|
|
minMaxValue = `+u+`(values, minMaxValue);
|
|
}
|
|
`,D="vec4";t==="all"?(s="1.0",T=`
|
|
bool reducedAllValue = all(values);
|
|
float floatedReducedAllValue = float(reducedAllValue);
|
|
allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);
|
|
`,D="bvec4"):t==="any"&&(s="0.0",T=`
|
|
bool reducedAnyValue = any(values);
|
|
float floatedReducedAnyValue = float(reducedAnyValue);
|
|
anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);
|
|
`,D="bvec4");var U="";i%e>0&&(U=`
|
|
if (inIdx < 0 || inIdx >= `+i+`) {
|
|
return initializationValue;
|
|
}
|
|
`),this.userCode=`
|
|
const float initializationValue = `+s+`;
|
|
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
float getValue(int batch, int inIdx) {
|
|
`+U+`
|
|
return getX(batch, inIdx);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int outIdx = coords[1];
|
|
int inOffset = outIdx * `+e+`;
|
|
|
|
vec4 minMaxValue = vec4(`+s+`);
|
|
float prodValue = 1.0;
|
|
float sumValue = 0.0;
|
|
float allValue = 1.0;
|
|
float anyValue = 0.0;
|
|
|
|
for (int i = 0; i < `+d+`; i += 4) {
|
|
int inIdx = inOffset + i;
|
|
`+D+" values = "+D+`(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
getValue(batch, inIdx + 3)
|
|
);
|
|
|
|
`+T+`
|
|
}
|
|
|
|
int inIdx = inOffset + `+d+`;
|
|
if (`+(A===1)+`) {
|
|
`+D+" values = "+D+`(
|
|
getValue(batch, inIdx),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+T+`
|
|
} else if (`+(A===2)+`) {
|
|
`+D+" values = "+D+`(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+T+`
|
|
} else if (`+(A===3)+`) {
|
|
`+D+" values = "+D+`(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
initializationValue
|
|
);
|
|
|
|
`+T+`
|
|
}
|
|
setOutput(`+l+`);
|
|
}
|
|
`},Ih=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var e="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),e+=`
|
|
`+i+`
|
|
`+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+`
|
|
int flatIndex = getFlatIndex(thisRC);
|
|
|
|
ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);
|
|
vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));
|
|
|
|
result[`+r+`] =
|
|
getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);
|
|
`+(r>0?"}":"")+`
|
|
`}this.userCode=`
|
|
|
|
ivec3 inputCoordsFromReshapedOutCoords(int index) {
|
|
`+po(["r","c","d"],t)+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
|
|
`+Nu(n)+`
|
|
|
|
void main() {
|
|
ivec3 rc = getOutputCoords();
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
ivec3 thisRC;
|
|
int rows = `+n[1]+`;
|
|
int cols = `+n[2]+`;
|
|
|
|
`+e+`
|
|
|
|
setOutput(result);
|
|
}
|
|
`},Th=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],a=r[2],s=n.shape,u=s[1],l=s[2],d=[e&&u>1?i-1:i,e&&l>1?a-1:a],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],T=d[0]/A[0],D=d[1]/A[1],U=1/T,te=1/D,oe=2*Math.ceil(U)+2,ae=2*Math.ceil(te)+2;this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
|
|
float accumulator = 0.0;
|
|
|
|
const float heightScale = float(`+T+`);
|
|
const float widthScale = float(`+D+`);
|
|
|
|
const float invHeightScale = float(`+U+`);
|
|
const float invWidthScale = float(`+te+`);
|
|
|
|
const int winHeight = int(`+oe+`);
|
|
const int winWidth = int(`+ae+`);
|
|
|
|
// Compute bounds for where in dy we will look
|
|
float startRLerp = floor(float(r) * invHeightScale);
|
|
int startDyR = int(startRLerp - float(winHeight / 2));
|
|
|
|
float startCLerp = floor(float(c) * invWidthScale);
|
|
int startDyC = int(startCLerp - float(winWidth / 2));
|
|
|
|
// Loop over dy
|
|
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
|
|
int dyR = dyROffset + startDyR;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyR < 0 || dyR >= `+u+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
|
|
int dyC = dyCOffset + startDyC;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyC < 0 || dyC >= `+l+`) {
|
|
continue;
|
|
}
|
|
|
|
float dxR = float(dyR) * heightScale;
|
|
int topDxRIndex = int(floor(dxR));
|
|
int bottomDxRIndex = int(min(ceil(dxR), `+(i-1)+`.0));
|
|
float dxRLerp = dxR - float(topDxRIndex);
|
|
float inverseDxRLerp = 1.0 - dxRLerp;
|
|
|
|
float dxC = float(dyC) * widthScale;
|
|
int leftDxCIndex = int(floor(dxC));
|
|
int rightDxCIndex = int(min(ceil(dxC), `+(a-1)+`.0));
|
|
float dxCLerp = dxC - float(leftDxCIndex);
|
|
float inverseDxCLerp = 1.0 - dxCLerp;
|
|
|
|
if (r == topDxRIndex && c == leftDxCIndex) {
|
|
// topLeft
|
|
accumulator +=
|
|
getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;
|
|
}
|
|
|
|
if (r == topDxRIndex && c == rightDxCIndex) {
|
|
// topRight
|
|
accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;
|
|
}
|
|
|
|
if (r == bottomDxRIndex && c == leftDxCIndex) {
|
|
// bottomLeft
|
|
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;
|
|
}
|
|
|
|
if (r == bottomDxRIndex && c == rightDxCIndex) {
|
|
// bottomRight
|
|
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;
|
|
}
|
|
}
|
|
}
|
|
// End loop over dy
|
|
|
|
setOutput(accumulator);
|
|
}
|
|
`},Rh=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
|
|
const vec2 effectiveInputOverOutputRatioRC = vec2(
|
|
`+l[0]/d[0]+`,
|
|
`+l[1]/d[1]+`);
|
|
const vec2 inputShapeRC = vec2(`+a+".0, "+s+`.0);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
ivec2 yRC = coords.yz;
|
|
|
|
// Fractional source index.
|
|
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
|
|
|
|
// Compute the four integer indices.
|
|
ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);
|
|
ivec2 sourceCeilRC = ivec2(
|
|
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
|
|
|
|
float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);
|
|
float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);
|
|
float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);
|
|
float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);
|
|
|
|
vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);
|
|
|
|
float top = topLeft + (topRight - topLeft) * fracRC.y;
|
|
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;
|
|
float newValue = top + (bottom - top) * fracRC.x;
|
|
|
|
setOutput(newValue);
|
|
}
|
|
`},kh=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
|
|
const vec3 effectiveInputOverOutputRatioRC = vec3(
|
|
`+l[0]/d[0]+`,
|
|
`+l[1]/d[1]+`,
|
|
`+l[1]/d[1]+`);
|
|
const vec3 inputShapeRC = vec3(`+a+".0, "+s+`.0,
|
|
`+s+`.0);
|
|
|
|
float getAValue(int b, int r, int c, int d) {
|
|
return getChannel(getA(b, r, c, d), vec2(c, d));
|
|
}
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
// Calculate values for next column in yRC.z.
|
|
ivec3 yRC = coords.yzz + ivec3(0, 0, 1);
|
|
|
|
// Fractional source index.
|
|
vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;
|
|
|
|
// Compute the four integer indices.
|
|
ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);
|
|
ivec3 sourceCeilRC = ivec3(
|
|
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
|
|
|
|
// Should we calculate next column and row elements in 2x2 packed cell.
|
|
bool hasNextCol = d < `+(u-1)+`;
|
|
bool hasNextRow = coords.z < `+(e-1)+`;
|
|
|
|
// In parallel, construct four corners for all four components in
|
|
// packed 2x2 cell.
|
|
vec4 topLeft = vec4(
|
|
getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);
|
|
|
|
vec4 bottomLeft = vec4(
|
|
getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);
|
|
|
|
vec4 topRight = vec4(
|
|
getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);
|
|
|
|
vec4 bottomRight = vec4(
|
|
getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);
|
|
|
|
vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);
|
|
|
|
vec4 top = mix(topLeft, topRight, fracRC.yyzz);
|
|
vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);
|
|
vec4 newValue = mix(top, bottom, fracRC.x);
|
|
|
|
setOutput(newValue);
|
|
}
|
|
`},Oh=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],a=r[2],s=n.shape,u=s[1],l=s[2],d=[e&&u>1?i-1:i,e&&l>1?a-1:a],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],T=d[0]/A[0],D=d[1]/A[1],U=1/T,te=1/D,oe=2*Math.ceil(U)+2,ae=2*Math.ceil(te)+2;this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
|
|
float accumulator = 0.0;
|
|
|
|
const float heightScale = float(`+T+`);
|
|
const float widthScale = float(`+D+`);
|
|
|
|
const float invHeightScale = float(`+U+`);
|
|
const float invWidthScale = float(`+te+`);
|
|
|
|
const int winHeight = int(`+oe+`);
|
|
const int winWidth = int(`+ae+`);
|
|
|
|
// Compute bounds for where in dy we will look
|
|
float startRLerp = floor(float(r) * invHeightScale);
|
|
int startDyR = int(floor(startRLerp - float(winHeight / 2)));
|
|
|
|
float startCLerp = floor(float(c) * invWidthScale);
|
|
int startDyC = int(floor(startCLerp - float(winWidth / 2)));
|
|
|
|
// Loop over dy
|
|
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
|
|
int dyR = dyROffset + startDyR;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyR < 0 || dyR >= `+u+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
|
|
int dyC = dyCOffset + startDyC;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyC < 0 || dyC >= `+l+`) {
|
|
continue;
|
|
}
|
|
|
|
float sourceFracRow =
|
|
float(`+d[0]+`) *
|
|
(float(dyR) / float(`+A[0]+`));
|
|
|
|
float sourceFracCol =
|
|
float(`+d[1]+`) *
|
|
(float(dyC) / float(`+A[1]+`));
|
|
|
|
int sourceNearestRow = int(min(
|
|
float(int(`+i+`) - 1),
|
|
`+e+` ? float(round(sourceFracRow)) :
|
|
float(floor(sourceFracRow))));
|
|
|
|
int sourceNearestCol = int(min(
|
|
float(int(`+a+`) - 1),
|
|
`+e+` ? float(round(sourceFracCol)) :
|
|
float(floor(sourceFracCol))));
|
|
|
|
if (r == sourceNearestRow && c == sourceNearestCol) {
|
|
accumulator += getDy(b, dyR, dyC, d);
|
|
}
|
|
}
|
|
}
|
|
// End loop over dy
|
|
|
|
setOutput(accumulator);
|
|
}
|
|
`},Dh=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],d=[r&&t>1?t-1:t,r&&e>1?e-1:e],A=r?"0.5":"0.0";this.userCode=`
|
|
const vec2 effectiveInputOverOutputRatioRC = vec2(
|
|
`+l[0]/d[0]+`,
|
|
`+l[1]/d[1]+`);
|
|
const vec2 inputShapeRC = vec2(`+a+".0, "+s+`.0);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
ivec2 yRC = coords.yz;
|
|
|
|
// Fractional source index.
|
|
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
|
|
|
|
// Compute the coordinators of nearest neighbor point.
|
|
ivec2 sourceNearestRC = ivec2(
|
|
min(inputShapeRC - 1.0, floor(sourceFracIndexRC + `+A+`)));
|
|
|
|
float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);
|
|
|
|
setOutput(newValue);
|
|
}
|
|
`},jh=function(n,t){this.variableNames=["x"];var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");if(this.outputShape=n,e!==1){var r=n.map(function(a,s){return function(u){return t.indexOf(u)!==-1&&n[u]!==1?n[u]+" - coords["+u+"] - 1":"coords["+u+"]"}(s)}).join(","),i=Gr(e);this.userCode=`
|
|
void main() {
|
|
`+i+` coords = getOutputCoords();
|
|
setOutput(getX(`+r+`));
|
|
}
|
|
`}else this.userCode=`
|
|
void main() {
|
|
int coord = getOutputCoords();
|
|
setOutput(getX(`+n[0]+` - coord - 1));
|
|
}
|
|
`},Ph=function(n,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");this.outputShape=n;var r=li("rc",e),i=r[e-1]+" + 1 < "+this.outputShape[e-1],a=r[e-2]+" + 1 < "+this.outputShape[e-2],s=Gr(e);function u(l){var d=n.map(function(A,T){return function(D,U){return t.indexOf(D)!==-1&&n[D]!==1?n[D]+" - "+U[D]+" - 1":""+U[D]}(T,l)});return"getChannel(getX("+d.join(",")+"), vec2("+d.slice(-2).join(",")+"))"}this.userCode=e===1?`
|
|
void main(){
|
|
int rc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
result.r = getChannel(getX(`+n[0]+` - rc - 1),
|
|
`+n[0]+` - rc - 1);
|
|
if(`+i+`){
|
|
result.g = getChannel(getX(`+n[0]+` - (rc + 1) - 1),
|
|
`+n[0]+` - (rc + 1) - 1);
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`:`
|
|
void main() {
|
|
`+s+` rc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
result.r = `+function(l){return u(l)}(r.slice())+`;
|
|
if(`+i+`){
|
|
result.g = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",u(l)}(r.slice())+`;
|
|
}
|
|
if(`+a+`) {
|
|
result.b = `+function(l){return l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
|
|
if(`+i+`) {
|
|
result.a = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
|
|
}
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`},qc=function(n,t,e,r,i,a,s){s===void 0&&(s=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;var u=Gr(i.length),l=Gr(a.length),d="";e===1?d="i":e===2&&(d="i, j");var A="getIndices("+d+")",T="";r===1?T="i":r===2&&(T="i, coords[1]");var D="getUpdates("+T+")",U=t>1?"strides[j]":"strides";this.userCode=`
|
|
`+u+" strides = "+u+"("+i+`);
|
|
|
|
void main() {
|
|
`+l+` coords = getOutputCoords();
|
|
float sum = 0.0;
|
|
bool found = false;
|
|
for (int i = 0; i < `+n+`; i++) {
|
|
int flattenedIndex = 0;
|
|
for (int j = 0; j < `+t+`; j++) {
|
|
int index = round(`+A+`);
|
|
flattenedIndex += index * `+U+`;
|
|
}
|
|
if (flattenedIndex == coords[0]) {
|
|
sum += `+D+`;
|
|
found = true;
|
|
}
|
|
}
|
|
setOutput(mix(getDefaultValue(), sum, float(found)));
|
|
}
|
|
`},Bh=function(n,t){this.variableNames=["x","segmentIds"];var e=n.windowSize,r=n.batchSize,i=n.inSize,a=n.numSegments,s=a*Math.ceil(i/e);this.outputShape=[r,s];var u=4*Math.floor(e/4),l=e%4,d=`
|
|
sumValue += dot(values, segFilter);
|
|
`,A="";i%e>0&&(A=`
|
|
if (inIdx < 0 || inIdx >= `+i+`) {
|
|
return initializationValue;
|
|
}
|
|
`);var T="";i%e>0&&(T=`
|
|
if (inIdx < 0 || inIdx >= `+i+`) {
|
|
return -1.0;
|
|
}
|
|
`),this.userCode=`
|
|
const float initializationValue = 0.0;
|
|
|
|
float getValue(int batch, int inIdx) {
|
|
`+A+`
|
|
return getX(batch, inIdx);
|
|
}
|
|
|
|
float getSegmentIdAtIndex(int inIdx) {
|
|
`+T+`
|
|
return getSegmentIds(inIdx);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int outIdx = coords[1];
|
|
int inOffset = int(floor(float(outIdx) / float(
|
|
`+a+")) * float("+e+`));
|
|
int currentSeg = int(mod(float(outIdx), float(`+a+`)));
|
|
|
|
float sumValue = 0.0;
|
|
|
|
for (int i = 0; i < `+u+`; i += 4) {
|
|
int inIdx = inOffset + i;
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
getValue(batch, inIdx + 3)
|
|
);
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0
|
|
);
|
|
|
|
`+d+`
|
|
}
|
|
|
|
int inIdx = inOffset + `+u+`;
|
|
if (`+(l===1)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
int inIdxSeg = int(getSegmentIdAtIndex(inIdx));
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
0,
|
|
0,
|
|
0
|
|
);
|
|
|
|
`+d+`
|
|
} else if (`+(l===2)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
|
|
0,
|
|
0
|
|
);
|
|
|
|
`+d+`
|
|
} else if (`+(l===3)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
initializationValue
|
|
);
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
|
|
0
|
|
);
|
|
|
|
`+d+`
|
|
}
|
|
setOutput(sumValue);
|
|
}
|
|
`},_h=function(n,t,e){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=t,e>4)throw Error("Where for rank "+e+" is not yet supported");if(e===1)i="resRC",r="resRC";else{for(var a=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[],u=[],l=0;l<t.length;l++)u.push(""+a[l]),l<n&&s.push(""+a[l]);r=s.join(),i=u.join()}var d=Gr(e);this.userCode=`
|
|
void main() {
|
|
`+d+` resRC = getOutputCoords();
|
|
float cVal = getC(`+r+`);
|
|
if (cVal >= 1.0) {
|
|
setOutput(getA(`+i+`));
|
|
} else {
|
|
setOutput(getB(`+i+`));
|
|
}
|
|
}
|
|
`},Mh=function(){function n(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;var e,r=Gr(this.rank),i="uniform int start["+this.rank+"];",a=function(s){if(s===1)return"sourceLoc";if(s<=6)return Vu.slice(0,s).map(function(u){return"sourceLoc."+u}).join(",");throw Error("Slicing for rank "+s+" is not yet supported")}(this.rank);e=`
|
|
`+r+` sourceLoc;
|
|
`+r+` coords = getOutputCoords();
|
|
`+t.map(function(s,u){return"sourceLoc."+Vu[u]+" = start["+u+"] + coords."+Vu[u]+";"}).join(`
|
|
`)+`
|
|
`,this.userCode=`
|
|
`+i+`
|
|
void main() {
|
|
`+e+`
|
|
setOutput(getSource(`+a+`));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),Vu=["x","y","z","w","u","v"],Nh=function(){function n(t){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.rank=t.length;var e=Gr(this.rank),r=li("coords",this.rank),i=li("sourceLoc",this.rank),a=this.rank===1?"sourceLoc":"vec2("+i.slice(-2).join()+")",s="getChannel(getSource("+i.join()+"), "+a+")",u=`
|
|
result.x = `+s+`;
|
|
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
|
|
++`+i[this.rank-1]+`;
|
|
result.y = `+s+`;
|
|
--`+i[this.rank-1]+`;
|
|
}
|
|
`,l=this.rank===1?"":`
|
|
--`+r[this.rank-1]+`;
|
|
if (++`+r[this.rank-2]+" < "+t[this.rank-2]+`) {
|
|
++`+i[this.rank-2]+`;
|
|
result.z = `+s+`;
|
|
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
|
|
++`+i[this.rank-1]+`;
|
|
result.w = `+s+`;
|
|
}
|
|
}
|
|
`,d=this.rank<=4?`sourceLoc = coords +
|
|
`+e+"("+t.map(function(A,T){return"start["+T+"]"}).join()+");":t.map(function(A,T){return i[T]+" = "+r[T]+" + start["+T+"];"}).join(`
|
|
`);this.userCode=`
|
|
uniform int start[`+this.rank+`];
|
|
void main() {
|
|
`+e+` coords = getOutputCoords();
|
|
`+e+` sourceLoc;
|
|
`+d+`
|
|
vec4 result = vec4(0.);
|
|
`+u+`
|
|
`+l+`
|
|
setOutput(result);
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),Fh=function(n,t,e){this.variableNames=["x"],this.outputShape=e;var r=e.length,i=Gr(e.length),a=Gr(e.length),s="";if(r===1)s="coords * strides + begin";else{var u=0;s=e.map(function(l,d){return u++,e.length===1?"coords * strides["+d+"] + begin["+d+"]":"coords["+(u-1)+"] * strides["+d+"] + begin["+d+"]"}).join(",")}this.userCode=`
|
|
`+i+" begin = "+i+"("+n+`);
|
|
`+i+" strides = "+i+"("+t+`);
|
|
|
|
void main() {
|
|
`+a+` coords = getOutputCoords();
|
|
setOutput(getX(`+s+`));
|
|
}
|
|
`},Lh=function(){function n(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return n.prototype.acquireTexture=function(t,e,r){var i,a=ef(e,r),s=tf(t,a,r);if(s in this.freeTextures||(this.freeTextures[s]=[]),s in this.usedTextures||(this.usedTextures[s]=[]),this.freeTextures[s].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var u=this.freeTextures[s].shift();return this.usedTextures[s].push(u),u}return this.numUsedTextures++,this.log(),a===Yr.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):a===Yr.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):a===Yr.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):a===Yr.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):a===Yr.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[s].push(i),i},n.prototype.releaseTexture=function(t,e,r,i){if(this.freeTextures!=null){var a=tf(e,ef(r,i),i);a in this.freeTextures||(this.freeTextures[a]=[]),this.freeTextures[a].push(t),this.numFreeTextures++,this.numUsedTextures--;var s=this.usedTextures[a],u=s.indexOf(t);if(u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");s.splice(u,1),this.log()}},n.prototype.log=function(){if(this.logEnabled){var t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+t+")")}},n.prototype.getNumUsedTextures=function(){return this.numUsedTextures},n.prototype.getNumFreeTextures=function(){return this.numFreeTextures},n.prototype.dispose=function(){var t=this;if(this.freeTextures!=null){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(r){t.gpgpu.deleteMatrixTexture(r)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(i){t.gpgpu.deleteMatrixTexture(i)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},n}();function ef(n,t){if(n===Cn.UPLOAD)return Yr.PACKED_2X2_FLOAT32;if(n===Cn.RENDER||n==null)return function(e){return P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?Yr.PACKED_2X2_FLOAT32:Yr.UNPACKED_FLOAT32:e?Yr.PACKED_2X2_FLOAT16:Yr.UNPACKED_FLOAT16}(t);if(n===Cn.DOWNLOAD||n===Cn.PIXELS)return Yr.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+n)}function tf(n,t,e){return n[0]+"_"+n[1]+"_"+t+"_"+e}var Uh=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[r]*t[r];this.outputShape=e,this.rank=e.length;var i=Gr(this.rank),a=function(s){var u=s.length;if(u>5)throw Error("Tile for rank "+u+" is not yet supported");if(u===1)return"imod(resRC, "+s[0]+")";for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],d=[],A=0;A<s.length;A++)d.push("imod("+l[A]+", "+s[A]+")");return d.join()}(n);this.userCode=`
|
|
void main() {
|
|
`+i+` resRC = getOutputCoords();
|
|
setOutput(getA(`+a+`));
|
|
}
|
|
`},Wh=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];this.outputShape=e,this.rank=e.length;var i=Gr(this.rank),a=function(s){var u=s.length;if(u>6)throw Error("Transpose for rank "+u+" is not yet supported");for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],d=new Array(u),A=0;A<s.length;A++)d[s[A]]=l[A];return d.join()}(t);this.userCode=`
|
|
void main() {
|
|
`+i+` resRC = getOutputCoords();
|
|
setOutput(getA(`+a+`));
|
|
}
|
|
`},zh=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];if(this.outputShape=e,this.rank=e.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=Gr(this.rank),a=Ec("rc",this.rank),s=new Array(this.rank);for(r=0;r<t.length;r++)s[t[r]]=a[r];var u="vec2("+s.slice(-2).join()+")",l="++"+a[this.rank-1]+" < "+e[this.rank-1],d="getChannel(getA("+s.join()+"), "+u+")";this.userCode=`
|
|
void main() {
|
|
`+i+` rc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
result[0] = `+d+`;
|
|
if(`+l+`) {
|
|
result[1] = `+d+`;
|
|
}
|
|
--`+a[this.rank-1]+`;
|
|
if(++`+a[this.rank-2]+" < "+e[this.rank-2]+`) {
|
|
result[2] = `+d+`;
|
|
if(`+l+`) {
|
|
result[3] = `+d+`;
|
|
}
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`},Qu=1.7580993408473768,Hu=1.0507009873554805,Jt=function(n,t){this.variableNames=["A"],this.outputShape=n,this.userCode=`
|
|
float unaryOperation(float x) {
|
|
`+t+`
|
|
}
|
|
|
|
void main() {
|
|
float x = getAAtOutCoords();
|
|
float y = unaryOperation(x);
|
|
|
|
setOutput(y);
|
|
}
|
|
`},Ui="if (isnan(x)) return x;",Vh="return x;",rf="return abs(x);",nf=Ui+`
|
|
return (x < 0.0) ? 0.0 : x;
|
|
`,af=Ui+`
|
|
return (x < 0.0) ? 0.0 : min(6.0, x);
|
|
`,of="return (x >= 0.0) ? x : (exp(x) - 1.0);",Qh=`
|
|
// Stable and Attracting Fixed Point (0, 1) for Normalized Weights.
|
|
// see: https://arxiv.org/abs/1706.02515
|
|
float scaleAlpha = `+Qu+`;
|
|
float scale = `+Hu+`;
|
|
return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);
|
|
`,sf="return -x;",uf="return ceil(x);",lf="return floor(x);",cf="return exp(x);",ff="return exp(x) - 1.0;",Hh=Ui+`
|
|
return sin(x);
|
|
`,Gh=Ui+`
|
|
return cos(x);
|
|
`,Xh=Ui+`
|
|
if (abs(x) > 1.) {
|
|
return NAN;
|
|
}
|
|
return asin(x);
|
|
`,Kh=Ui+`
|
|
if (abs(x) > 1.) {
|
|
return NAN;
|
|
}
|
|
return acos(x);
|
|
`,Zh=Ui+`
|
|
return atan(x);
|
|
`,Jh=Ui+"return log(x + sqrt(x * x + 1.0));",Yh=Ui+`
|
|
if (x < 1.0) return NAN;
|
|
return log(x + sqrt(x * x - 1.0));`,$h=Ui+`
|
|
if ((x < -1.0) || (x > 1.0)) return NAN;
|
|
return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,$s="return x;",qh="return x;",df=`
|
|
vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));
|
|
bvec4 isNaN = isnan(x);
|
|
|
|
result.r = isNaN.r ? x.r : result.r;
|
|
result.g = isNaN.g ? x.g : result.g;
|
|
result.b = isNaN.b ? x.b : result.b;
|
|
result.a = isNaN.a ? x.a : result.a;
|
|
|
|
return result;
|
|
`,pf=`
|
|
vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));
|
|
bvec4 isNaN = isnan(x);
|
|
|
|
result.r = isNaN.r ? x.r : result.r;
|
|
result.g = isNaN.g ? x.g : result.g;
|
|
result.b = isNaN.b ? x.b : result.b;
|
|
result.a = isNaN.a ? x.a : result.a;
|
|
|
|
return result;
|
|
`,hf=`
|
|
vec4 result;
|
|
|
|
result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);
|
|
result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);
|
|
result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);
|
|
result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);
|
|
|
|
return result;
|
|
`,ws=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.userCode=`
|
|
vec4 unaryOperation(vec4 x) {
|
|
`+t+`
|
|
}
|
|
|
|
void main() {
|
|
vec4 x = getAAtOutCoords();
|
|
vec4 y = unaryOperation(x);
|
|
|
|
setOutput(y);
|
|
}
|
|
`},ev=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=n;var t=n.length,e=li("rc",t),r=Gr(t),i=function(u,l){if(u===1)return"rc";for(var d="",A=0;A<u;A++)d+=l[A],A<u-1&&(d+=",");return d}(t,e),a=e.slice(-2),s=t<=1?"rc":"vec2("+a.join(",")+")";this.userCode=`
|
|
void main() {
|
|
`+r+` rc = getOutputCoords();
|
|
vec4 packedInput = getA(`+i+`);
|
|
|
|
setOutput(getChannel(packedInput, `+s+`));
|
|
}
|
|
`},eu={};function tu(n,t){if(t===void 0&&(t=!1),n==="linear")return t?qh:Vh;if(n==="relu")return t?df:nf;if(n==="elu")return t?hf:of;if(n==="relu6")return t?pf:af;if(n==="prelu")return t?kc:Rc;throw new Error("Activation "+n+" has not been implemented for the WebGL backend.")}var tv=600,vf=function(n){function t(e){var r,i=n.call(this)||this;if(i.pendingRead=new WeakMap,i.pendingDisposal=new WeakSet,i.dataRefCount=new WeakMap,i.numBytesInGPU=0,i.uploadWaitMs=0,i.downloadWaitMs=0,i.warnedAboutMemory=!1,i.pendingDeletes=0,i.disposed=!1,!P().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");if(e==null){var a=gn(P().getNumber("WEBGL_VERSION"));i.binaryCache=((r=P().getNumber("WEBGL_VERSION"))in eu||(eu[r]={}),eu[r]),i.gpgpu=new Yc(a),i.canvas=a.canvas,i.gpgpuCreatedLocally=!0}else i.gpgpu=e,i.binaryCache={},i.gpgpuCreatedLocally=!1,i.canvas=e.gl.canvas;return i.textureManager=new Lh(i.gpgpu),i.numMBBeforeWarning=P().global.screen==null?1024:P().global.screen.height*P().global.screen.width*window.devicePixelRatio*tv/1024/1024,i.texData=new co(i,Ge),i}return I(t,n),t.prototype.numDataIds=function(){return this.texData.numDataIds()+(this.cpuBackend?this.cpuBackend.numDataIds():0)-this.pendingDeletes},t.prototype.write=function(e,r,i){if(P().getBool("DEBUG")&&this.checkNumericalProblems(e),i==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var a={};return this.texData.set(a,{shape:r,dtype:i,values:e,usage:Cn.UPLOAD}),a},t.prototype.move=function(e,r,i,a){if(P().getBool("DEBUG")&&this.checkNumericalProblems(r),a==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:i,dtype:a,values:r,usage:Cn.UPLOAD})},t.prototype.readSync=function(e){var r=this.texData.get(e),i=r.values,a=r.dtype,s=r.complexTensors,u=r.slice,l=r.shape,d=r.isPacked;if(u!=null){var A=void 0;A=d?new ws(l,$s):new Jt(l,$s);var T=this.runWebGLProgram(A,[{dataId:e,shape:l,dtype:a}],a),D=this.readSync(T.dataId);return this.disposeData(T.dataId),D}if(i!=null)return this.convertAndCacheOnCPU(e);if(a==="string")return i;var U,te,oe=this.activeTimers!=null;return oe&&(U=Ye()),a==="complex64"?te=rn(s.real.dataSync(),s.imag.dataSync()):te=this.getValuesFromTexture(e),oe&&(this.downloadWaitMs+=Ye()-U),this.convertAndCacheOnCPU(e,te)},t.prototype.read=function(e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,T,D,U,te,oe,ae,se,we,Ce,me,Se,Re,Ue,We;return E(this,function(Ne){switch(Ne.label){case 0:if(this.pendingRead.has(e))return r=this.pendingRead.get(e),[2,new Promise(function(Le){return r.push(Le)})];if(i=this.texData.get(e),a=i.values,s=i.shape,u=i.slice,l=i.dtype,d=i.complexTensors,A=i.isPacked,u!=null)return T=void 0,T=A?new ws(s,$s):new Jt(s,$s),D=this.runWebGLProgram(T,[{dataId:e,shape:s,dtype:l}],l),U=this.read(D.dataId),this.disposeData(D.dataId),[2,U];if(a!=null)return[2,this.convertAndCacheOnCPU(e)];if(!P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&P().getNumber("WEBGL_VERSION")===2)throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return te=null,l!=="complex64"&&P().get("WEBGL_BUFFER_SUPPORTED")&&(oe=this.decode(e),ae=this.texData.get(oe.dataId),te=(We=this.gpgpu).createBufferFromTexture.apply(We,[ae.texture].concat(ji(s)))),this.pendingRead.set(e,[]),l==="complex64"?[3,2]:[4,this.gpgpu.createAndWaitForFence()];case 1:Ne.sent(),Ne.label=2;case 2:return l!=="complex64"?[3,4]:[4,Promise.all([d.real.data(),d.imag.data()])];case 3:return we=Ne.sent(),Ce=we[0],me=we[1],se=rn(Ce,me),[3,5];case 4:te==null?se=this.getValuesFromTexture(e):(Se=le(s),se=this.gpgpu.downloadFloat32MatrixFromBuffer(te,Se)),Ne.label=5;case 5:return oe!=null&&this.disposeData(oe.dataId),Re=this.convertAndCacheOnCPU(e,se),Ue=this.pendingRead.get(e),this.pendingRead.delete(e),Ue.forEach(function(Le){return Le(Re)}),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e),this.pendingDeletes--),[2,Re]}})})},t.prototype.checkNumericalProblems=function(e){if(e!=null)for(var r=0;r<e.length;r++){var i=e[r];if(!Du(i))throw P().getBool("WEBGL_RENDER_FLOAT32_CAPABLE")?Error("The value "+i+" cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'"):Error("The value "+i+" cannot be represented on this device.")}},t.prototype.getValuesFromTexture=function(e){var r,i=this.texData.get(e),a=i.shape,s=i.dtype,u=i.isPacked,l=le(a);if(P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var d=this.decode(e),A=this.texData.get(d.dataId),T=(r=this.gpgpu).downloadMatrixFromPackedTexture.apply(r,[A.texture].concat(ji(a))).subarray(0,l);return this.disposeData(d.dataId),T}var D=P().getBool("WEBGL_PACK")&&u===!0,U=D?ko(a):a,te=D?new ah(U):new ih(U),oe=this.runWebGLProgram(te,[{shape:U,dtype:s,dataId:e}],"float32"),ae=this.texData.get(oe.dataId),se=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(ae.texture,ae.texShape[0],ae.texShape[1]).subarray(0,l);return this.disposeData(oe.dataId),se},t.prototype.time=function(e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,d;return E(this,function(A){switch(A.label){case 0:return r=this.activeTimers,i=[],a=!1,this.programTimersStack==null?(this.programTimersStack=i,a=!0):this.activeTimers.push(i),this.activeTimers=i,e(),s=be(this.activeTimers.map(function(T){return T.query})).filter(function(T){return T!=null}),u=be(this.activeTimers.map(function(T){return T.name})).filter(function(T){return T!=null}),this.activeTimers=r,a&&(this.programTimersStack=null),l={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[4,Promise.all(s)]:[3,2];case 1:return d=A.sent(),l.kernelMs=Ae(d),l.getExtraProfileInfo=function(){return d.map(function(T,D){return{name:u[D],ms:T}}).map(function(T){return T.name+": "+T.ms}).join(", ")},[3,3];case 2:l.kernelMs={error:"WebGL query timers are not supported in this environment."},A.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,l]}})})},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:Ye(),endMs:null}},t.prototype.endTimer=function(e){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=Ye(),e)},t.prototype.getQueryTime=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(r=e).endMs-r.startMs]})})},t.prototype.disposeData=function(e){if(!this.pendingDisposal.has(e)){if(this.pendingRead.has(e))return this.pendingDisposal.add(e),void this.pendingDeletes++;if(this.texData.has(e)){this.releaseGPUData(e);var r=this.texData.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.texData.delete(e)}}},t.prototype.releaseGPUData=function(e){var r=this.texData.get(e),i=r.texture,a=r.dtype,s=r.texShape,u=r.usage,l=r.isPacked,d=r.slice,A=d&&d.origDataId||e,T=this.dataRefCount.get(A);T>1?this.dataRefCount.set(A,T-1):(this.dataRefCount.delete(A),i!=null&&(this.numBytesInGPU-=this.computeBytes(s,a),this.textureManager.releaseTexture(i,s,u,l)));var D=this.texData.get(e);D.texture=null,D.texShape=null,D.isPacked=!1,D.slice=null},t.prototype.getTexture=function(e){return this.uploadToGPU(e),this.texData.get(e).texture},t.prototype.getDataInfo=function(e){return this.texData.get(e)},t.prototype.getCPUBackend=function(){return P().getBool("WEBGL_CPU_FORWARD")?(this.cpuBackend==null&&(this.cpuBackend=Ge.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(e,r){var i=this;return r===void 0&&(r=128),this.getCPUBackend()!=null&&e.every(function(a){return i.texData.get(a.dataId).texture==null&&a.size<r})},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.complex=function(e,r){var i=this.makeOutput(e.shape,"complex64");return this.texData.get(i.dataId).complexTensors={real:Ge.keep(e.clone()),imag:Ge.keep(r.clone())},i},t.prototype.real=function(e){return this.texData.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.texData.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.slice(e,r,i);if(le(i)===0)return Mt([],i,e.dtype);var a=this.texData.get(e.dataId).isPacked,s=si(e.shape,r,i);if(a||!s){var u=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Nh(i):new Mh(i),l=u.getCustomSetupFunc(r);return this.compileAndRun(u,[e],null,l)}return this.uploadToGPU(e.dataId),this.shallowSlice(e,r,i)},t.prototype.shallowSlice=function(e,r,i){var a=this.texData.get(e.dataId),s=this.makeOutput(i,e.dtype),u=this.texData.get(s.dataId);Object.assign(u,a),u.shape=i,u.dtype=e.dtype;var l=Jn(r,e.strides);a.slice&&(l+=a.slice.flatOffset),u.slice={flatOffset:l,origDataId:a.slice&&a.slice.origDataId||e.dataId};var d=this.dataRefCount.get(u.slice.origDataId)||1;return this.dataRefCount.set(u.slice.origDataId,d+1),s},t.prototype.stridedSlice=function(e,r,i,a){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.stridedSlice(e,r,i,a);var s=oi(r,i,a);if(s.some(function(l){return l===0}))return Mt([],s);var u=new Fh(r,a,s);return this.compileAndRun(u,[e])},t.prototype.reverse=function(e,r){var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ph(e.shape,r):new jh(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.concat=function(e,r){if(e[0].dtype==="complex64"){var i=e.map(function(U){return Tr(U)}),a=e.map(function(U){return Hr(U)});return Fr(this.concat(i,r),this.concat(a,r))}if(this.shouldExecuteOnCPU(e))return this.cpuBackend.concat(e,r);if(e.length===1)return e[0];if(e.length>P().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var s=Math.floor(e.length/2),u=this.concat(e.slice(0,s),r),l=this.concat(e.slice(s),r);return this.concat([u,l],r)}if(P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var d=new Qp(e.map(function(U){return U.shape}),r);return this.compileAndRun(d,e)}var A=On(e.map(function(U){return U.shape}),r),T=e.map(function(U){return U.as2D(-1,le(U.shape.slice(r)))}),D=new Vp(T.map(function(U){return U.shape}));return this.compileAndRun(D,T).reshape(A)},t.prototype.neg=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.neg(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,sf,e.dtype);var r=new Jt(e.shape,sf);return this.compileAndRun(r,[e])},t.prototype.batchMatMul=function(e,r,i,a){var s=i?e.shape[2]:e.shape[1],u=a?r.shape[1]:r.shape[2],l=i?e.shape[1]:e.shape[2],d=e.shape[0];if((s===1||u===1)&&l>1e3){i&&(e=e.transpose([0,2,1])),a&&(r=r.transpose([0,2,1]));var A=u===1?e:e.as3D(d,l,1),T=u===1?2:1,D=u===1?r.as3D(d,1,l):r;return this.multiply(A,D).sum(T,!0)}var U=Vt(e.dtype,r.dtype),te=new Uu(e.shape,[d,s,u],i,a);return this.compileAndRun(te,[e,r],U)},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,a=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=a?r.shape[2]:r.shape[1],T=s?i.shape[1]:i.shape[2],D=r.shape[0],U=Vt(r.dtype,i.dtype),te=u!=null,oe=d!=null,ae=l?tu(l,!0):null,se=new Uu(r.shape,[D,A,T],a,s,te,ae,oe),we=[r,i];return u&&we.push(u),d&&we.push(d),this.compileAndRun(se,we,U)},t.prototype.multiply=function(e,r){if(e.dtype==="complex64"){var i=this.texData.get(e.dataId),a=this.texData.get(r.dataId),s=new Ic(Fp,e.shape,r.shape),u=new Ic(Lp,e.shape,r.shape),l=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag),this.makeComplexComponentTensorInfo(r,a.complexTensors.real),this.makeComplexComponentTensorInfo(r,a.complexTensors.imag)],d=this.compileAndRun(s,l),A=this.compileAndRun(u,l),T=this.complex(d,A);return d.dispose(),A.dispose(),T}if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.multiply(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Tc,e.dtype);var D=new ln(Tc,e.shape,r.shape);return this.compileAndRun(D,[e,r],e.dtype)},t.prototype.batchNormalization=function(e,r,i,a,s,u){var l=[e,r,i],d=null;u!=null&&(d=u.shape,l.push(u));var A=null;if(s!=null&&(A=s.shape,l.push(s)),P().getBool("WEBGL_PACK_NORMALIZATION")){var T=new Np(e.shape,r.shape,i.shape,d,A,a);return this.compileAndRun(T,l)}var D=new Mp(e.shape,r.shape,i.shape,d,A,a);return this.compileAndRun(D,l)},t.prototype.localResponseNormalization4D=function(e,r,i,a,s){var u=P().getBool("WEBGL_PACK_NORMALIZATION")?new gh(e.shape,r,i,a,s):new vh(e.shape,r,i,a,s);return this.compileAndRun(u,[e])},t.prototype.LRNGrad=function(e,r,i,a,s,u,l){var d=new mh(r.shape,a,s,u,l);return this.compileAndRun(d,[r,i,e])},t.prototype.tile=function(e,r){if(e.dtype==="string"){var i=this.readSync(e.dataId).map(function(s){return ft(s)});return Ac(Nt(e.shape,e.dtype,i),r)}var a=new Uh(e.shape,r);return this.compileAndRun(a,[e])},t.prototype.pad=function(e,r,i){var a=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Ch(e.shape,r,i):new Eh(e.shape,r,i);return this.compileAndRun(a,[e])},t.prototype.transpose=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,r);var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new zh(e.shape,r):new Wh(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.gather=function(e,r,i){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.gather(e,r,i);var a=new fh(e.shape,r.size,i);return this.compileAndRun(a,[e,r])},t.prototype.batchToSpaceND=function(e,r,i){Z(e.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var a=r.reduce(function(T,D){return T*D}),s=ai(e.shape,r,a),u=_i(s.length,r.length),l=Si(e.shape,r,a),d=no(i,r.length),A=vn(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(d,A)},t.prototype.spaceToBatchND=function(e,r,i){Z(e.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var a=r.reduce(function(D,U){return D*U}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),d=ai(l.shape,r,a,!1),A=_i(d.length,r.length,!1),T=Si(l.shape,r,a,!1);return l.reshape(d).transpose(A).reshape(T)},t.prototype.reduce=function(e,r,i){var a=e.shape[0],s=e.shape[1],u=va(s),l=new Sh({windowSize:u,inSize:s,batchSize:a},r),d=this.compileAndRun(l,[e],i);return d.shape[1]===1?d:this.reduce(d,r,i)},t.prototype.argReduce=function(e,r,i){i===void 0&&(i=null);var a=e.shape[0],s=e.shape[1];i!=null&&(a=i.shape[0],s=i.shape[1]);var u=va(s),l=new Tp({windowSize:u,inSize:s,batchSize:a},r,i==null),d=[e];i!=null&&d.push(i);var A=this.compileAndRun(l,d,"int32");return A.shape[1]===1?A:this.argReduce(e,r,A)},t.prototype.argReducePacked=function(e,r,i){i===void 0&&(i=null);var a=i!=null?i.shape:e.shape,s=va(a[a.length-1]),u=new Pp(a,s,r,i==null),l=i==null?[e]:[e,i],d=this.compileAndRun(u,l,"int32");return d.rank===e.rank?this.argReducePacked(e,r,d):d},t.prototype.sum=function(e,r){Xr("sum",r,e.rank);var i=jr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s),l=mn(e.dtype);return this.reduce(u,"sum",l).reshape(a)},t.prototype.prod=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.prod(e,r);var i=jr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s),l=mn(e.dtype);return this.reduce(u,"prod",l).reshape(a)},t.prototype.unsortedSegmentSum=function(e,r,i){var a=0,s=qr([a],e.rank),u=e;s!=null&&(u=e.transpose(s),a=fn(1,e.rank)[0]);var l=function(U,te,oe){for(var ae=[],se=U.length,we=0;we<se;we++)we!==te?ae.push(U[we]):ae.push(oe);return ae}(u.shape,a,i),d=le([u.shape[a]]),A=u.as2D(-1,d),T=mn(e.dtype),D=this.segOpCompute(A,"unsortedSegmentSum",r,T,i).reshape(l);return s!=null&&(D=D.transpose(Sn(s))),D},t.prototype.segOpCompute=function(e,r,i,a,s){var u=e.shape[0],l=e.shape[1],d=function(D,U){var te,oe=!1;for(D<=Mi?(te=D,oe=!0):te=ge(D,Math.floor(Math.sqrt(D)));!oe;)te>U||te===D?oe=!0:te=ge(D,te+1);return te}(l,s),A=new Bh({windowSize:d,inSize:l,batchSize:u,numSegments:s},r),T=this.compileAndRun(A,[e,i],a);return T.shape[1]===s?T:(i=Mn(0,s).tile([l/d]),this.segOpCompute(T,r,i,a,s))},t.prototype.argMinMaxReduce=function(e,r,i){var a=[r];if(Xr("arg"+i.charAt(0).toUpperCase()+i.slice(1),a,e.rank),!P().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var s=jr(e.shape,a),u=s[0],l=le(s[1]),d=e.as2D(-1,l);return this.argReduce(d,i).reshape(u)}return this.argReducePacked(e,i)},t.prototype.argMin=function(e,r){return this.argMinMaxReduce(e,r,"min")},t.prototype.argMax=function(e,r){return this.argMinMaxReduce(e,r,"max")},t.prototype.cumsum=function(e,r,i,a){if(r!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+r);var s=new qp(e.shape,i,a);return this.compileAndRun(s,[e])},t.prototype.equal=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(equal(a, b));
|
|
`,"bool");var i=new ln("return float(a == b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.notEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(notEqual(a, b));
|
|
`,"bool");var i=new ln("return float(a != b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.less=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.less(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(lessThan(a, b));
|
|
`,"bool");var i=new ln("return float(a < b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.lessEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(lessThanEqual(a, b));
|
|
`,"bool");var i=new ln("return float(a <= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greater=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.greater(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(greaterThan(a, b));
|
|
`,"bool");var i=new ln("return float(a > b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greaterEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(greaterThanEqual(a, b));
|
|
`,"bool");var i=new ln("return float(a >= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalNot=function(e){var r=new Jt(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(r,[e])},t.prototype.logicalAnd=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(
|
|
vec4(greaterThanEqual(a, vec4(1.0))) *
|
|
vec4(greaterThanEqual(b, vec4(1.0))));
|
|
`,"bool");var i=new ln("return float(a >= 1.0 && b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalOr=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return min(
|
|
vec4(greaterThanEqual(a, vec4(1.0))) +
|
|
vec4(greaterThanEqual(b, vec4(1.0))),
|
|
vec4(1.0));
|
|
`,"bool");var i=new ln("return float(a >= 1.0 || b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.select=function(e,r,i){var a=new _h(e.rank,r.shape,r.rank);return this.compileAndRun(a,[e,r,i],Vt(r.dtype,i.dtype))},t.prototype.where=function(e){$r("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var r=e.dataSync();return Mu(e.shape,r)},t.prototype.topk=function(e,r,i){return xc(e.dataSync(),e.shape,e.dtype,r)},t.prototype.min=function(e,r){Xr("min",r,e.rank);var i=jr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"min",u.dtype).reshape(a)},t.prototype.minimum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.minimum(e,r);var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(`
|
|
vec4 result = vec4(min(a, b));
|
|
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new ln(`
|
|
if (isnan(a)) return a;
|
|
if (isnan(b)) return b;
|
|
|
|
return min(a, b);
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.mod=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(`
|
|
vec4 result = mod(a, b);
|
|
vec4 isNaN = vec4(equal(b, vec4(0.0)));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new ln(`if (b == 0.0) return NAN;
|
|
return mod(a, b);`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.max=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,r);Xr("max",r,e.rank);var i=jr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"max",u.dtype).reshape(a)},t.prototype.maximum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.maximum(e,r);var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(`
|
|
vec4 result = vec4(max(a, b));
|
|
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new ln(`
|
|
if (isnan(a)) return a;
|
|
if (isnan(b)) return b;
|
|
|
|
return max(a, b);
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.all=function(e,r){Xr("all",r,e.rank);var i=jr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"all",u.dtype).reshape(a)},t.prototype.any=function(e,r){Xr("any",r,e.rank);var i=jr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"any",u.dtype).reshape(a)},t.prototype.realDivide=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
// vec4 one = vec4(equal(a, b));
|
|
// return one + (vec4(1.0) - one) * a / b;
|
|
vec4 result = a / b;
|
|
if(a.x == b.x) {
|
|
result.x = 1.;
|
|
}
|
|
if(a.y == b.y) {
|
|
result.y = 1.;
|
|
}
|
|
if(a.z == b.z) {
|
|
result.z = 1.;
|
|
}
|
|
if(a.w == b.w) {
|
|
result.w = 1.;
|
|
}
|
|
|
|
return result;
|
|
`,"float32",!0);var i=new ln(`
|
|
if (a == b) {
|
|
return 1.0;
|
|
};
|
|
return a / b;`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"float32")},t.prototype.floorDiv=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
ivec4 ia = round(a);
|
|
ivec4 ib = round(b);
|
|
bvec4 cond = notEqual(ib, ivec4(0));
|
|
ivec4 result = ivec4(0);
|
|
vec4 s = sign(a) * sign(b);
|
|
|
|
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
|
|
if (cond[0]) {
|
|
result[0] = idiv(ia[0], ib[0], s[0]);
|
|
}
|
|
if (cond[1]) {
|
|
result[1] = idiv(ia[1], ib[1], s[1]);
|
|
}
|
|
if (cond[2]) {
|
|
result[2] = idiv(ia[2], ib[2], s[2]);
|
|
}
|
|
if (cond[3]) {
|
|
result[3] = idiv(ia[3], ib[3], s[3]);
|
|
}
|
|
return vec4(result);
|
|
`,"int32");var i=new ln(`
|
|
float s = sign(a) * sign(b);
|
|
int ia = round(a);
|
|
int ib = round(b);
|
|
if (ib != 0) {
|
|
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
|
|
return float(idiv(ia, ib, s));
|
|
} else {
|
|
return NAN;
|
|
}
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"int32")},t.prototype.add=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Fu);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.add(e,r);var i=Vt(e.dtype,r.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Fu,i);var a=new ln(Fu,e.shape,r.shape);return this.compileAndRun(a,[e,r],i)},t.prototype.packedUnaryOp=function(e,r,i){var a=new ws(e.shape,r);return this.compileAndRun(a,[e],i)},t.prototype.packedBinaryOp=function(e,r,i,a,s){s===void 0&&(s=!1);var u=new ma(i,e.shape,r.shape,s);return this.compileAndRun(u,[e,r],a)},t.prototype.complexSeparableBinaryOp=function(e,r,i){var a=this,s=this.texData.get(e.dataId),u=this.texData.get(r.dataId),l=[[s.complexTensors.real,u.complexTensors.real],[s.complexTensors.imag,u.complexTensors.imag]].map(function(D){var U=D[0],te=D[1],oe=a.makeComplexComponentTensorInfo(e,U),ae=a.makeComplexComponentTensorInfo(r,te),se=new ln(i,e.shape,r.shape);return a.compileAndRun(se,[oe,ae],Vt(U.dtype,te.dtype))}),d=l[0],A=l[1],T=this.complex(d,A);return d.dispose(),A.dispose(),T},t.prototype.makeComplexComponentTensorInfo=function(e,r){return{dataId:r.dataId,dtype:r.dtype,shape:e.shape}},t.prototype.addN=function(e){if(e.length===1)return e[0];if(e.length>P().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var r=Math.floor(e.length/2),i=this.addN(e.slice(0,r)),a=this.addN(e.slice(r));return this.addN([i,a])}var s=e.map(function(d){return d.dtype}).reduce(function(d,A){return Vt(d,A)}),u=e.map(function(d){return d.shape}),l=P().getBool("WEBGL_PACK")?new Ip(e[0].shape,u):new Sp(e[0].shape,u);return this.compileAndRun(l,e,s)},t.prototype.subtract=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Lu);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.subtract(e,r);var i=Vt(e.dtype,r.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Lu,e.dtype);var a=new ln(Lu,e.shape,r.shape);return this.compileAndRun(a,[e,r],i)},t.prototype.pow=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(`
|
|
// isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.
|
|
vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));
|
|
vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);
|
|
vec4 result = multiplier * pow(abs(a), b);
|
|
|
|
// Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS
|
|
bvec4 isExpZero = equal(b, vec4(0.0));
|
|
result.r = isExpZero.r ? 1.0 : result.r;
|
|
result.g = isExpZero.g ? 1.0 : result.g;
|
|
result.b = isExpZero.b ? 1.0 : result.b;
|
|
result.a = isExpZero.a ? 1.0 : result.a;
|
|
|
|
vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new ln(`
|
|
if(a < 0.0 && floor(b) < b){
|
|
return NAN;
|
|
}
|
|
if (b == 0.0) {
|
|
return 1.0;
|
|
}
|
|
return (round(mod(b, 2.0)) != 1) ?
|
|
pow(abs(a), b) : sign(a) * pow(abs(a), b);
|
|
`,e.shape,r.shape),a=Vt(e.dtype,r.dtype);return this.compileAndRun(i,[e,r],a)},t.prototype.ceil=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.ceil(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,uf,e.dtype);var r=new Jt(e.shape,uf);return this.compileAndRun(r,[e])},t.prototype.floor=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.floor(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,lf,e.dtype);var r=new Jt(e.shape,lf);return this.compileAndRun(r,[e])},t.prototype.sign=function(e){var r=new Jt(e.shape,`
|
|
if (isnan(x)) { return 0.0; }
|
|
return sign(x);
|
|
`);return this.compileAndRun(r,[e])},t.prototype.isNaN=function(e){var r=new Jt(e.shape,"return float(isnan(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isInf=function(e){var r=new Jt(e.shape,"return float(isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isFinite=function(e){var r=new Jt(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.round=function(e){var r=new Jt(e.shape,`
|
|
// OpenGL ES does not support round function.
|
|
// The algorithm is based on banker's rounding.
|
|
float base = floor(x);
|
|
if ((x - base) < 0.5) {
|
|
return floor(x);
|
|
} else if ((x - base) > 0.5) {
|
|
return ceil(x);
|
|
} else {
|
|
if (mod(base, 2.0) == 0.0) {
|
|
return base;
|
|
} else {
|
|
return base + 1.0;
|
|
}
|
|
}
|
|
`);return this.compileAndRun(r,[e])},t.prototype.exp=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.exp(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,cf,e.dtype);var r=new Jt(e.shape,cf);return this.compileAndRun(r,[e])},t.prototype.expm1=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.expm1(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,ff,e.dtype);var r=new Jt(e.shape,ff);return this.compileAndRun(r,[e])},t.prototype.softmax=function(e,r){var i=ye([r],e.shape),a=this.max(e,i),s=Nr(a.shape,i),u=this.subtract(e,a.reshape(s)),l=this.exp(u),d=this.sum(l,i).reshape(s);return this.realDivide(l,d)},t.prototype.log=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.log(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,`
|
|
vec4 result = log(x);
|
|
vec4 isNaN = vec4(lessThan(x, vec4(0.0)));
|
|
result.r = isNaN.r == 1.0 ? NAN : result.r;
|
|
result.g = isNaN.g == 1.0 ? NAN : result.g;
|
|
result.b = isNaN.b == 1.0 ? NAN : result.b;
|
|
result.a = isNaN.a == 1.0 ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.dtype);var r=new Jt(e.shape,`if (x < 0.0) return NAN;
|
|
return log(x);`);return this.compileAndRun(r,[e])},t.prototype.log1p=function(e){var r=new Jt(e.shape,"return log(1.0 + x);");return this.compileAndRun(r,[e])},t.prototype.sqrt=function(e){var r=new Jt(e.shape,"return sqrt(x);");return this.compileAndRun(r,[e])},t.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var r=new Jt(e.shape,"return inversesqrt(x);");return this.compileAndRun(r,[e])},t.prototype.reciprocal=function(e){var r=new Jt(e.shape,"return 1.0 / x;");return this.compileAndRun(r,[e])},t.prototype.relu=function(e){var r;return r=P().getBool("WEBGL_PACK")?new ws(e.shape,df):new Jt(e.shape,nf),this.compileAndRun(r,[e])},t.prototype.relu6=function(e){var r;return r=P().getBool("WEBGL_PACK")?new ws(e.shape,pf):new Jt(e.shape,af),this.compileAndRun(r,[e])},t.prototype.prelu=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(kc,e.shape,r.shape):new ln(Rc,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.elu=function(e){if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,hf,e.dtype);var r=new Jt(e.shape,of);return this.compileAndRun(r,[e])},t.prototype.eluDer=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(`
|
|
vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));
|
|
return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));
|
|
`,e.shape,r.shape):new ln("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.selu=function(e){var r=new Jt(e.shape,Qh);return this.compileAndRun(r,[e])},t.prototype.int=function(e){var r=new Jt(e.shape,"return float(int(x));");return this.compileAndRun(r,[e],"int32")},t.prototype.clip=function(e,r,i){var a,s=(a=P().getBool("WEBGL_PACK_CLIP")?new Wp(e.shape):new Up(e.shape)).getCustomSetupFunc(r,i);return this.compileAndRun(a,[e],null,s)},t.prototype.abs=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.abs(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,rf,e.dtype);var r=new Jt(e.shape,rf);return this.compileAndRun(r,[e])},t.prototype.complexAbs=function(e){var r=this.texData.get(e.dataId),i=new zp(e.shape),a=[this.makeComplexComponentTensorInfo(e,r.complexTensors.real),this.makeComplexComponentTensorInfo(e,r.complexTensors.imag)];return this.compileAndRun(i,a)},t.prototype.sigmoid=function(e){var r=new Jt(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(r,[e])},t.prototype.softplus=function(e){var r=new Jt(e.shape,`
|
|
float epsilon = 1.1920928955078125e-7;
|
|
float threshold = log(epsilon) + 2.0;
|
|
|
|
bool too_large = x > -threshold;
|
|
bool too_small = x < threshold;
|
|
|
|
float result;
|
|
float exp_x = exp(x);
|
|
|
|
if (too_large){
|
|
result = x;
|
|
}
|
|
else if (too_small){
|
|
result = exp_x;
|
|
}
|
|
else{
|
|
result = log(exp_x + 1.0);
|
|
}
|
|
return result;
|
|
`);return this.compileAndRun(r,[e])},t.prototype.sin=function(e){var r=new Jt(e.shape,Hh);return this.compileAndRun(r,[e])},t.prototype.cos=function(e){var r=new Jt(e.shape,Gh);return this.compileAndRun(r,[e])},t.prototype.tan=function(e){var r=new Jt(e.shape,"return tan(x);");return this.compileAndRun(r,[e])},t.prototype.asin=function(e){var r=new Jt(e.shape,Xh);return this.compileAndRun(r,[e])},t.prototype.acos=function(e){var r=new Jt(e.shape,Kh);return this.compileAndRun(r,[e])},t.prototype.atan=function(e){var r=new Jt(e.shape,Zh);return this.compileAndRun(r,[e])},t.prototype.atan2=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma(`
|
|
vec4 result = atan(a, b);
|
|
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new ln(`
|
|
if (isnan(a)) return a;
|
|
if (isnan(b)) return b;
|
|
|
|
return atan(a, b);
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.sinh=function(e){var r=new Jt(e.shape,`
|
|
float e2x = exp(x);
|
|
return (e2x - 1.0 / e2x) / 2.0;
|
|
`);return this.compileAndRun(r,[e])},t.prototype.cosh=function(e){var r=new Jt(e.shape,`
|
|
float e2x = exp(-x);
|
|
return (e2x + 1.0 / e2x) / 2.0;
|
|
`);return this.compileAndRun(r,[e])},t.prototype.tanh=function(e){var r=new Jt(e.shape,`
|
|
float e2x = exp(-2.0 * abs(x));
|
|
return sign(x) * (1.0 - e2x) / (1.0 + e2x);
|
|
`);return this.compileAndRun(r,[e])},t.prototype.asinh=function(e){var r=new Jt(e.shape,Jh);return this.compileAndRun(r,[e])},t.prototype.acosh=function(e){var r=new Jt(e.shape,Yh);return this.compileAndRun(r,[e])},t.prototype.atanh=function(e){var r=new Jt(e.shape,$h);return this.compileAndRun(r,[e])},t.prototype.erf=function(e){var r=new Jt(e.shape,`
|
|
// Error function is calculated approximately with elementary function.
|
|
// See "Handbook of Mathematical Functions with Formulas,
|
|
// Graphs, and Mathematical Tables", Abramowitz and Stegun.
|
|
float p = 0.3275911;
|
|
float a1 = 0.254829592;
|
|
float a2 = -0.284496736;
|
|
float a3 = 1.421413741;
|
|
float a4 = -1.453152027;
|
|
float a5 = 1.061405429;
|
|
|
|
float sign = sign(x);
|
|
x = abs(x);
|
|
float t = 1.0 / (1.0 + p * x);
|
|
return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));
|
|
`);return this.compileAndRun(r,[e])},t.prototype.step=function(e,r){var i=new Jt(e.shape,function(a){return a===void 0&&(a=0),Ui+`
|
|
return x > 0.0 ? 1.0 : float(`+a+`);
|
|
`}(r));return this.compileAndRun(i,[e])},t.prototype.conv2dByMatMul=function(e,r,i,a,s,u){var l=e.shape,d=this.texData.get(e.dataId),A=i.inChannels,T=l[0]*l[1]*l[2],D=i.outChannels,U=i.dataFormat==="channelsLast",te=(T===1||D===1)&&A>1e3,oe=l[2]%2!=0&&!!d.isPacked;if(te||!P().getBool("WEBGL_LAZILY_UNPACK")||!P().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!oe){var ae=U?l[0]*l[1]*l[2]:l[0]*l[2]*l[3],se=this.reshape(e,[1,ae,i.inChannels]),we=this.reshape(r,[1,i.inChannels,i.outChannels]);return this.reshape(this.fusedBatchMatMul({a:se,b:we,transposeA:!1,transposeB:!1,bias:a,activation:s,preluActivationWeights:u}),i.outShape)}var Ce=U?l[0]*l[1]*(l[2]+1):l[0]*l[2]*(l[3]+1),me={dataId:e.dataId,shape:[1,Ce,i.inChannels],dtype:e.dtype},Se=d.shape;d.shape=d.shape.slice(),d.shape[d.shape.length-2]++,Z(ja(d.shape,me.shape),function(){return"packed reshape "+d.shape+" to "+me.shape+" isn't free"});var Re=this.reshape(r,[1,i.inChannels,i.outChannels]),Ue=this.fusedBatchMatMul({a:me,b:Re,transposeA:!1,transposeB:!1,bias:a,activation:s,preluActivationWeights:u}),We=this.texData.get(Ue.dataId);return Z(We.isPacked,function(){return"batchMatMul result is expected to be packed"}),d.shape=Se,We.shape=i.outShape,Ge.makeTensorFromDataId(Ue.dataId,i.outShape,Ue.dtype)},t.prototype.conv2dWithIm2Row=function(e,r,i,a,s,u){var l=i.filterWidth,d=i.filterHeight,A=i.inChannels,T=i.outWidth,D=i.outHeight,U=i.dataFormat==="channelsLast",te=l*d*A,oe=D*T,ae=[te,oe],se=e.squeeze([0]),we=r.reshape([1,te,-1]),Ce=new hh(ae,se.shape,i),me=this.compileAndRun(Ce,[se]).reshape([1,ae[0],ae[1]]),Se=a!=null,Re=u!=null,Ue=s?tu(s,!0):null,We=new Uu(me.shape,[1,oe,i.outChannels],!0,!1,Se,Ue,Re),Ne=[me,we];a&&Ne.push(a),Re&&Ne.push(u);var Le=this.compileAndRun(We,Ne);return U?Le.reshape([1,D,T,i.outChannels]):Le.reshape([1,i.outChannels,D,T])},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights;if(a.filterHeight===1&&a.filterWidth===1&&a.dilationHeight===1&&a.dilationWidth===1&&a.strideHeight===1&&a.strideWidth===1&&(a.padInfo.type==="SAME"||a.padInfo.type==="VALID"))return this.conv2dByMatMul(r,i,a,s,u,l);if(P().getBool("WEBGL_CONV_IM2COL")&&r.shape[0]===1)return this.conv2dWithIm2Row(r,i,a,s,u,l);var d=s!=null,A=l!=null,T=u?tu(u,!1):null,D=new Oc(a,d,T,A),U=[r,i];return s&&U.push(s),l&&U.push(l),this.compileAndRun(D,U)},t.prototype.conv2d=function(e,r,i){if(i.filterHeight===1&&i.filterWidth===1&&i.dilationHeight===1&&i.dilationWidth===1&&i.strideHeight===1&&i.strideWidth===1&&(i.padInfo.type==="SAME"||i.padInfo.type==="VALID"))return this.conv2dByMatMul(e,r,i);if(P().getBool("WEBGL_CONV_IM2COL")&&e.shape[0]===1)return this.conv2dWithIm2Row(e,r,i);var a=new Oc(i);return this.compileAndRun(a,[e,r])},t.prototype.conv2dDerInput=function(e,r,i){var a=new Gp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv2dDerFilter=function(e,r,i){var a=new Hp(i);return this.compileAndRun(a,[e,r])},t.prototype.fusedDepthwiseConv2D=function(e){var r,i=e.input,a=e.filter,s=e.convInfo,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=P().getBool("WEBGL_PACK_DEPTHWISECONV")&&s.strideWidth<=2&&s.outChannels/s.inChannels==1,T=l?tu(l,A):null,D=[i,a],U=u!=null,te=d!=null;return U&&D.push(u),te&&D.push(d),A?(r=new jc(s,U,T,te),this.compileAndRun(r,D)):(r=new Dc(s,U,T,te),this.compileAndRun(r,D))},t.prototype.depthwiseConv2D=function(e,r,i){var a;return P().getBool("WEBGL_PACK_DEPTHWISECONV")&&i.strideWidth<=2&&i.outChannels/i.inChannels==1?(a=new jc(i),this.compileAndRun(a,[e,r])):(a=new Dc(i),this.compileAndRun(a,[e,r]))},t.prototype.depthwiseConv2DDerInput=function(e,r,i){var a=new Jp(i);return this.compileAndRun(a,[e,r])},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){var a=new Zp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3d=function(e,r,i){var a=new Yp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3dDerInput=function(e,r,i){var a=new Kp(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3dDerFilter=function(e,r,i){var a=new Xp(i);return this.compileAndRun(a,[e,r])},t.prototype.maxPool=function(e,r){var i=new Wu(r,"max",!1);return this.compileAndRun(i,[e])},t.prototype.avgPool=function(e,r){var i=new Wu(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPoolBackprop=function(e,r,i,a){var s=new Wu(a,"max",!0),u=this.compileAndRun(s,[r]),l=new yh(a),d=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),d},t.prototype.avgPoolBackprop=function(e,r,i){var a=new Bp(i);return this.compileAndRun(a,[e],r.dtype)},t.prototype.cast=function(e,r){return fo(e,r,this)},t.prototype.unstack=function(e,r){for(var i=e.shape[r],a=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(a[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),d=e.shape.slice();d[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,d).reshape(a);return A},t.prototype.avgPool3d=function(e,r){var i=new zu(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.avgPool3dBackprop=function(e,r,i){var a=new _p(i);return this.compileAndRun(a,[e],r.dtype)},t.prototype.maxPool3d=function(e,r){var i=new zu(r,"max",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPool3dBackprop=function(e,r,i,a){var s=new zu(a,"max",!0),u=this.compileAndRun(s,[r]),l=new bh(a),d=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),d},t.prototype.reshape=function(e,r){var i=this.texData.get(e.dataId);if(i.isPacked&&!ja(e.shape,r)&&(i.texture===null||!ja(i.shape,r))){var a=this.packedReshape(e,r);return Ge.makeTensorFromDataId(a.dataId,a.shape,a.dtype)}return Et(e,r)},t.prototype.resizeBilinear=function(e,r,i,a){var s=P().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new kh(e.shape,r,i,a):new Rh(e.shape,r,i,a);return this.compileAndRun(s,[e],"float32")},t.prototype.resizeBilinearBackprop=function(e,r,i){var a=new Th(e,r,i);return this.compileAndRun(a,[e])},t.prototype.resizeNearestNeighbor=function(e,r,i,a){var s=new Dh(e.shape,r,i,a);return this.compileAndRun(s,[e])},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){var a=new Oh(e,r,i);return this.compileAndRun(a,[e])},t.prototype.multinomial=function(e,r,i,a){var s=r?e:vi(e),u=s.shape[0],l=s.shape[1],d=new wh(u,l,i),A=d.getCustomSetupFunc(a);return this.compileAndRun(d,[s],"int32",A)},t.prototype.oneHot=function(e,r,i,a){var s=new Ah(e.size,r,i,a);return this.compileAndRun(s,[e])},t.prototype.diag=function(e){var r=new nh(e.size);return this.compileAndRun(r,[e])},t.prototype.nonMaxSuppression=function(e,r,i,a,s){return $r("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),Bu(e.dataSync(),r.dataSync(),i,a,s)},t.prototype.cropAndResize=function(e,r,i,a,s,u){var l=new $p(e.shape,r.shape,a,s,u);return this.compileAndRun(l,[e,r,i],"float32")},t.prototype.depthToSpace=function(e,r,i){Z(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});var a=e.shape[0],s=i==="NHWC"?e.shape[1]:e.shape[2],u=i==="NHWC"?e.shape[2]:e.shape[3],l=i==="NHWC"?e.shape[3]:e.shape[1],d=s*r,A=u*r,T=l/(r*r),D=new rh(i==="NHWC"?[a,d,A,T]:[a,T,d,A],r,i);return this.compileAndRun(D,[e])},t.prototype.split=function(e,r,i){return wc(e,r,i)},t.prototype.scatterND=function(e,r,i){var a=Ji(0,e,i),s=a.sliceRank,u=a.numUpdates,l=a.sliceSize,d=a.strides,A=a.outputSize,T=[A/l,l],D=e.reshape([u,s]),U=r.reshape([u,l]);if(A===0)return Et(Mt([]),i);var te=wt(0),oe=new qc(u,s,D.rank,U.rank,d,T);return this.compileAndRun(oe,[U,D,te]).reshape(i)},t.prototype.sparseToDense=function(e,r,i,a){var s=Ji(0,e,i),u=s.sliceRank,l=s.numUpdates,d=s.strides,A=s.outputSize,T=new qc(l,u,e.rank,r.rank,d,[A,1],!1);return this.compileAndRun(T,[r,e,a]).reshape(i)},t.prototype.fft=function(e){return this.fftImpl(e,!1)},t.prototype.ifft=function(e){return this.fftImpl(e,!0)},t.prototype.fftImpl=function(e,r){var i=this.texData.get(e.dataId),a=new Bc(uh,e.shape,r),s=new Bc(lh,e.shape,r),u=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag)],l=this.compileAndRun(a,u),d=this.compileAndRun(s,u),A=this.complex(l,d).as2D(e.shape[0],e.shape[1]);return l.dispose(),d.dispose(),A},t.prototype.gatherND=function(e,r){var i=r.shape,a=i[i.length-1],s=Ba(e,r),u=s[0],l=s[1],d=s[2],A=s[3],T=r.reshape([l,a]),D=e.reshape([e.size/d,d]),U=new dh(a,A,[l,d]);return this.compileAndRun(U,[D,T]).reshape(u)},t.prototype.fill=function(e,r,i){if((i=i||Je(r))==="string"){var a=Q(i,le(e));return a.fill(r),Ge.makeTensor(a,e,i,this)}var s=new ch(e,r),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[],i,u)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported under string dtype");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){return this.fill(e.shape,e.dtype==="string"?"":0,e.dtype)},t.prototype.linspace=function(e,r,i){return Dt(e,r,i)},t.prototype.makeTensorInfo=function(e,r){var i=this.write(null,e,r);return this.texData.get(i).usage=null,{dataId:i,shape:e,dtype:r}},t.prototype.makeOutput=function(e,r){var i=this.makeTensorInfo(e,r).dataId;return Ge.makeTensorFromDataId(i,e,r,this)},t.prototype.unpackTensor=function(e){var r=new ev(e.shape);return this.runWebGLProgram(r,[e],e.dtype)},t.prototype.packTensor=function(e){var r=new xh(e.shape);return this.runWebGLProgram(r,[e],e.dtype,null,!0)},t.prototype.packedReshape=function(e,r){var i=[ei(e.shape)].concat(Ja(e.shape)),a={dtype:e.dtype,shape:i,dataId:e.dataId},s=[ei(r)].concat(Ja(r)),u=new Ih(s,i),l=this.runWebGLProgram(u,[a],e.dtype,null,!0);return{dataId:l.dataId,shape:r,dtype:l.dtype}},t.prototype.decode=function(e){var r,i=this.texData.get(e),a=i.isPacked,s=i.shape,u=i.dtype,l=ko(s);return r=a?new th(l):new eh(l),{dtype:u,shape:s,dataId:this.runWebGLProgram(r,[{shape:l,dtype:u,dataId:e}],u,null,!0).dataId}},t.prototype.runWebGLProgram=function(e,r,i,a,s){var u=this;s===void 0&&(s=!1);var l=this.makeTensorInfo(e.outputShape,i),d=this.texData.get(l.dataId);if(e.packedOutput&&(d.isPacked=!0),e.outPackingScheme===qn.DENSE){var A=ji(e.outputShape);d.texShape=A.map(function(Ce){return 2*Ce})}if(e.outTexUsage!=null&&(d.usage=e.outTexUsage),le(l.shape)===0)return d.values=H(l.dtype,0),l;var T=[],D=r.map(function(Ce){if(Ce.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var me=u.texData.get(Ce.dataId);if(me.texture==null){if(!e.packedInputs&&le(Ce.shape)<=P().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:Ce.shape,texData:null,isUniform:!0,uniformValues:me.values};e.packedInputs&&(me.isPacked=!0,me.shape=Ce.shape)}else if(!!me.isPacked!=!!e.packedInputs)Ce=me.isPacked?u.unpackTensor(Ce):u.packTensor(Ce),T.push(Ce),me=u.texData.get(Ce.dataId);else if(me.isPacked&&!ja(me.shape,Ce.shape)){var Se=Ce,Re=Ce.shape;Ce.shape=me.shape,Ce=u.packedReshape(Ce,Re),T.push(Ce),me=u.texData.get(Ce.dataId),Se.shape=Re}return u.uploadToGPU(Ce.dataId),{shape:Ce.shape,texData:me,isUniform:!1}});this.uploadToGPU(l.dataId);var U,te={shape:l.shape,texData:d,isUniform:!1},oe=function(Ce,me,Se){var Re="";me.concat(Se).forEach(function(Ne){var Le=Ne.texData!=null&&Ne.texData.slice!=null&&Ne.texData.slice.flatOffset>0,$e=Ne.isUniform?"uniform":Ne.texData.texShape;Re+=Ne.shape+"_"+$e+"_"+Le});var Ue=Ce.userCode,We=Ce.constructor.name;return We+="_"+Re+"_"+Ue}(e,D,te),ae=this.getAndSaveBinary(oe,function(){return function(Ce,me,Se,Re){var Ue=me.userCode,We=Se.map(function(lt,mt){var ut={logicalShape:lt.shape,texShape:lt.isUniform?null:lt.texData.texShape,isUniform:lt.isUniform,isPacked:!lt.isUniform&<.texData.isPacked,flatOffset:null};return lt.texData!=null&<.texData.slice!=null&<.texData.slice.flatOffset>0&&(ut.flatOffset=lt.texData.slice.flatOffset),{name:me.variableNames[mt],shapeInfo:ut}}),Ne=We.map(function(lt){return lt.shapeInfo}),Le={logicalShape:Re.shape,texShape:Re.texData.texShape,isUniform:!1,isPacked:Re.texData.isPacked,flatOffset:null},$e=Rp(We,Le,Ue,me.packedInputs),Ze=Ce.createProgram($e),et=null,tt=Ce.getUniformLocation(Ze,"NAN",!1);P().getNumber("WEBGL_VERSION")===1&&(et=Ce.getUniformLocation(Ze,"INFINITY",!1));for(var st={},pt=0;pt<me.variableNames.length;pt++){var ct=me.variableNames[pt];st[ct]=Ce.getUniformLocation(Ze,ct,!1),st["offset"+ct]=Ce.getUniformLocation(Ze,"offset"+ct,!1)}return{program:me,source:$e,webGLProgram:Ze,uniformLocations:st,inShapeInfos:Ne,outShapeInfo:Le,infLoc:et,nanLoc:tt}}(u.gpgpu,e,D,te)}),se=this.activeTimers!=null;if(se&&(U=this.startTimer()),function(Ce,me,Se,Re,Ue){$c(me.inShapeInfos,Se),$c([me.outShapeInfo],[Re]);var We=Re.texData.texture,Ne=Re.texData.texShape;Re.texData.isPacked?Ce.setOutputPackedMatrixTexture(We,Ne[0],Ne[1]):Ce.setOutputMatrixTexture(We,Ne[0],Ne[1]),Ce.setProgram(me.webGLProgram),P().getNumber("WEBGL_VERSION")===1&&me.infLoc!==null&&Ce.gl.uniform1f(me.infLoc,1/0),me.nanLoc!==null&&Ce.gl.uniform1f(me.nanLoc,NaN),Se.forEach(function(Le,$e){var Ze=me.program.variableNames[$e],et=me.uniformLocations[Ze],tt=me.uniformLocations["offset"+Ze];if(et!=null)if(Le.isUniform)if(le(Le.shape)<2)Ce.gl.uniform1f(et,Le.uniformValues[0]);else{var st=Le.uniformValues;st instanceof Float32Array||(st=new Float32Array(st)),Ce.gl.uniform1fv(et,st)}else Le.texData.slice!=null&&tt!=null&&Ce.gl.uniform1i(tt,Le.texData.slice.flatOffset),Ce.setInputMatrixTexture(Le.texData.texture,et,$e)}),Ue!=null&&Ue(Ce,me.webGLProgram),Ce.executeProgram()}(this.gpgpu,ae,D,te,a),T.forEach(function(Ce){return u.disposeData(Ce.dataId)}),se&&(U=this.endTimer(U),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(U)})),!P().getBool("WEBGL_LAZILY_UNPACK")&&d.isPacked&&s===!1){var we=this.unpackTensor(l);return this.disposeData(l.dataId),we}return l},t.prototype.compileAndRun=function(e,r,i,a,s){s===void 0&&(s=!1),i=i||r[0].dtype;var u=this.runWebGLProgram(e,r,i,a,s);return Ge.makeTensorFromDataId(u.dataId,u.shape,u.dtype)},t.prototype.getAndSaveBinary=function(e,r){return e in this.binaryCache||(this.binaryCache[e]=r()),this.binaryCache[e]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){var e=this;this.disposed||(P().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach(function(r){e.gpgpu.deleteProgram(e.binaryCache[r].webGLProgram),delete e.binaryCache[r]}),this.textureManager.dispose(),this.canvas!=null&&typeof HTMLCanvasElement!="undefined"&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var e=this;return this.floatPrecisionValue==null&&(this.floatPrecisionValue=qe(function(){if(!P().get("WEBGL_RENDER_FLOAT32_ENABLED")){var r=P().getBool("DEBUG");P().set("DEBUG",!1);var i=e.abs(wt(1e-8)).dataSync()[0];if(P().set("DEBUG",r),i>0)return 32}return 16})),this.floatPrecisionValue},t.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},t.prototype.uploadToGPU=function(e){var r,i=this.texData.get(e),a=i.shape,s=i.dtype,u=i.values,l=i.texture,d=i.usage,A=i.isPacked;if(l==null){var T,D=this.activeTimers!=null;D&&(T=Ye());var U=i.texShape;if(U==null&&(U=zs(a,A),i.texShape=U),u!=null){var te=ko(a),oe=void 0,ae=U[1],se=U[0],we=u instanceof Uint8Array;A?(ae=(r=wi(U[0],U[1]))[0],se=r[1],oe=new sh(te,[se,ae],we)):oe=new oh(te,[se,ae],we);var Ce=this.makeTensorInfo([se,ae],s);this.texData.get(Ce.dataId).usage=we?Cn.PIXELS:Cn.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(Ce.dataId),ae,se,u);var me=this.runWebGLProgram(oe,[Ce],s,null,!0),Se=this.texData.get(me.dataId);i.texture=Se.texture,i.texShape=Se.texShape,i.isPacked=Se.isPacked,i.usage=Se.usage,this.disposeData(Ce.dataId),this.texData.delete(me.dataId),i.values=null,D&&(this.uploadWaitMs+=Ye()-T)}else{var Re=this.acquireTexture(U,d,s,A);i.texture=Re}}},t.prototype.convertAndCacheOnCPU=function(e,r){var i=this.texData.get(e),a=i.dtype;return this.releaseGPUData(e),r!=null&&(i.values=function(s,u){if(u==="float32"||u==="complex64")return s;if(u==="int32"||u==="bool"){for(var l=u==="int32"?new Int32Array(s.length):new Uint8Array(s.length),d=0;d<l.length;++d)l[d]=Math.round(s[d]);return l}throw new Error("Unknown dtype "+u)}(r,a)),i.values},t.prototype.acquireTexture=function(e,r,i,a){if(this.numBytesInGPU+=this.computeBytes(e,i),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){var s=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+s+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,r,a)},t.prototype.computeBytes=function(e,r){return e[0]*e[1]*q(r)},t}(Lo);Or()&&Ge.registerBackend("webgl",function(){return new vf},2);var rv=Qe({square_:function(n){var t=ke(n,"x","square"),e=[t];return Ge.runKernelFunc(function(r,i){return i([t]),r.square(t)},{x:t},null,"Square",{},e,[])}}),As="SquaredDifference",mf=Qe({squaredDifference_:function(n,t){var e,r=ke(n,"a","squaredDifference"),i=ke(t,"b","squaredDifference");e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape);var a={a:r,b:i},s=[r,i];return Ge.runKernelFunc(function(u,l){var d=u.squaredDifference(r,i);return l([r,i]),d},a,function(u,l){var d=l[0],A=l[1],T=wt(2);return{a:function(){return u.mul(d.sub(A).mul(T))},b:function(){return u.mul(A.sub(d).mul(T))}}},As,{},s,[])}}),nv=Qe({abs_:function(n){var t=ke(n,"x","abs");return t.dtype==="complex64"?Ge.runKernelFunc(function(e){return e.complexAbs(t)},{$x:t}):Ge.runKernelFunc(function(e,r){var i=e.abs(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.toFloat().step(-1))}}},"Abs")}}),iv=Qe({acos_:function(n){var t=ke(n,"x","acos");return Ge.runKernelFunc(function(e,r){var i=e.acos(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(wt(1).sub(i.toFloat().square()).sqrt()).neg()}}})}}),av=Qe({acosh_:function(n){var t=ke(n,"x","acosh");return Ge.runKernelFunc(function(e,r){var i=e.acosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(i.toFloat().square().sub(1).sqrt())}}})}}),ov=Qe({asin_:function(n){var t=ke(n,"x","asin");return Ge.runKernelFunc(function(e,r){var i=e.asin(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(wt(1).sub(i.toFloat().square()).sqrt())}}})}}),sv=Qe({asinh_:function(n){var t=ke(n,"x","asinh");return Ge.runKernelFunc(function(e,r){var i=e.asinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(wt(1).add(i.toFloat().square()).sqrt())}}})}}),uv=Qe({atan_:function(n){var t=ke(n,"x","atan");return Ge.runKernelFunc(function(e,r){var i=e.atan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().square().add(1))}}})}}),lv=Qe({atanh_:function(n){var t=ke(n,"x","atanh");return Ge.runKernelFunc(function(e,r){var i=e.atanh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(wt(1).sub(i.toFloat().square()))}}})}}),cv=Qe({ceil_:function(n){var t=ke(n,"x","ceil");return Ge.runKernelFunc(function(e){return e.ceil(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),Gu=Qe({clipByValue_:function(n,t,e){var r=ke(n,"x","clipByValue");Z(t<=e,function(){return"Error in clip: min ("+t+") must be less than or equal to max ("+e+")."});var i=[r],a={min:t,max:e};return Ge.runKernelFunc(function(s,u){var l=s.clip(r,t,e);return u([r]),l},{x:r},function(s,u){var l=u[0];return{x:function(){return s.where(l.greaterEqual(t).logicalAnd(l.lessEqual(e)),Yt(s))}}},"ClipByValue",a,i)}}),fv=Qe({cos_:function(n){var t=ke(n,"x","cos"),e=[t];return Ge.runKernelFunc(function(r,i){var a=r.cos(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return a.toFloat().sin().neg().mul(r)}}},"Cos",{},e)}}),dv=Qe({cosh_:function(n){var t=ke(n,"x","cosh");return Ge.runKernelFunc(function(e,r){var i=e.cosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().sinh().mulStrict(e)}}})}}),pv=Qe({erf_:function(n){var t=ke(n,"x","erf");return Z(t.dtype==="int32"||t.dtype==="float32",function(){return"Input dtype must be `int32` or `float32`."}),t.dtype==="int32"&&(t=t.toFloat()),Ge.runKernelFunc(function(e,r){var i=e.erf(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),Xu=Qe({exp_:function(n){var t=ke(n,"x","exp");return Ge.runKernelFunc(function(e,r){var i=e.exp(t);return r([i]),i},{x:t},function(e,r){return{x:function(){return e.mulStrict(r[0])}}},"Exp",{},[],[!0])}}),hv=Qe({expm1_:function(n){var t=ke(n,"x","expm1");return Ge.runKernelFunc(function(e,r){var i=e.expm1(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.exp())}}})}}),vv=Qe({floor_:function(n){var t=ke(n,"x","floor");return Ge.runKernelFunc(function(e){return e.floor(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),mv=Qe({log_:function(n){var t=ke(n,"x","log"),e=[t];return Ge.runKernelFunc(function(r,i){var a=r.log(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return r.div(a.toFloat())}}},"Log",{},e)}}),gv=Qe({log1p_:function(n){var t=ke(n,"x","log1p");return Ge.runKernelFunc(function(e,r){var i=e.log1p(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.add(1))}}})}}),yv=Qe({logSigmoid_:function(n){var t=ke(n,"x","logSigmoid");return Ge.runKernelFunc(function(e,r){var i=e.softplus(t.neg()).neg();return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.neg().sigmoid())}}})}}),ru=Qe({neg_:function(n){var t=ke(n,"x","neg"),e=[t];return Ge.runKernelFunc(function(r){return r.neg(t)},{x:t},function(r){return{x:function(){return r.neg()}}},"Neg",{},e)}}),bv=Qe({reciprocal_:function(n){var t=ke(n,"x","reciprocal");return Ge.runKernelFunc(function(e,r){var i=e.reciprocal(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.square().neg())}}})}}),wv=Qe({round_:function(n){var t=ke(n,"x","round");return Ge.runKernelFunc(function(e){return e.round(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),gf=Qe({rsqrt_:function(n){var t=ke(n,"x","rsqrt"),e=[t];return Ge.runKernelFunc(function(r,i){var a=r.rsqrt(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return r.div(a.pow(1.5).mul(2)).neg()}}},"Rsqrt",{},e)}}),yf=Qe({sigmoid_:function(n){var t=ke(n,"x","sigmoid");return Ge.runKernelFunc(function(e,r){var i=e.sigmoid(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.mul(wt(1).sub(i)))}}},"Sigmoid")}}),Av=Qe({sign_:function(n){var t=ke(n,"x","sign");return Ge.runKernelFunc(function(e){return e.sign(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),xv=Qe({isNaN_:function(n){var t=ke(n,"x","isNaN");return Ge.runKernelFunc(function(e){return e.isNaN(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),Ev=Qe({isInf_:function(n){var t=ke(n,"x","isInf");return Ge.runKernelFunc(function(e){return e.isInf(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),Cv=Qe({isFinite_:function(n){var t=ke(n,"x","isFinite");return Ge.runKernelFunc(function(e){return e.isFinite(t)},{$x:t},function(e){return{$x:function(){return Yt(e)}}})}}),Sv=Qe({sin_:function(n){var t=ke(n,"x","sin"),e=[t];return Ge.runKernelFunc(function(r,i){var a=r.sin(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return a.toFloat().cos().mul(r)}}},"Sin",{},e)}}),Iv=Qe({sinh_:function(n){var t=ke(n,"x","sinh");return Ge.runKernelFunc(function(e,r){var i=e.sinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().cosh().mulStrict(e)}}})}}),Tv=Qe({softplus_:function(n){var t=ke(n,"x","softplus");return Ge.runKernelFunc(function(e,r){var i=e.softplus(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.sigmoid())}}})}}),Rv=Qe({sqrt_:function(n){var t=ke(n,"x","sqrt");return Ge.runKernelFunc(function(e,r){var i=e.sqrt(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().sqrt().mul(2))}}})}}),kv=Qe({step_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","step");return Ge.runKernelFunc(function(r){return r.step(e,t)},{$x:e},function(r){return{$x:function(){return Yt(r)}}})}}),Ov=Qe({tan_:function(n){var t=ke(n,"x","tan");return Ge.runKernelFunc(function(e,r){var i=e.tan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.cos().square())}}})}}),Dv=Qe({tanh_:function(n){var t=ke(n,"x","tanh");return Ge.runKernelFunc(function(e,r){var i=e.tanh(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return wt(1).sub(i.square()).mulStrict(e)}}},"Tanh",{},null,[!0])}});function bf(n,t,e,r,i,a){var s,u,l=ke(n,"x","batchNorm"),d=ke(t,"mean","batchNorm"),A=ke(e,"variance","batchNorm");return i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),Z(l.rank===2,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),Z(d.rank===2||d.rank===1,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+d.rank+"."}),Z(A.rank===2||A.rank===1,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+A.rank+"."}),s!=null&&Z(s.rank===2||s.rank===1,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+s.rank+"."}),u!=null&&Z(u.rank===2||u.rank===1,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+u.rank+"."}),xs(l,d,A,u,s,a)}function wf(n,t,e,r,i,a){var s,u,l=ke(n,"x","batchNorm"),d=ke(t,"mean","batchNorm"),A=ke(e,"variance","batchNorm");return i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),Z(l.rank===3,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),Z(d.rank===3||d.rank===1,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+d.rank+"."}),Z(A.rank===3||A.rank===1,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+A.rank+"."}),s!=null&&Z(s.rank===3||s.rank===1,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+s.rank+"."}),u!=null&&Z(u.rank===3||u.rank===1,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+u.rank+"."}),xs(l,d,A,u,s,a)}function Af(n,t,e,r,i,a){var s,u,l=ke(n,"x","batchNorm"),d=ke(t,"mean","batchNorm"),A=ke(e,"variance","batchNorm");return i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),Z(l.rank===4,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+l.rank+"."}),Z(d.rank===4||d.rank===1,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+d.rank+"."}),Z(A.rank===4||A.rank===1,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+A.rank+"."}),s!=null&&Z(s.rank===4||s.rank===1,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+s.rank+"."}),u!=null&&Z(u.rank===4||u.rank===1,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+u.rank+"."}),xs(l,d,A,u,s,a)}function xs(n,t,e,r,i,a){a==null&&(a=.001);var s,u,l,d=ke(n,"x","batchNorm"),A=ke(t,"mean","batchNorm"),T=ke(e,"variance","batchNorm");i!=null&&(s=ke(i,"scale","batchNorm")),r!=null&&(u=ke(r,"offset","batchNorm")),Z(A.rank===T.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),Z(u==null||A.rank===u.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),Z(s==null||A.rank===s.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),l=d.rank===0||d.rank===1?d.as4D(1,1,1,d.size):d.rank===2?d.as4D(1,1,d.shape[0],d.shape[1]):d.rank===3?d.as4D(1,d.shape[0],d.shape[1],d.shape[2]):d;var D=[d,A,T,s];return Ge.runKernelFunc(function(U,te){var oe=U.batchNormalization(l,nu(A),nu(T),a,nu(s),nu(u));return te([d,A,T,s]),oe},{x:d,mean:A,variance:T,scale:s,offset:u},function(U,te){var oe=te,ae=oe[0],se=oe[1],we=oe[2],Ce=oe[3],me=Ce==null?wt(1):Ce,Se=Jr(se.shape,l.shape),Re=[];if(se.rank===1){for(var Ue=0;Ue<l.shape.length-1;++Ue)Re.push(l.shape[Ue]);Re.push(1)}var We=ae.sub(se),Ne=U.mul(me),Le=gf(we.add(wt(a))),$e=Le.mul(Le).mul(Le).mul(wt(-.5));return{x:function(){return se.rank===1?U.mul(hi(Le.as4D(1,1,1,se.shape[0]),Re)).mul(me).reshape(ae.shape):U.mul(Le).mul(me).reshape(ae.shape)},mean:function(){var Ze=Le.mul(wt(-1)).mul(Ne);return se.rank===1&&(Ze=Ze.sum(Se)),Ze.reshape(se.shape)},variance:function(){var Ze=$e.mul(We).mul(Ne);return se.rank===1&&(Ze=Ze.sum(Se)),Ze.reshape(se.shape)},scale:function(){var Ze=We.mul(Le),et=U.mul(Ze);return se.rank===1&&(et=et.sum(Se)),et.reshape(se.shape)},offset:function(){var Ze=U;return se.rank===1&&(Ze=Ze.sum(Se)),Ze.reshape(se.shape)}}},"BatchNormalization",{varianceEpsilon:a},D).reshape(d.shape)}function nu(n){return n==null?null:n.rank===0?n.as1D():n.rank===1?n:n.rank===2?n.as4D(1,1,n.shape[0],n.shape[1]):n.rank===3?n.as4D(1,n.shape[0],n.shape[1],n.shape[2]):n}function iu(){Xs("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var jv=Qe({batchNormalization2d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),iu(),bf(n,t,e,a,i,r)}}),Pv=Qe({batchNormalization3d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),iu(),wf(n,t,e,a,i,r)}}),Bv=Qe({batchNormalization4d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),iu(),Af(n,t,e,a,i,r)}}),_v=Qe({batchNormalization_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),iu(),xs(n,t,e,a,i,r)}}),xf=Qe({batchNorm_:xs}),Mv=Qe({batchNorm2d_:bf}),Nv=Qe({batchNorm3d_:wf}),Fv=Qe({batchNorm4d_:Af}),au=Qe({logicalAnd_:function(n,t){var e=ke(n,"a","logicalAnd","bool"),r=ke(t,"b","logicalAnd","bool");return Zt(e.shape,r.shape),Ge.runKernelFunc(function(i){return i.logicalAnd(e,r)},{a:e,b:r},null,"LogicalAnd")}}),Lv=Qe({logicalNot_:function(n){var t=ke(n,"x","logicalNot","bool");return Ge.runKernelFunc(function(e){return e.logicalNot(t)},{$x:t})}}),Ef=Qe({logicalOr_:function(n,t){var e=ke(n,"a","logicalOr","bool"),r=ke(t,"b","logicalOr","bool");return Zt(e.shape,r.shape),Ge.runKernelFunc(function(i){return i.logicalOr(e,r)},{$a:e,$b:r})}}),Uv=Qe({logicalXor_:function(n,t){var e=ke(n,"a","logicalXor","bool"),r=ke(t,"b","logicalXor","bool");return Zt(e.shape,r.shape),Ef(n,t).logicalAnd(au(n,t).logicalNot())}}),vo=Qe({where_:function(n,t,e){var r=ke(t,"a","where"),i=ke(e,"b","where"),a=ke(n,"condition","where","bool");return fe(r.shape,i.shape,"Error in where: "),a.rank===1?Z(a.shape[0]===r.shape[0],function(){return"The first dimension of `a` must match the size of `condition`."}):fe(a.shape,i.shape,"Error in where: "),Ge.runKernelFunc(function(s,u){var l=s.select(a,r,i);return u([a]),l},{$condition:a,$a:r,$b:i},function(s,u){var l=u[0];return{$condition:function(){return Yt(l).toFloat()},$a:function(){return s.mul(l.cast(s.dtype))},$b:function(){return s.mul(l.logicalNot().cast(s.dtype))}}})}}),Cf=function(n){return C(this,void 0,void 0,function(){var t,e,r;return E(this,function(i){switch(i.label){case 0:return[4,(t=ke(n,"condition","whereAsync","bool")).data()];case 1:return e=i.sent(),r=Mu(t.shape,e),n!==t&&t.dispose(),[2,r]}})})},er=Qe({add_:function(n,t){var e,r=ke(n,"a","add"),i=ke(t,"b","add");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s){return s.add(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=Jr(r.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=Jr(i.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(i.shape)}}},"Add")}}),Wv=Qe({addN_:function(n){Z(Array.isArray(n),function(){return"The argument passed to tf.addN() must be a list of tensors"}),Z(n.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+n.length});var t=n.map(function(i,a){return ke(i,"tensors"+a,"addN")}),e=t[0];t.forEach(function(i){if(i.dtype!==e.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(function(i){if(!ue(i.shape,e.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=t;return Ge.runKernelFunc(function(i){return i.addN(t)},r,function(i){var a={};return t.forEach(function(s,u){a[u]=function(){return i.clone()}}),a},"AddN")}}),zv=Qe({addStrict_:function(n,t){var e=ke(n,"a","addStrict"),r=ke(t,"b","addStrict");return fe(e.shape,r.shape,"Error in addStrict: "),e.add(r)}}),Vv=Qe({atan2_:function(n,t){var e,r=ke(n,"a","atan2"),i=ke(t,"b","atan2");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s,u){var l=s.atan2(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],d=u[1];return{$a:function(){var A=er(l.square(),d.square()),T=s.mul(d.div(A)),D=Jr(l.shape,a);return D.length>0&&(T=T.sum(D)),T.reshape(l.shape)},$b:function(){var A=er(l.square(),d.square()),T=ru(s.mul(l.div(A))),D=Jr(d.shape,a);return D.length>0&&(T=T.sum(D)),T.reshape(d.shape)}}})}}),Wi=Qe({div_:function(n,t){var e,r=ke(n,"a","div"),i=ke(t,"b","div");if(e=sr(r,i),r=e[0],i=e[1],r.dtype==="int32"&&i.dtype==="int32")return Sf(r,i);var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s,u){var l=s.realDivide(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.div(d.toFloat()),T=Jr(l.shape,a);return T.length>0?A.sum(T).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),T=Jr(d.shape,a);T.length>0&&(A=A.sum(T).reshape(d.shape));var D=d.square();return A.div(D.toFloat()).neg()}}},"Div")}}),Qv=Qe({divNoNan_:function(n,t){var e,r=ke(n,"a","div"),i=ke(t,"b","div");r=(e=sr(r,i))[0],i=e[1];var a=Wi(r,i),s=Yt(a),u=i.equal(s);return vo(u,s,a)}}),Hv=Qe({divStrict_:function(n,t){var e=ke(n,"a","div"),r=ke(t,"b","div");return fe(e.shape,r.shape,"Error in divideStrict: "),e.div(r)}}),Sf=Qe({floorDiv_:function(n,t){var e,r=ke(n,"a","floorDiv"),i=ke(t,"b","floorDiv");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s,u){var l=s.floorDiv(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.div(d.toFloat()),T=Jr(l.shape,a);return T.length>0?A.sum(T).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),T=Jr(d.shape,a);T.length>0&&(A=A.sum(T).reshape(d.shape));var D=d.square();return A.div(D.toFloat()).neg()}}},"FloorDiv")}}),Ku=Qe({maximum_:function(n,t){var e,r=ke(n,"a","maximum"),i=ke(t,"b","maximum");return e=sr(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),Zt(r.shape,i.shape),Ge.runKernelFunc(function(a,s){var u=a.maximum(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return a.mul(u.greaterEqual(l).toFloat())},b:function(){return a.mul(u.less(l).toFloat())}}},"Maximum")}}),Gv=Qe({maximumStrict_:function(n,t){var e=ke(n,"a","maximumStrict"),r=ke(t,"b","maximumStrict");return fe(e.shape,r.shape,"Error in maximumStrict: "),e.maximum(r)}}),If=Qe({minimum_:function(n,t){var e,r=ke(n,"a","minimum"),i=ke(t,"b","minimum");return e=sr(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),Zt(r.shape,i.shape),Ge.runKernelFunc(function(a,s){var u=a.minimum(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return a.mul(u.lessEqual(l).toFloat())},b:function(){return a.mul(u.greater(l).toFloat())}}},"Minimum")}}),Xv=Qe({minimumStrict_:function(n,t){var e=ke(n,"a","minimumStrict"),r=ke(t,"b","minimumStrict");return fe(e.shape,r.shape,"Error in minimumStrict: "),e.minimum(r)}}),Kv=Qe({mod_:function(n,t){var e,r=ke(n,"a","mod"),i=ke(t,"b","mod");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s,u){var l=s.mod(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],d=u[1];return{$a:function(){var A=Jr(l.shape,a);return A.length>0?s.sum(A).reshape(l.shape):s},$b:function(){var A=s.mul(l.div(d).floor().neg()),T=Jr(d.shape,a);return T.length>0?A.sum(T).reshape(d.shape):A}}})}}),Zv=Qe({modStrict_:function(n,t){var e=ke(n,"a","modStrict"),r=ke(t,"b","modStrict");return fe(e.shape,r.shape,"Error in modStrict: "),e.mod(r)}}),Wn=Qe({mul_:function(n,t){var e,r=ke(n,"a","mul"),i=ke(t,"b","mul");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s,u){var l=s.multiply(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],d=u[1];return{a:function(){var A=s.mul(d.toFloat()),T=Jr(l.shape,a);return T.length>0?A.sum(T).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),T=Jr(d.shape,a);return T.length>0?A.sum(T).reshape(d.shape):A}}},"Mul")}}),Jv=Qe({mulStrict_:function(n,t){var e=ke(n,"a","mul"),r=ke(t,"b","mul");return fe(e.shape,r.shape,"Error in multiplyStrict: "),e.mul(r)}}),ou=Qe({pow_:function(n,t){var e,r=ke(n,"base","pow"),i=ke(t,"exp","pow");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape),s=[r,i];return Ge.runKernelFunc(function(u,l){var d=u.pow(r,i);return l([r,i,d]),d},{a:r,b:i},function(u,l){var d=l[0],A=l[1],T=l[2];return{a:function(){var D=A.toFloat(),U=u.mul(D.mul(d.pow(D.sub(wt(1))))),te=Jr(d.shape,a);return te.length>0&&(U=U.sum(te)),U.reshape(d.shape)},b:function(){var D=d.greater(0),U=d.log().where(D,Yt(d)),te=u.mul(T.mul(U)),oe=Jr(A.shape,a);return oe.length>0&&(te=te.sum(oe)),te.reshape(A.shape)}}},"Pow",{},s,[!0])}}),Yv=Qe({powStrict_:function(n,t){return fe(n.shape,t.shape,"Error in powStrict: "),n.pow(t)}}),$v=Qe({squaredDifferenceStrict_:function(n,t){var e=ke(n,"a","squaredDifferenceStrict"),r=ke(t,"b","squaredDifferenceStrict");return fe(e.shape,r.shape,"Error in squaredDifferenceStrict: "),e.squaredDifference(r)}}),xn=Qe({sub_:function(n,t){var e,r=ke(n,"a","sub"),i=ke(t,"b","sub");e=sr(r,i),r=e[0],i=e[1];var a=Zt(r.shape,i.shape);return Ge.runKernelFunc(function(s){return s.subtract(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=Jr(r.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=Jr(i.shape,a);return l.length>0&&(u=u.sum(l)),u.neg().reshape(i.shape)}}},"Sub")}}),qv=Qe({subStrict_:function(n,t){var e=ke(n,"a","subStrict"),r=ke(t,"b","subStrict");return fe(e.shape,r.shape,"Error in subStrict: "),e.sub(r)}}),Tf=Qe({equal_:function(n,t){var e,r=ke(n,"a","equal"),i=ke(t,"b","equal");return e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape),Ge.runKernelFunc(function(a){return a.equal(r,i)},{$a:r,$b:i})}}),em=Qe({equalStrict_:function(n,t){var e=ke(n,"a","equalStrict"),r=ke(t,"b","equalStrict");return fe(e.shape,r.shape,"Error in equalStrict: "),e.equal(r)}}),tm=Qe({greater_:function(n,t){var e,r=ke(n,"a","greater"),i=ke(t,"b","greater");return e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape),Ge.runKernelFunc(function(a){return a.greater(r,i)},{a:r,b:i},null,"Greater")}}),Rf=Qe({greaterEqual_:function(n,t){var e,r=ke(n,"a","greaterEqual"),i=ke(t,"b","greaterEqual");return e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape),Ge.runKernelFunc(function(a,s){var u=a.greaterEqual(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return Yt(u)},b:function(){return Yt(l)}}},"GreaterEqual")}}),rm=Qe({greaterEqualStrict_:function(n,t){var e=ke(n,"a","greaterEqualStrict"),r=ke(t,"b","greaterEqualStrict");return fe(e.shape,r.shape,"Error in greaterEqualStrict: "),e.greaterEqual(r)}}),nm=Qe({greaterStrict_:function(n,t){var e=ke(n,"a","greaterStrict"),r=ke(t,"b","greaterStrict");return fe(e.shape,r.shape,"Error in greaterStrict: "),e.greater(r)}}),im=Qe({less_:function(n,t){var e,r=ke(n,"a","less"),i=ke(t,"b","less");return e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape),Ge.runKernelFunc(function(a){return a.less(r,i)},{a:r,b:i},null,"Less")}}),am=Qe({lessEqual_:function(n,t){var e,r=ke(n,"a","lessEqual"),i=ke(t,"b","lessEqual");return e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape),Ge.runKernelFunc(function(a,s){var u=a.lessEqual(r,i);return s([r,i]),u},{a:r,b:i},null,"LessEqual")}}),om=Qe({lessEqualStrict_:function(n,t){var e=ke(n,"a","lessEqualStrict"),r=ke(t,"b","lessEqualStrict");return fe(e.shape,r.shape,"Error in lessEqualStrict: "),e.lessEqual(r)}}),sm=Qe({lessStrict_:function(n,t){var e=ke(n,"a","lessStrict"),r=ke(t,"b","lessStrict");return fe(e.shape,r.shape,"Error in lessStrict: "),e.less(r)}}),um=Qe({notEqual_:function(n,t){var e,r=ke(n,"a","notEqual"),i=ke(t,"b","notEqual");return e=sr(r,i),r=e[0],i=e[1],Zt(r.shape,i.shape),Ge.runKernelFunc(function(a){return a.notEqual(r,i)},{a:r,b:i},null,"NotEqual")}}),lm=Qe({notEqualStrict_:function(n,t){var e=ke(n,"a","notEqualStrict"),r=ke(t,"b","notEqualStrict");return fe(e.shape,r.shape,"Error in notEqualStrict: "),e.notEqual(r)}});function kf(n,t){for(var e=[],r=n;r<t;++r)e.push(r);return e}function Of(n){for(var t=[],e=0;e<n.length;++e)for(var r=0;r<n[e].length;++r)t.push(n[e][r]);return t}var Zu=Qe({gather_:function(n,t,e){e===void 0&&(e=0);var r=ke(n,"x","gather"),i=ke(t,"indices","gather","int32");e=ye(e,r.shape)[0];var a=function(s,u,l){for(var d=s.shape[l],A=[],T=1,D=1,U=0;U<l;U++)A.push(s.shape[U]),T*=s.shape[U];for(U=0;U<u.rank;U++)A.push(u.shape[U]);for(U=l+1;U<s.rank;U++)A.push(s.shape[U]),D*=s.shape[U];return{batchSize:T,sliceSize:D,dimSize:d,outputShape:A}}(r,i,e);return Ge.runKernelFunc(function(s,u){var l=s.gather(r,i.flatten(),e);return u([i]),l},{x:r,indices:i},function(s,u){var l=u[0];return{x:function(){var d=r.shape,A=l.size,T=d.slice(0,e),D=T.length,U=d.slice(e,d.length).slice(1),te=U.length,oe=kf(0,D),ae=kf(D+1,D+1+te),se=Of([T,[A],U]),we=s.reshape(se),Ce=l.reshape([A]),me=Of([[D],oe,ae]),Se=we.transpose(me),Re=Df(Se,Ce,r.shape[e]),Ue=Sn(me);return Re=Re.transpose(Ue)},indices:function(){return l}}},"Gather",{axis:e}).reshape(a.outputShape)}}),Df=Qe({unsortedSegmentSum_:function(n,t,e){var r=ke(n,"x","unsortedSegmentSum"),i=ke(t,"segmentIds","unsortedSegmentSum","int32");return Z(ve(e),function(){return"numSegments must be of dtype int"}),Ge.runKernelFunc(function(a,s){var u=a.unsortedSegmentSum(r,i,e);return s([i]),u},{$x:r},function(a,s){var u=s[0];return{$x:function(){return function(l,d){for(var A=Ku(d,Yt(d)),T=Zu(l,A),D=Rf(d,wt(0,"int32")),U=T.rank-D.rank,te=0;te<U;++te)D=tn(D,te+1);D=au(D,Xn(T.shape,"bool"));var oe=Yt(T);return vo(D,T,oe)}(a,u)}}})}}),cm=function(n,t,e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,T,D,U,te,oe;return E(this,function(ae){switch(ae.label){case 0:for(r=ke(n,"tensor","boolMask"),i=ke(t,"mask","boolMask","bool"),a=e==null?0:e,s=i.rank,u=r.shape,Z(s>0,function(){return"mask cannot be scalar"}),fe(u.slice(a,a+s),i.shape,"mask's shape must match the first K dimensions of tensor's shape,"),l=1,d=a;d<a+s;d++)l*=u[d];return A=u.slice(0,a).concat([l],u.slice(a+s)),T=r.reshape(A),D=i.reshape([-1]),[4,Cf(D)];case 1:return U=ae.sent(),te=U.squeeze([1]),oe=Zu(T,te,a),n!==r&&r.dispose(),t!==i&&i.dispose(),te.dispose(),T.dispose(),D.dispose(),U.dispose(),[2,oe]}})})};function jf(n,t,e,r,i,a,s){a===void 0&&(a="NHWC"),Z(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var u=n,l=t,d=!1;t.rank===3&&(d=!0,l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]),u=[1,n[0],n[1],n[2]]),Z(u.length===4,function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+u.length+"."}),Z(l.rank===4,function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+l.rank}),Z(e.rank===4,function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+e.rank});var A=a==="NHWC"?u[3]:u[1],T=a==="NHWC"?l.shape[3]:l.shape[1];Z(A===e.shape[2],function(){return"Error in conv2dDerInput: depth of input ("+A+") must match input depth for filter "+e.shape[2]+"."}),Z(T===e.shape[3],function(){return"Error in conv2dDerInput: depth of output ("+T+") must match output depth for filter "+e.shape[3]+"."}),s!=null&&Z(ve(i),function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var D=Fa(a),U=Ti(u,e.shape,r,1,i,s,!1,D),te=Ge.runKernelFunc(function(oe,ae){var se=oe.conv2dDerInput(l,e,U);return ae([e,l]),se},{dy4D:l,filter:e},function(oe,ae){var se=ae[0],we=ae[1];return{dy4D:function(){return Oi(oe,se,r,i,a,1,s)},filter:function(){return Yu(oe,we,se.shape,r,i,a,s)}}});return d?te.as3D(te.shape[1],te.shape[2],te.shape[3]):te}function Ju(n){var t=function(a){return typeof a=="number"?[a,a,a]:a.length===2?[a[0],a[1],1]:a}(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function Pf(n,t,e,r,i){Z(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var a=n,s=t,u=!1;t.rank===4&&(u=!0,s=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]),a=[1,n[0],n[1],n[2],n[3]]);var l=a[4],d=s.shape[4];Z(a.length===5,function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+a.length+"."}),Z(s.rank===5,function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+s.rank}),Z(e.rank===5,function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+e.rank}),Z(l===e.shape[3],function(){return"Error in conv3dDerInput: depth of input ("+l+") must match input depth for filter "+e.shape[3]+"."}),Z(d===e.shape[4],function(){return"Error in conv3dDerInput: depth of output ("+d+") must match output depth for filter "+e.shape[4]+"."});var A=In(a,e.shape,r,1,i),T=Ge.runKernelFunc(function(D){return D.conv3dDerInput(s,e,A)},{dy5D:s});return u?T.as4D(T.shape[1],T.shape[2],T.shape[3],T.shape[4]):T}var fm=Qe({conv1d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NWC"),a===void 0&&(a=1);var u=ke(n,"x","conv1d"),l=ke(t,"filter","conv1d"),d=u,A=!1;u.rank===2&&(A=!0,d=u.as3D(1,u.shape[0],u.shape[1])),Z(d.rank===3,function(){return"Error in conv1d: input must be rank 3, but got rank "+d.rank+"."}),Z(l.rank===3,function(){return"Error in conv1d: filter must be rank 3, but got rank "+l.rank+"."}),s!=null&&Z(ve(r),function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."}),Z(d.shape[2]===l.shape[1],function(){return"Error in conv1d: depth of input ("+d.shape[2]+") must match input depth for filter "+l.shape[1]+"."}),Z(An(e,a),function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+e+" and dilation '"+a+"'"}),Z(i==="NWC",function(){return"Error in conv1d: got dataFormat of "+i+" but only NWC is currently supported."});var T=l.as4D(1,l.shape[0],l.shape[1],l.shape[2]),D=d.as4D(d.shape[0],1,d.shape[1],d.shape[2]),U=Oi(D,T,[1,e],r,"NHWC",[1,a],s);return A?U.as2D(U.shape[2],U.shape[3]):U.as3D(U.shape[0],U.shape[2],U.shape[3])}}),Oi=Qe({conv2d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]);var u=ke(n,"x","conv2d"),l=ke(t,"filter","conv2d"),d=u,A=!1;u.rank===3&&(A=!0,d=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),Z(d.rank===4,function(){return"Error in conv2d: input must be rank 4, but got rank "+d.rank+"."}),Z(l.rank===4,function(){return"Error in conv2d: filter must be rank 4, but got rank "+l.rank+"."}),s!=null&&Z(ve(r),function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var T=i==="NHWC"?d.shape[3]:d.shape[1];Z(T===l.shape[2],function(){return"Error in conv2d: depth of input ("+T+") must match input depth for filter "+l.shape[2]+"."}),Z(An(e,a),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"});var D=Fa(i),U=Ti(d.shape,l.shape,e,a,r,s,!1,D),te=[l,d],oe=Ge.runKernelFunc(function(ae,se){var we=ae.conv2d(d,l,U);return se([l,d]),we},{x:d,filter:l},function(ae,se){var we=se,Ce=we[0],me=we[1];return Z(ki(a),function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"}),{x:function(){return Bf(me.shape,ae,Ce,e,r,i)},filter:function(){return Yu(me,ae,Ce.shape,e,r,i)}}},"Conv2D",U,te);return A?oe.as3D(oe.shape[1],oe.shape[2],oe.shape[3]):oe}}),dm=Qe({conv3d_:function(n,t,e,r,i,a){i===void 0&&(i="NDHWC"),a===void 0&&(a=[1,1,1]);var s=ke(n,"x","conv3d"),u=ke(t,"filter","conv3d"),l=s,d=!1;s.rank===4&&(d=!0,l=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),Z(l.rank===5,function(){return"Error in conv3d: input must be rank 5, but got rank "+l.rank+"."}),Z(u.rank===5,function(){return"Error in conv3d: filter must be rank 5, but got rank "+u.rank+"."}),Z(l.shape[4]===u.shape[3],function(){return"Error in conv3d: depth of input ("+l.shape[4]+") must match input depth for filter "+u.shape[3]+"."}),Z(function(D,U){return Ju(D)||Ju(U)}(e,a),function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"}),Z(i==="NDHWC",function(){return"Error in conv3d: got dataFormat of "+i+" but only NDHWC is currently supported."});var A=In(l.shape,u.shape,e,a,r),T=Ge.runKernelFunc(function(D,U){var te=D.conv3d(l,u,A);return U([l,u]),te},{x:l,$filter:u},function(D,U){Z(Ju(a),function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"});var te=U[0],oe=U[1];return{x:function(){return Pf(te.shape,D,oe,e,r)},$filter:function(){return function(ae,se,we,Ce,me){var Se=ae;ae.rank===4&&(Se=ae.as5D(1,ae.shape[0],ae.shape[1],ae.shape[2],ae.shape[3]));var Re=se;Re.rank===4&&(Re=se.as5D(1,se.shape[0],se.shape[1],se.shape[2],se.shape[3])),Z(Se.rank===5,function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+Se.shape+"."}),Z(Re.rank===5,function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+Re.shape+"."}),Z(we.length===5,function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+we+"."}),Z(Se.shape[4]===we[3],function(){return"Error in conv3dDerFilter: depth of input "+Se.shape[4]+") must match input depth in filter ("+we[3]+"."}),Z(Re.shape[4]===we[4],function(){return"Error in conv3dDerFilter: depth of dy ("+Re.shape[4]+") must match output depth for filter ("+we[4]+")."});var Ue=In(Se.shape,we,Ce,1,me);return Ge.runKernelFunc(function(We){return We.conv3dDerFilter(Se,Re,Ue)},{x5D:Se,dy5D:Re})}(te,D,oe.shape,e,r)}}});return d?T.as4D(T.shape[1],T.shape[2],T.shape[3],T.shape[4]):T}}),Yu=Qe({conv2dDerFilter_:function(n,t,e,r,i,a,s){a===void 0&&(a="NHWC");var u=n;n.rank===3&&(u=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var l=t;l.rank===3&&(l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),Z(u.rank===4,function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+u.shape+"."}),Z(l.rank===4,function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+l.shape+"."}),Z(e.length===4,function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+e+"."});var d=a==="NHWC"?u.shape[3]:u.shape[1],A=a==="NHWC"?l.shape[3]:l.shape[1];Z(d===e[2],function(){return"Error in conv2dDerFilter: depth of input "+d+") must match input depth in filter ("+e[2]+"."}),Z(A===e[3],function(){return"Error in conv2dDerFilter: depth of dy ("+A+") must match output depth for filter ("+e[3]+")."}),s!=null&&Z(ve(i),function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var T=Fa(a),D=Ti(u.shape,e,r,1,i,s,!1,T);return Ge.runKernelFunc(function(U){return U.conv2dDerFilter(u,l,D)},{x4D:u,dy4D:l})}}),Bf=Qe({conv2dDerInput_:jf}),su=Qe({depthwiseConv2d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]);var u=ke(n,"x","depthwiseConv2d"),l=ke(t,"filter","depthwiseConv2d"),d=u,A=!1;u.rank===3&&(A=!0,d=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),Z(d.rank===4,function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+d.rank+"."}),Z(l.rank===4,function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+l.rank+"."}),Z(d.shape[3]===l.shape[2],function(){return"Error in depthwiseConv2d: number of input channels ("+d.shape[3]+") must match the inChannels dimension in filter "+l.shape[2]+"."}),a==null&&(a=[1,1]),Z(An(e,a),function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"}),s!=null&&Z(ve(r),function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var T=Ti(d.shape,l.shape,e,a,r,s,!0),D=[d,l],U=Ge.runKernelFunc(function(te,oe){var ae=te.depthwiseConv2D(d,l,T);return oe([d,l]),ae},{x:d,filter:l},function(te,oe){Z(ki(a),function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+a+"'"});var ae=oe[0],se=oe[1];return{x:function(){return _f(ae.shape,te,se,T)},filter:function(){return Mf(ae,te,se.shape,T)}}},"DepthwiseConv2dNative",T,D);return A?U.as3D(U.shape[1],U.shape[2],U.shape[3]):U}}),_f=Qe({depthwiseConv2dDerInput_:function(n,t,e,r){var i=t,a=!1;t.rank===3&&(a=!0,i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var s=Ge.runKernelFunc(function(u){return u.depthwiseConv2DDerInput(i,e,r)},{dy4D:i});return a?s.as3D(s.shape[1],s.shape[2],s.shape[3]):s}}),Mf=Qe({depthwiseConv2dDerFilter_:function(n,t,e,r){var i=n;n.rank===3&&(i=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var a=t;return a.rank===3&&(a=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),Ge.runKernelFunc(function(s){return s.depthwiseConv2DDerFilter(i,a,r)},{x4D:i,dy4D:a})}}),$u=Qe({separableConv2d_:function(n,t,e,r,i,a,s){a===void 0&&(a=[1,1]),s===void 0&&(s="NHWC");var u=ke(n,"x","separableConv2d"),l=ke(t,"depthwiseFilter","separableConv2d"),d=ke(e,"pointwiseFilter","separableConv2d"),A=u,T=!1;if(u.rank===3&&(T=!0,A=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),s==="NCHW")throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");Z(A.rank===4,function(){return"Error in separableConv2d: input must be rank 4, but got rank "+A.rank+"."}),Z(l.rank===4,function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+l.rank+"."}),Z(d.rank===4,function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+l.rank+"."}),Z(d.shape[0]===1,function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+d.shape[0]+"."}),Z(d.shape[1]===1,function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+d.shape[1]+"."});var D=l.shape[2],U=l.shape[3];Z(d.shape[2]===D*U,function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+D*U+", but got "+d.shape[2]+"."});var te=su(A,l,r,i,s,a),oe=Oi(te,d,1,"valid",s);return T?oe.as3D(oe.shape[1],oe.shape[2],oe.shape[3]):oe}}),pm=Qe({conv2dTranspose_:function(n,t,e,r,i,a){return jf(e,ke(n,"x","conv2dTranspose"),ke(t,"filter","conv2dTranspose"),r,i,"NHWC",a)}}),hm=Qe({conv3dTranspose_:function(n,t,e,r,i){return Pf(e,ke(n,"x","conv3dTranspose"),ke(t,"filter","conv3dTranspose"),r,i)}}),uu=Qe({matMul_:function(n,t,e,r){var i;e===void 0&&(e=!1),r===void 0&&(r=!1);var a=ke(n,"a","matMul"),s=ke(t,"b","matMul");i=sr(a,s),a=i[0],s=i[1];var u=e?a.shape[a.rank-2]:a.shape[a.rank-1],l=r?s.shape[s.rank-1]:s.shape[s.rank-2],d=e?a.shape[a.rank-1]:a.shape[a.rank-2],A=r?s.shape[s.rank-2]:s.shape[s.rank-1],T=a.shape.slice(0,-2),D=s.shape.slice(0,-2),U=le(T),te=le(D);Z(a.rank>=2&&s.rank>=2&&a.rank===s.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+a.rank+" and "+s.rank+"."}),Z(ue(T,D),function(){return"Error in matMul: outer dimensions ("+T+") and ("+D+") of Tensors with shapes "+a.shape+" and "+s.shape+" must match."}),Z(u===l,function(){return"Error in matMul: inner shapes ("+u+") and ("+l+") of Tensors with shapes "+a.shape+" and "+s.shape+" and transposeA="+e+" and transposeB="+r+" must match."});var oe=a.shape.slice(0,-2).concat([d,A]),ae=e?a.as3D(U,u,d):a.as3D(U,d,u),se=r?s.as3D(te,A,l):s.as3D(te,l,A),we={transposeA:e,transposeB:r};return Ge.runKernelFunc(function(Ce,me){var Se=Ce.batchMatMul(ae,se,e,r);return me([ae,se]),Se},{a:ae,b:se},function(Ce,me){var Se=me,Re=Se[0],Ue=Se[1];return e||r?!e&&r?{a:function(){return Ce.matMul(Ue,!1,!1)},b:function(){return Ce.matMul(Re,!0,!1)}}:e&&!r?{a:function(){return Ue.matMul(Ce,!1,!0)},b:function(){return Re.matMul(Ce,!1,!1)}}:{a:function(){return Ue.matMul(Ce,!0,!0)},b:function(){return Ce.matMul(Re,!0,!0)}}:{a:function(){return Ce.matMul(Ue,!1,!0)},b:function(){return Re.matMul(Ce,!0,!1)}}},"BatchMatMul",we).reshape(oe)}}),vm=Qe({dot_:function(n,t){var e=ke(n,"t1","dot"),r=ke(t,"t2","dot");Z(!(e.rank!==1&&e.rank!==2||r.rank!==1&&r.rank!==2),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+e.rank+" and "+r.rank+"."});var i=e.rank===1?e.size:e.shape[1],a=r.rank===1?r.size:r.shape[0];return Z(i===a,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+a+"."}),e.rank===1&&r.rank===1?e.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():e.rank===1&&r.rank===2?e.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():e.rank===2&&r.rank===1?e.matMul(r.as2D(-1,1)).as1D():e.matMul(r.as2D(r.shape[0],r.shape[1]))}}),mm=Qe({outerProduct_:function(n,t){var e=ke(n,"v1","outerProduct"),r=ke(t,"v2","outerProduct");return Z(e.rank===1&&r.rank===1,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+e.rank+" and "+r.rank+"."}),e.as2D(-1,1).matMul(r.as2D(1,-1))}}),Es=Qe({reverse_:function(n,t){var e=ke(n,"x","reverse");if(e.rank===0)return e.clone();var r=ye(t,e.shape);return Ge.runKernelFunc(function(i){return i.reverse(e,r)},{$x:e},function(i){return{$x:function(){return i.reverse(r)}}}).reshapeAs(e)}}),gm=Qe({reverse1d_:function(n){var t=ke(n,"x","reverse");return Z(t.rank===1,function(){return"Error in reverse1D: x must be rank 1 but got rank "+t.rank+"."}),Es(t,0)}}),ym=Qe({reverse2d_:function(n,t){var e=ke(n,"x","reverse");return Z(e.rank===2,function(){return"Error in reverse2D: x must be rank 2 but got rank "+e.rank+"."}),Es(e,t)}}),bm=Qe({reverse3d_:function(n,t){var e=ke(n,"x","reverse");return Z(e.rank===3,function(){return"Error in reverse3D: x must be rank 3 but got rank "+e.rank+"."}),Es(e,t)}}),wm=Qe({reverse4d_:function(n,t){var e=ke(n,"x","reverse");return Z(e.rank===4,function(){return"Error in reverse4D: x must be rank 4 but got rank "+e.rank+"."}),Es(e,t)}});function Nf(n,t,e,r,i,a){var s=ke(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),r==null&&(r=[1,1]),Z(u.rank===4,function(){return"Error in maxPool: input must be rank 4 but got rank "+u.rank+"."}),Z(An(e,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"}),a!=null&&Z(ve(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var d=Ii(u.shape,t,e,r,i,a);if(d.filterWidth===1&&d.filterHeight===1&&ue(d.inShape,d.outShape))return s.clone();var A=[u],T=Ge.runKernelFunc(function(D,U){var te=D.maxPool(u,d);return U([u,te]),te},{x:u},function(D,U){var te=U[0],oe=U[1];return{x:function(){return function(ae,se,we,Ce,me,Se,Re,Ue){var We=ke(ae,"dy","maxPoolBackprop"),Ne=ke(se,"input","maxPoolBackprop"),Le=ke(we,"output","maxPoolBackprop");Z(Ne.rank===We.rank,function(){return"Rank of input ("+Ne.rank+") does not match rank of dy ("+We.rank+")"}),Se==null&&(Se=[1,1]),Z(An(me,Se),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+me+" and dilations '"+Se+"'"}),Z(We.rank===4,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+We.rank+"."}),Z(Ne.rank===4,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+Ne.rank+"."}),Ue!=null&&Z(ve(Re),function(){return"Error in maxPoolBackprop: pad must be an integer when using, dimRoundingMode "+Ue+" but got pad "+Re+"."});var $e=Ii(Ne.shape,Ce,me,Se,Re,Ue);return Ge.runKernelFunc(function(Ze){return Ze.maxPoolBackprop(We,Ne,Le,$e)},{$dy:We,$input:Ne})}(D,te,oe,t,e,r,i)}}},"MaxPool",d,A);return l?T.as3D(T.shape[1],T.shape[2],T.shape[3]):T}function Ff(n,t,e,r,i,a){var s=ke(n,"x","avgPool","float32");r==null&&(r=[1,1]),Z(An(e,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"});var u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),Z(u.rank===4,function(){return"Error in avgPool: x must be rank 4 but got rank "+u.rank+"."}),a!=null&&Z(ve(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var d=Ii(u.shape,t,e,r,i,a);if(d.filterWidth===1&&d.filterHeight===1&&ue(d.inShape,d.outShape))return s.clone();var A=Ge.runKernelFunc(function(T){return T.avgPool(u,d)},{x:u},function(T){return{x:function(){return function(D,U,te,oe,ae,se){var we=ke(D,"dy","avgPoolBackprop"),Ce=ke(U,"input","avgPoolBackprop");Z(Ce.rank===we.rank,function(){return"Rank of input ("+Ce.rank+") does not match rank of dy ("+we.rank+")"}),ae==null&&(ae=[1,1]),Z(An(oe,ae),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+oe+" and dilations '"+ae+"'"});var me=Ce,Se=we,Re=!1;Ce.rank===3&&(Re=!0,me=Ce.as4D(1,Ce.shape[0],Ce.shape[1],Ce.shape[2]),Se=we.as4D(1,we.shape[0],we.shape[1],we.shape[2])),Z(Se.rank===4,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+Se.rank+"."}),Z(me.rank===4,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+me.rank+"."});var Ue=Ii(me.shape,te,oe,ae,se),We=Ge.runKernelFunc(function(Ne){return Ne.avgPoolBackprop(Se,me,Ue)},{dy4D:Se,input4D:me});return Re?We.as3D(We.shape[1],We.shape[2],We.shape[3]):We}(T,u,t,e,r,i)}}},"AvgPool",d);return A=A.cast(s.dtype),l?A.as3D(A.shape[1],A.shape[2],A.shape[3]):A}var Tn=Qe({maxPool_:function(n,t,e,r,i){return Nf(n,t,e,1,r,i)}}),Cs=Qe({avgPool_:function(n,t,e,r,i){return Ff(n,t,e,1,r,i)}}),Am=Qe({pool_:function(n,t,e,r,i,a){i==null&&(i=[1,1]),a==null&&(a=1),r===0&&(r="valid");var s=ke(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),Z(An(a,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+a+" and dilations '"+i+"'"});var d,A=Ii(u.shape,t,a,i,r),T=[A.dilationHeight,A.dilationWidth];d=r==="same"?function(me,Se){var Re=me.map(function(Ne,Le){return Ne+(Ne-1)*(Se[Le]-1)}).map(function(Ne){return Ne-1}),Ue=Re.map(function(Ne){return Math.floor(Ne/2)}),We=Re.map(function(Ne,Le){return Ne-Ue[Le]});return Re.map(function(Ne,Le){return[Ue[Le],We[Le]]})}([A.filterHeight,A.filterWidth],T):[[0,0],[0,0]];var D=T[0]===1&&T[1]===1,U=function(me,Se,Re){var Ue=Re.map(function(tt){return tt[0]}),We=Re.map(function(tt){return tt[1]}),Ne=me.concat(Ue,We),Le=Se.map(function(tt,st){return(tt-Ne[st]%tt)%tt}),$e=We.map(function(tt,st){return tt+Le[st]}),Ze=Se.map(function(tt,st){return[Ue[st],$e[st]]}),et=Se.map(function(tt,st){return[0,Le[st]]});return[Ze,et]}([A.inHeight,A.inWidth],T,d),te=U[0],oe=U[1],ae=D?r:"valid",se=D?u:to(u,T,te),we=(e==="avg"?function(){return Ff(se,t,a,1,ae)}:function(){return Nf(se,t,a,1,ae)})(),Ce=D?we:Zn(we,T,oe);return l?Ce.as3D(Ce.shape[1],Ce.shape[2],Ce.shape[3]):Ce}}),xm=Qe({maxPool3d_:function(n,t,e,r,i,a,s){a===void 0&&(a="NDHWC");var u=ke(n,"x","maxPool3d"),l=u,d=!1;u.rank===4&&(d=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),Z(l.rank===5,function(){return"Error in maxPool3d: x must be rank 5 but got rank "+l.rank+"."}),Z(a==="NDHWC",function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+a}),Z(An(e,s),function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&Z(ve(r),function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=Ln(l.shape,t,e,s,r,i,a),T=Ge.runKernelFunc(function(D,U){var te=D.maxPool3d(l,A);return U([l,te]),te},{x:l},function(D,U){var te=U[0],oe=U[1];return{x:function(){return function(ae,se,we,Ce,me,Se,Re,Ue){var We=ke(ae,"dy","maxPool3dBackprop"),Ne=ke(se,"input","maxPool3dBackprop"),Le=ke(we,"output","maxPool3dBackprop"),$e=We,Ze=Ne,et=Le,tt=!1;Ne.rank===4&&(tt=!0,$e=We.as5D(1,We.shape[0],We.shape[1],We.shape[2],We.shape[3]),Ze=Ne.as5D(1,Ne.shape[0],Ne.shape[1],Ne.shape[2],Ne.shape[3]),et=Le.as5D(1,Le.shape[0],Le.shape[1],Le.shape[2],Le.shape[3])),Z($e.rank===5,function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+$e.rank+"."}),Z(Ze.rank===5,function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+Ze.rank+"."}),Z(et.rank===5,function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+et.rank+"."}),Se==null&&(Se=[1,1,1]),Z(An(me,Se),function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+me+" and dilations '"+Se+"'"}),Ue!=null&&Z(ve(Re),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Ue+" but got pad "+Re+"."});var st=Ln(Ze.shape,Ce,me,Se,Re,Ue),pt=Ge.runKernelFunc(function(ct){return ct.maxPool3dBackprop($e,Ze,et,st)},{dy5D:$e,input5D:Ze});return tt?pt.as4D(pt.shape[1],pt.shape[2],pt.shape[3],pt.shape[4]):pt}(D,te,oe,t,e,s,r,i)}}});return d?T.as4D(T.shape[1],T.shape[2],T.shape[3],T.shape[4]):T}}),Em=Qe({avgPool3d_:function(n,t,e,r,i,a,s){a===void 0&&(a="NDHWC");var u=ke(n,"x","avgPool3d","float32"),l=u,d=!1;u.rank===4&&(d=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),Z(l.rank===5,function(){return"Error in avgPool3d: x must be rank 5 but got rank "+l.rank+"."}),Z(a==="NDHWC",function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+a}),Z(An(e,s),function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&Z(ve(r),function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=Ln(l.shape,t,e,s,r,i,a),T=Ge.runKernelFunc(function(D){return D.avgPool3d(l,A)},{x:l},function(D){return{x:function(){return function(U,te,oe,ae,se,we,Ce){var me=ke(U,"dy","avgPool3dBackprop"),Se=ke(te,"input","avgPool3dBackprop"),Re=me,Ue=Se,We=!1;Se.rank===4&&(We=!0,Re=me.as5D(1,me.shape[0],me.shape[1],me.shape[2],me.shape[3]),Ue=Se.as5D(1,Se.shape[0],Se.shape[1],Se.shape[2],Se.shape[3])),Z(Re.rank===5,function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+Re.rank+"."}),Z(Ue.rank===5,function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+Ue.rank+"."}),se==null&&(se=[1,1,1]),Z(An(ae,se),function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+ae+" and dilations '"+se+"'"}),Ce!=null&&Z(ve(we),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Ce+" but got pad "+we+"."});var Ne=Ln(Ue.shape,oe,ae,se,we,Ce),Le=Ge.runKernelFunc(function($e){return $e.avgPool3dBackprop(Re,Ue,Ne)},{dy5D:Re,input5D:Ue});return We?Le.as4D(Le.shape[1],Le.shape[2],Le.shape[3],Le.shape[4]):Le}(D,l,t,e,s,r,i)}}});return T=T.cast(l.dtype),d?T.as4D(T.shape[1],T.shape[2],T.shape[3],T.shape[4]):T}}),qi=Qe({slice_:function(n,t,e){var r,i,a=ke(n,"x","slice");if(a.rank===0)throw new Error("Slicing scalar is not possible");(r=typeof t=="number"?[t].concat(new Array(a.rank-1).fill(0)):t.length<a.rank?t.concat(new Array(a.rank-t.length).fill(0)):t.slice()).forEach(function(l){Z(l!==-1,function(){return"slice() does not support negative begin indexing."})}),i=(i=e==null?new Array(a.rank).fill(-1):typeof e=="number"?[e].concat(new Array(a.rank-1).fill(-1)):e.length<a.rank?e.concat(new Array(a.rank-e.length).fill(-1)):e).map(function(l,d){return l>=0?l:(Z(l===-1,function(){return"Negative size values should be exactly -1 but got "+l+" for the slice() size at index "+d+"."}),a.shape[d]-r[d])}),ao(a,r,i);var s=a.shape,u={begin:r,size:i};return Ge.runKernelFunc(function(l){return l.slice(a,r,i)},{x:a},function(l){for(var d=[],A=0;A<l.rank;A++)d.push([r[A],s[A]-r[A]-i[A]]);return{x:function(){return l.pad(d)}}},"Slice",u)}}),Cm=Qe({slice1d_:function(n,t,e){var r=ke(n,"x","slice1d");return Z(r.rank===1,function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"}),qi(r,[t],[e])}}),Sm=Qe({slice2d_:function(n,t,e){var r=ke(n,"x","slice2d");return Z(r.rank===2,function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"}),qi(r,t,e)}}),Lf=Qe({slice3d_:function(n,t,e){var r=ke(n,"x","slice3d");return Z(r.rank===3,function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"}),qi(r,t,e)}}),Im=Qe({slice4d_:function(n,t,e){var r=ke(n,"x","slice4d");return Z(r.rank===4,function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"}),qi(r,t,e)}});function Uf(n,t,e,r,i){return t.rank<e.rank&&(t=t.reshape(Nr(t.shape,r))),n.rank<e.rank&&(n=n.reshape(Nr(n.shape,r))),{x:function(){var a=n.mul(e.equal(t).cast(n.dtype));return i==null?a:a.transpose(i)}}}var Tm=Qe({all_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","all","bool"),i=ye(t,r.shape),a=i,s=qr(a,r.rank);s!=null&&(r=r.transpose(s),a=fn(a.length,r.rank));var u=Ge.runKernelFunc(function(d){return d.all(r,a)},{$x:r});if(e){var l=Nr(u.shape,i);return u.reshape(l)}return u}}),Rm=Qe({any_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","any","bool"),i=ye(t,r.shape),a=i,s=qr(a,r.rank);s!=null&&(r=r.transpose(s),a=fn(a.length,r.rank));var u=Ge.runKernelFunc(function(d){return d.any(r,a)},{$x:r});if(e){var l=Nr(u.shape,i);return u.reshape(l)}return u}}),km=Qe({argMax_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","argMax");t==null&&(t=0);var r=ye(t,e.shape),i=qr(r,e.rank);i!=null&&(e=e.transpose(i),r=fn(r.length,e.rank));var a={axis:r[0]},s=[e];return Ge.runKernelFunc(function(u,l){var d=u.argMax(e,r[0]);return l([e]),d},{x:e},function(u,l){var d=l[0];return{x:function(){return Yt(d)}}},"ArgMax",a,s)}}),Om=Qe({argMin_:function(n,t){t===void 0&&(t=0);var e=ke(n,"x","argMin");t==null&&(t=0);var r=ye(t,e.shape),i=qr(r,e.rank);return i!=null&&(e=e.transpose(i),r=fn(r.length,e.rank)),Ge.runKernelFunc(function(a,s){var u=a.argMin(e,r[0]);return s([e]),u},{$x:e},function(a,s){var u=s[0];return{$x:function(){return Yt(u)}}})}}),Dm=Qe({logSumExp_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","logSumExp"),i=ye(t,r.shape),a=r.max(i,!0),s=r.sub(a).exp().sum(i).log(),u=a.reshape(s.shape).add(s);if(e){var l=Nr(u.shape,i);return u.reshape(l)}return u}}),lu=Qe({max_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","max"),i=r,a=ye(t,r.shape),s=a,u=qr(s,r.rank);u!=null&&(r=r.transpose(u),s=fn(s.length,r.rank));var l=[r],d=Ge.runKernelFunc(function(T,D){var U=T.max(r,s);return D([i,U]),U},{x:r},function(T,D){return Uf(T,D[1],D[0],a,u)},"Max",{axes:s},l,[!0]);if(e){var A=Nr(d.shape,a);d=d.reshape(A)}return d}}),jm=Qe({mean_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","mean"),i=ye(t,r.shape),a=le(jr(r.shape,i)[1]);return $i(function(s){var u=wt(a);return{value:(u.dtype===s.dtype?s:s.cast(u.dtype)).div(u).sum(t,e),gradFunc:function(l){var d=s.shape.slice();return i.forEach(function(A){d[A]=1}),l.reshape(d).mul(Xn(s.shape,"float32")).div(a)}}})(r)}}),Pm=Qe({min_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","min"),i=r,a=ye(t,r.shape),s=a,u=qr(s,r.rank);u!=null&&(r=r.transpose(u),s=fn(s.length,r.rank));var l=[r],d=Ge.runKernelFunc(function(T,D){var U=T.min(r,s);return D([i,U]),U},{x:r},function(T,D){return Uf(T,D[1],D[0],a,u)},"Min",{axes:s},l,[!0]);if(e){var A=Nr(d.shape,a);d=d.reshape(A)}return d}}),Bm=Qe({moments_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ye(t,(n=ke(n,"x","moments")).shape),i=n.mean(r,e),a=i.shape;e||(a=Nr(i.shape,r));var s=n.toFloat().sub(i.reshape(a)).square();return{mean:i,variance:s.mean(r,e)}}}),Wf=Qe({sum_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","sum");r.dtype==="bool"&&(r=r.toInt());var i=ye(t,r.shape);return $i(function(a){var s=qr(i,a.rank),u=i,l=a;s!=null&&(l=a.transpose(s),u=fn(u.length,a.rank));var d=function(U){var te=a.shape.slice();return i.forEach(function(oe){te[oe]=1}),U.reshape(te).mul(Xn(a.shape,"float32"))},A={axes:u},T=Ge.runKernelFunc(function(U){return U.sum(l,u)},{x:l},function(U){return{x:function(){return d(U)}}},"Sum",A);if(e){var D=Nr(T.shape,i);T=T.reshape(D)}return{value:T,gradFunc:d}})(r)}}),_m=Qe({prod_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ke(n,"x","prod");r.dtype==="bool"&&(r=r.toInt());var i=ye(t,r.shape),a=qr(i,r.rank),s=i,u=r;a!=null&&(u=r.transpose(a),s=fn(s.length,r.rank));var l=Ge.runKernelFunc(function(A){return A.prod(u,s)},{permutedX:u});if(e){var d=Nr(l.shape,i);l=l.reshape(d)}return l}}),zf=Qe({elu_:function(n){var t=ke(n,"x","elu");return Ge.runKernelFunc(function(e,r){var i=e.elu(t);return r([i]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return Ge.runKernelFunc(function(a){return a.eluDer(e,i)},{dy:e,y:i})}}})}}),Mm=Qe({leakyRelu_:function(n,t){t===void 0&&(t=.2);var e=ke(n,"x","leakyRelu");return Ku(wt(t).mul(e),e)}}),Vf=Qe({prelu_:function(n,t){var e=ke(n,"x","prelu"),r=ke(t,"alpha","prelu");return Ge.runKernelFunc(function(i,a){var s=i.prelu(e,r);return a([e,r]),s},{x:e,alpha:r},function(i,a){var s=a[0],u=a[1],l=s.greater(0);return{x:function(){return vo(l,i,i.mul(u))},alpha:function(){var d=vo(l,Yt(i),i.mul(s)),A=Jr(u.shape,i.shape);return A.length>0&&(d=d.sum(A)),d.reshape(u.shape)}}},"Prelu")}}),nn=Qe({relu_:function(n){var t=ke(n,"x","relu");return t.dtype==="bool"?t.toInt():Ge.runKernelFunc(function(e,r){var i=e.relu(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mulStrict(i.step().toFloat())}}},"Relu")}}),Qf=Qe({relu6_:function(n){var t=ke(n,"x","relu6");return t.dtype==="bool"?t.toInt():Ge.runKernelFunc(function(e,r){var i=e.relu6(t);return r([t]),i},{x:t},function(e,r){var i=r[0],a=i.lessEqual(6).mul(i.step());return{x:function(){return e.mulStrict(a.toFloat())}}},"Relu6")}}),Nm=Qe({selu_:function(n){var t=ke(n,"x","selu");return Ge.runKernelFunc(function(e,r){var i=e.selu(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){var a=i.greater(wt(0)),s=wt(Qu),u=wt(Hu),l=e.mul(u),d=e.mul(s).mul(i.toFloat().exp());return vo(a,l,d)}}})}}),La=Qe({transpose_:function(n,t){var e=ke(n,"x","transpose");if(t==null&&(t=e.shape.map(function(i,a){return a}).reverse()),Z(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of perm "+t+"."}),t.forEach(function(i){Z(i>=0&&i<e.rank,function(){return"All entries in 'perm' must be between 0 and "+(e.rank-1)+" but got "+t})}),e.rank<=1)return e.clone();var r={perm:t};return Ge.runKernelFunc(function(i){return i.transpose(e,t)},{x:e},function(i){var a=Sn(t);return{x:function(){return i.transpose(a)}}},"Transpose",r)}}),Fm=Qe({localResponseNormalization_:function(n,t,e,r,i){t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5);var a=ke(n,"x","localResponseNormalization");Z(a.rank===4||a.rank===3,function(){return`Error in localResponseNormalization: x must be rank 3 or 4 but got
|
|
rank `+a.rank+"."}),Z(ve(t),function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+t+"."});var s=a,u=!1;a.rank===3&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2]));var l=Ge.runKernelFunc(function(d,A){var T=d.localResponseNormalization4D(s,t,e,r,i);return A([s,T]),T},{x4D:s},function(d,A){var T=A[0],D=A[1];return{x4D:function(){return Ge.runKernelFunc(function(U){return U.LRNGrad(d,T,D,t,e,r,i)},{})}}});return u?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),Hf=Qe({norm_:function(n,t,e,r){t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1);var i=function u(l,d,A){if(A===void 0&&(A=null),l.rank===0)return l.abs();if(l.rank!==1&&A===null)return u(l.reshape([-1]),d,A);if(l.rank===1||typeof A=="number"||Array.isArray(A)&&A.length===1){if(d===1)return l.abs().sum(A);if(d===1/0)return l.abs().max(A);if(d===-1/0)return l.abs().min(A);if(d==="euclidean"||d===2)return l.abs().pow(wt(2,"int32")).sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+d)}if(Array.isArray(A)&&A.length===2){if(d===1)return l.abs().sum(A[0]).max(A[1]-1);if(d===1/0)return l.abs().sum(A[1]).max(A[0]);if(d===-1/0)return l.abs().sum(A[1]).min(A[0]);if(d==="fro"||d==="euclidean")return l.square().sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+d)}throw new Error("Error in norm: invalid axis: "+A)}(n=ke(n,"x","norm"),t,e),a=i.shape;if(r){var s=ye(e,n.shape);a=Nr(i.shape,s)}return i.reshape(a)}}),Lm=Qe({basicLSTMCell_:function(n,t,e,r,i,a){var s=ke(n,"forgetBias","basicLSTMCell"),u=ke(t,"lstmKernel","basicLSTMCell"),l=ke(e,"lstmBias","basicLSTMCell"),d=ke(r,"data","basicLSTMCell"),A=ke(i,"c","basicLSTMCell"),T=ke(a,"h","basicLSTMCell"),D=d.concat(T,1).matMul(u).add(l),U=D.shape[0],te=D.shape[1]/4,oe=[U,te],ae=D.slice([0,0],oe),se=D.slice([0,te],oe),we=D.slice([0,2*te],oe),Ce=D.slice([0,3*te],oe),me=ae.sigmoid().mulStrict(se.tanh()).addStrict(A.mulStrict(s.add(we).sigmoid())),Se=me.tanh().mulStrict(Ce.sigmoid());return[me,Se]}}),Um=Qe({multiRNNCell_:function(n,t,e,r){for(var i=ke(t,"data","multiRNNCell"),a=Dr(e,"c","multiRNNCell"),s=Dr(r,"h","multiRNNCell"),u=i,l=[],d=0;d<n.length;d++){var A=n[d](u,a[d],s[d]);l.push(A[0]),l.push(A[1]),u=A[1]}var T=[],D=[];for(d=0;d<l.length;d+=2)T.push(l[d]),D.push(l[d+1]);return[T,D]}}),Wm=Qe({movingAverage_:function(n,t,e,r,i){i===void 0&&(i=!0);var a=ke(n,"v","movingAverage"),s=ke(t,"x","movingAverage"),u=ke(e,"decay","movingAverage");Sa(a,s),Z(ue(a.shape,s.shape),function(){return"Shape mismatch in v and x"});var l=wt(1),d=l.sub(u),A=s.sub(a).mul(d);if(i){Z(r!=null,function(){return"When using zeroDebias: true, step is required."});var T=ke(r,"step","movingAverage");A=A.div(l.sub(ou(u,T)))}return a.add(A)}}),zm=Qe({stridedSlice_:function(n,t,e,r,i,a,s,u,l){if(i===void 0&&(i=0),a===void 0&&(a=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),r==null&&(r=new Array(t.length)),s!==0)throw new Error("ellipsis mask is not yet supported");var d=ke(n,"x","stridedSlice"),A=Yi(u),T=d.shape.slice();A.forEach(function(ae){t[ae]=0,e[ae]=1,T.splice(ae,0,1)}),d=d.reshape(T);for(var D=0;D<d.rank;D++)t[D]=oo(i,t,r,d.shape,D),e[D]=so(a,e,r,d.shape,D),r[D]=r[D]||1;var U=Yi(l);U.forEach(function(ae){e[ae]=t[ae]+1,r[ae]=1});var te=oi(t,e,r),oe=te.filter(function(ae,se){return U.indexOf(se)===-1});return r.every(function(ae){return ae===1})?qi(d,t,te).reshape(oe):Ge.runKernelFunc(function(ae){return ae.stridedSlice(d,t,e,r)},{$x:d}).reshape(oe)}}),Vm=Qe({topk_:function(n,t,e){t===void 0&&(t=1),e===void 0&&(e=!0);var r=ke(n,"x","topk");if(r.rank===0)throw new Error("topk() expects the input to be of rank 1 or higher");var i=r.shape[r.shape.length-1];if(t>i)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+t);var a=Ge.runKernelFunc(function(s){return s.topk(r,t,e)},{$x:r});return{values:a[0],indices:a[1]}}}),Qm=Qe({scatterND_:function(n,t,e){var r=ke(n,"indices","scatterND","int32"),i=ke(t,"updates","scatterND");return io(i,r,e),Ge.runKernelFunc(function(a){return a.scatterND(r,i,e)},{indices:r,updates:i},null,"ScatterNd",{shape:e})}}),qu=Qe({fft_:function(n){Z(n.dtype==="complex64",function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return Ge.runKernelFunc(function(i){return i.fft(r)},{input:n}).reshape(n.shape)}}),cu=Qe({ifft_:function(n){Z(n.dtype==="complex64",function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return Ge.runKernelFunc(function(i){return i.ifft(r)},{input:n}).reshape(n.shape)}}),el=Qe({rfft_:function(n,t){Z(n.dtype==="float32",function(){return"The dtype for rfft() must be real value but got "+n.dtype});var e,r=n.shape[n.shape.length-1],i=n.size/r;if(t!=null&&t<r){var a=n.shape.map(function(se){return 0}),s=n.shape.map(function(se){return se});s[n.shape.length-1]=t,e=n.slice(a,s),r=t}else if(t!=null&&t>r){var u=n.shape.map(function(se){return se});u[n.shape.length-1]=t-r,e=n.concat(pr(u),n.shape.length-1),r=t}else e=n;var l=e.zerosLike(),d=Fr(e,l).as2D(i,r),A=qu(d),T=Math.floor(r/2)+1,D=Tr(A),U=Hr(A),te=D.split([T,r-T],D.shape.length-1),oe=U.split([T,r-T],U.shape.length-1),ae=e.shape.slice();return ae[e.shape.length-1]=T,Fr(te[0],oe[0]).reshape(ae)}}),Gf=Qe({irfft_:function(n){var t=n.shape[n.shape.length-1],e=n.size/t;if(t<=2){var r=n.as2D(e,t),i=cu(r);return Tr(i)}var a=[e,2*(t-1)],s=Tr(n).as2D(e,t),u=Hr(n).as2D(e,t),l=s.slice([0,1],[e,t-2]).reverse(1),d=u.slice([0,1],[e,t-2]).reverse(1).mul(wt(-1)),A=s.concat(l,1),T=u.concat(d,1);return r=Fr(A,T).as2D(a[0],a[1]),i=cu(r),Tr(i)}}),Hm=Object.freeze({fft:qu,ifft:cu,rfft:el,irfft:Gf}),Gm=Qe({sparseToDense_:function(n,t,e,r){r===void 0&&(r=0);var i=ke(n,"sparseIndices","sparseToDense","int32"),a=ke(t,"sparseValues","sparseToDense"),s=ke(r,"defaultValue","sparseToDense",a.dtype);return function(u,l,d,A){if(u.dtype!=="int32")throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+u.dtype+".");if(u.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+u.shape+".");var T=u.rank>0?u.shape[0]:1,D=u.rank>1?u.shape[1]:1;if(d.length!==D)throw new Error("outputShape has incorrect number of elements:, "+d.length+", should be: "+D+".");var U=l.size;if(l.rank!==0&&(l.rank!==1||U!==T))throw new Error("sparseValues has incorrect shape "+l.shape+", should be [] or ["+T+"]");if(l.dtype!==A.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,a,e,s),Ge.runKernelFunc(function(u){return u.sparseToDense(i,a,e,s)},{$sparseIndices:i,$sparseValues:a,$defaultValue:s})}}),Xm=Qe({gatherND_:function(n,t){var e=ke(t,"indices","gatherND","int32"),r=ke(n,"x","gatherND");return Ge.runKernelFunc(function(i){return i.gatherND(r,e)},{x:r,indices:e},null,"GatherNd")}}),Km=Qe({diag_:function(n){var t=ke(n,"x","diag").flatten(),e=n.shape.concat(n.shape);return Ge.runKernelFunc(function(r){return r.diag(t)},{$x:t}).reshape(e)}}),Zm=Qe({dropout_:function(n,t,e,r){var i=ke(n,"x","dropout");if(Z(i.dtype==="float32",function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+i.dtype+" tensor instead."}),Z(t>=0&&t<1,function(){return"rate must be a float in the range [0, 1), but got "+t+"."}),t===0)return n instanceof Wt?i.clone():i;var a=function(l,d){if(d==null)return l.shape.slice();if(ue(l.shape,d))return d;if(l.shape.length===d.length){for(var A=[],T=0;T<l.shape.length;T++)d[T]==null&&l.shape[T]!=null?A.push(l.shape[T]):A.push(d[T]);return A}return d}(i,e),s=1-t,u=Pa(a,0,1,"float32",r).add(s).floor().div(s);return i.mul(u)}});function Xf(n,t,e){for(var r=1-n%2,i=new Float32Array(n),a=0;a<n;++a){var s=2*Math.PI*a/(n+r-1);i[a]=t-e*Math.cos(s)}return nr(i,"float32")}var tl=Qe({hannWindow_:function(n){return Xf(n,.5,.5)}}),Kf=Qe({hammingWindow_:function(n){return Xf(n,.54,.46)}}),rl=Qe({frame_:function(n,t,e,r,i){r===void 0&&(r=!1),i===void 0&&(i=0);for(var a=0,s=[];a+t<=n.size;)s.push(qi(n,a,t)),a+=e;if(r)for(;a<n.size;){var u=a+t-n.size,l=Pr([qi(n,a,t-u),en([u],i)]);s.push(l),a+=e}return s.length===0?cr([],[0,t]):Pr(s).as2D(s.length,t)}}),Zf=Qe({stft_:function(n,t,e,r,i){var a;i===void 0&&(i=tl),r==null&&(a=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(a)/Math.log(2)))));for(var s=rl(n,t,e),u=Wn(s,i(t)),l=[],d=0;d<s.shape[0];d++)l.push(el(u.slice([d,0],[1,t]),r));return Pr(l)}}),Jm=Object.freeze({hannWindow:tl,hammingWindow:Kf,frame:rl,stft:Zf}),zn,Ym=function(n,t,e){return e===void 0&&(e=1),C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,T,D,U,te,oe,ae;return E(this,function(se){switch(se.label){case 0:return r=ke(n,"predictions","inTopK"),i=ke(t,"targets","inTopK"),Z(r.rank>1,function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank}),Z(r.rank-1===i.rank,function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+i.rank}),fe(r.shape.slice(0,r.shape.length-1),i.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),a=r.shape[r.shape.length-1],Z(e>0&&e<=a,function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+a+"), but got "+e}),[4,r.data()];case 1:return s=se.sent(),[4,i.data()];case 2:for(u=se.sent(),l=[s.length/a,a],A=l[1],T=H("bool",d=l[0]),D=0;D<d;D++){for(U=D*A,te=s.subarray(U,U+A),oe=[],ae=0;ae<te.length;ae++)oe.push({value:te[ae],index:ae});for(oe.sort(function(we,Ce){return Ce.value-we.value}),T[D]=0,ae=0;ae<e;ae++)if(oe[ae].index===u[D]){T[D]=1;break}}return n!==r&&r.dispose(),t!==i&&i.dispose(),[2,Mt(T,i.shape,"bool")]}})})};(function(n){n[n.NONE=0]="NONE",n[n.MEAN=1]="MEAN",n[n.SUM=2]="SUM",n[n.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"})(zn||(zn={}));var $m=Qe({absoluteDifference_:function(n,t,e,r){r===void 0&&(r=zn.SUM_BY_NONZERO_WEIGHTS);var i=ke(n,"labels","absoluteDifference"),a=ke(t,"predictions","absoluteDifference"),s=null;e!=null&&(s=ke(e,"weights","absoluteDifference")),fe(i.shape,a.shape,"Error in absoluteDifference: ");var u=i.sub(a).abs();return ga(u,s,r)}}),ga=Qe({computeWeightedLoss_:function(n,t,e){e===void 0&&(e=zn.SUM_BY_NONZERO_WEIGHTS);var r=ke(n,"losses","computeWeightedLoss"),i=null;t!=null&&(i=ke(t,"weights","computeWeightedLoss"));var a=i==null?r:r.mul(i);if(e===zn.NONE)return a;if(e===zn.SUM)return a.sum();if(e===zn.MEAN){if(i==null)return a.mean();var s=r.size/i.size,u=a.sum().div(i.sum());return s>1?u.div(wt(s)):u}if(e===zn.SUM_BY_NONZERO_WEIGHTS){if(i==null)return a.sum().div(wt(r.size));var l=i.mul(Xn(r.shape)).notEqual(wt(0)).sum().toFloat();return a.sum().div(l)}throw Error("Unknown reduction: "+e)}}),qm=Qe({cosineDistance_:function(n,t,e,r,i){i===void 0&&(i=zn.SUM_BY_NONZERO_WEIGHTS);var a=ke(n,"labels","cosineDistance"),s=ke(t,"predictions","cosineDistance"),u=null;r!=null&&(u=ke(r,"weights","cosineDistance")),fe(a.shape,s.shape,"Error in cosineDistance: ");var l=wt(1).sub(a.mul(s).sum(e,!0));return ga(l,u,i)}}),eg=Qe({hingeLoss_:function(n,t,e,r){r===void 0&&(r=zn.SUM_BY_NONZERO_WEIGHTS);var i=ke(n,"labels","hingeLoss"),a=ke(t,"predictions","hingeLoss"),s=null;e!=null&&(s=ke(e,"weights","hingeLoss")),fe(i.shape,a.shape,"Error in hingeLoss: ");var u=wt(1);i=wt(2).mul(i).sub(u);var l=u.sub(i.mul(a)).relu();return ga(l,s,r)}}),tg=Qe({huberLoss_:function(n,t,e,r,i){r===void 0&&(r=1),i===void 0&&(i=zn.SUM_BY_NONZERO_WEIGHTS);var a=ke(n,"labels","huberLoss"),s=ke(t,"predictions","huberLoss"),u=null;e!=null&&(u=ke(e,"weights","huberLoss")),fe(a.shape,s.shape,"Error in huberLoss: ");var l=wt(r),d=s.sub(a).abs(),A=If(d,l),T=d.sub(A),D=wt(.5).mul(A.square()).add(l.mul(T));return ga(D,u,i)}}),rg=Qe({logLoss_:function(n,t,e,r,i){r===void 0&&(r=1e-7),i===void 0&&(i=zn.SUM_BY_NONZERO_WEIGHTS);var a=ke(n,"labels","logLoss"),s=ke(t,"predictions","logLoss"),u=null;e!=null&&(u=ke(e,"weights","logLoss")),fe(a.shape,s.shape,"Error in logLoss: ");var l=wt(1),d=wt(r),A=a.mul(s.add(d).log()).neg().sub(l.sub(a).mul(l.sub(s).add(d).log()));return ga(A,u,i)}}),ng=Qe({meanSquaredError_:function(n,t,e,r){r===void 0&&(r=zn.SUM_BY_NONZERO_WEIGHTS);var i=ke(n,"labels","meanSquaredError"),a=ke(t,"predictions","meanSquaredError"),s=null;e!=null&&(s=ke(e,"weights","meanSquaredError")),fe(i.shape,a.shape,"Error in meanSquaredError: ");var u=i.squaredDifference(a);return ga(u,s,r)}}),ig=Qe({sigmoidCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=zn.SUM_BY_NONZERO_WEIGHTS);var a=ke(n,"multiClassLabels","sigmoidCrossEntropy"),s=ke(t,"logits","sigmoidCrossEntropy"),u=null;if(e!=null&&(u=ke(e,"weights","sigmoidCrossEntropy")),fe(a.shape,s.shape,"Error in sigmoidCrossEntropy: "),r>0){var l=wt(r),d=wt(1),A=wt(.5);a=a.mul(d.sub(l)).add(A.mul(l))}var T=function(D,U){var te=ke(D,"labels","sigmoidCrossEntropyWithLogits"),oe=ke(U,"logits","sigmoidCrossEntropyWithLogits");fe(te.shape,oe.shape,"Error in sigmoidCrossEntropyWithLogits: ");var ae=oe.relu(),se=oe.mul(te),we=oe.abs().neg().exp().log1p();return ae.sub(se).add(we)}(a,s);return ga(T,u,i)}}),ag=Qe({softmaxCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=zn.SUM_BY_NONZERO_WEIGHTS);var a=ke(n,"onehotLabels","softmaxCrossEntropy"),s=ke(t,"logits","softmaxCrossEntropy"),u=null;if(e!=null&&(u=ke(e,"weights","softmaxCrossEntropy")),fe(a.shape,s.shape,"Error in softmaxCrossEntropy: "),r>0){var l=wt(r),d=wt(1),A=wt(a.shape[1]);a=a.mul(d.sub(l)).add(l.div(A))}var T=function(D,U,te){if(te===void 0&&(te=-1),te===-1&&(te=U.rank-1),te!==U.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+U.rank+" and dim was "+te);return $i(function(oe,ae,se){var we=ae.logSumExp([te],!0),Ce=ae.toFloat().sub(we);return se([oe,Ce]),{value:Ce.mul(oe).neg().sum([te]),gradFunc:function(me,Se){var Re=Se[0],Ue=Se[1],We=Nr(me.shape,[te]);return[me.reshape(We).mul(Re.toFloat().sub(Ue.exp())),me.reshape(We).mul(Ue.exp().sub(Re.toFloat()))]}}})(D,U)}(a,s);return ga(T,u,i)}}),og=Object.freeze({get Reduction(){return zn},absoluteDifference:$m,computeWeightedLoss:ga,cosineDistance:qm,hingeLoss:eg,huberLoss:tg,logLoss:rg,meanSquaredError:ng,sigmoidCrossEntropy:ig,softmaxCrossEntropy:ag});function Jf(n,t){return t===void 0&&(t=!1),Ge.tidy(function(){if(n.shape.length!==2)throw new Error("qr2d() requires a 2D Tensor, but got a "+n.shape.length+"D Tensor.");for(var e=n.shape[0],r=n.shape[1],i=Nn(e),a=n.clone(),s=cr([[1]],[1,1]),u=s.clone(),l=e>=r?r:e,d=function(T){var D,U=a,te=u,oe=i;D=Ge.tidy(function(){var ae=a.slice([T,T],[e-T,1]),se=ae.norm(),we=a.slice([T,T],[1,1]),Ce=cr([[-1]]).where(we.greater(0),cr([[1]])),me=we.sub(Ce.mul(se)),Se=ae.div(me);u=Se.shape[0]===1?s.clone():s.concat(Se.slice([1,0],[Se.shape[0]-1,Se.shape[1]]),0);var Re=Ce.matMul(me).div(se).neg(),Ue=a.slice([T,0],[e-T,r]),We=Re.mul(u);if(T===0)a=Ue.sub(We.matMul(u.transpose().matMul(Ue)));else{var Ne=Ue.sub(We.matMul(u.transpose().matMul(Ue)));a=a.slice([0,0],[T,r]).concat(Ne,0)}var Le=i.slice([0,T],[e,i.shape[1]-T]);if(T===0)i=Le.sub(Le.matMul(u).matMul(We.transpose()));else{var $e=Le.sub(Le.matMul(u).matMul(We.transpose()));i=i.slice([0,0],[e,T]).concat($e,1)}return[u,a,i]}),u=D[0],a=D[1],i=D[2],gt([U,te,oe])},A=0;A<l;++A)d(A);return!t&&e>r&&(i=i.slice([0,0],[e,r]),a=a.slice([0,0],[r,r])),[i,a]})}var sg=Qe({bandPart_:function(n,t,e){if(t%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+t+".");if(e%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+e+".");var r=ke(n,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var i=r.shape,a=r.shape.slice(-2),s=a[0],u=a[1];if(!(t<=s))throw new Error("bandPart(): numLower ("+t+") must not be greater than the number of rows ("+s+").");if(!(e<=u))throw new Error("bandPart(): numUpper ("+e+") must not be greater than the number of columns ("+u+").");t<0&&(t=s),e<0&&(e=u);var l=Mn(0,s,1,"int32").reshape([-1,1]),d=Mn(0,u,1,"int32"),A=xn(l,d),T=au(A.lessEqual(wt(+t,"int32")),A.greaterEqual(wt(-e,"int32"))),D=pr([s,u],r.dtype);return wn(Ur(r.reshape([-1,s,u])).map(function(U){return vo(T,U,D)})).reshape(i)}}),ug=Qe({gramSchmidt_:function(n){var t;if(Array.isArray(n)){t=!1,Z(n!=null&&n.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var e=n[0].shape[0],r=function(l){Z(n[l].shape[0]===e,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+n[l].shape[0]+" vs. "+e+")"})},i=1;i<n.length;++i)r(i)}else t=!0,n=$a(n,n.shape[0],0).map(function(l){return No(l,[0])});Z(n.length<=n[0].shape[0],function(){return"Gram-Schmidt: Number of vectors ("+n.length+") exceeds number of dimensions ("+n[0].shape[0]+")."});var a=[],s=n,u=function(l){a.push(Ge.tidy(function(){var d=s[l];if(l>0)for(var A=0;A<l;++A){var T=Wf(a[A].mulStrict(d)).mul(a[A]);d=d.sub(T)}return d.div(Hf(d,"euclidean"))}))};for(i=0;i<n.length;++i)u(i);return t?wn(a,0):a}}),lg=Qe({qr_:function(n,t){if(t===void 0&&(t=!1),n.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+n.rank);if(n.rank===2)return Jf(n,t);var e=n.shape.slice(0,n.shape.length-2).reduce(function(s,u){return s*u}),r=Ur(n.reshape([e,n.shape[n.shape.length-2],n.shape[n.shape.length-1]]),0),i=[],a=[];return r.forEach(function(s){var u=Jf(s,t),l=u[0],d=u[1];i.push(l),a.push(d)}),[wn(i,0).reshape(n.shape),wn(a,0).reshape(n.shape)]}}),cg=Object.freeze({bandPart:sg,gramSchmidt:ug,qr:lg});function fu(n,t,e,r,i,a){r==null&&(r=.5),i==null&&(i=Number.NEGATIVE_INFINITY),a==null&&(a=0);var s=n.shape[0];return e=Math.min(e,s),Z(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),Z(n.rank===2,function(){return"boxes must be a 2D tensor, but was of rank '"+n.rank+"'"}),Z(n.shape[1]===4,function(){return"boxes must have 4 columns, but 2nd dimension was "+n.shape[1]}),Z(t.rank===1,function(){return"scores must be a 1D tensor"}),Z(t.shape[0]===s,function(){return"scores has incompatible shape with boxes. Expected "+s+", but was "+t.shape[0]}),Z(0<=a&&a<=1,function(){return"softNmsSigma must be in [0, 1], but was '"+a+"'"}),{maxOutputSize:e,iouThreshold:r,scoreThreshold:i,softNmsSigma:a}}var fg=Qe({resizeBilinear_:function(n,t,e){e===void 0&&(e=!1);var r=ke(n,"images","resizeBilinear");Z(r.rank===3||r.rank===4,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),Z(t.length===2,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."});var i=r,a=!1;r.rank===3&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=Ge.runKernelFunc(function(d,A){return A([i]),d.resizeBilinear(i,s,u,e)},{x:i},function(d,A){return{x:function(){return Ge.runKernelFunc(function(T){return T.resizeBilinearBackprop(d,A[0],e)},{})}}},"ResizeBilinear",{alignCorners:e,newHeight:s,newWidth:u});return a?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),dg=Qe({resizeNearestNeighbor_:function(n,t,e){e===void 0&&(e=!1);var r=ke(n,"images","resizeNearestNeighbor");Z(r.rank===3||r.rank===4,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),Z(t.length===2,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."}),Z(r.dtype==="float32"||r.dtype==="int32",function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,a=!1;r.rank===3&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=Ge.runKernelFunc(function(d,A){return A([i]),d.resizeNearestNeighbor(i,s,u,e)},{batchImages:i},function(d,A){return{batchImages:function(){return Ge.runKernelFunc(function(T){return T.resizeNearestNeighborBackprop(d,A[0],e)},{})}}});return a?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),pg=Qe({nonMaxSuppression_:function(n,t,e,r,i){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY);var a=ke(n,"boxes","nonMaxSuppression"),s=ke(t,"scores","nonMaxSuppression"),u=fu(a,s,e,r,i);e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold;var l={maxOutputSize:e,iouThreshold:r,scoreThreshold:i};return Ge.runKernelFunc(function(d){return d.nonMaxSuppression(a,s,e,r,i)},{boxes:a,scores:s},null,"NonMaxSuppressionV3",l)}}),hg=function(n,t,e,r,i){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),C(this,void 0,void 0,function(){var a,s,u,l,d,A,T;return E(this,function(D){switch(D.label){case 0:return a=ke(n,"boxes","nonMaxSuppressionAsync"),s=ke(t,"scores","nonMaxSuppressionAsync"),u=fu(a,s,e,r,i),e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold,[4,Promise.all([a.data(),s.data()])];case 1:return l=D.sent(),d=l[0],A=l[1],T=Bu(d,A,e,r,i),a!==n&&a.dispose(),s!==t&&s.dispose(),[2,T]}})})},vg=Qe({nonMaxSuppressionWithScore_:function(n,t,e,r,i,a){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),a===void 0&&(a=0);var s=ke(n,"boxes","nonMaxSuppression"),u=ke(t,"scores","nonMaxSuppression"),l=fu(s,u,e,r,i,a),d={maxOutputSize:e=l.maxOutputSize,iouThreshold:r=l.iouThreshold,scoreThreshold:i=l.scoreThreshold,softNmsSigma:a=l.softNmsSigma},A=Ge.runKernel("NonMaxSuppressionV5",{boxes:s,scores:u},d);return{selectedIndices:A[0],selectedScores:A[1]}}}),mg=function(n,t,e,r,i,a){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),a===void 0&&(a=0),C(this,void 0,void 0,function(){var s,u,l,d,A,T,D;return E(this,function(U){switch(U.label){case 0:return s=ke(n,"boxes","nonMaxSuppressionAsync"),u=ke(t,"scores","nonMaxSuppressionAsync"),l=fu(s,u,e,r,i,a),e=l.maxOutputSize,r=l.iouThreshold,i=l.scoreThreshold,a=l.softNmsSigma,[4,Promise.all([s.data(),u.data()])];case 1:return d=U.sent(),A=d[0],T=d[1],D=_u(A,T,e,r,i,a),s!==n&&s.dispose(),u!==t&&u.dispose(),[2,D]}})})},gg=Qe({cropAndResize_:function(n,t,e,r,i,a){var s=ke(n,"image","cropAndResize"),u=ke(t,"boxes","cropAndResize","float32"),l=ke(e,"boxInd","cropAndResize","int32");i=i||"bilinear",a=a||0;var d=u.shape[0];return Z(s.rank===4,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+s.rank+"."}),Z(u.rank===2&&u.shape[1]===4,function(){return"Error in cropAndResize: boxes must be have size ["+d+",4] but had shape "+u.shape+"."}),Z(l.rank===1&&l.shape[0]===d,function(){return"Error in cropAndResize: boxInd must be have size ["+d+"] but had shape "+u.shape+"."}),Z(r.length===2,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),Z(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),Z(i==="bilinear"||i==="nearest",function(){return"method must be bilinear or nearest, but was "+i}),Ge.runKernelFunc(function(A,T){return A.cropAndResize(s,u,l,r,i,a)},{images:s,boxes:u,boxInd:l},null,"CropAndResize",{method:i,extrapolationValue:a,cropSize:r})}}),nl=Object.freeze({resizeBilinear:fg,resizeNearestNeighbor:dg,nonMaxSuppression:pg,nonMaxSuppressionAsync:hg,nonMaxSuppressionWithScore:vg,nonMaxSuppressionWithScoreAsync:mg,cropAndResize:gg}),il=function(n,t){return!(n>0)||t==="linear"},al=function(n,t,e){if(e==null||e==="linear")return n;if(e==="relu")return n.mul(t.step());throw new Error("Gradient for activation "+e+" has not been implemented yet.")},ol=function(n,t){var e=t,r=Jr(n.shape,t.shape);return r.length>0&&(e=e.sum(r)),e.reshape(n.shape)},sl=function(n,t,e){if(t==="linear")return n;if(t==="relu")return nn(n);if(t==="elu")return zf(n);if(t==="relu6")return Qf(n);if(t==="prelu")return Vf(n,e);throw new Error("Unknown fused activation "+t+".")},yg=Qe({fusedMatMul_:function(n){var t,e=n.a,r=n.b,i=n.transposeA,a=i!==void 0&&i,s=n.transposeB,u=s!==void 0&&s,l=n.bias,d=n.activation,A=d===void 0?"linear":d,T=n.preluActivationWeights;if(il(Ge.state.gradientDepth,A)===!1){var D=uu(e,r,a,u);return l!=null&&(D=er(D,l)),sl(D,A,T)}var U=ke(e,"a","fused matMul"),te=ke(r,"b","fused matMul");t=sr(U,te),U=t[0],te=t[1];var oe=a?U.shape[U.rank-2]:U.shape[U.rank-1],ae=u?te.shape[te.rank-1]:te.shape[te.rank-2],se=a?U.shape[U.rank-1]:U.shape[U.rank-2],we=u?te.shape[te.rank-2]:te.shape[te.rank-1],Ce=U.shape.slice(0,-2),me=te.shape.slice(0,-2),Se=le(Ce),Re=le(me);Z(U.rank>=2&&te.rank>=2&&U.rank===te.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+U.rank+" and "+te.rank+"."}),Z(ue(Ce,me),function(){return"Error in fused matMul: outer dimensions ("+Ce+") and ("+me+") of Tensors with shapes "+U.shape+" and "+te.shape+" must match."}),Z(oe===ae,function(){return"Error in fused matMul: inner shapes ("+oe+") and ("+ae+") of Tensors with shapes "+U.shape+" and "+te.shape+" and transposeA="+a+" and transposeB="+u+" must match."});var Ue,We,Ne=U.shape.slice(0,-2).concat([se,we]),Le=a?U.as3D(Se,oe,se):U.as3D(Se,se,oe),$e=u?te.as3D(Re,we,ae):te.as3D(Re,ae,we);l!=null&&Zt(Ne,(Ue=sr(Ue=ke(l,"bias","fused matMul"),U)[0]).shape),T!=null&&(We=ke(T,"prelu weights","fused matMul"));var Ze={a:Le,b:$e};l!=null&&(Ze.bias=Ue),T!=null&&(Ze.preluActivationWeights=We);var et=[Le,$e];return Ge.runKernelFunc(function(tt,st){var pt=tt.fusedBatchMatMul({a:Le,b:$e,transposeA:a,transposeB:u,bias:Ue,activation:A,preluActivationWeights:We});return st([Le,$e,pt]),pt},Ze,function(tt,st){var pt=st[0],ct=st[1],lt=st[2],mt=al(tt,lt,A),ut={};return l!=null&&(ut={bias:function(){return ol(Ue,mt)}}),Object.assign(a||u?!a&&u?{a:function(){return mt.matMul(ct,!1,!1)},b:function(){return mt.matMul(pt,!0,!1)}}:a&&!u?{a:function(){return ct.matMul(mt,!1,!0)},b:function(){return pt.matMul(mt,!1,!1)}}:{a:function(){return ct.matMul(mt,!0,!0)},b:function(){return mt.matMul(pt,!0,!0)}}:{a:function(){return mt.matMul(ct,!1,!0)},b:function(){return pt.matMul(mt,!0,!1)}},ut)},"_FusedMatMul",{transposeA:a,transposeB:u,activation:A},et,[!0]).reshape(Ne)}}),bg=Qe({fusedConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,a=n.dataFormat,s=a===void 0?"NHWC":a,u=n.dilations,l=u===void 0?[1,1]:u,d=n.dimRoundingMode,A=n.bias,T=n.activation,D=T===void 0?"linear":T,U=n.preluActivationWeights;if(D=D||"linear",il(Ge.state.gradientDepth,D)===!1){var te=Oi(t,e,r,i,s,l,d);return A!=null&&(te=er(te,A)),sl(te,D,U)}var oe=ke(t,"x","conv2d"),ae=ke(e,"filter","conv2d"),se=oe,we=!1;oe.rank===3&&(we=!0,se=oe.as4D(1,oe.shape[0],oe.shape[1],oe.shape[2])),Z(se.rank===4,function(){return"Error in fused conv2d: input must be rank 4, but got rank "+se.rank+"."}),Z(ae.rank===4,function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+ae.rank+"."}),d!=null&&Z(ve(i),function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+d+" but got pad "+i+"."}),Z(se.shape[3]===ae.shape[2],function(){return"Error in conv2d: depth of input ("+se.shape[3]+") must match input depth for filter "+ae.shape[2]+"."}),Z(An(r,l),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),Z(s==="NHWC",function(){return"Error in conv2d: got dataFormat of "+s+" but only NHWC is currently supported."});var Ce,me,Se=Ti(se.shape,ae.shape,r,l,i,d);A!=null&&(Ce=sr(Ce=ke(A,"bias","fused conv2d"),oe)[0],Zt(Se.outShape,Ce.shape)),U!=null&&(me=ke(U,"prelu weights","fused conv2d"));var Re={x:se,filter:ae};A!=null&&(Re.bias=Ce),U!=null&&(Re.preluActivationWeights=me);var Ue=[ae,se],We=Ge.runKernelFunc(function(Ne,Le){var $e=Ne.fusedConv2d({input:se,filter:ae,convInfo:Se,bias:Ce,activation:D,preluActivationWeights:me});return Le([ae,se,$e]),$e},Re,function(Ne,Le){var $e=Le,Ze=$e[0],et=$e[1],tt=$e[2],st=al(Ne,tt,D);Z(ki(l),function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+l+"'"});var pt={};return A!=null&&(pt={bias:function(){return ol(Ce,st)}}),Object.assign({x:function(){return Bf(et.shape,st,Ze,r,i)},filter:function(){return Yu(et,st,Ze.shape,r,i)}},pt)},"FusedConv2D",{convInfo:Se,activation:D},Ue,[!0]);return we?We.as3D(We.shape[1],We.shape[2],We.shape[3]):We}}),wg=Qe({fusedDepthwiseConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,a=n.dataFormat,s=a===void 0?"NHWC":a,u=n.dilations,l=u===void 0?[1,1]:u,d=n.dimRoundingMode,A=n.bias,T=n.activation,D=T===void 0?"linear":T,U=n.preluActivationWeights;if(il(Ge.state.gradientDepth,D)===!1){var te=su(t,e,r,i,s,l,d);return A!=null&&(te=er(te,A)),sl(te,D,U)}var oe=ke(t,"x","depthwiseConv2d"),ae=ke(e,"filter","depthwiseConv2d"),se=oe,we=!1;oe.rank===3&&(we=!0,se=oe.as4D(1,oe.shape[0],oe.shape[1],oe.shape[2])),Z(se.rank===4,function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+se.rank+"."}),Z(ae.rank===4,function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+ae.rank+"."}),Z(se.shape[3]===ae.shape[2],function(){return"Error in fused depthwiseConv2d: number of input channels ("+se.shape[3]+") must match the inChannels dimension in filter "+ae.shape[2]+"."}),l==null&&(l=[1,1]),Z(An(r,l),function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),d!=null&&Z(ve(i),function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+d+" but got pad "+i+"."});var Ce,me,Se=Ti(se.shape,ae.shape,r,l,i,d,!0);A!=null&&(Ce=sr(Ce=ke(A,"bias","fused conv2d"),oe)[0],Zt(Se.outShape,Ce.shape)),U!=null&&(me=ke(U,"prelu weights","fused depthwiseConv2d"));var Re={x:se,filter:ae};A!=null&&(Re.bias=Ce),U!=null&&(Re.preluActivationWeights=me);var Ue=[ae,se],We=Ge.runKernelFunc(function(Ne,Le){var $e=Ne.fusedDepthwiseConv2D({input:se,filter:ae,convInfo:Se,bias:Ce,activation:D,preluActivationWeights:me});return Le([ae,se,$e]),$e},Re,function(Ne,Le){Z(ki(l),function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+l+"'"});var $e=Le[0],Ze=Le[1],et=Le[2],tt=al(Ne,et,D),st={};return A!=null&&(st={bias:function(){return ol(Ce,tt)}}),Object.assign({x:function(){return _f(Ze.shape,tt,$e,Se)},filter:function(){return Mf(Ze,tt,$e.shape,Se)}},st)},"FusedDepthwiseConv2D",{convInfo:Se,activation:D},Ue,[!0]);return we?We.as3D(We.shape[1],We.shape[2],We.shape[3]):We}}),Ag=Object.freeze({matMul:yg,conv2d:bg,depthwiseConv2d:wg}),xg=Object.freeze({image:nl,linalg:cg,losses:og,spectral:Hm,fused:Ag,signal:Jm,square:rv,squaredDifference:mf,conv1d:fm,conv2d:Oi,conv3d:dm,depthwiseConv2d:su,separableConv2d:$u,conv2dTranspose:pm,conv3dTranspose:hm,op:Qe,batchNormalization2d:jv,batchNormalization3d:Pv,batchNormalization4d:Bv,batchNormalization:_v,batchNorm:xf,batchNorm2d:Mv,batchNorm3d:Nv,batchNorm4d:Fv,booleanMaskAsync:cm,complex:Fr,real:Tr,imag:Hr,concat:Pr,concat1d:ri,concat2d:Ci,concat3d:la,concat4d:Pn,split:$a,matMul:uu,dot:vm,outerProduct:mm,reverse:Es,reverse1d:gm,reverse2d:ym,reverse3d:bm,reverse4d:wm,maxPool:Tn,avgPool:Cs,pool:Am,maxPool3d:xm,avgPool3d:Em,slice:qi,slice1d:Cm,slice2d:Sm,slice3d:Lf,slice4d:Im,abs:nv,acos:iv,acosh:av,asin:ov,asinh:sv,atan:uv,atanh:lv,ceil:cv,clipByValue:Gu,cos:fv,cosh:dv,erf:pv,exp:Xu,expm1:hv,floor:vv,log:mv,log1p:gv,logSigmoid:yv,neg:ru,reciprocal:bv,round:wv,rsqrt:gf,sigmoid:yf,sign:Av,isNaN:xv,isInf:Ev,isFinite:Cv,sin:Sv,sinh:Iv,softplus:Tv,sqrt:Rv,step:kv,tan:Ov,tanh:Dv,all:Tm,any:Rm,argMax:km,argMin:Om,logSumExp:Dm,max:lu,mean:jm,min:Pm,moments:Bm,sum:Wf,prod:_m,equal:Tf,equalStrict:em,greater:tm,greaterEqual:Rf,greaterEqualStrict:rm,greaterStrict:nm,less:im,lessEqual:am,lessEqualStrict:om,lessStrict:sm,notEqual:um,notEqualStrict:lm,add:er,addN:Wv,addStrict:zv,atan2:Vv,div:Wi,divNoNan:Qv,divStrict:Hv,floorDiv:Sf,maximum:Ku,maximumStrict:Gv,minimum:If,minimumStrict:Xv,mod:Kv,modStrict:Zv,mul:Wn,mulStrict:Jv,pow:ou,powStrict:Yv,squaredDifferenceStrict:$v,sub:xn,subStrict:qv,elu:zf,leakyRelu:Mm,prelu:Vf,relu:nn,relu6:Qf,selu:Nm,logicalAnd:au,logicalNot:Lv,logicalOr:Ef,logicalXor:Uv,where:vo,whereAsync:Cf,buffer:Nt,print:da,batchToSpaceND:Zn,broadcastTo:Zi,cast:ds,clone:_o,cumsum:ps,depthToSpace:hs,expandDims:tn,eye:Nn,multinomial:qa,oneHot:bn,pad:Fn,pad1d:Br,pad2d:Lr,pad3d:pi,pad4d:pa,rand:eo,randomNormal:ii,randomGamma:Mo,randomUniform:Pa,reshape:hn,spaceToBatchND:to,squeeze:No,stack:wn,tile:hi,truncatedNormal:ro,unstack:Ur,setdiff1dAsync:ha,fill:en,linspace:Ei,ones:Xn,range:Mn,scalar:wt,tensor:Mt,tensor1d:nr,tensor2d:cr,tensor3d:Dn,tensor4d:un,tensor5d:Ya,tensor6d:xi,variable:Gn,zeros:pr,onesLike:jn,zerosLike:Yt,transpose:La,softmax:vi,logSoftmax:gs,localResponseNormalization:Fm,norm:Hf,gather:Zu,unsortedSegmentSum:Df,basicLSTMCell:Lm,multiRNNCell:Um,movingAverage:Wm,stridedSlice:zm,topk:Vm,scatterND:Qm,fft:qu,ifft:cu,rfft:el,irfft:Gf,sparseToDense:Gm,gatherND:Xm,diag:Km,dropout:Zm,hannWindow:tl,hammingWindow:Kf,frame:rl,stft:Zf,inTopKAsync:Ym});function ht(n,t){Array.isArray(n)||(n=[n]),n.forEach(function(e){e!=null&&Z(e.dtype!=="complex64",function(){return t+" does not support complex64 tensors."})})}function ul(n,t,e,r){if(e==="linear")return n.linear(t);if(e==="relu")return n.relu(t);if(e==="elu")return n.elu(t);if(e==="relu6")return n.relu6(t);if(e==="prelu")return n.prelu(t,r);throw new Error("Activation "+e+" has not been implemented for the CPU backend.")}var Eg=function(n){function t(){var e=n.call(this)||this;return e.blockSize=48,e.firstUse=!0,e.data=new co(e,Ge),e}return I(t,n),t.prototype.write=function(e,r,i){this.firstUse&&(this.firstUse=!1,P().get("IS_NODE")&&$r(`
|
|
============================
|
|
Hi there \u{1F44B}. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.
|
|
============================`));var a={};return this.data.set(a,{values:e,dtype:i}),a},t.prototype.move=function(e,r,i,a){this.data.set(e,{values:r,dtype:a})},t.prototype.numDataIds=function(){return this.data.numDataIds()},t.prototype.read=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){return[2,this.readSync(e)]})})},t.prototype.readSync=function(e){var r=this.data.get(e),i=r.dtype,a=r.complexTensors;return i==="complex64"?rn(this.readSync(a.real.dataId),this.readSync(a.imag.dataId)):this.data.get(e).values},t.prototype.bufferSync=function(e){var r=this.readSync(e.dataId),i=r;if(e.dtype==="string")try{i=r.map(function(a){return ft(a)})}catch(a){throw new Error("Failed to decode encoded string bytes into utf-8")}return Nt(e.shape,e.dtype,i)},t.prototype.makeOutput=function(e,r,i){var a=this.write(e,r,i);return Ge.makeTensorFromDataId(a,r,i,this)},t.prototype.disposeData=function(e){if(this.data.has(e)){var r=this.data.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.data.delete(e)}},t.prototype.time=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){return r=Ye(),e(),[2,{kernelMs:Ye()-r}]})})},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(e,r){var i=this.makeOutput(null,e.shape,"complex64");return this.data.get(i.dataId).complexTensors={real:Ge.keep(e.clone()),imag:Ge.keep(r.clone())},i},t.prototype.real=function(e){return this.data.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.data.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(ht(e,"slice"),si(e.shape,r,i)){var a=Jn(r,e.strides),s=le(i);return Mt(this.readSync(e.dataId).subarray(a,a+s),i,e.dtype)}for(var u=Nt(i,e.dtype),l=this.bufferSync(e),d=0;d<u.size;++d){var A=u.indexToLoc(d).map(function(T,D){return T+r[D]});u.values[d]=l.get.apply(l,A)}return u.toTensor()},t.prototype.stridedSlice=function(e,r,i,a){ht(e,"stridedSlice");var s=oi(r,i,a);if(s.some(function(U){return U===0}))return Mt([],s);for(var u=Nt(s,e.dtype),l=this.bufferSync(e),d=0;d<u.size;d++){for(var A=u.indexToLoc(d),T=new Array(A.length),D=0;D<T.length;D++)T[D]=A[D]*a[D]+r[D];u.set.apply(u,[l.get.apply(l,T)].concat(A))}return u.toTensor()},t.prototype.diag=function(e){for(var r=this.readSync(e.dataId),i=Nt([e.size,e.size],e.dtype),a=i.values,s=0;s<r.length;s++)a[s*e.size+s]=r[s];return i.toTensor()},t.prototype.unstack=function(e,r){for(var i=e.shape[r],a=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(a[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),d=e.shape.slice();d[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,d).reshape(a);return A},t.prototype.reverse=function(e,r){ht(e,"reverse");for(var i=Nt(e.shape,e.dtype),a=this.bufferSync(e),s=function(l){var d=i.indexToLoc(l),A=d.slice();r.forEach(function(T){return A[T]=e.shape[T]-1-A[T]}),i.set.apply(i,[a.get.apply(a,A)].concat(d))},u=0;u<i.size;u++)s(u);return i.toTensor()},t.prototype.concat=function(e,r){var i=this;if(e[0].dtype==="complex64"){var a=e.map(function(U){return Tr(U)}),s=e.map(function(U){return Hr(U)});return Fr(this.concat(a,r),this.concat(s,r))}var u=e.map(function(U){var te=le(U.shape.slice(r));return U.as2D(-1,te)}),l=On(u.map(function(U){return U.shape}),1),d=Nt(l,e[0].dtype).values;if(u[0].shape[0]===1){var A=0;u.forEach(function(U){d.set(i.readSync(U.dataId),A),A+=U.size})}else{var T=0;u.forEach(function(U){for(var te=i.readSync(U.dataId),oe=0,ae=0;ae<U.shape[0];++ae)for(var se=ae*l[1]+T,we=0;we<U.shape[1];++we)d[se+we]=te[oe++];T+=U.shape[1]})}var D=On(e.map(function(U){return U.shape}),r);return Mt(d,D,e[0].dtype)},t.prototype.neg=function(e){return ht(e,"neg"),this.multiply(wt(-1),e)},t.prototype.add=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i+s,imag:a+u}}):this.broadcastedBinaryOp(e,r,Vt(e.dtype,r.dtype),function(i,a){return i+a})},t.prototype.addN=function(e){var r=this;ht(e,"addN");for(var i=e.map(function(A){return r.readSync(A.dataId)}),a=Nt(e[0].shape,e[0].dtype),s=a.values,u=0;u<e.length;u++)for(var l=i[u],d=0;d<s.length;d++)s[d]+=l[d];return a.toTensor()},t.prototype.softmax=function(e,r){var i=ye([r],e.shape),a=this.max(e,i),s=Nr(a.shape,i),u=this.subtract(e,a.reshape(s)),l=this.exp(u),d=this.sum(l,i).reshape(s);return this.realDivide(l,d)},t.prototype.subtract=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i-s,imag:a-u}}):this.broadcastedBinaryOp(e,r,Vt(e.dtype,r.dtype),function(i,a){return i-a})},t.prototype.pow=function(e,r){return ht([e,r],"pow"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.pow(i,a)})},t.prototype.batchMatMul=function(e,r,i,a){ht([e,r],"matMul");for(var s=i?e.shape[1]:e.shape[2],u=i?e.shape[2]:e.shape[1],l=a?r.shape[1]:r.shape[2],d=e.shape[0],A=this.readSync(e.dataId),T=this.readSync(r.dataId),D=i?[e.strides[0],1,e.strides[1]]:[e.strides[0],e.strides[1],1],U=D[0],te=D[1],oe=D[2],ae=a?[1,r.strides[1],r.strides[0]]:[r.strides[1],1,r.strides[0]],se=ae[0],we=ae[1],Ce=ae[2],me=u*l,Se=Nt([d,u,l],e.dtype),Re=Se.values,Ue=this.blockSize,We=0;We<d;We++)for(var Ne=0;Ne<u;Ne+=Ue)for(var Le=0;Le<l;Le+=Ue)for(var $e=0;$e<s;$e+=Ue)for(var Ze=Math.min(Ne+Ue,u),et=Math.min(Le+Ue,l),tt=Math.min($e+Ue,s),st=Ne;st<Ze;st++)for(var pt=Le;pt<et;pt++){for(var ct=0,lt=$e;lt<tt;lt++)ct+=A[We*U+st*te+lt*oe]*T[lt*se+pt*we+We*Ce];Re[We*me+(st*l+pt)]+=ct}return Se.toTensor()},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,a=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,d=e.preluActivationWeights,A=this.batchMatMul(r,i,a,s);return u&&(A=this.add(A,u)),l&&(A=ul(this,A,l,d)),A},t.prototype.multiply=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i*s-a*u,imag:i*u+a*s}}):this.broadcastedBinaryOp(e,r,Vt(e.dtype,r.dtype),function(i,a){return i*a})},t.prototype.realDivide=function(e,r){return ht([e,r],"realDivide"),this.broadcastedBinaryOp(e,r,"float32",function(i,a){return i/a})},t.prototype.floorDiv=function(e,r){return ht([e,r],"floorDiv"),this.broadcastedBinaryOp(e,r,"int32",function(i,a){return Math.floor(i/a)})},t.prototype.sum=function(e,r){ht(e,"sum"),Xr("sum",r,e.rank);for(var i=jr(e.shape,r),a=i[0],s=i[1],u=pr(a,Vt(e.dtype,"int32")),l=le(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),T=0;T<d.length;++T){for(var D=T*l,U=0,te=0;te<l;++te)U+=A[D+te];d[T]=U}return u},t.prototype.prod=function(e,r){ht(e,"sum");for(var i=jr(e.shape,r),a=i[0],s=i[1],u=pr(a,Vt(e.dtype,"int32")),l=le(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),T=0;T<d.length;++T){for(var D=T*l,U=1,te=0;te<l;++te)U*=A[D+te];d[T]=U}return u},t.prototype.unsortedSegmentSum=function(e,r,i){ht(e,"unsortedSegmentSum");for(var a=[],s=e.rank-r.rank,u=0;u<s;++u)r=r.expandDims(u+1);for(u=0;u<i;++u){var l=wt(u,"int32"),d=Tf(l,r).asType("float32").mul(e).sum(0);a.push(d)}return wn(a)},t.prototype.argMin=function(e,r){ht(e,"argMin");var i=[r];Xr("argMin",i,e.rank);for(var a=jr(e.shape,i),s=a[0],u=a[1],l=pr(s,"int32"),d=le(u),A=this.readSync(l.dataId),T=this.readSync(e.dataId),D=0;D<A.length;++D){for(var U=D*d,te=T[U],oe=0,ae=0;ae<d;++ae){var se=T[U+ae];se<te&&(te=se,oe=ae)}A[D]=oe}return l},t.prototype.argMax=function(e,r){ht(e,"argMax");var i=[r];Xr("argMax",i,e.rank);for(var a=jr(e.shape,i),s=a[0],u=a[1],l=pr(s,"int32"),d=le(u),A=this.readSync(l.dataId),T=this.readSync(e.dataId),D=0;D<A.length;++D){for(var U=D*d,te=T[U],oe=0,ae=0;ae<d;++ae){var se=T[U+ae];se>te&&(te=se,oe=ae)}A[D]=oe}return l},t.prototype.cumsum=function(e,r,i,a){if(ht(e,"cumsum"),r!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+r);for(var s=Vt(e.dtype,"int32"),u=pr(e.shape,s),l=this.readSync(u.dataId),d=this.readSync(e.dataId),A=e.shape[e.rank-1],T=a?function(ae,se){return ae+A-se-1}:function(ae,se){return ae+se},D=0;D<d.length;D+=A)for(var U=0;U<A;U++){var te=T(D,U);if(U===0)l[te]=i?0:d[te];else{var oe=T(D,U-1);l[te]=i?d[oe]+l[oe]:d[te]+l[oe]}}return u},t.prototype.equal=function(e,r){return ht([e,r],"equal"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i===a?1:0})},t.prototype.notEqual=function(e,r){return ht([e,r],"notEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i!==a?1:0})},t.prototype.less=function(e,r){return ht([e,r],"less"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i<a?1:0})},t.prototype.lessEqual=function(e,r){return ht([e,r],"lessEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i<=a?1:0})},t.prototype.greater=function(e,r){return ht([e,r],"greater"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i>a?1:0})},t.prototype.greaterEqual=function(e,r){return ht([e,r],"greaterEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i>=a?1:0})},t.prototype.logicalNot=function(e){ht(e,"logicalNot");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)i[a]=r[a]?0:1;return this.makeOutput(i,e.shape,"bool")},t.prototype.logicalAnd=function(e,r){return ht([e,r],"logicalAnd"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i&&a})},t.prototype.logicalOr=function(e,r){return ht([e,r],"logicalOr"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i||a})},t.prototype.select=function(e,r,i){ht([e,r,i],"select");for(var a=this.readSync(e.dataId),s=this.readSync(r.dataId),u=this.readSync(i.dataId),l=pr(r.shape,Vt(r.dtype,i.dtype)),d=this.readSync(l.dataId),A=0,T=e.rank===0||e.rank>1||r.rank===1?1:le(r.shape.slice(1)),D=0;D<a.length;D++)for(var U=0;U<T;U++)a[D]===1?d[A++]=s[D]:d[A++]=u[D];return l},t.prototype.where=function(e){ht([e],"where");var r=this.readSync(e.dataId);return Mu(e.shape,r)},t.prototype.topk=function(e,r,i){return ht(e,"topk"),xc(this.readSync(e.dataId),e.shape,e.dtype,r)},t.prototype.min=function(e,r){ht(e,"min"),Xr("min",r,e.rank);for(var i=jr(e.shape,r),a=i[0],s=i[1],u=pr(a,e.dtype),l=le(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),T=0;T<d.length;++T){for(var D=T*l,U=A[D],te=0;te<l;++te){var oe=A[D+te];oe<U&&(U=oe)}d[T]=U}return u},t.prototype.minimum=function(e,r){return ht([e,r],"minimum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.min(i,a)})},t.prototype.mod=function(e,r){return ht([e,r],"mod"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){var s=i%a;return i<0&&a<0||i>=0&&a>=0?s:(s+a)%a})},t.prototype.max=function(e,r){ht(e,"max"),Xr("max",r,e.rank);for(var i=jr(e.shape,r),a=i[0],s=i[1],u=pr(a,e.dtype),l=le(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),T=0;T<d.length;++T){for(var D=T*l,U=A[D],te=0;te<l;++te){var oe=A[D+te];oe>U&&(U=oe)}d[T]=U}return u},t.prototype.maximum=function(e,r){return ht([e,r],"maximum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.max(i,a)})},t.prototype.all=function(e,r){ht(e,"all"),Xr("all",r,e.rank);for(var i=jr(e.shape,r),a=i[0],s=i[1],u=pr(a,e.dtype),l=le(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),T=0;T<d.length;++T){for(var D=T*l,U=A[D],te=0;te<l;++te){var oe=A[D+te];U=U&&oe}d[T]=U}return u},t.prototype.any=function(e,r){ht(e,"any"),Xr("any",r,e.rank);for(var i=jr(e.shape,r),a=i[0],s=i[1],u=pr(a,e.dtype),l=le(s),d=this.readSync(u.dataId),A=this.readSync(e.dataId),T=0;T<d.length;++T){for(var D=T*l,U=A[D],te=0;te<l;++te){var oe=A[D+te];U=U||oe}d[T]=U}return u},t.prototype.squaredDifference=function(e,r){return ht([e,r],"squaredDifference"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){var s=i-a;return s*s})},t.prototype.ceil=function(e){ht(e,"ceil");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.ceil(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.floor=function(e){ht(e,"floor");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.floor(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.sign=function(e){ht(e,"x");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)r[a]<0?i[a]=-1:r[a]>0?i[a]=1:i[a]=0;return this.makeOutput(i,e.shape,"float32")},t.prototype.isNaN=function(e){ht(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Number.isNaN(r[a])&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isInf=function(e){ht(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Math.abs(r[a])===1/0&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isFinite=function(e){ht(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Number.isFinite(r[a])&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.round=function(e){ht(e,"round");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=Math.floor(r[a]);r[a]-s<.5?i[a]=Math.floor(r[a]):r[a]-s>.5?i[a]=Math.ceil(r[a]):i[a]=s%2==0?s:s+1}return this.makeOutput(i,e.shape,"float32")},t.prototype.exp=function(e){ht(e,"exp");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.exp(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.expm1=function(e){ht(e,"expm1");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.expm1(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.log=function(e){ht(e,"log");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.log(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.log1p=function(e){ht(e,"log1p");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.log1p(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.sqrt=function(e){ht(e,"sqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.rsqrt=function(e){ht(e,"rsqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=1/Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.reciprocal=function(e){ht(e,"reciprocal");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=1/r[a];return this.makeOutput(i,e.shape,"float32")},t.prototype.linear=function(e){return e},t.prototype.relu=function(e){ht(e,"relu");for(var r=pr(e.shape,e.dtype),i=this.readSync(r.dataId),a=this.readSync(e.dataId),s=0;s<a.length;++s)i[s]=Math.max(0,a[s]);return r},t.prototype.relu6=function(e){ht(e,"relu");for(var r=pr(e.shape,e.dtype),i=this.readSync(r.dataId),a=this.readSync(e.dataId),s=0;s<a.length;++s)i[s]=Math.min(Math.max(0,a[s]),6);return r},t.prototype.prelu=function(e,r){return ht([e,r],"prelu"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return i<0?a*i:i})},t.prototype.elu=function(e){ht(e,"elu");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a){var s=i[a];r[a]=s>=0?s:Math.exp(s)-1}return this.makeOutput(r,e.shape,"float32")},t.prototype.eluDer=function(e,r){ht([e,r],"eluDer");for(var i=new Float32Array(r.size),a=this.readSync(r.dataId),s=this.readSync(e.dataId),u=0;u<a.length;++u){var l=a[u];i[u]=l>=1?s[u]:s[u]*(l+1)}return this.makeOutput(i,r.shape,"float32")},t.prototype.selu=function(e){ht(e,"selu");for(var r=Qu,i=Hu,a=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];a[u]=l>=0?i*l:r*(Math.exp(l)-1)}return this.makeOutput(a,e.shape,"float32")},t.prototype.clip=function(e,r,i){ht(e,"clip");for(var a=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];a[u]=l>i?i:l<r?r:l}return this.makeOutput(a,e.shape,"float32")},t.prototype.abs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.abs(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.complexAbs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<e.size;++a){var s=i[2*a],u=i[2*a+1];r[a]=Math.hypot(s,u)}return this.makeOutput(r,e.shape,"float32")},t.prototype.int=function(e){ht(e,"int");for(var r=new Int32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=i[a];return this.makeOutput(r,e.shape,"int32")},t.prototype.sigmoid=function(e){ht(e,"sigmoid");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=1/(1+Math.exp(-i[a]));return this.makeOutput(r,e.shape,"float32")},t.prototype.softplus=function(e){ht(e,"softplus");for(var r=Math.log(11920928955078125e-23)+2,i=new Float32Array(e.size),a=this.readSync(e.dataId),s=0;s<a.length;++s){var u=a[s]>-r,l=a[s]<r,d=Math.exp(a[s]),A=void 0;A=l?d:u?a[s]:Math.log(1+d),i[s]=A}return this.makeOutput(i,e.shape,"float32")},t.prototype.sin=function(e){ht(e,"sin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.sin(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cos=function(e){ht(e,"cos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.cos(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tan=function(e){ht(e,"tan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.tan(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asin=function(e){ht(e,"asin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.asin(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acos=function(e){ht(e,"acos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.acos(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan=function(e){ht(e,"atan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.atan(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan2=function(e,r){return ht([e,r],"atan2"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.atan2(i,a)})},t.prototype.sinh=function(e){ht(e,"sinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.sinh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cosh=function(e){ht(e,"cosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.cosh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tanh=function(e){ht(e,"tanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Ee(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asinh=function(e){ht(e,"asinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.asinh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acosh=function(e){ht(e,"acosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.acosh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atanh=function(e){ht(e,"atanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.atanh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.erf=function(e){ht(e,"erf");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a){var s=Math.sign(i[a]),u=Math.abs(i[a]),l=1/(1+.3275911*u);r[a]=s*(1-((((1.061405429*l-1.453152027)*l+1.421413741)*l-.284496736)*l+.254829592)*l*Math.exp(-u*u))}return this.makeOutput(r,e.shape,"float32")},t.prototype.step=function(e,r){r===void 0&&(r=0),ht(e,"step");for(var i=new Float32Array(e.size),a=this.readSync(e.dataId),s=0;s<a.length;++s){var u=a[s];isNaN(u)?i[s]=NaN:i[s]=u>0?1:r}return this.makeOutput(i,e.shape,"float32")},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,d=this.conv2d(r,i,a);return s&&(d=this.add(d,s)),u&&(d=ul(this,d,u,l)),d},t.prototype.conv2d=function(e,r,i){ht([e,r],"conv2d");for(var a=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,d=i.padInfo.left,A=i.padInfo.top,T=i.dataFormat==="channelsLast",D=Nt(i.outShape,e.dtype),U=e.strides[0],te=T?e.strides[1]:e.strides[2],oe=T?e.strides[2]:1,ae=T?1:e.strides[1],se=D.strides[0],we=T?D.strides[1]:D.strides[2],Ce=T?D.strides[2]:1,me=T?1:D.strides[1],Se=this.readSync(e.dataId),Re=this.readSync(r.dataId),Ue=D.values,We=0;We<i.batchSize;++We)for(var Ne=We*U,Le=We*se,$e=0;$e<i.outHeight;++$e)for(var Ze=Le+$e*we,et=$e*i.strideHeight-A,tt=0;tt<a;tt++){var st=et+tt*u;if(!(st<0||st>=i.inHeight))for(var pt=tt*r.strides[0],ct=Ne+st*te,lt=0;lt<i.outWidth;++lt)for(var mt=Ze+lt*Ce,ut=lt*i.strideWidth-d,yt=0;yt<s;yt++){var At=ut+yt*l;if(!(At<0||At>=i.inWidth))for(var St=ct+At*oe,Ft=pt+yt*r.strides[1],Ht=0;Ht<i.inChannels;++Ht){for(var $t=Se[St+Ht*ae],ir=0;ir<i.outChannels;++ir)Ue[mt+ir*me]+=$t*Re[Ft+ir];Ft+=i.outChannels}}}return D.toTensor()},t.prototype.conv3d=function(e,r,i){for(var a=i.filterDepth,s=i.filterHeight,u=i.filterWidth,l=i.dilationDepth,d=i.dilationHeight,A=i.dilationWidth,T=i.padInfo.front,D=i.padInfo.left,U=i.padInfo.top,te=Nt(i.outShape,e.dtype),oe=this.readSync(e.dataId),ae=this.readSync(r.dataId),se=te.values,we=0;we<i.batchSize;++we)for(var Ce=we*e.strides[0],me=we*te.strides[0],Se=0;Se<i.outDepth;++Se)for(var Re=me+Se*te.strides[1],Ue=Se*i.strideDepth-T,We=0;We<a;We++){var Ne=Ue+We*l;if(!(Ne<0||Ne>=i.inDepth))for(var Le=We*r.strides[0],$e=Ce+Ne*e.strides[1],Ze=0;Ze<i.outHeight;++Ze)for(var et=Re+Ze*te.strides[2],tt=Ze*i.strideHeight-U,st=0;st<s;st++){var pt=tt+st*d;if(!(pt<0||pt>=i.inHeight))for(var ct=Le+st*r.strides[1],lt=$e+pt*e.strides[2],mt=0;mt<i.outWidth;++mt)for(var ut=et+mt*i.outChannels,yt=mt*i.strideWidth-D,At=0;At<u;At++){var St=yt+At*A;if(!(St<0||St>=i.inWidth))for(var Ft=ct+At*r.strides[2],Ht=lt+St*i.inChannels,$t=Ft,ir=0;ir<i.inChannels;++ir){for(var tr=oe[Ht+ir],ar=0;ar<i.outChannels;++ar)se[ut+ar]+=tr*ae[$t+ar];$t+=i.outChannels}}}}return te.toTensor()},t.prototype.conv2dDerInput=function(e,r,i){ht([e,r],"conv2dDerInput");for(var a=Nt(i.inShape,"float32"),s=a.values,u=this.readSync(e.dataId),l=this.readSync(r.dataId),d=r.strides,A=d[0],T=d[1],D=d[2],U=i.batchSize,te=i.filterHeight,oe=i.filterWidth,ae=i.inChannels,se=i.inHeight,we=i.inWidth,Ce=i.outChannels,me=i.outHeight,Se=i.outWidth,Re=i.strideHeight,Ue=i.strideWidth,We=i.dataFormat,Ne=te-1-i.padInfo.top,Le=oe-1-i.padInfo.left,$e=We==="channelsLast",Ze=a.strides[0],et=$e?a.strides[1]:a.strides[2],tt=$e?a.strides[2]:1,st=$e?1:a.strides[1],pt=e.strides[0],ct=$e?e.strides[1]:e.strides[2],lt=$e?e.strides[2]:1,mt=$e?1:e.strides[1],ut=0;ut<U;++ut)for(var yt=0;yt<ae;++yt)for(var At=0;At<se;++At)for(var St=At-Ne,Ft=Math.max(0,Math.ceil(St/Re)),Ht=Math.min(me,(te+St)/Re),$t=0;$t<we;++$t){for(var ir=$t-Le,tr=Math.max(0,Math.ceil(ir/Ue)),ar=Math.min(Se,(oe+ir)/Ue),qt=0,rr=Ft;rr<Ht;++rr)for(var Er=rr*Re-St,vr=tr;vr<ar;++vr)for(var Wr=pt*ut+ct*rr+lt*vr,an=A*(te-1-Er)+T*(oe-1-(vr*Ue-ir))+D*yt,on=0;on<Ce;++on)qt+=u[Wr+mt*on]*l[an+on];s[Ze*ut+et*At+tt*$t+st*yt]=qt}return a.toTensor()},t.prototype.conv3dDerInput=function(e,r,i){for(var a=Nt(i.inShape,"float32"),s=a.values,u=a.strides,l=u[0],d=u[1],A=u[2],T=u[3],D=this.readSync(e.dataId),U=e.strides,te=U[0],oe=U[1],ae=U[2],se=U[3],we=this.readSync(r.dataId),Ce=r.strides,me=Ce[0],Se=Ce[1],Re=Ce[2],Ue=Ce[3],We=i.batchSize,Ne=i.filterDepth,Le=i.filterHeight,$e=i.filterWidth,Ze=i.inChannels,et=i.inDepth,tt=i.inHeight,st=i.inWidth,pt=i.outChannels,ct=i.outDepth,lt=i.outHeight,mt=i.outWidth,ut=i.strideDepth,yt=i.strideHeight,At=i.strideWidth,St=Ne-1-i.padInfo.front,Ft=Le-1-i.padInfo.top,Ht=$e-1-i.padInfo.left,$t=0;$t<We;++$t)for(var ir=0;ir<Ze;++ir)for(var tr=0;tr<et;++tr)for(var ar=tr-St,qt=Math.max(0,Math.ceil(ar/ut)),rr=Math.min(ct,(Ne+ar)/ut),Er=0;Er<tt;++Er)for(var vr=Er-Ft,Wr=Math.max(0,Math.ceil(vr/yt)),an=Math.min(lt,(Le+vr)/yt),on=0;on<st;++on){for(var aa=on-Ht,oa=Math.max(0,Math.ceil(aa/At)),bi=Math.min(mt,($e+aa)/At),rs=0,xa=qt;xa<rr;++xa)for(var Ka=xa*ut-ar,Ea=Wr;Ea<an;++Ea)for(var ns=Ea*yt-vr,Ca=oa;Ca<bi;++Ca)for(var cc=te*$t+oe*xa+ae*Ea+se*Ca,is=me*(Ne-1-Ka)+Se*(Le-1-ns)+Re*($e-1-(Ca*At-aa))+Ue*ir,sa=0;sa<pt;++sa)rs+=D[cc+sa]*we[is+sa];s[l*$t+d*tr+A*Er+T*on+ir]=rs}return a.toTensor()},t.prototype.conv2dDerFilter=function(e,r,i){ht([e,r],"conv2dDerFilter");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=i.dataFormat==="channelsLast",A=Nt(i.filterShape,"float32"),T=i.padInfo.left,D=i.padInfo.top,U=this.bufferSync(e),te=this.bufferSync(r),oe=0;oe<u;++oe)for(var ae=Math.max(0,Math.ceil((D-oe)/a)),se=Math.min(i.outHeight,(i.inHeight+D-oe)/a),we=0;we<l;++we)for(var Ce=Math.max(0,Math.ceil((T-we)/s)),me=Math.min(i.outWidth,(i.inWidth+T-we)/s),Se=0;Se<i.inChannels;++Se)for(var Re=0;Re<i.outChannels;++Re){for(var Ue=0,We=0;We<i.batchSize;++We)for(var Ne=ae;Ne<se;++Ne)for(var Le=oe+Ne*a-D,$e=Ce;$e<me;++$e){var Ze=we+$e*s-T;Ue+=d?U.get(We,Le,Ze,Se)*te.get(We,Ne,$e,Re):U.get(We,Se,Le,Ze)*te.get(We,Re,Ne,$e)}A.set(Ue,oe,we,Se,Re)}return A.toTensor()},t.prototype.conv3dDerFilter=function(e,r,i){for(var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,d=i.filterHeight,A=i.filterWidth,T=Nt(i.filterShape,"float32"),D=T.values,U=T.strides,te=U[0],oe=U[1],ae=U[2],se=U[3],we=this.readSync(r.dataId),Ce=r.strides,me=Ce[0],Se=Ce[1],Re=Ce[2],Ue=Ce[3],We=this.readSync(e.dataId),Ne=e.strides,Le=Ne[0],$e=Ne[1],Ze=Ne[2],et=Ne[3],tt=i.padInfo.front,st=i.padInfo.left,pt=i.padInfo.top,ct=0;ct<l;++ct)for(var lt=Math.max(0,Math.ceil((tt-ct)/a)),mt=Math.min(i.outDepth,(i.inDepth+tt-ct)/a),ut=ct*te,yt=0;yt<d;++yt)for(var At=Math.max(0,Math.ceil((pt-yt)/s)),St=Math.min(i.outHeight,(i.inHeight+pt-yt)/s),Ft=yt*oe+ut,Ht=0;Ht<A;++Ht)for(var $t=Math.max(0,Math.ceil((st-Ht)/u)),ir=Math.min(i.outWidth,(i.inWidth+st-Ht)/u),tr=Ht*ae+Ft,ar=0;ar<i.inChannels;++ar)for(var qt=ar*se+tr,rr=0;rr<i.outChannels;++rr){for(var Er=0,vr=0;vr<i.batchSize;++vr)for(var Wr=vr*Le,an=vr*me,on=lt;on<mt;++on)for(var aa=(ct+on*a-tt)*$e+Wr,oa=on*Se+an,bi=At;bi<St;++bi)for(var rs=(yt+bi*s-pt)*Ze+aa,xa=bi*Re+oa,Ka=$t;Ka<ir;++Ka){var Ea=Ka*Ue+xa;Er+=We[(Ht+Ka*u-st)*et+rs+ar]*we[Ea+rr]}D[qt+rr]=Er}return T.toTensor()},t.prototype.fusedDepthwiseConv2D=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,d=this.depthwiseConv2D(r,i,a);return s&&(d=this.add(d,s)),u&&(d=ul(this,d,u,l)),d},t.prototype.depthwiseConv2D=function(e,r,i){ht([e,r],"depthwiseConv2D");for(var a=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,d=i.padInfo.left,A=i.padInfo.top,T=i.outChannels/i.inChannels,D=Nt(i.outShape,e.dtype),U=this.readSync(e.dataId),te=this.readSync(r.dataId),oe=D.values,ae=0;ae<i.batchSize;++ae)for(var se=ae*e.strides[0],we=ae*D.strides[0],Ce=0;Ce<i.outHeight;++Ce)for(var me=we+Ce*D.strides[1],Se=Ce*i.strideHeight-d,Re=0;Re<a;++Re){var Ue=Se+Re*u;if(!(Ue<0||Ue>=i.inHeight))for(var We=Re*r.strides[0],Ne=se+Ue*e.strides[1],Le=0;Le<i.outWidth;++Le)for(var $e=me+Le*D.strides[2],Ze=Le*i.strideWidth-A,et=0;et<s;++et){var tt=Ze+et*l;if(!(tt<0||tt>=i.inWidth))for(var st=We+et*r.strides[1],pt=Ne+tt*i.inChannels,ct=$e,lt=st,mt=0;mt<i.inChannels;++mt){for(var ut=U[pt+mt],yt=0;yt<T;++yt)oe[ct+yt]+=ut*te[lt+yt];ct+=T,lt+=T}}}return D.toTensor()},t.prototype.depthwiseConv2DDerInput=function(e,r,i){ht([e,r],"depthwiseConv2DDerInput");for(var a=Nt(i.inShape,"float32"),s=a.values,u=a.strides,l=u[0],d=u[1],A=u[2],T=this.readSync(e.dataId),D=e.strides,U=D[0],te=D[1],oe=D[2],ae=this.readSync(r.dataId),se=r.strides,we=se[0],Ce=se[1],me=se[2],Se=i.batchSize,Re=i.filterHeight,Ue=i.filterWidth,We=i.inChannels,Ne=i.inHeight,Le=i.inWidth,$e=i.outChannels,Ze=i.outHeight,et=i.outWidth,tt=i.strideHeight,st=i.strideWidth,pt=Re-1-i.padInfo.top,ct=Ue-1-i.padInfo.left,lt=$e/We,mt=0;mt<Se;++mt)for(var ut=0;ut<We;++ut)for(var yt=0;yt<Ne;++yt)for(var At=yt-pt,St=Math.max(0,Math.ceil(At/tt)),Ft=Math.min(Ze,(Re+At)/tt),Ht=0;Ht<Le;++Ht){for(var $t=Ht-ct,ir=Math.max(0,Math.ceil($t/st)),tr=Math.min(et,(Ue+$t)/st),ar=0,qt=St;qt<Ft;++qt)for(var rr=qt*tt-At,Er=ir;Er<tr;++Er)for(var vr=U*mt+te*qt+oe*Er,Wr=we*(Re-1-rr)+Ce*(Ue-1-(Er*st-$t))+me*ut,an=0;an<lt;++an)ar+=T[vr+(ut*lt+an)]*ae[Wr+an];s[l*mt+d*yt+A*Ht+ut]=ar}return a.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){ht([e,r],"depthwiseConv2DDerFilter");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=Nt(i.filterShape,"float32"),A=i.padInfo.left,T=i.padInfo.top,D=i.outChannels/i.inChannels,U=this.bufferSync(e),te=this.bufferSync(r),oe=0;oe<u;++oe)for(var ae=Math.max(0,Math.ceil((T-oe)/a)),se=Math.min(i.outHeight,(i.inHeight+T-oe)/a),we=0;we<l;++we)for(var Ce=Math.max(0,Math.ceil((A-we)/s)),me=Math.min(i.outWidth,(i.inWidth+A-we)/s),Se=0;Se<i.outChannels;++Se){for(var Re=Math.trunc(Se/D),Ue=Se%D,We=0,Ne=0;Ne<i.batchSize;++Ne)for(var Le=ae;Le<se;++Le)for(var $e=oe+Le*a-T,Ze=Ce;Ze<me;++Ze){var et=we+Ze*s-A;We+=U.get(Ne,$e,et,Re)*te.get(Ne,Le,Ze,Se)}d.set(We,oe,we,Re,Ue)}return d.toTensor()},t.prototype.tile=function(e,r){return ht(e,"tile"),Ac(this.bufferSync(e),r)},t.prototype.pad=function(e,r,i){ht(e,"pad");var a=r.map(function(D,U){return D[0]+e.shape[U]+D[1]}),s=r.map(function(D){return D[0]}),u=this.bufferSync(e),l=Nt(a,e.dtype);i!==0&&l.values.fill(i);for(var d=0;d<e.size;d++){var A=u.indexToLoc(d),T=A.map(function(D,U){return D+s[U]});l.set.apply(l,[u.get.apply(u,A)].concat(T))}return l.toTensor()},t.prototype.transpose=function(e,r){ht(e,"transpose");for(var i=new Array(e.rank),a=0;a<i.length;a++)i[a]=e.shape[r[a]];var s=this.readSync(e.dataId),u=Nt(i,e.dtype),l=this.bufferSync(e);for(a=0;a<e.size;++a){for(var d=l.indexToLoc(a),A=new Array(d.length),T=0;T<A.length;T++)A[T]=d[r[T]];var D=u.locToIndex(A);u.values[D]=s[a]}return u.toTensor()},t.prototype.gather=function(e,r,i){ht([e,r],"gather");var a=e.shape.slice(),s=this.readSync(r.dataId);a[i]=s.length;for(var u=Nt(a,e.dtype),l=this.bufferSync(e),d=0;d<u.size;++d){var A=u.indexToLoc(d),T=A.slice();T[i]=s[A[i]];var D=l.locToIndex(T);u.values[d]=l.values[D]}return u.toTensor()},t.prototype.batchToSpaceND=function(e,r,i){ht([e],"batchToSpaceND");var a=r.reduce(function(T,D){return T*D}),s=ai(e.shape,r,a),u=_i(s.length,r.length),l=Si(e.shape,r,a),d=no(i,r.length),A=vn(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(d,A)},t.prototype.spaceToBatchND=function(e,r,i){ht([e],"spaceToBatchND");var a=r.reduce(function(D,U){return D*U}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),d=ai(l.shape,r,a,!1),A=_i(d.length,r.length,!1),T=Si(l.shape,r,a,!1);return l.reshape(d).transpose(A).reshape(T)},t.prototype.pool=function(e,r,i){ht(e,"pool");for(var a=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,d=r.effectiveFilterHeight,A=r.effectiveFilterWidth,T=r.padInfo.top,D=r.padInfo.left,U=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,te=this.readSync(e.dataId),oe=Nt(r.outShape,e.dtype),ae=oe.values,se=r.outShape[1]*r.outShape[2]*r.outShape[3],we=r.outShape[2]*r.outShape[3],Ce=r.outShape[3],me=0;me<r.batchSize;++me)for(var Se=me*se,Re=me*e.strides[0],Ue=0;Ue<r.inChannels;++Ue)for(var We=0;We<r.outHeight;++We)for(var Ne=We*a-T,Le=Math.max(0,Ne),$e=Math.min(r.inHeight,d+Ne),Ze=Se+We*we,et=0;et<r.outWidth;++et){for(var tt=et*s-D,st=Math.max(0,tt),pt=Math.min(r.inWidth,A+tt),ct=U,lt=0,mt=0,ut=Le;ut<$e;ut+=u){for(var yt=Re+ut*e.strides[1],At=st;At<pt;At+=l){var St=te[yt+At*e.strides[2]+Ue];i==="max"&&St>ct?ct=St:i==="avg"&&(lt+=St,mt++)}if(isNaN(ct))break}ae[Ze+et*Ce+Ue]=i==="avg"?lt/mt:ct}return oe.toTensor()},t.prototype.maxPool=function(e,r){return this.pool(e,r,"max")},t.prototype.maxPoolPositions=function(e,r){for(var i=Nt(r.outShape,"int32"),a=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,d=r.effectiveFilterHeight,A=r.effectiveFilterWidth,T=r.padInfo.top,D=r.padInfo.left,U=this.bufferSync(e),te=0;te<r.batchSize;++te)for(var oe=0;oe<r.inChannels;++oe)for(var ae=0;ae<r.outHeight;++ae){for(var se=ae*a-T,we=se;we<0;)we+=u;for(var Ce=Math.min(r.inHeight,d+se),me=0;me<r.outWidth;++me){for(var Se=me*s-D,Re=Se;Re<0;)Re+=l;for(var Ue=Math.min(r.inWidth,A+Se),We=Number.NEGATIVE_INFINITY,Ne=-1,Le=we;Le<Ce;Le+=u)for(var $e=Le-se,Ze=Re;Ze<Ue;Ze+=l){var et=Ze-Se,tt=U.get(te,Le,Ze,oe);tt>We&&(We=tt,Ne=$e*A+et)}i.set(Ne,te,ae,me,oe)}}return i.toTensor()},t.prototype.maxPoolBackprop=function(e,r,i,a){ht([r,i],"maxPoolBackprop");for(var s=this.maxPoolPositions(r,a),u=a.strideHeight,l=a.strideWidth,d=a.dilationHeight,A=a.dilationWidth,T=a.effectiveFilterHeight,D=a.effectiveFilterWidth,U=D-1-a.padInfo.left,te=T-1-a.padInfo.top,oe=Nt(r.shape,"float32"),ae=this.bufferSync(s),se=this.bufferSync(e),we=0;we<a.batchSize;++we)for(var Ce=0;Ce<a.inChannels;++Ce)for(var me=0;me<a.inHeight;++me)for(var Se=0;Se<a.inWidth;++Se){for(var Re=me-te,Ue=Se-U,We=0,Ne=0;Ne<T;Ne+=d){var Le=(Re+Ne)/u;if(!(Le<0||Le>=a.outHeight||Math.floor(Le)!==Le))for(var $e=0;$e<D;$e+=A){var Ze=(Ue+$e)/l;if(!(Ze<0||Ze>=a.outWidth||Math.floor(Ze)!==Ze)){var et=T*D-1-ae.get(we,Le,Ze,Ce)===Ne*D+$e?1:0;et!==0&&(We+=se.get(we,Le,Ze,Ce)*et)}}}oe.set(We,we,me,Se,Ce)}return oe.toTensor()},t.prototype.avgPoolBackprop=function(e,r,i){ht([e,r],"avgPoolBackprop");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,d=i.dilationHeight,A=i.dilationWidth,T=i.effectiveFilterHeight,D=i.effectiveFilterWidth,U=D-1-i.padInfo.left,te=T-1-i.padInfo.top,oe=Nt(r.shape,"float32"),ae=1/(u*l),se=this.bufferSync(e),we=0;we<i.batchSize;++we)for(var Ce=0;Ce<i.inChannels;++Ce)for(var me=0;me<i.inHeight;++me)for(var Se=0;Se<i.inWidth;++Se){for(var Re=me-te,Ue=Se-U,We=0,Ne=0;Ne<T;Ne+=d){var Le=(Re+Ne)/a;if(!(Le<0||Le>=i.outHeight||Math.floor(Le)!==Le))for(var $e=0;$e<D;$e+=A){var Ze=(Ue+$e)/s;Ze<0||Ze>=i.outWidth||Math.floor(Ze)!==Ze||(We+=se.get(we,Le,Ze,Ce))}}oe.set(We*ae,we,me,Se,Ce)}return oe.toTensor()},t.prototype.pool3d=function(e,r,i){ht(e,"pool3d");for(var a=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,d=r.dilationHeight,A=r.dilationWidth,T=r.effectiveFilterDepth,D=r.effectiveFilterHeight,U=r.effectiveFilterWidth,te=r.padInfo.front,oe=r.padInfo.top,ae=r.padInfo.left,se=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,we=this.readSync(e.dataId),Ce=Nt(r.outShape,e.dtype),me=Ce.values,Se=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],Re=r.outShape[2]*r.outShape[3]*r.outShape[4],Ue=r.outShape[3]*r.outShape[4],We=r.outShape[4],Ne=0;Ne<r.batchSize;++Ne)for(var Le=Ne*Se,$e=Ne*e.strides[0],Ze=0;Ze<r.inChannels;++Ze)for(var et=0;et<r.outDepth;++et){for(var tt=et*a-te,st=tt;st<0;)st+=l;for(var pt=Math.min(r.inDepth,T+tt),ct=Le+et*Re,lt=0;lt<r.outHeight;++lt){for(var mt=lt*s-oe,ut=mt;ut<0;)ut+=d;for(var yt=Math.min(r.inHeight,D+mt),At=ct+lt*Ue,St=0;St<r.outWidth;++St){for(var Ft=St*u-ae,Ht=Ft;Ht<0;)Ht+=A;for(var $t=Math.min(r.inWidth,U+Ft),ir=At+St*We,tr=se,ar=0,qt=0,rr=st;rr<pt;rr+=l){for(var Er=$e+rr*e.strides[1],vr=ut;vr<yt;vr+=d){for(var Wr=Er+vr*e.strides[2],an=Ht;an<$t;an+=A){var on=we[Wr+an*e.strides[3]+Ze];if(i==="max"&&on>tr?tr=on:i==="avg"&&(ar+=on,qt++),isNaN(tr))break}if(isNaN(tr))break}if(isNaN(tr))break}me[ir+Ze]=i==="avg"?ar/qt:tr}}}return Ce.toTensor()},t.prototype.avgPool3d=function(e,r){return ht(e,"avgPool3d"),this.pool3d(e,r,"avg").toFloat()},t.prototype.avgPool3dBackprop=function(e,r,i){ht([e,r],"avgPool3dBackprop");for(var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,d=i.filterHeight,A=i.filterWidth,T=i.dilationDepth,D=i.dilationHeight,U=i.dilationWidth,te=i.effectiveFilterDepth,oe=i.effectiveFilterHeight,ae=i.effectiveFilterWidth,se=te-1-i.padInfo.front,we=ae-1-i.padInfo.left,Ce=oe-1-i.padInfo.top,me=Nt(r.shape,"float32"),Se=1/(l*d*A),Re=this.bufferSync(e),Ue=0;Ue<i.batchSize;++Ue)for(var We=0;We<i.inChannels;++We)for(var Ne=0;Ne<i.inDepth;++Ne)for(var Le=0;Le<i.inHeight;++Le)for(var $e=0;$e<i.inWidth;++$e){for(var Ze=Ne-se,et=Le-Ce,tt=$e-we,st=0,pt=0;pt<te;pt+=T){var ct=(Ze+pt)/a;if(!(ct<0||ct>=i.outDepth||Math.floor(ct)!==ct))for(var lt=0;lt<oe;lt+=D){var mt=(et+lt)/s;if(!(mt<0||mt>=i.outHeight||Math.floor(mt)!==mt))for(var ut=0;ut<ae;ut+=U){var yt=(tt+ut)/u;yt<0||yt>=i.outWidth||Math.floor(yt)!==yt||(st+=Re.get(Ue,ct,mt,yt,We))}}}me.set(st*Se,Ue,Ne,Le,$e,We)}return me.toTensor()},t.prototype.maxPool3d=function(e,r){return ht(e,"maxPool3d"),this.pool3d(e,r,"max").toFloat()},t.prototype.maxPool3dPositions=function(e,r){for(var i=Nt(r.outShape,"int32"),a=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,d=r.dilationHeight,A=r.dilationWidth,T=r.effectiveFilterDepth,D=r.effectiveFilterHeight,U=r.effectiveFilterWidth,te=r.padInfo.front,oe=r.padInfo.top,ae=r.padInfo.left,se=this.bufferSync(e),we=0;we<r.batchSize;++we)for(var Ce=0;Ce<r.inChannels;++Ce)for(var me=0;me<r.outDepth;++me){for(var Se=me*a-te,Re=Se;Re<0;)Re+=l;for(var Ue=Math.min(r.inDepth,T+Se),We=0;We<r.outHeight;++We){for(var Ne=We*s-oe,Le=Ne;Le<0;)Le+=d;for(var $e=Math.min(r.inHeight,D+Ne),Ze=0;Ze<r.outWidth;++Ze){for(var et=Ze*u-ae,tt=et;tt<0;)tt+=A;for(var st=Math.min(r.inWidth,U+et),pt=Number.NEGATIVE_INFINITY,ct=-1,lt=Re;lt<Ue;lt+=l)for(var mt=lt-Se,ut=Le;ut<$e;ut+=d)for(var yt=ut-Ne,At=tt;At<st;At+=A){var St=At-et,Ft=se.get(we,lt,ut,At,Ce);Ft>=pt&&(pt=Ft,ct=mt*D*U+yt*D+St)}i.set(ct,we,me,We,Ze,Ce)}}}return i.toTensor()},t.prototype.maxPool3dBackprop=function(e,r,i,a){ht([r,i],"maxPool3dBackprop");for(var s=this.maxPool3dPositions(r,a),u=a.strideDepth,l=a.strideHeight,d=a.strideWidth,A=a.dilationDepth,T=a.dilationHeight,D=a.dilationWidth,U=a.effectiveFilterDepth,te=a.effectiveFilterHeight,oe=a.effectiveFilterWidth,ae=U-1-a.padInfo.front,se=oe-1-a.padInfo.left,we=te-1-a.padInfo.top,Ce=Nt(r.shape,"float32"),me=this.bufferSync(s),Se=this.bufferSync(e),Re=0;Re<a.batchSize;++Re)for(var Ue=0;Ue<a.inChannels;++Ue)for(var We=0;We<a.inDepth;++We)for(var Ne=0;Ne<a.inHeight;++Ne)for(var Le=0;Le<a.inWidth;++Le){for(var $e=We-ae,Ze=Ne-we,et=Le-se,tt=0,st=0;st<U;st+=A){var pt=($e+st)/u;if(!(pt<0||pt>=a.outDepth||Math.floor(pt)!==pt))for(var ct=0;ct<te;ct+=T){var lt=(Ze+ct)/l;if(!(lt<0||lt>=a.outHeight||Math.floor(lt)!==lt))for(var mt=0;mt<oe;mt+=D){var ut=(et+mt)/d;if(!(ut<0||ut>=a.outWidth||Math.floor(ut)!==ut)){var yt=U*te*oe-1-me.get(Re,pt,lt,ut,Ue)===st*te*oe+ct*oe+mt?1:0;yt!==0&&(tt+=Se.get(Re,pt,lt,ut,Ue)*yt)}}}}Ce.set(tt,Re,We,Ne,Le,Ue)}return Ce.toTensor()},t.prototype.cast=function(e,r){return fo(e,r,this)},t.prototype.reshape=function(e,r){return Et(e,r)},t.prototype.avgPool=function(e,r){return ht(e,"avgPool"),this.pool(e,r,"avg").toFloat()},t.prototype.resizeBilinear=function(e,r,i,a){ht(e,"resizeBilinear");for(var s=e.shape,u=s[0],l=s[1],d=s[2],A=s[3],T=this.readSync(e.dataId),D=new Float32Array(le([u,r,i,A])),U=[a&&r>1?l-1:l,a&&i>1?d-1:d],te=[a&&r>1?r-1:r,a&&i>1?i-1:i],oe=0,ae=U[0]/te[0],se=U[1]/te[1],we=0;we<u;we++)for(var Ce=0;Ce<r;Ce++)for(var me=ae*Ce,Se=Math.floor(me),Re=me-Se,Ue=Math.min(l-1,Math.ceil(me)),We=we*e.strides[0]+Se*e.strides[1],Ne=we*e.strides[0]+Ue*e.strides[1],Le=0;Le<i;Le++)for(var $e=se*Le,Ze=Math.floor($e),et=$e-Ze,tt=Math.min(d-1,Math.ceil($e)),st=We+Ze*e.strides[2],pt=Ne+Ze*e.strides[2],ct=We+tt*e.strides[2],lt=Ne+tt*e.strides[2],mt=0;mt<A;mt++){var ut=T[st+mt],yt=T[pt+mt],At=ut+(T[ct+mt]-ut)*et,St=At+(yt+(T[lt+mt]-yt)*et-At)*Re;D[oe++]=St}return Mt(D,[u,r,i,A])},t.prototype.resizeBilinearBackprop=function(e,r,i){ht([e,r],"resizeBilinearBackprop");for(var a=r.shape,s=a[0],u=a[1],l=a[2],d=a[3],A=e.shape,T=A[1],D=A[2],U=new Float32Array(s*u*l*d),te=[i&&T>1?u-1:u,i&&D>1?l-1:l],oe=[i&&T>1?T-1:T,i&&D>1?D-1:D],ae=te[0]/oe[0],se=te[1]/oe[1],we=this.readSync(e.dataId),Ce=0,me=0;me<s;me++)for(var Se=me*r.strides[0],Re=0;Re<T;Re++)for(var Ue=Re*ae,We=Math.floor(Ue),Ne=Math.min(Math.ceil(Ue),u-1),Le=Se+We*r.strides[1],$e=Se+Ne*r.strides[1],Ze=Ue-We,et=1-Ze,tt=0;tt<D;tt++)for(var st=tt*se,pt=Math.floor(st),ct=Math.min(Math.ceil(st),l-1),lt=st-pt,mt=1-lt,ut=Le+pt*r.strides[2],yt=Le+ct*r.strides[2],At=$e+pt*r.strides[2],St=$e+ct*r.strides[2],Ft=et*mt,Ht=et*lt,$t=Ze*mt,ir=Ze*lt,tr=0;tr<d;tr++){var ar=we[Ce++];U[ut+tr]+=ar*Ft,U[yt+tr]+=ar*Ht,U[At+tr]+=ar*$t,U[St+tr]+=ar*ir}return un(U,[s,l,u,d],r.dtype)},t.prototype.resizeNearestNeighbor=function(e,r,i,a){ht(e,"resizeNearestNeighbor");for(var s=e.shape,u=s[0],l=s[1],d=s[2],A=s[3],T=this.readSync(e.dataId),D=new Float32Array(u*r*i*A),U=[a&&r>1?l-1:l,a&&i>1?d-1:d],te=[a&&r>1?r-1:r,a&&i>1?i-1:i],oe=U[0]/te[0],ae=U[1]/te[1],se=0,we=0;we<u;we++)for(var Ce=we*e.strides[0],me=0;me<r;me++)for(var Se=oe*me,Re=Ce+Math.min(l-1,a?Math.round(Se):Math.floor(Se))*e.strides[1],Ue=0;Ue<i;Ue++)for(var We=ae*Ue,Ne=Re+Math.min(d-1,a?Math.round(We):Math.floor(We))*e.strides[2],Le=0;Le<A;Le++){var $e=T[Ne+Le];D[se++]=$e}return Mt(D,[u,r,i,A],e.dtype)},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){ht([e,r],"resizeNearestNeighborBackprop");for(var a=r.shape,s=a[0],u=a[1],l=a[2],d=a[3],A=e.shape,T=A[1],D=A[2],U=new Float32Array(s*u*l*d),te=this.readSync(e.dataId),oe=[i&&T>1?u-1:u,i&&D>1?l-1:l],ae=[i&&T>1?T-1:T,i&&D>1?D-1:D],se=oe[0]/ae[0],we=oe[1]/ae[1],Ce=1/se,me=1/we,Se=2*Math.ceil(Ce)+2,Re=2*Math.ceil(me)+2,Ue=0;Ue<s;Ue++)for(var We=Ue*r.strides[0],Ne=0;Ne<u;Ne++)for(var Le=We+Ne*r.strides[1],$e=Math.floor(Ne*Ce),Ze=Math.floor($e-Se/2),et=0;et<l;et++)for(var tt=Le+et*r.strides[2],st=Math.floor(et*me),pt=Math.floor(st-Re/2),ct=0;ct<d;ct++){for(var lt=0,mt=0;mt<Se;mt++){var ut=mt+Ze;if(!(ut<0||ut>=T)){var yt=We+ut*e.strides[1],At=ut*se;if(Ne===Math.min(u-1,i?Math.round(At):Math.floor(At)))for(var St=0;St<Re;St++){var Ft=St+pt;if(!(Ft<0||Ft>=D)){var Ht=yt+Ft*e.strides[2],$t=Ft*we;et===Math.min(l-1,i?Math.round($t):Math.floor($t))&&(lt+=te[Ht+ct])}}}}U[tt+ct]=lt}return un(U,r.shape,r.dtype)},t.prototype.batchNormalization=function(e,r,i,a,s,u){ht([e,r,i,s,u],"batchNorm");for(var l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=this.readSync(i.dataId),T=s?this.readSync(s.dataId):new Float32Array([1]),D=u?this.readSync(u.dataId):new Float32Array([0]),U=new Float32Array(l.length),te=D.length,oe=T.length,ae=A.length,se=d.length,we=0,Ce=0,me=0,Se=0,Re=0;Re<l.length;++Re)U[Re]=D[we++]+(l[Re]-d[Ce++])*T[me++]/Math.sqrt(A[Se++]+a),we>=te&&(we=0),Ce>=se&&(Ce=0),me>=oe&&(me=0),Se>=ae&&(Se=0);return un(U,e.shape)},t.prototype.localResponseNormalization4D=function(e,r,i,a,s){ht(e,"localResponseNormalization4D");var u=e.shape[3],l=u-1,d=this.readSync(e.dataId),A=e.size,T=new Float32Array(A);function D(ae){for(var se=ae%u,we=ae-se+Math.max(0,se-r),Ce=ae-se+Math.min(se+r,l),me=0;we<=Ce;we++){var Se=d[we];me+=Se*Se}return me}for(var U=0;U<A;U++){var te=D(U),oe=d[U]*Math.pow(i+a*te,-s);T[U]=oe}return un(T,e.shape)},t.prototype.LRNGrad=function(e,r,i,a,s,u,l){ht(e,"LRNGrad");for(var d=e.shape[3],A=this.readSync(e.dataId),T=this.readSync(r.dataId),D=this.readSync(i.dataId),U=new Float32Array(e.size),te=e.size,oe=0;oe<te;oe++){for(var ae=oe%d,se=oe-ae+Math.max(0,ae-a),we=oe-ae+Math.min(d,ae+a+1),Ce=0,me=se;me<we;me++)Ce+=Math.pow(T[me],2);for(Ce=u*Ce+s,me=se;me<we;me++){var Se=-2*u*l*T[me]*D[oe]/Ce;oe===me&&(Se+=Math.pow(Ce,-l)),Se*=A[oe],U[me]+=Se}}return un(U,e.shape)},t.prototype.multinomial=function(e,r,i,a){ht(e,"multinomial");for(var s=r?e:vi(e),u=s.shape[0],l=s.shape[1],d=pr([u,i],"int32"),A=this.readSync(d.dataId),T=this.readSync(s.dataId),D=0;D<u;++D){var U=D*l,te=new Float32Array(l-1);te[0]=T[U];for(var oe=1;oe<te.length;++oe)te[oe]=te[oe-1]+T[U+oe];for(var ae=fa(a.toString()),se=D*i,we=0;we<i;++we){var Ce=ae();A[se+we]=te.length;for(var me=0;me<te.length;me++)if(Ce<te[me]){A[se+we]=me;break}}}return d},t.prototype.oneHot=function(e,r,i,a){ht(e,"oneHot");var s=new Float32Array(e.size*r);s.fill(a);for(var u=this.readSync(e.dataId),l=0;l<e.size;++l)u[l]>=0&&u[l]<r&&(s[l*r+u[l]]=i);return cr(s,[e.size,r],"int32")},t.prototype.nonMaxSuppression=function(e,r,i,a,s){return ht(e,"nonMaxSuppression"),Bu(this.readSync(e.dataId),this.readSync(r.dataId),i,a,s)},t.prototype.fft=function(e){return this.fftBatch(e,!1)},t.prototype.ifft=function(e){return this.fftBatch(e,!0)},t.prototype.fftBatch=function(e,r){for(var i=e.shape[0],a=e.shape[1],s=Nt(e.shape,"float32"),u=Nt(e.shape,"float32"),l=Tr(e).as2D(i,a),d=Hr(e).as2D(i,a),A=0;A<i;A++)for(var T=l.slice([A,0],[1,a]),D=d.slice([A,0],[1,a]),U=Fr(T,D),te=this.readSync(this.fftImpl(U,r).dataId),oe=0;oe<a;oe++){var ae=Zr(te,oe);s.values[A*a+oe]=ae.real,u.values[A*a+oe]=ae.imag}return Fr(s.toTensor(),u.toTensor()).as2D(i,a)},t.prototype.fftImpl=function(e,r){var i=e.as1D(),a=i.size;if(this.isExponentOf2(a)){var s=this.fftRadix2(i,a,r).as2D(e.shape[0],e.shape[1]);return r&&(s=Fr(Tr(s).div(wt(a)),Hr(s).div(wt(a)))),s}var u=this.readSync(e.dataId),l=function(d){for(var A=new Float32Array(d.length/2),T=new Float32Array(d.length/2),D=0;D<d.length;D+=2)A[D/2]=d[D],T[D/2]=d[D+1];return{real:A,imag:T}}(this.fourierTransformByMatmul(u,a,r));return Fr(l.real,l.imag).as2D(e.shape[0],e.shape[1])},t.prototype.isExponentOf2=function(e){return(e&e-1)==0},t.prototype.fftRadix2=function(e,r,i){if(r===1)return e;var a=this.readSync(e.dataId),s=r/2,u=function(se){for(var we=Math.ceil(se.length/4),Ce=new Float32Array(we),me=new Float32Array(we),Se=0;Se<se.length;Se+=4)Ce[Math.floor(Se/4)]=se[Se],me[Math.floor(Se/4)]=se[Se+1];return{real:Ce,imag:me}}(a),l=Fr(u.real,u.imag).as1D(),d=function(se){for(var we=Math.floor(se.length/4),Ce=new Float32Array(we),me=new Float32Array(we),Se=2;Se<se.length;Se+=4)Ce[Math.floor(Se/4)]=se[Se],me[Math.floor(Se/4)]=se[Se+1];return{real:Ce,imag:me}}(a),A=Fr(d.real,d.imag).as1D();l=this.fftRadix2(l,s,i),A=this.fftRadix2(A,s,i);var T=function(se,we){for(var Ce=new Float32Array(se/2),me=new Float32Array(se/2),Se=0;Se<Math.ceil(se/2);Se++){var Re=(we?2:-2)*Math.PI*(Se/se);Ce[Se]=Math.cos(Re),me[Se]=Math.sin(Re)}return{real:Ce,imag:me}}(r,i),D=Fr(T.real,T.imag).mul(A),U=l.add(D),te=l.sub(D),oe=Tr(U).concat(Tr(te)),ae=Hr(U).concat(Hr(te));return Fr(oe,ae).as1D()},t.prototype.fourierTransformByMatmul=function(e,r,i){for(var a=new Float32Array(2*r),s=0;s<r;s++){for(var u=0,l=0,d=0;d<r;d++){var A=ys(s*d,r,i),T=Zr(e,d);u+=T.real*A.real-T.imag*A.imag,l+=T.real*A.imag+T.imag*A.real}i&&(u/=r,l/=r),Uo(a,u,l,s)}return a},t.prototype.depthToSpace=function(e,r,i){Z(i==="NHWC",function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+i}),Z(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});for(var a=e.shape[0],s=e.shape[1],u=e.shape[2],l=e.shape[3],d=s*r,A=u*r,T=l/(r*r),D=this.readSync(e.dataId),U=new Float32Array(a*d*A*T),te=0,oe=0;oe<a;++oe)for(var ae=0;ae<d;++ae)for(var se=Math.floor(ae/r),we=ae%r,Ce=0;Ce<A;++Ce)for(var me=Math.floor(Ce/r),Se=(we*r+Ce%r)*T,Re=0;Re<T;++Re){var Ue=Re+Se+l*(me+u*(se+s*oe));U[te++]=D[Ue]}return un(U,[a,d,A,T])},t.prototype.broadcastedBinaryOp=function(e,r,i,a){var s=Zt(e.shape,r.shape),u=Nt(s,i),l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=ui(e.shape,s),T=ui(r.shape,s),D=u.values;if(A.length+T.length===0)for(var U=0;U<D.length;++U)D[U]=a(l[U%l.length],d[U%d.length]);else{var te=this.bufferSync(e),oe=this.bufferSync(r),ae=function(se){var we=u.indexToLoc(se),Ce=we.slice(-e.rank);A.forEach(function(Ue){return Ce[Ue]=0});var me=te.locToIndex(Ce),Se=we.slice(-r.rank);T.forEach(function(Ue){return Se[Ue]=0});var Re=oe.locToIndex(Se);D[se]=a(l[me],d[Re])};for(U=0;U<D.length;++U)ae(U)}return u.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(e,r,i){var a=Zt(e.shape,r.shape),s=Nt(a,"float32"),u=Nt(a,"float32"),l=this.readSync(e.dataId),d=this.readSync(r.dataId),A=ui(e.shape,a),T=ui(r.shape,a),D=s.values,U=u.values;if(A.length+T.length===0)for(var te=0;te<D.length;te++){var oe=te%l.length,ae=te%d.length,se=i(l[2*oe],l[2*oe+1],d[2*ae],d[2*ae+1]);D[te]=se.real,U[te]=se.imag}else{var we=this.bufferSync(this.data.get(e.dataId).complexTensors.real),Ce=this.bufferSync(this.data.get(r.dataId).complexTensors.real),me=function(Se){var Re=s.indexToLoc(Se),Ue=Re.slice(-e.rank);A.forEach(function(Ze){return Ue[Ze]=0});var We=we.locToIndex(Ue),Ne=Re.slice(-r.rank);T.forEach(function(Ze){return Ne[Ze]=0});var Le=Ce.locToIndex(Ne),$e=i(l[2*We],l[2*We+1],d[2*Le],d[2*Le+1]);D[Se]=$e.real,U[Se]=$e.imag};for(te=0;te<D.length;te++)me(te)}return this.complex(s.toTensor(),u.toTensor())},t.prototype.split=function(e,r,i){return wc(e,r,i)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.epsilon=function(){return 1e-7},t.prototype.cropAndResize=function(e,r,i,a,s,u){for(var l=e.shape,d=l[0],A=l[1],T=l[2],D=l[3],U=r.shape[0],te=a[0],oe=a[1],ae=Nt([U,te,oe,D],"float32"),se=this.readSync(r.dataId),we=this.readSync(i.dataId),Ce=this.readSync(e.dataId),me=e.strides,Se=ae.strides,Re=0;Re<U;Re++){var Ue=4*Re,We=se[Ue],Ne=se[Ue+1],Le=se[Ue+2],$e=se[Ue+3],Ze=we[Re];if(!(Ze>=d))for(var et=te>1?(Le-We)*(A-1)/(te-1):0,tt=oe>1?($e-Ne)*(T-1)/(oe-1):0,st=0;st<te;st++){var pt=te>1?We*(A-1)+st*et:.5*(We+Le)*(A-1);if(pt<0||pt>A-1)for(var ct=0;ct<oe;ct++)for(var lt=0;lt<D;lt++){var mt=lt+ct*Se[2]+st*Se[1]+Re*Se[0];ae.values[mt]=u}else if(s==="bilinear"){var ut=Math.floor(pt),yt=Math.ceil(pt),At=pt-ut;for(ct=0;ct<oe;ct++)if((rr=oe>1?Ne*(T-1)+ct*tt:.5*(Ne+$e)*(T-1))<0||rr>T-1)for(lt=0;lt<D;lt++)mt=lt+ct*Se[2]+st*Se[1]+Re*Se[0],ae.values[mt]=u;else{var St=Math.floor(rr),Ft=Math.ceil(rr),Ht=rr-St;for(lt=0;lt<D;lt++){var $t=Ce[mt=lt+St*me[2]+ut*me[1]+Ze*me[0]],ir=Ce[mt=lt+Ft*me[2]+ut*me[1]+Ze*me[0]],tr=Ce[mt=lt+St*me[2]+yt*me[1]+Ze*me[0]],ar=$t+(ir-$t)*Ht,qt=tr+(Ce[mt=lt+Ft*me[2]+yt*me[1]+Ze*me[0]]-tr)*Ht;mt=lt+ct*Se[2]+st*Se[1]+Re*Se[0],ae.values[mt]=ar+(qt-ar)*At}}}else for(ct=0;ct<oe;++ct){var rr;if((rr=oe>1?Ne*(T-1)+ct*tt:.5*(Ne+$e)*(T-1))<0||rr>T-1)for(lt=0;lt<D;lt++)mt=lt+ct*Se[2]+st*Se[1]+Re*Se[0],ae.values[mt]=u;else{var Er=Math.round(rr),vr=Math.round(pt);for(lt=0;lt<D;lt++){var Wr=lt+Er*me[2]+vr*me[1]+Ze*me[0],an=lt+ct*Se[2]+st*Se[1]+Re*Se[0];ae.values[an]=Ce[Wr]}}}}}return ae.toTensor()},t.prototype.sparseToDense=function(e,r,i,a){var s=Ji(0,e,i),u=s.sliceRank,l=s.numUpdates,d=s.sliceSize,A=s.strides,T=s.outputSize;return this.scatter(e,r,i,T,d,l,u,A,a,!1)},t.prototype.gatherND=function(e,r){var i=r.shape,a=i[i.length-1],s=Ba(e,r),u=s[0],l=s[1],d=s[2],A=s[3];if(l===0)return Mt([],u,e.dtype);for(var T=new Cr([l,d],e.dtype),D=this.readSync(r.dataId),U=this.readSync(e.dataId),te=0;te<l;te++){for(var oe=[],ae=0,se=0;se<a;se++){var we=D[te*a+se];ae+=we*A[se],oe.push(we)}if(ae<0||ae>=e.size/d)throw new Error("Invalid indices: "+oe+" does not index into "+e.shape);for(var Ce=0;Ce<d;Ce++)T.values[te*d+Ce]=U[ae*d+Ce]}return T.toTensor().reshape(u)},t.prototype.scatterND=function(e,r,i){var a=Ji(0,e,i),s=a.sliceRank,u=a.numUpdates,l=a.sliceSize,d=a.strides,A=a.outputSize,T=wt(0);return this.scatter(e,r,i,A,l,u,s,d,T,!0)},t.prototype.fill=function(e,r,i){var a=Q(i=i||Je(r),le(e));return a.fill(r),Ge.makeTensor(a,e,i,this)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported for string tensors");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){var r=Q(e.dtype,le(e.shape));return this.makeOutput(r,e.shape,e.dtype)},t.prototype.linspace=function(e,r,i){return Dt(e,r,i)},t.prototype.scatter=function(e,r,i,a,s,u,l,d,A,T){var D=[a/s,s],U=this.readSync(e.dataId),te=this.readSync(r.dataId);if(a===0)return Mt([],i,r.dtype);var oe=new Cr(D,r.dtype);oe.values.fill(this.readSync(A.dataId)[0]);for(var ae=0;ae<u;ae++){for(var se=[],we=0,Ce=0;Ce<l;Ce++){var me=U[ae*l+Ce];se.push(me),we+=me*d[Ce]}if(we<0||we>=a/s)throw new Error("Invalid indices: "+se+" does not index into "+i);for(var Se=0;Se<s;Se++)T?oe.values[we*s+Se]+=te[ae*s+Se]:oe.values[we*s+Se]=r.rank===0?te[0]:te[ae*s+Se]}return oe.toTensor().reshape(i)},t}(Lo);Ge.registerBackend("cpu",function(){return new Eg},1);for(var ll=0,Yf=[{kernelName:"NonMaxSuppressionV5",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t,a=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,d=u.iouThreshold,A=u.scoreThreshold,T=u.softNmsSigma,D=e;ht(a,"NonMaxSuppressionWithScore");var U=_u(D.data.get(a.dataId).values,D.data.get(s.dataId).values,l,d,A,T);return[U.selectedIndices,U.selectedScores]}},{kernelName:"Square",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e;ht(r,"square");for(var a=i.data.get(r.dataId).values,s=new Float32Array(a.length),u=0;u<a.length;++u){var l=a[u];s[u]=l*l}return{dataId:i.write(s,r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},{kernelName:As,backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,a=r.b,s=e;ht([i,a],As);var u=s.data.get(i.dataId).values,l=s.data.get(a.dataId).values,d=function(D,U,te,oe,ae,se){var we=Zt(D,U),Ce=we.length,me=Be(we),Se=H(ae,le(we)),Re=D.length,Ue=U.length,We=Be(D),Ne=Be(U),Le=ui(D,we),$e=ui(U,we);if(Le.length+$e.length===0)for(var Ze=0;Ze<Se.length;++Ze)Se[Ze]=se(te[Ze%te.length],oe[Ze%oe.length]);else{var et=function(tt){var st=jt(tt,Ce,me),pt=st.slice(-Re);Le.forEach(function(ut){return pt[ut]=0});var ct=Ct(pt,Re,We),lt=st.slice(-Ue);$e.forEach(function(ut){return lt[ut]=0});var mt=Ct(lt,Ue,Ne);Se[tt]=se(te[ct],oe[mt])};for(Ze=0;Ze<Se.length;++Ze)et(Ze)}return[Se,we]}(i.shape,a.shape,u,l,i.dtype,function(D,U){var te=D-U;return te*te}),A=d[0],T=d[1];return{dataId:s.write(A,T,i.dtype),shape:T,dtype:i.dtype}}}];ll<Yf.length;ll++)z(Yf[ll]);for(var Go,Cg=function(n){this.variableNames=["A"];var t=Un(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
int texR = coords[0];
|
|
int texC = coords[1];
|
|
int depth = coords[2];
|
|
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+r+".0, "+e+`.0);
|
|
|
|
vec4 values = `+t.texture2D+`(A, uv);
|
|
float value;
|
|
if (depth == 0) {
|
|
value = values.r;
|
|
} else if (depth == 1) {
|
|
value = values.g;
|
|
} else if (depth == 2) {
|
|
value = values.b;
|
|
} else if (depth == 3) {
|
|
value = values.a;
|
|
}
|
|
|
|
setOutput(floor(value * 255.0 + 0.5));
|
|
}
|
|
`},Sg=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=Un(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
int texR = coords[0];
|
|
int texC = coords[1];
|
|
int depth = coords[2];
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
for(int row=0; row<=1; row++) {
|
|
for(int col=0; col<=1; col++) {
|
|
texC = coords[1] + row;
|
|
depth = coords[2] + col;
|
|
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+r+".0, "+e+`.0);
|
|
vec4 values = `+t.texture2D+`(A, uv);
|
|
float value;
|
|
if (depth == 0) {
|
|
value = values.r;
|
|
} else if (depth == 1) {
|
|
value = values.g;
|
|
} else if (depth == 2) {
|
|
value = values.b;
|
|
} else if (depth == 3) {
|
|
value = values.a;
|
|
}
|
|
|
|
result[row * 2 + col] = floor(value * 255.0 + 0.5);
|
|
}
|
|
}
|
|
|
|
`+t.output+` = result;
|
|
}
|
|
`},cl=0,$f=[{kernelName:"FromPixels",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t.pixels,a=r.numChannels,s=typeof HTMLVideoElement!="undefined"&&i instanceof HTMLVideoElement,u=typeof HTMLImageElement!="undefined"&&i instanceof HTMLImageElement,l=s?[i.videoWidth,i.videoHeight]:[i.width,i.height],d=l[0],A=l[1],T=[A,d],D=[A,d,a];(u||s)&&(Go==null&&(Go=document.createElement("canvas").getContext("2d")),Go.canvas.width=d,Go.canvas.height=A,Go.drawImage(i,0,0,d,A),i=Go.canvas);var U=e.makeTensorInfo(T,"int32");e.texData.get(U.dataId).usage=Cn.PIXELS,e.gpgpu.uploadPixelDataToTexture(e.getTexture(U.dataId),i);var te=P().getBool("WEBGL_PACK")?new Sg(D):new Cg(D),oe=e.runWebGLProgram(te,[U],"int32");return e.disposeData(U.dataId),oe}},{kernelName:"NonMaxSuppressionV5",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs;$r("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");var i=t,a=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,d=u.iouThreshold,A=u.scoreThreshold,T=u.softNmsSigma,D=e,U=_u(D.readSync(a.dataId),D.readSync(s.dataId),l,d,A,T);return[U.selectedIndices,U.selectedScores]}},{kernelName:"Square",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e,a=new Jt(r.shape,"return x * x;");return i.runWebGLProgram(a,[r],r.dtype)}},{kernelName:As,backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,a=r.b,s=e,u=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new ma("return (a - b) * (a - b);",i.shape,a.shape):new ln("return (a - b) * (a - b);",i.shape,a.shape);return s.compileAndRun(u,[i,a])}}];cl<$f.length;cl++)z($f[cl]);for(var fl=0,qf=[{kernelName:"Square",gradFunc:function(n,t){var e=t[0];return{x:function(){return n.mul(e.toFloat().mul(2))}}}},{kernelName:As,gradFunc:function(n,t){var e=t[0],r=t[1],i=wt(2);return{a:function(){return Wn(n,Wn(i,xn(e,r)))},b:function(){return Wn(n,Wn(i,xn(r,e)))}}}}];fl<qf.length;fl++)F(qf[fl]);var Ig=function(){function n(){}return n.prototype.fetch=function(t,e){return fetch(t,e)},n.prototype.now=function(){return performance.now()},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Browser's encoder only supports utf-8, but got "+e);return this.textEncoder==null&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return new TextDecoder(e).decode(t)},n}();P().get("IS_BROWSER")&&P().setPlatform("browser",new Ig);var dl,Tg=function(){return je(40522)},Rg=function(){function n(){this.util=je(90753),this.textEncoder=new this.util.TextEncoder}return n.prototype.fetch=function(t,e){return P().global.fetch!=null?P().global.fetch(t,e):(dl==null&&(dl=Tg()),dl(t,e))},n.prototype.now=function(){var t=y.hrtime();return 1e3*t[0]+t[1]/1e6},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Node built-in encoder only supports utf-8, but got "+e);return this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return t.length===0?"":new this.util.TextDecoder(e).decode(t)},n}();P().get("IS_NODE")&&P().setPlatform("node",new Rg);var pl={float32:4,int32:4,uint16:2,uint8:1,bool:1},du=4;function ed(n,t){for(var e={},r=0,i=function(u){var l=u.name,d=u.dtype,A=u.shape,T=le(A),D=void 0;if("quantization"in u){var U=u.quantization;if(U.dtype!=="uint8"&&U.dtype!=="uint16")throw new Error("Weight "+u.name+" has unknown quantization dtype "+U.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var te=pl[U.dtype],oe=n.slice(r,r+T*te),ae=U.dtype==="uint8"?new Uint8Array(oe):new Uint16Array(oe);if(d==="float32")D=Float32Array.from(ae,function(Re){return Re*U.scale+U.min});else{if(d!=="int32")throw new Error("Unsupported dtype in weight '"+l+"': "+d);D=Int32Array.from(ae,function(Re){return Math.round(Re*U.scale+U.min)})}r+=T*te}else if(d==="string"){var se=le(u.shape);D=[];for(var we=0;we<se;we++){var Ce=new Uint32Array(n.slice(r,r+du))[0];r+=du;var me=new Uint8Array(n.slice(r,r+Ce));D.push(me),r+=Ce}}else{var Se=pl[d];if(oe=n.slice(r,r+T*Se),d==="float32")D=new Float32Array(oe);else if(d==="int32")D=new Int32Array(oe);else{if(d!=="bool")throw new Error("Unsupported dtype in weight '"+l+"': "+d);D=new Uint8Array(oe)}r+=T*Se}e[l]=Mt(D,A,d)},a=0,s=t;a<s.length;a++)i(s[a]);return e}function kg(n){if(n===null)throw new Error("Invalid input value: "+JSON.stringify(n));var t=0,e=[];n.forEach(function(a){if(t+=a.byteLength,e.push(a.byteLength===a.buffer.byteLength?a:new a.constructor(a)),!(a instanceof Float32Array||a instanceof Int32Array||a instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+a.constructor.name)});var r=new Uint8Array(t),i=0;return e.forEach(function(a){r.set(new Uint8Array(a.buffer),i),i+=a.byteLength}),r.buffer}var hl=typeof x!="undefined"&&(typeof Blob=="undefined"||typeof atob=="undefined"||typeof btoa=="undefined");function td(n){return hl?x.byteLength(n):new Blob([n]).size}function vl(n){var t=0;n.forEach(function(i){t+=i.byteLength});var e=new Uint8Array(t),r=0;return n.forEach(function(i){e.set(new Uint8Array(i),r),r+=i.byteLength}),e.buffer}function rd(n){for(n=n.trim();n.endsWith("/");)n=n.slice(0,n.length-1);var t=n.split("/");return t[t.length-1]}function Ss(n){if(n.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:n.modelTopology==null?0:td(JSON.stringify(n.modelTopology)),weightSpecsBytes:n.weightSpecs==null?0:td(JSON.stringify(n.weightSpecs)),weightDataBytes:n.weightData==null?0:n.weightData.byteLength}}var mi=function(){function n(){this.saveRouters=[],this.loadRouters=[]}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerSaveRouter=function(t){n.getInstance().saveRouters.push(t)},n.registerLoadRouter=function(t){n.getInstance().loadRouters.push(t)},n.getSaveHandlers=function(t){return n.getHandlers(t,"save")},n.getLoadHandlers=function(t,e){return n.getHandlers(t,"load",e)},n.getHandlers=function(t,e,r){var i=[];return(e==="load"?n.getInstance().loadRouters:n.getInstance().saveRouters).forEach(function(a){var s=a(t,r);s!==null&&i.push(s)}),i},n}(),Xo="://",Ua=function(){function n(){this.managers={}}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerManager=function(t,e){Z(t!=null,function(){return"scheme must not be undefined or null."}),t.endsWith(Xo)&&(t=t.slice(0,t.indexOf(Xo))),Z(t.length>0,function(){return"scheme must not be an empty string."});var r=n.getInstance();Z(r.managers[t]==null,function(){return"A model store manager is already registered for scheme '"+t+"'."}),r.managers[t]=e},n.getManager=function(t){var e=this.getInstance().managers[t];if(e==null)throw new Error("Cannot find model manager for scheme '"+t+"'");return e},n.getSchemes=function(){return Object.keys(this.getInstance().managers)},n}();function pu(n){if(n.indexOf(Xo)===-1)throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+Ua.getSchemes().join(","));return{scheme:n.split(Xo)[0],path:n.split(Xo)[1]}}function nd(n,t,e){return e===void 0&&(e=!1),C(this,void 0,void 0,function(){var r,i,a,s,u,l,d,A,T;return E(this,function(D){switch(D.label){case 0:return Z(n!==t,function(){return"Old path and new path are the same: '"+n+"'"}),Z((r=mi.getLoadHandlers(n)).length>0,function(){return"Copying failed because no load handler is found for source URL "+n+"."}),Z(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+n+"."}),i=r[0],Z((a=mi.getSaveHandlers(t)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+t+"."}),Z(a.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+t+"."}),s=a[0],u=pu(n).scheme,l=pu(n).path,d=u===pu(n).scheme,[4,i.load()];case 1:return A=D.sent(),e&&d?[4,Ua.getManager(u).removeModel(l)]:[3,3];case 2:D.sent(),D.label=3;case 3:return[4,s.save(A)];case 4:return T=D.sent(),!e||d?[3,6]:[4,Ua.getManager(u).removeModel(l)];case 5:D.sent(),D.label=6;case 6:return[2,T.modelArtifactsInfo]}})})}var mo="models_store",Wa="model_info_store";function id(){if(!P().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var n=window||self,t=n.indexedDB||n.mozIndexedDB||n.webkitIndexedDB||n.msIndexedDB||n.shimIndexedDB;if(t==null)throw new Error("The current browser does not appear to support IndexedDB.");return t}function ml(n){var t=n.result;t.createObjectStore(mo,{keyPath:"modelPath"}),t.createObjectStore(Wa,{keyPath:"modelPath"})}var Ko=function(){function n(t){if(this.indexedDB=id(),t==null||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){return E(this,function(e){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,t)]})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){return E(this,function(t){return[2,this.databaseAction(this.modelPath)]})})},n.prototype.databaseAction=function(t,e){var r=this;return new Promise(function(i,a){var s=r.indexedDB.open("tensorflowjs",1);s.onupgradeneeded=function(){return ml(s)},s.onsuccess=function(){var u=s.result;if(e==null){var l=u.transaction(mo,"readonly"),d=l.objectStore(mo).get(r.modelPath);d.onsuccess=function(){if(d.result==null)return u.close(),a(new Error("Cannot find model with path '"+r.modelPath+"' in IndexedDB."));i(d.result.modelArtifacts)},d.onerror=function(oe){return u.close(),a(d.error)},l.oncomplete=function(){return u.close()}}else{var A,T=Ss(e),D=u.transaction(Wa,"readwrite"),U=D.objectStore(Wa),te=U.put({modelPath:r.modelPath,modelArtifactsInfo:T});te.onsuccess=function(){var oe=(A=u.transaction(mo,"readwrite")).objectStore(mo).put({modelPath:r.modelPath,modelArtifacts:e,modelArtifactsInfo:T});oe.onsuccess=function(){return i({modelArtifactsInfo:T})},oe.onerror=function(ae){var se=(U=D.objectStore(Wa)).delete(r.modelPath);se.onsuccess=function(){return u.close(),a(oe.error)},se.onerror=function(we){return u.close(),a(oe.error)}}},te.onerror=function(oe){return u.close(),a(te.error)},D.oncomplete=function(){A==null?u.close():A.oncomplete=function(){return u.close()}}}},s.onerror=function(u){return a(s.error)}})},n.URL_SCHEME="indexeddb://",n}(),ad=function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Ko.URL_SCHEME)?(t=n.slice(Ko.URL_SCHEME.length),new Ko(t)):null;var t};mi.registerSaveRouter(ad),mi.registerLoadRouter(ad);var Og=function(){function n(){this.indexedDB=id()}return n.prototype.listModels=function(){return C(this,void 0,void 0,function(){var t=this;return E(this,function(e){return[2,new Promise(function(r,i){var a=t.indexedDB.open("tensorflowjs",1);a.onupgradeneeded=function(){return ml(a)},a.onsuccess=function(){var s=a.result,u=s.transaction(Wa,"readonly"),l=u.objectStore(Wa).getAll();l.onsuccess=function(){for(var d={},A=0,T=l.result;A<T.length;A++){var D=T[A];d[D.modelPath]=D.modelArtifactsInfo}r(d)},l.onerror=function(d){return s.close(),i(l.error)},u.oncomplete=function(){return s.close()}},a.onerror=function(s){return i(a.error)}})]})})},n.prototype.removeModel=function(t){return C(this,void 0,void 0,function(){var e=this;return E(this,function(r){var i;return t=(i=t).startsWith(Ko.URL_SCHEME)?i.slice(Ko.URL_SCHEME.length):i,[2,new Promise(function(a,s){var u=e.indexedDB.open("tensorflowjs",1);u.onupgradeneeded=function(){return ml(u)},u.onsuccess=function(){var l,d=u.result,A=d.transaction(Wa,"readwrite"),T=A.objectStore(Wa),D=T.get(t);D.onsuccess=function(){if(D.result==null)return d.close(),s(new Error("Cannot find model with path '"+t+"' in IndexedDB."));var U=T.delete(t),te=function(){var oe=(l=d.transaction(mo,"readwrite")).objectStore(mo).delete(t);oe.onsuccess=function(){return a(D.result.modelArtifactsInfo)},oe.onerror=function(ae){return s(D.error)}};U.onsuccess=te,U.onerror=function(oe){return te(),d.close(),s(D.error)}},D.onerror=function(U){return d.close(),s(D.error)},A.oncomplete=function(){l==null?d.close():l.oncomplete=function(){return d.close()}}},u.onerror=function(l){return s(u.error)}})]})})},n}();if(P().getBool("IS_BROWSER"))try{Ua.registerManager(Ko.URL_SCHEME,new Og)}catch(n){}var ya="/",Zo="tensorflowjs_models",od="info",Dg="model_topology",jg="weight_specs",Pg="weight_data",Bg="model_metadata";function sd(n){return{info:[Zo,n,od].join(ya),topology:[Zo,n,Dg].join(ya),weightSpecs:[Zo,n,jg].join(ya),weightData:[Zo,n,Pg].join(ya),modelMetadata:[Zo,n,Bg].join(ya)}}function _g(n){var t=n.split(ya);if(t.length<3)throw new Error("Invalid key format: "+n);return t.slice(1,t.length-1).join(ya)}var Jo=function(){function n(t){if(!P().getBool("IS_BROWSER")||typeof window=="undefined"||window.localStorage===void 0)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,t==null||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=sd(this.modelPath)}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i;return E(this,function(a){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(t.modelTopology),r=JSON.stringify(t.weightSpecs),i=Ss(t);try{return this.LS.setItem(this.keys.info,JSON.stringify(i)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,r),this.LS.setItem(this.keys.weightData,function(s){if(hl)return x.from(s).toString("base64");for(var u=new Uint8Array(s),l="",d=0,A=u.length;d<A;d++)l+=String.fromCharCode(u[d]);return btoa(l)}(t.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata})),[2,{modelArtifactsInfo:i}]}catch(s){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+i.modelTopologyBytes+", weightSpecsBytes="+i.weightSpecsBytes+", weightDataBytes="+i.weightDataBytes+".")}return[2]})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s,u;return E(this,function(l){if((t=JSON.parse(this.LS.getItem(this.keys.info)))==null)throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if(t.modelTopologyType!=="JSON")throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(e={},(r=JSON.parse(this.LS.getItem(this.keys.topology)))==null)throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(e.modelTopology=r,(i=JSON.parse(this.LS.getItem(this.keys.weightSpecs)))==null)throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(e.weightSpecs=i,(a=this.LS.getItem(this.keys.modelMetadata))!=null&&(s=JSON.parse(a),e.format=s.format,e.generatedBy=s.generatedBy,e.convertedBy=s.convertedBy,e.userDefinedMetadata=s.userDefinedMetadata),(u=this.LS.getItem(this.keys.weightData))==null)throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return e.weightData=function(d){if(hl){var A=x.from(d,"base64");return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)}for(var T=atob(d),D=new Uint8Array(T.length),U=0;U<T.length;++U)D.set([T.charCodeAt(U)],U);return D.buffer}(u),[2,e]})})},n.URL_SCHEME="localstorage://",n}(),ud=function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Jo.URL_SCHEME)?(t=n.slice(Jo.URL_SCHEME.length),new Jo(t)):null;var t};mi.registerSaveRouter(ud),mi.registerLoadRouter(ud);var Mg=function(){function n(){Z(P().getBool("IS_BROWSER"),function(){return"Current environment is not a web browser"}),Z(typeof window=="undefined"||window.localStorage!==void 0,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return n.prototype.listModels=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s;return E(this,function(u){for(t={},e=Zo+ya,r=ya+od,i=0;i<this.LS.length;++i)(a=this.LS.key(i)).startsWith(e)&&a.endsWith(r)&&(s=_g(a),t[s]=JSON.parse(this.LS.getItem(a)));return[2,t]})})},n.prototype.removeModel=function(t){return C(this,void 0,void 0,function(){var e,r;return E(this,function(i){var a;if(t=(a=t).startsWith(Jo.URL_SCHEME)?a.slice(Jo.URL_SCHEME.length):a,e=sd(t),this.LS.getItem(e.info)==null)throw new Error("Cannot find model at path '"+t+"'");return r=JSON.parse(this.LS.getItem(e.info)),this.LS.removeItem(e.info),this.LS.removeItem(e.topology),this.LS.removeItem(e.weightSpecs),this.LS.removeItem(e.weightData),[2,r]})})},n}();if(P().getBool("IS_BROWSER"))try{Ua.registerManager(Jo.URL_SCHEME,new Mg)}catch(n){}var Ng="model",Fg=".json",Lg=".weights.bin";function ld(n){return new Promise(function(t){return setTimeout(t)}).then(n)}var gl=function(){function n(t){if(!P().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(n.URL_SCHEME)&&(t=t.slice(n.URL_SCHEME.length)),t!=null&&t.length!==0||(t=Ng),this.modelTopologyFileName=t+Fg,this.weightDataFileName=t+Lg}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u;return E(this,function(l){switch(l.label){case 0:if(typeof document=="undefined")throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(e=window.URL.createObjectURL(new Blob([t.weightData],{type:"application/octet-stream"})),!(t.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return r=[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:r},a=window.URL.createObjectURL(new Blob([JSON.stringify(i)],{type:"application/json"})),(s=this.jsonAnchor==null?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,s.href=a,[4,ld(function(){return s.dispatchEvent(new MouseEvent("click"))})];case 2:return l.sent(),t.weightData==null?[3,4]:((u=this.weightDataAnchor==null?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,u.href=e,[4,ld(function(){return u.dispatchEvent(new MouseEvent("click"))})]);case 3:l.sent(),l.label=4;case 4:return[2,{modelArtifactsInfo:Ss(t)}]}})})},n.URL_SCHEME="downloads://",n}(),Ug=function(){function n(t){if(t==null||t.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+t);this.files=t}return n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r=this;return E(this,function(i){return t=this.files[0],e=this.files.slice(1),[2,new Promise(function(a,s){var u=new FileReader;u.onload=function(l){var d=JSON.parse(l.target.result),A=d.modelTopology;if(A!=null){e.length===0&&a({modelTopology:A});var T=d.weightsManifest;if(T!=null){var D;try{D=r.checkManifestAndWeightFiles(T,e)}catch(ae){return void s(ae)}var U=[],te=[],oe=[];T.forEach(function(ae){ae.paths.forEach(function(se){te.push(se),oe.push(null)}),U.push.apply(U,ae.weights)}),T.forEach(function(ae){ae.paths.forEach(function(se){var we=new FileReader;we.onload=function(Ce){var me=Ce.target.result,Se=te.indexOf(se);oe[Se]=me,oe.indexOf(null)===-1&&a({modelTopology:A,weightSpecs:U,weightData:vl(oe),format:d.format,generatedBy:d.generatedBy,convertedBy:d.convertedBy,userDefinedMetadata:d.userDefinedMetadata})},we.onerror=function(Ce){return s("Failed to weights data from file of path '"+se+"'.")},we.readAsArrayBuffer(D[se])})})}else s(new Error("weightManifest field is missing from file "+t.name))}else s(new Error("modelTopology field is missing from file "+t.name))},u.onerror=function(l){return s("Failed to read model topology and weights manifest JSON from file '"+t.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},u.readAsText(t)})]})})},n.prototype.checkManifestAndWeightFiles=function(t,e){for(var r=[],i=e.map(function(l){return rd(l.name)}),a={},s=0,u=t;s<u.length;s++)u[s].paths.forEach(function(l){var d=rd(l);if(r.indexOf(d)!==-1)throw new Error("Duplicate file basename found in weights manifest: '"+d+"'");if(r.push(d),i.indexOf(d)===-1)throw new Error("Weight file with basename '"+d+"' is not provided.");a[l]=e[i.indexOf(d)]});if(r.length!==e.length)throw new Error("Mismatch in the number of files in weights manifest ("+r.length+") and the number of weight files provided ("+e.length+").");return a},n}();function cd(n,t,e,r){(function(a){Z(a!=null&&Array.isArray(a)&&a.length>0,function(){return"promises must be a none empty array"})})(n),function(a,s){Z(a>=0&&a<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+a}),Z(s>=0&&s<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+s}),Z(s>=a,function(){return"startFraction must be no more than endFraction, but got startFraction "+a+" and endFraction "+s})}(e=e==null?0:e,r=r==null?1:r);var i=0;return Promise.all(n.map(function(a){return a.then(function(s){var u=e+ ++i/n.length*(r-e);return t(u),s}),a}))}function fd(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A;return E(this,function(T){switch(T.label){case 0:return t==null&&(t={}),e=t.fetchFunc==null?P().platform.fetch:t.fetchFunc,r=n.map(function(D){return e(D,t.requestInit,{isBinary:!0})}),i=0,a=.5,t.onProgress!=null?[3,2]:[4,Promise.all(r)];case 1:return s=T.sent(),[3,4];case 2:return[4,cd(r,t.onProgress,i,a)];case 3:s=T.sent(),T.label=4;case 4:return u=s.map(function(D){return D.arrayBuffer()}),l=.5,d=1,t.onProgress!=null?[3,6]:[4,Promise.all(u)];case 5:return A=T.sent(),[3,8];case 6:return[4,cd(u,t.onProgress,l,d)];case 7:A=T.sent(),T.label=8;case 8:return[2,A]}})})}function dd(n){var t=this;return function(e,r,i){return r===void 0&&(r=""),C(t,void 0,void 0,function(){var a,s,u,l,d,A,T,D,U,te;return E(this,function(oe){switch(oe.label){case 0:if(a=e.map(function(){return!1}),s={},u=i!=null?i.map(function(){return!1}):[],l=[],e.forEach(function(ae,se){var we=0;ae.weights.forEach(function(Ce){var me="quantization"in Ce?Ce.quantization.dtype:Ce.dtype,Se=pl[me]*le(Ce.shape),Re=function(){a[se]=!0,s[se]==null&&(s[se]=[]),s[se].push({manifestEntry:Ce,groupOffset:we,sizeBytes:Se})};i!=null?i.forEach(function(Ue,We){Ue===Ce.name&&(Re(),u[We]=!0)}):Re(),l.push(Ce.name),we+=Se})}),!u.every(function(ae){return ae}))throw d=i.filter(function(ae,se){return!u[se]}),new Error("Could not find weights in manifest with names: "+d.join(", ")+`.
|
|
Manifest JSON has weights with names: `+l.join(", ")+".");return A=a.reduce(function(ae,se,we){return se&&ae.push(we),ae},[]),T=[],A.forEach(function(ae){e[ae].paths.forEach(function(se){var we=r+(r.endsWith("/")?"":"/")+se;T.push(we)})}),[4,n(T)];case 1:return D=oe.sent(),U={},te=0,A.forEach(function(ae){for(var se=e[ae].paths.length,we=0,Ce=0;Ce<se;Ce++)we+=D[te+Ce].byteLength;for(var me=new ArrayBuffer(we),Se=new Uint8Array(me),Re=0,Ue=0;Ue<se;Ue++){var We=new Uint8Array(D[te+Ue]);Se.set(We,Re),Re+=We.byteLength}s[ae].forEach(function(Ne){var Le=ed(me.slice(Ne.groupOffset,Ne.groupOffset+Ne.sizeBytes),[Ne.manifestEntry]);for(var $e in Le)U[$e]=Le[$e]}),te+=se}),[2,U]}})})}}mi.registerSaveRouter(function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(gl.URL_SCHEME)?function(t){return t===void 0&&(t="model"),new gl(t)}(n.slice(gl.URL_SCHEME.length)):null});var pd=function(){function n(t,e){if(this.DEFAULT_METHOD="POST",e==null&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.onProgress=e.onProgress,e.fetchFunc!=null?(Z(typeof e.fetchFunc=="function",function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"}),this.fetch=e.fetchFunc):this.fetch=P().platform.fetch,Z(t!=null&&t.length>0,function(){return"URL path for http must not be null, undefined or empty."}),Array.isArray(t)&&Z(t.length===2,function(){return"URL paths for http must have a length of 2, (actual length is "+t.length+")."}),this.path=t,e.requestInit!=null&&e.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i,a;return E(this,function(s){switch(s.label){case 0:if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,r=[{paths:["./model.weights.bin"],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata,weightsManifest:r},e.body.append("model.json",new Blob([JSON.stringify(i)],{type:"application/json"}),"model.json"),t.weightData!=null&&e.body.append("model.weights.bin",new Blob([t.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,e)];case 1:if((a=s.sent()).ok)return[2,{modelArtifactsInfo:Ss(t),responses:[a]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+a.status+".")}})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s,u,l,d,A,T,D;return E(this,function(U){switch(U.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(t=U.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+t.status+". Please verify this URL points to the model JSON of the model to load.");U.label=2;case 2:return U.trys.push([2,4,,5]),[4,t.json()];case 3:return e=U.sent(),[3,5];case 4:throw U.sent(),r="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?r+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":r+=" Please make sure the server is serving valid JSON for this request.",new Error(r);case 5:if(i=e.modelTopology,a=e.weightsManifest,s=e.generatedBy,u=e.convertedBy,l=e.format,d=e.userDefinedMetadata,i==null&&a==null)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return a==null?[3,7]:[4,this.loadWeights(a)];case 6:D=U.sent(),A=D[0],T=D[1],U.label=7;case 7:return[2,{modelTopology:i,weightSpecs:A,weightData:T,userDefinedMetadata:d,generatedBy:s,convertedBy:u,format:l}]}})})},n.prototype.loadWeights=function(t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,T,D;return E(this,function(U){switch(U.label){case 0:for(e=Array.isArray(this.path)?this.path[1]:this.path,r=function(te){var oe=te.lastIndexOf("/"),ae=te.lastIndexOf("?"),se=te.substring(0,oe),we=ae>oe?te.substring(ae):"";return[se+"/",we]}(e),i=r[0],a=r[1],s=this.weightPathPrefix||i,u=[],l=0,d=t;l<d.length;l++)A=d[l],u.push.apply(u,A.weights);return T=[],t.forEach(function(te){te.paths.forEach(function(oe){T.push(s+oe+a)})}),[4,fd(T,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress})];case 1:return D=U.sent(),[2,[u,vl(D)]]}})})},n.URL_SCHEME_REGEX=/^https?:\/\//,n}();function yl(n){return n.match(pd.URL_SCHEME_REGEX)!=null}var hd=function(n,t){return typeof fetch=="undefined"?null:(Array.isArray(n)?n.every(function(e){return yl(e)}):yl(n))?bl(n,{onProgress:t}):null};function bl(n,t){return new pd(n,t)}mi.registerSaveRouter(hd),mi.registerLoadRouter(hd);var wl=function(){function n(t){this.modelArtifacts=t}return n.prototype.load=function(){return C(this,void 0,void 0,function(){return E(this,function(t){return[2,this.modelArtifacts]})})},n}(),Wg=function(){function n(t){this.saveHandler=t}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){return E(this,function(e){return[2,this.saveHandler(t)]})})},n}(),vd=Object.freeze({browserFiles:function(n){return new Ug(n)},browserHTTPRequest:function(n,t){return bl(n,t)},concatenateArrayBuffers:vl,decodeWeights:ed,encodeWeights:function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u=this;return E(this,function(l){switch(l.label){case 0:for(e=[],r=[],i=Array.isArray(n)?n.map(function(d){return d.name}):Object.keys(n),a=function(d){var A=i[d],T=Array.isArray(n)?n[d].tensor:n[A];if(T.dtype!=="float32"&&T.dtype!=="int32"&&T.dtype!=="bool"&&T.dtype!=="string")throw new Error("Unsupported dtype in weight '"+A+"': "+T.dtype);var D={name:A,shape:T.shape,dtype:T.dtype};if(T.dtype==="string"){var U=new Promise(function(te){return C(u,void 0,void 0,function(){var oe,ae,se,we,Ce,me,Se;return E(this,function(Re){switch(Re.label){case 0:return[4,T.bytes()];case 1:for(oe=Re.sent(),ae=oe.reduce(function(Ue,We){return Ue+We.length},0)+du*oe.length,se=new Uint8Array(ae),we=0,Ce=0;Ce<oe.length;Ce++)me=oe[Ce],Se=new Uint8Array(new Uint32Array([me.length]).buffer),se.set(Se,we),we+=du,se.set(me,we),we+=me.length;return te(se),[2]}})})});r.push(U)}else r.push(T.data());t!=null&&(D.group=t),e.push(D)},s=0;s<i.length;++s)a(s);return[4,Promise.all(r)];case 1:return[2,{data:kg(l.sent()),specs:e}]}})})},fromMemory:function(n,t,e,r){return arguments.length===1?n.modelTopology!=null||n.weightSpecs!=null?new wl(n):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new wl({modelTopology:n})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new wl({modelTopology:n,weightSpecs:t,weightData:e,trainingConfig:r}))},getLoadHandlers:function(n,t){return mi.getLoadHandlers(n,t)},getModelArtifactsInfoForJSON:Ss,getSaveHandlers:function(n){return mi.getSaveHandlers(n)},http:bl,isHTTPScheme:yl,loadWeights:function(n,t,e,r){return t===void 0&&(t=""),C(this,void 0,void 0,function(){return E(this,function(i){return[2,dd(function(a){return fd(a,{requestInit:r})})(n,t,e)]})})},registerLoadRouter:function(n){return mi.registerLoadRouter(n)},registerSaveRouter:function(n){return mi.registerSaveRouter(n)},weightsLoaderFactory:dd,withSaveHandler:function(n){return new Wg(n)},copyModel:function(n,t){return C(this,void 0,void 0,function(){return E(this,function(e){return[2,nd(n,t,!1)]})})},listModels:function(){return C(this,void 0,void 0,function(){var n,t,e,r,i,a,s;return E(this,function(u){switch(u.label){case 0:n=Ua.getSchemes(),t={},e=0,r=n,u.label=1;case 1:return e<r.length?(i=r[e],[4,Ua.getManager(i).listModels()]):[3,4];case 2:for(s in a=u.sent())t[i+Xo+s]=a[s];u.label=3;case 3:return e++,[3,1];case 4:return[2,t]}})})},moveModel:function(n,t){return C(this,void 0,void 0,function(){return E(this,function(e){return[2,nd(n,t,!0)]})})},removeModel:function(n){return C(this,void 0,void 0,function(){var t;return E(this,function(e){return t=pu(n),[2,Ua.getManager(t.scheme).removeModel(t.path)]})})}}),Yo,zg=Qe({confusionMatrix_:function(n,t,e){var r=ke(n,"labels","confusionMatrix"),i=ke(t,"predictions","confusionMatrix");Z(e==null||e>0&&Number.isInteger(e),function(){return"If provided, numClasses must be a positive integer, but got "+e}),Z(r.rank===1,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),Z(i.rank===1,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),Z(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),Z(e>0&&Number.isInteger(e),function(){return"numClasses is required to be a positive integer, but got "+e});var a=bn(r.asType("int32"),e),s=bn(i.asType("int32"),e);return a.transpose().matMul(s).asType("int32")}}),cb=Object.freeze({confusionMatrix:zg}),Vg=Qe({fromPixels_:function(n,t){if(t===void 0&&(t=3),t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(n==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var e=!1,r=!1,i=!1,a=!1,s=!1;if(n.data instanceof Uint8Array)e=!0;else if(typeof ImageData!="undefined"&&n instanceof ImageData)r=!0;else if(typeof HTMLVideoElement!="undefined"&&n instanceof HTMLVideoElement)i=!0;else if(typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement)a=!0;else{if(n.getContext==null)throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+n.constructor.name);s=!0}if(i&&i&&n.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.");if(j("FromPixels",Ge.backendName)!=null)return Ge.runKernel("FromPixels",{pixels:n},{numChannels:t});var u,l,d=i?[n.videoWidth,n.videoHeight]:[n.width,n.height],A=d[0],T=d[1];if(s?u=n.getContext("2d").getImageData(0,0,A,T).data:r||e?u=n.data:(a||i)&&(Yo==null&&(Yo=document.createElement("canvas").getContext("2d")),Yo.canvas.width=A,Yo.canvas.height=T,Yo.drawImage(n,0,0,A,T),u=Yo.getImageData(0,0,A,T).data),t===4)l=new Int32Array(u);else{var D=A*T;l=new Int32Array(D*t);for(var U=0;U<D;U++)for(var te=0;te<t;++te)l[U*t+te]=u[4*U+te]}return Dn(l,[T,A,t],"int32")}}),Al=Object.freeze({toPixels:function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,T,D,U,te,oe,ae,se,we,Ce,me,Se,Re,Ue,We;return E(this,function(Ne){switch(Ne.label){case 0:if(e=ke(n,"img","toPixels"),n instanceof Wt||(e=e.toInt()),e.rank!==2&&e.rank!==3)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+e.rank+".");if(r=e.shape.slice(0,2),i=r[0],a=r[1],(s=e.rank===2?1:e.shape[2])>4||s===2)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+s);return[4,e.data()];case 1:return u=Ne.sent(),l=e.min(),d=e.max(),[4,Promise.all([l.data(),d.data()])];case 2:if(A=Ne.sent(),T=A[0],D=A[1],U=T[0],te=D[0],l.dispose(),d.dispose(),e.dtype==="float32"){if(U<0||te>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+U+" - "+te+"].")}else{if(e.dtype!=="int32")throw new Error("Unsupported type for toPixels: "+e.dtype+". Please use float32 or int32 tensors.");if(U<0||te>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+U+" - "+te+"].")}for(oe=e.dtype==="float32"?255:1,ae=new Uint8ClampedArray(a*i*4),se=0;se<i*a;++se)we=void 0,Ce=void 0,me=void 0,Se=void 0,s===1?(we=u[se]*oe,Ce=u[se]*oe,me=u[se]*oe,Se=255):s===3?(we=u[3*se]*oe,Ce=u[3*se+1]*oe,me=u[3*se+2]*oe,Se=255):s===4&&(we=u[4*se]*oe,Ce=u[4*se+1]*oe,me=u[4*se+2]*oe,Se=u[4*se+3]*oe),ae[(Re=4*se)+0]=Math.round(we),ae[Re+1]=Math.round(Ce),ae[Re+2]=Math.round(me),ae[Re+3]=Math.round(Se);return t!=null&&(t.width=a,t.height=i,Ue=t.getContext("2d"),We=new ImageData(ae,a,i),Ue.putImageData(We,0,0)),e!==n&&e.dispose(),[2,ae]}})})},fromPixels:Vg}),md=function(){function n(){}return n.prototype.getClassName=function(){return this.constructor.className},n.fromConfig=function(t,e){return new t(e)},n}(),gd=function(){function n(){this.classNameMap={}}return n.getMap=function(){return n.instance==null&&(n.instance=new n),n.instance},n.register=function(t){n.getMap().classNameMap[t.className]=[t,t.fromConfig]},n}();function za(n){Z(n.className!=null,function(){return"Class being registered does not have the static className property defined."}),Z(typeof n.className=="string",function(){return"className is required to be a string, but got type "+typeof n.className}),Z(n.className.length>0,function(){return"Class being registered has an empty-string as its className, which is disallowed."}),gd.register(n)}var fb=Object.freeze({Serializable:md,SerializationMap:gd,registerClass:za}),Qg=.001,yd=.1;function xl(){return Ge.backend.floatPrecision()===32?Qg:yd}function El(n,t,e){var r=!0;if((L(n)||L(t))&&(r=!1),L(n)&&L(t)&&(r=!0),r){var i=n.constructor.name,a=t.constructor.name;if(i!==a)throw new Error("Arrays are of different type. Actual: "+i+". Expected: "+a)}if(Array.isArray(n)&&Array.isArray(t)){var s=xr(n),u=xr(t);if(!ue(s,u))throw new Error("Arrays have different shapes. Actual: ["+s+"]. Expected: ["+u+"]")}var l=L(n)?n:be(n),d=L(t)?t:be(t);if(l.length!==d.length)throw new Error("Arrays have different lengths actual: "+l.length+" vs expected: "+d.length+`.
|
|
Actual: `+l+`.
|
|
Expected: `+d+".");for(var A=0;A<d.length;++A){var T=l[A],D=d[A];if(!e(T,D))throw new Error("Arrays differ: actual["+A+"] = "+T+", expected["+A+"] = "+D+`.
|
|
Actual: `+l+`.
|
|
Expected: `+d+".")}}function Cl(n,t,e){return!isFinite(n)&&!isFinite(t)||!(isNaN(n)||isNaN(t)||Math.abs(n-t)>e)}var db=Object.freeze({TEST_EPSILON_FLOAT16:yd,expectArraysClose:function(n,t,e){return e==null&&(e=xl()),El(n,t,function(r,i){return Cl(r,i,e)})},testEpsilon:xl,expectPromiseToFail:function(n,t){n().then(function(){return t.fail()},function(){return t()})},expectArraysEqual:function(n,t){var e=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Ie(n)||Ie(n[0])||Ie(t)||Ie(t[0])?El(n,e,function(r,i){return r==i}):El(n,t,function(r,i){return Cl(r,i,0)})},expectNumbersClose:function(n,t,e){if(e==null&&(e=xl()),!Cl(n,t,e))throw new Error("Numbers differ: actual === "+n+", expected === "+t)},expectValuesInRange:function(n,t,e){for(var r=0;r<n.length;r++)if(n[r]<t||n[r]>e)throw new Error("Value out of range:"+n[r]+" low: "+t+", high: "+e)},expectArrayBuffersEqual:function(n,t){expect(new Float32Array(n)).toEqual(new Float32Array(t))}}),pb="1.7.0",hb=Object.freeze({gpgpu_util:ph,webgl_util:Pu,forceHalfFloat:function(){P().set("WEBGL_FORCE_F16_TEXTURES",!0)},MathBackendWebGL:vf,setWebGLContext:Eo,GPGPUContext:Yc}),go=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return I(t,n),t.prototype.minimize=function(e,r,i){r===void 0&&(r=!1);var a=this.computeGradients(e,i),s=a.value,u=a.grads;if(i!=null){var l=i.map(function(d){return{name:d.name,tensor:u[d.name]}});this.applyGradients(l)}else this.applyGradients(u);return gt(u),r?s:(s.dispose(),null)},Object.defineProperty(t.prototype,"iterations",{get:function(){return this.iterations_==null&&(this.iterations_=0),this.iterations_},enumerable:!0,configurable:!0}),t.prototype.incrementIterations=function(){this.iterations_=this.iterations+1},t.prototype.computeGradients=function(e,r){return ms(e,r)},t.prototype.dispose=function(){this.iterations_!=null&>(this.iterations_)},t.prototype.saveIterations=function(){return C(this,void 0,void 0,function(){return E(this,function(e){return this.iterations_==null&&(this.iterations_=0),[2,{name:"iter",tensor:wt(this.iterations_,"int32")}]})})},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){throw new Error("getWeights() is not implemented for this optimizer yet.")})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())})})},t.prototype.extractIterations=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){switch(i.label){case 0:return r=this,[4,e[0].tensor.data()];case 1:return r.iterations_=i.sent()[0],[2,e.slice(1)]}})})},t}(md);Object.defineProperty(go,Symbol.hasInstance,{value:function(n){return n.minimize!=null&&n.computeGradients!=null&&n.applyGradients!=null}});var bd=function(n){function t(e,r,i){i===void 0&&(i=null);var a=n.call(this)||this;return a.learningRate=e,a.rho=r,a.epsilon=i,a.accumulatedGrads=[],a.accumulatedUpdates=[],i==null&&(a.epsilon=Ge.backend.epsilon()),a}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Ge.registeredVariables[i];r.accumulatedGrads[a]==null&&(r.accumulatedGrads[a]={originalName:i+"/accum_grad",variable:qe(function(){return Yt(s).variable(!1)})}),r.accumulatedUpdates[a]==null&&(r.accumulatedUpdates[a]={originalName:i+"/accum_var",variable:qe(function(){return Yt(s).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[a].variable,d=r.accumulatedUpdates[a].variable;qe(function(){var A=l.mul(r.rho).add(u.square().mul(1-r.rho)),T=d.add(r.epsilon).sqrt().div(l.add(r.epsilon).sqrt()).mul(u),D=d.mul(r.rho).add(T.square().mul(1-r.rho));l.assign(A),d.assign(D);var U=T.mul(-r.learningRate).add(s);s.assign(U)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedUpdates!=null&&(gt(this.accumulatedGrads.map(function(e){return e.variable})),gt(this.accumulatedUpdates.map(function(e){return e.variable})))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return E(this,function(r){switch(r.label){case 0:return e=this.accumulatedGrads.concat(this.accumulatedUpdates),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=e.length/2,this.accumulatedGrads=e.slice(0,r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.accumulatedUpdates=e.slice(r,2*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.rho,r.epsilon)},t.className="Adadelta",t}(go);za(bd);var wd=function(n){function t(e,r){r===void 0&&(r=.1);var i=n.call(this)||this;return i.learningRate=e,i.initialAccumulatorValue=r,i.accumulatedGrads=[],i}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Ge.registeredVariables[i];r.accumulatedGrads[a]==null&&(r.accumulatedGrads[a]={originalName:i+"/accumulator",variable:qe(function(){return en(s.shape,r.initialAccumulatorValue).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[a].variable;qe(function(){var d=l.add(u.square());l.assign(d);var A=u.div(d.add(Ge.backend.epsilon()).sqrt()).mul(-r.learningRate).add(s);s.assign(A)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedGrads!=null&>(this.accumulatedGrads.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulatedGrads.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulatedGrads=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},t.fromConfig=function(e,r){return new e(r.learningRate,r.initialAccumulatorValue)},t.className="Adagrad",t}(go);za(wd);var Ad=function(n){function t(e,r,i,a){a===void 0&&(a=null);var s=n.call(this)||this;return s.learningRate=e,s.beta1=r,s.beta2=i,s.epsilon=a,s.accumulatedFirstMoment=[],s.accumulatedSecondMoment=[],qe(function(){s.accBeta1=wt(r).variable(),s.accBeta2=wt(i).variable()}),a==null&&(s.epsilon=Ge.backend.epsilon()),s}return I(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(a){return a.name}):Object.keys(e);qe(function(){var a=xn(1,r.accBeta1),s=xn(1,r.accBeta2);i.forEach(function(u,l){var d=Ge.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:qe(function(){return Yt(d).variable(!1)})}),r.accumulatedSecondMoment[l]==null&&(r.accumulatedSecondMoment[l]={originalName:u+"/v",variable:qe(function(){return Yt(d).variable(!1)})});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var T=r.accumulatedFirstMoment[l].variable,D=r.accumulatedSecondMoment[l].variable,U=T.mul(r.beta1).add(A.mul(1-r.beta1)),te=D.mul(r.beta2).add(A.square().mul(1-r.beta2)),oe=U.div(a),ae=te.div(s);T.assign(U),D.assign(te);var se=oe.div(ae.sqrt().add(r.epsilon)).mul(-r.learningRate).add(d);d.assign(se)}}),r.accBeta1.assign(r.accBeta1.mul(r.beta1)),r.accBeta2.assign(r.accBeta2.mul(r.beta2))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.accBeta2.dispose(),this.accumulatedFirstMoment!=null&>(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedSecondMoment!=null&>(this.accumulatedSecondMoment.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return E(this,function(r){switch(r.label){case 0:return e=this.accumulatedFirstMoment.concat(this.accumulatedSecondMoment),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r,i=this;return E(this,function(a){switch(a.label){case 0:return[4,this.extractIterations(e)];case 1:return e=a.sent(),qe(function(){i.accBeta1.assign(ou(i.beta1,i.iterations_+1)),i.accBeta2.assign(ou(i.beta2,i.iterations_+1))}),r=e.length/2,this.accumulatedFirstMoment=e.slice(0,r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),this.accumulatedSecondMoment=e.slice(r,2*r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon)},t.className="Adam",t}(go);za(Ad);var xd=function(n){function t(e,r,i,a,s){a===void 0&&(a=null),s===void 0&&(s=0);var u=n.call(this)||this;return u.learningRate=e,u.beta1=r,u.beta2=i,u.epsilon=a,u.decay=s,u.accumulatedFirstMoment=[],u.accumulatedWeightedInfNorm=[],qe(function(){u.iteration=wt(0).variable(),u.accBeta1=wt(r).variable()}),a==null&&(u.epsilon=Ge.backend.epsilon()),u}return I(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(a){return a.name}):Object.keys(e);qe(function(){var a=xn(1,r.accBeta1),s=Wi(-r.learningRate,r.iteration.mul(r.decay).add(1));i.forEach(function(u,l){var d=Ge.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:Yt(d).variable(!1)}),r.accumulatedWeightedInfNorm[l]==null&&(r.accumulatedWeightedInfNorm[l]={originalName:u+"/v",variable:Yt(d).variable(!1)});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var T=r.accumulatedFirstMoment[l].variable,D=r.accumulatedWeightedInfNorm[l].variable,U=T.mul(r.beta1).add(A.mul(1-r.beta1)),te=D.mul(r.beta2),oe=A.abs(),ae=te.maximum(oe);T.assign(U),D.assign(ae);var se=s.div(a).mul(U.div(ae.add(r.epsilon))).add(d);d.assign(se)}}),r.iteration.assign(r.iteration.add(1)),r.accBeta1.assign(r.accBeta1.mul(r.beta1))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.iteration.dispose(),this.accumulatedFirstMoment!=null&>(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedWeightedInfNorm!=null&>(this.accumulatedWeightedInfNorm.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){throw new Error("getWeights() is not implemented for Adamax yet.")})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){throw new Error("setWeights() is not implemented for Adamax yet.")})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon,r.decay)},t.className="Adamax",t}(go);za(xd);var Sl=function(n){function t(e){var r=n.call(this)||this;return r.learningRate=e,r.setLearningRate(e),r}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Array.isArray(e)?e[a].tensor:e[i];if(s!=null){var u=Ge.registeredVariables[i];qe(function(){var l=r.c.mul(s).add(u);u.assign(l)})}}),this.incrementIterations()},t.prototype.setLearningRate=function(e){this.learningRate=e,this.c!=null&&this.c.dispose(),this.c=xt(wt(-e))},t.prototype.dispose=function(){this.c.dispose()},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()]]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:if((e=r.sent()).length!==0)throw new Error("SGD optimizer does not have settable weights.");return[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate}},t.fromConfig=function(e,r){return new e(r.learningRate)},t.className="SGD",t}(go);za(Sl);var Ed=function(n){function t(e,r,i){i===void 0&&(i=!1);var a=n.call(this,e)||this;return a.learningRate=e,a.momentum=r,a.useNesterov=i,a.accumulations=[],a.m=wt(a.momentum),a}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Ge.registeredVariables[i];r.accumulations[a]==null&&(r.accumulations[a]={originalName:i+"/momentum",variable:qe(function(){return Yt(s).variable(!1)})});var u=r.accumulations[a].variable,l=Array.isArray(e)?e[a].tensor:e[i];l!=null&&qe(function(){var d,A=r.m.mul(u).add(l);d=r.useNesterov?r.c.mul(l.add(A.mul(r.m))).add(s):r.c.mul(A).add(s),u.assign(A),s.assign(d)})}),this.incrementIterations()},t.prototype.dispose=function(){this.m.dispose(),this.accumulations!=null&>(this.accumulations.map(function(e){return e.variable}))},t.prototype.setMomentum=function(e){this.momentum=e},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulations.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulations=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},t.fromConfig=function(e,r){return new e(r.learningRate,r.momentum,r.useNesterov)},t.className="Momentum",t}(Sl);za(Ed);var Cd=function(n){function t(e,r,i,a,s){r===void 0&&(r=.9),i===void 0&&(i=0),a===void 0&&(a=null),s===void 0&&(s=!1);var u=n.call(this)||this;if(u.learningRate=e,u.decay=r,u.momentum=i,u.epsilon=a,u.accumulatedMeanSquares=[],u.accumulatedMoments=[],u.accumulatedMeanGrads=[],u.centered=s,a==null&&(u.epsilon=Ge.backend.epsilon()),e==null)throw new Error("learningRate for RMSPropOptimizer must be defined.");return u}return I(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Ge.registeredVariables[i];r.accumulatedMeanSquares[a]==null&&(r.accumulatedMeanSquares[a]={originalName:i+"/rms",variable:qe(function(){return Yt(s).variable(!1)})}),r.accumulatedMoments[a]==null&&(r.accumulatedMoments[a]={originalName:i+"/momentum",variable:qe(function(){return Yt(s).variable(!1)})}),r.accumulatedMeanGrads[a]==null&&r.centered&&(r.accumulatedMeanGrads[a]={originalName:i+"/mg",variable:qe(function(){return Yt(s).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedMeanSquares[a].variable,d=r.accumulatedMoments[a].variable;qe(function(){var A=l.mul(r.decay).add(u.square().mul(1-r.decay));if(r.centered){var T=r.accumulatedMeanGrads[a].variable,D=T.mul(r.decay).add(u.mul(1-r.decay)),U=d.mul(r.momentum).add(u.mul(r.learningRate).div(A.sub(D.square().add(r.epsilon)).sqrt()));l.assign(A),T.assign(D),d.assign(U);var te=s.sub(U);s.assign(te)}else{var oe=l.mul(r.decay).add(u.square().mul(1-r.decay));U=d.mul(r.momentum).add(u.mul(r.learningRate).div(oe.add(r.epsilon).sqrt())),l.assign(oe),d.assign(U),te=s.sub(U),s.assign(te)}})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedMeanSquares!=null&>(this.accumulatedMeanSquares.map(function(e){return e.variable})),this.accumulatedMeanGrads!=null&&this.centered&>(this.accumulatedMeanGrads.map(function(e){return e.variable})),this.accumulatedMoments!=null&>(this.accumulatedMoments.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return E(this,function(r){switch(r.label){case 0:return e=this.accumulatedMeanSquares.concat(this.accumulatedMoments),this.centered&&e.push.apply(e,this.accumulatedMeanGrads),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r;return E(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=this.centered?e.length/3:e.length/2,this.accumulatedMeanSquares=e.slice(0,r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.accumulatedMoments=e.slice(r,2*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.centered&&(this.accumulatedMeanGrads=e.slice(2*r,3*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}})),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},t.fromConfig=function(e,r){return new e(r.learningRate,r.decay,r.momentum,r.epsilon,r.centered)},t.className="RMSProp",t}(go);za(Cd);var yo=function(){function n(){}return n.sgd=function(t){return new Sl(t)},n.momentum=function(t,e,r){return r===void 0&&(r=!1),new Ed(t,e,r)},n.rmsprop=function(t,e,r,i,a){return e===void 0&&(e=.9),r===void 0&&(r=0),i===void 0&&(i=null),a===void 0&&(a=!1),new Cd(t,e,r,i,a)},n.adam=function(t,e,r,i){return t===void 0&&(t=.001),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),new Ad(t,e,r,i)},n.adadelta=function(t,e,r){return t===void 0&&(t=.001),e===void 0&&(e=.95),r===void 0&&(r=null),new bd(t,e,r)},n.adamax=function(t,e,r,i,a){return t===void 0&&(t=.002),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),a===void 0&&(a=0),new xd(t,e,r,i,a)},n.adagrad=function(t,e){return e===void 0&&(e=.1),new wd(t,e)},n}(),vb={sgd:yo.sgd,momentum:yo.momentum,adadelta:yo.adadelta,adagrad:yo.adagrad,rmsprop:yo.rmsprop,adamax:yo.adamax,adam:yo.adam},Hg=typeof requestAnimationFrame!="undefined"?requestAnimationFrame:typeof setImmediate!="undefined"?setImmediate:function(n){return n()};function mb(){return new Promise(function(n){return Hg(function(){return n()})})}Wt.prototype.squaredDifference=function(n){return mf(this,n)},rt=xg;function bo(n,t,e){if(e===void 0&&(e=!1),n.beginPath(),t.slice(1).forEach(function(a,s){var u=a.x,l=a.y,d=t[s];n.moveTo(d.x,d.y),n.lineTo(u,l)}),e){var r=t[t.length-1],i=t[0];if(!r||!i)return;n.moveTo(r.x,r.y),n.lineTo(i.x,i.y)}n.stroke()}var Il=function(n,t){return Il=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])},Il(n,t)};function zt(n,t){Il(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Vn=function(){return Vn=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Vn.apply(this,arguments)};function gb(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(e[r[i]]=n[r[i]]);return e}function yb(n,t,e,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(n,t,e,r);else for(var u=n.length-1;u>=0;u--)(s=n[u])&&(a=(i<3?s(a):i>3?s(t,e,a):s(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a}function bb(n,t){return function(e,r){t(e,r,n)}}function wb(n,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,t)}function It(n,t,e,r){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function u(A){try{d(r.next(A))}catch(T){s(T)}}function l(A){try{d(r.throw(A))}catch(T){s(T)}}function d(A){A.done?a(A.value):i(A.value).then(u,l)}d((r=r.apply(n,t||[])).next())})}function Tt(n,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(A){return l([d,A])}}function l(d){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return e.label++,{value:d[1],done:!1};case 5:e.label++,i=d[1],d=[0];continue;case 7:d=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){e.label=d[1];break}if(d[0]===6&&e.label<a[1]){e.label=a[1],a=d;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(d);break}a[2]&&e.ops.pop(),e.trys.pop();continue}d=t.call(n,e)}catch(A){d=[6,A],i=0}finally{r=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Ab(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}function xb(n,t){for(var e in n)e!=="default"&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Sd(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gg(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return a}function Eb(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(Gg(arguments[t]));return n}function Is(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var a=arguments[t],s=0,u=a.length;s<u;s++,i++)r[i]=a[s];return r}function hu(n){return this instanceof hu?(this.v=n,this):new hu(n)}function Cb(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),i,a=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(D){r[D]&&(i[D]=function(U){return new Promise(function(te,oe){a.push([D,U,te,oe])>1||u(D,U)})})}function u(D,U){try{l(r[D](U))}catch(te){T(a[0][3],te)}}function l(D){D.value instanceof hu?Promise.resolve(D.value.v).then(d,A):T(a[0][2],D)}function d(D){u("next",D)}function A(D){u("throw",D)}function T(D,U){D(U),a.shift(),a.length&&u(a[0][0],a[0][1])}}function Sb(n){var t,e;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=n[i]?function(s){return(e=!e)?{value:hu(n[i](s)),done:i==="return"}:a?a(s):s}:a}}function Ib(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Sd=="function"?Sd(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(a){e[a]=n[a]&&function(s){return new Promise(function(u,l){s=n[a](s),i(u,l,s.done,s.value)})}}function i(a,s,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},s)}}function Tb(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}function Rb(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t}function kb(n){return n&&n.__esModule?n:{default:n}}function Ob(n,t){if(!t.has(n))throw new TypeError("attempted to get private field on non-instance");return t.get(n)}function Db(n,t,e){if(!t.has(n))throw new TypeError("attempted to set private field on non-instance");return t.set(n,e),e}var wo=function(){function n(t,e){if(!Ao(t)||!Ao(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),n.prototype.reverse=function(){return new n(1/this.width,1/this.height)},n}();function Ts(n,t){return n instanceof Wt&&n.shape.length===t}function jb(n){return Ts(n,1)}function Xg(n){return Ts(n,2)}function vu(n){return Ts(n,3)}function Va(n){return Ts(n,4)}function Kg(n){return n%1!==0}function Id(n){return n%2===0}function Tl(n,t){t===void 0&&(t=2);var e=Math.pow(10,t);return Math.floor(n*e)/e}function Td(n){return n&&n.width&&n.height}function Zg(n,t){var e=n.width,r=n.height,i=t/Math.max(r,e);return new wo(Math.round(e*i),Math.round(r*i))}function Rl(n){return n.reduce(function(t,e){return t.add(e)},new gr(0,0)).div(new gr(n.length,n.length))}function Rs(n,t,e){return Array(n).fill(0).map(function(r,i){return t+i*e})}function Ao(n){return!!n&&n!==1/0&&n!==-1/0&&!isNaN(n)||n===0}function Rd(n){return Ao(n)&&0<=n&&n<=1}var gr=function(){function n(t,e){this._x=t,this._y=e}return Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),n.prototype.add=function(t){return new n(this.x+t.x,this.y+t.y)},n.prototype.sub=function(t){return new n(this.x-t.x,this.y-t.y)},n.prototype.mul=function(t){return new n(this.x*t.x,this.y*t.y)},n.prototype.div=function(t){return new n(this.x/t.x,this.y/t.y)},n.prototype.abs=function(){return new n(Math.abs(this.x),Math.abs(this.y))},n.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},n.prototype.floor=function(){return new n(Math.floor(this.x),Math.floor(this.y))},n}(),ea=function(){function n(t,e){e===void 0&&(e=!0);var r=t||{},i=[r.left,r.top,r.right,r.bottom].every(Ao),a=[r.x,r.y,r.width,r.height].every(Ao);if(!a&&!i)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var s=a?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],u=s[0],l=s[1],d=s[2],A=s[3];n.assertIsValidBox({x:u,y:l,width:d,height:A},"Box.constructor",e),this._x=u,this._y=l,this._width=d,this._height=A}return n.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(Ao)},n.assertIsValidBox=function(t,e,r){if(r===void 0&&(r=!1),!n.isRect(t))throw new Error(e+" - invalid box: "+JSON.stringify(t)+", expected object with properties x, y, width, height");if(!r&&(t.width<0||t.height<0))throw new Error(e+" - width ("+t.width+") and height ("+t.height+") must be positive numbers")},Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topLeft",{get:function(){return new gr(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topRight",{get:function(){return new gr(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomLeft",{get:function(){return new gr(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomRight",{get:function(){return new gr(this.right,this.bottom)},enumerable:!0,configurable:!0}),n.prototype.round=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.round(s)}),e=t[0],r=t[1],i=t[2],a=t[3];return new n({x:e,y:r,width:i,height:a})},n.prototype.floor=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.floor(s)}),e=t[0],r=t[1],i=t[2],a=t[3];return new n({x:e,y:r,width:i,height:a})},n.prototype.toSquare=function(){var t=this,e=t.x,r=t.y,i=t.width,a=t.height,s=Math.abs(i-a);return i<a&&(e-=s/2,i+=s),a<i&&(r-=s/2,a+=s),new n({x:e,y:r,width:i,height:a})},n.prototype.rescale=function(t){var e=Td(t)?t.width:t,r=Td(t)?t.height:t;return new n({x:this.x*e,y:this.y*r,width:this.width*e,height:this.height*r})},n.prototype.pad=function(t,e){var r=[this.x-t/2,this.y-e/2,this.width+t,this.height+e],i=r[0],a=r[1],s=r[2],u=r[3];return new n({x:i,y:a,width:s,height:u})},n.prototype.clipAtImageBorders=function(t,e){var r=this,i=r.x,a=r.y,s=r.right,u=r.bottom,l=Math.max(i,0),d=Math.max(a,0),A=s-l,T=u-d,D=Math.min(A,t-l),U=Math.min(T,e-d);return new n({x:l,y:d,width:D,height:U}).floor()},n.prototype.shift=function(t,e){var r=this,i=r.width,a=r.height,s=this.x+t,u=this.y+e;return new n({x:s,y:u,width:i,height:a})},n.prototype.padAtBorders=function(t,e){var r=this.width+1,i=this.height+1,a=1,s=1,u=r,l=i,d=this.left,A=this.top,T=this.right,D=this.bottom;return T>e&&(u=-T+e+r,T=e),D>t&&(l=-D+t+i,D=t),d<1&&(l=2-d,d=1),A<1&&(l=2-A,A=1),{dy:s,edy:l,dx:a,edx:u,y:A,ey:D,x:d,ex:T,w:r,h:i}},n.prototype.calibrate=function(t){return new n({left:this.left+t.left*this.width,top:this.top+t.top*this.height,right:this.right+t.right*this.width,bottom:this.bottom+t.bottom*this.height}).toSquare().round()},n}(),mu=function(n){zt(t,n);function t(e,r,i,a,s){return s===void 0&&(s=!1),n.call(this,{left:e,top:r,right:i,bottom:a},s)||this}return t}(ea),kd=function(){function n(t,e,r,i,a){this._imageDims=new wo(a.width,a.height),this._score=t,this._classScore=e,this._className=r,this._box=new ea(i).rescale(this._imageDims)}return Object.defineProperty(n.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativeBox",{get:function(){return new ea(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new n(this.score,this.classScore,this.className,this.relativeBox,{width:t,height:e})},n}(),gi=function(n){zt(t,n);function t(e,r,i){return n.call(this,e,e,"",r,i)||this}return t.prototype.forSize=function(e,r){var i=n.prototype.forSize.call(this,e,r),a=i.score,s=i.relativeBox,u=i.imageDims;return new t(a,s,u)},t}(kd);function Jg(n){var t=n.map(function(u){return u.x}),e=n.map(function(u){return u.y}),r=t.reduce(function(u,l){return l<u?l:u},1/0),i=e.reduce(function(u,l){return l<u?l:u},1/0),a=t.reduce(function(u,l){return u<l?l:u},0),s=e.reduce(function(u,l){return u<l?l:u},0);return new mu(r,i,a,s)}function Yg(n,t,e){e===void 0&&(e=!0);var r=Math.max(0,Math.min(n.right,t.right)-Math.max(n.left,t.left)),i=Math.max(0,Math.min(n.bottom,t.bottom)-Math.max(n.top,t.top)),a=r*i;return e?a/(n.area+t.area-a):a/Math.min(n.area,t.area)}function ks(n,t,e,r){r===void 0&&(r=!0);for(var i=t.map(function(u,l){return{score:u,boxIndex:l}}).sort(function(u,l){return u.score-l.score}).map(function(u){return u.boxIndex}),a=[],s=function(){var u=i.pop();a.push(u);for(var l=i,d=[],A=0;A<l.length;A++){var T=l[A],D=n[u],U=n[T];d.push(Yg(D,U,r))}i=i.filter(function(te,oe){return d[oe]<=e})};i.length>0;)s();return a}function Os(n,t){return qe(function(){var e=t[0],r=t[1],i=t[2],a=en(Is(n.shape.slice(0,3),[1]),e),s=en(Is(n.shape.slice(0,3),[1]),r),u=en(Is(n.shape.slice(0,3),[1]),i),l=Pr([a,s,u],3);return xn(n,l)})}function $g(n,t){return t===void 0&&(t=!1),qe(function(){var e=n.shape.slice(1),r=e[0],i=e[1];if(r===i)return n;var a=Math.abs(r-i),s=Math.round(a*(t?.5:1)),u=r>i?2:1,l=function(U){var te=n.shape.slice();return te[u]=U,en(te,0)},d=l(s),A=a-d.shape[u],T=t&&A?l(A):null,D=[T,n,d].filter(function(U){return!!U}).map(function(U){return U.toFloat()});return Pr(D,u)})}function kl(n){return 1/(1+Math.exp(-n))}function Pb(n){return Math.log(n/(1-n))}var Ol=function(n){zt(t,n);function t(e,r,i,a,s){return s===void 0&&(s=!1),n.call(this,{x:e,y:r,width:i,height:a},s)||this}return t}(ea),qg=.5,ey=.43,ty=.45,$o=function(){function n(t,e,r){r===void 0&&(r=new gr(0,0));var i=e.width,a=e.height;this._imgDims=new wo(i,a),this._shift=r,this._positions=t.map(function(s){return s.mul(new gr(i,a)).add(r)})}return Object.defineProperty(n.prototype,"shift",{get:function(){return new gr(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map(function(e){return e.sub(t._shift).div(new gr(t.imageWidth,t.imageHeight))})},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},n.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new gr(t,e))},n.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},n.prototype.align=function(t,e){if(e===void 0&&(e={}),t){var r=t instanceof gi?t.box.floor():new ea(t);return this.shiftBy(r.x,r.y).align(null,e)}var i=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),a=i.useDlibAlignment,s=i.minBoxPadding;return a?this.alignDlib():this.alignMinBbox(s)},n.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],r=t[1],i=t[2],a=function(T){return i.sub(T).magnitude()},s=(a(e)+a(r))/2,u=Math.floor(s/ty),l=Rl(t),d=Math.floor(Math.max(0,l.x-qg*u)),A=Math.floor(Math.max(0,l.y-ey*u));return new Ol(d,A,Math.min(u,this.imageWidth+d),Math.min(u,this.imageHeight+A))},n.prototype.alignMinBbox=function(t){var e=Jg(this.positions);return e.pad(e.width*t,e.height*t)},n.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},n}(),ry=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getRefPointsForAlignment=function(){var e=this.positions;return[e[0],e[1],Rl([e[3],e[4]])]},t}($o),Od=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getJawOutline=function(){return this.positions.slice(0,17)},t.prototype.getLeftEyeBrow=function(){return this.positions.slice(17,22)},t.prototype.getRightEyeBrow=function(){return this.positions.slice(22,27)},t.prototype.getNose=function(){return this.positions.slice(27,36)},t.prototype.getLeftEye=function(){return this.positions.slice(36,42)},t.prototype.getRightEye=function(){return this.positions.slice(42,48)},t.prototype.getMouth=function(){return this.positions.slice(48,68)},t.prototype.getRefPointsForAlignment=function(){return[this.getLeftEye(),this.getRightEye(),this.getMouth()].map(Rl)},t}($o),Dd=function(){function n(t,e){this._label=t,this._distance=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){return t===void 0&&(t=!0),""+this.label+(t?" ("+Tl(this.distance)+")":"")},n}(),jd=function(n){zt(t,n);function t(e,r){var i=n.call(this,e)||this;return i._label=r,i}return t.assertIsValidLabeledBox=function(e,r){if(ea.assertIsValidBox(e,r),!Ao(e.label))throw new Error(r+" - expected property label ("+e.label+") to be a number")},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),t}(ea),gu=function(){function n(t,e){if(typeof t!="string")throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(e)||e.some(function(r){return!(r instanceof Float32Array)}))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=t,this._descriptors=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return{label:this.label,descriptors:this.descriptors.map(function(t){return Array.from(t)})}},n.fromJSON=function(t){var e=t.descriptors.map(function(r){return new Float32Array(r)});return new n(t.label,e)},n}(),Bb=function(n){zt(t,n);function t(e,r,i,a){var s=n.call(this,e,r)||this;return s._score=i,s._classScore=a,s}return t.assertIsValidPredictedBox=function(e,r){if(jd.assertIsValidLabeledBox(e,r),!Rd(e.score)||!Rd(e.classScore))throw new Error(r+" - expected properties score ("+e.score+") and ("+e.classScore+") to be a number between [0, 1]")},Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),t}(jd);function Ds(n){return n.detection instanceof gi}function js(n,t){var e={detection:t};return Object.assign({},n,e)}function Pd(){var n=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")},t=function(){throw new Error("readFile - filesystem not available for browser environment")};return{Canvas:HTMLCanvasElement,CanvasRenderingContext2D,Image:HTMLImageElement,ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:n,readFile:t}}function Bd(n){var t="";if(!n)try{n=je(12155)}catch(r){t=r.toString()}var e=n?function(r){return new Promise(function(i,a){n.readFile(r,function(s,u){return s?a(s):i(u)})})}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+t)};return{readFile:e}}function _d(){var n=je.g.Canvas||je.g.HTMLCanvasElement,t=je.g.Image||je.g.HTMLImageElement,e=function(){if(n)return new n;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},r=function(){if(t)return new t;throw new Error("createImageElement - missing Image implementation for nodejs environment")},i=je.g.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},a=Bd();return Vn({Canvas:n||function(){function s(){}return s}(),CanvasRenderingContext2D:je.g.CanvasRenderingContext2D||function(){function s(){}return s}(),Image:t||function(){function s(){}return s}(),ImageData:je.g.ImageData||function(){function s(){}return s}(),Video:je.g.HTMLVideoElement||function(){function s(){}return s}(),createCanvasElement:e,createImageElement:r,fetch:i},a)}function Md(){return typeof window=="object"&&typeof document!="undefined"&&typeof HTMLImageElement!="undefined"&&typeof HTMLCanvasElement!="undefined"&&typeof HTMLVideoElement!="undefined"&&typeof ImageData!="undefined"&&typeof CanvasRenderingContext2D!="undefined"}var Nd=je(34155);function Fd(){return typeof je.g=="object"&&!0&&!0&&typeof Nd!="undefined"&&!!Nd.version}var En;function ny(){if(!En)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return En}function Dl(n){En=n}function jl(){Md()&&Dl(Pd()),Fd()&&Dl(_d())}function iy(n){if(En||jl(),!En)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var t=n.Canvas,e=t===void 0?En.Canvas:t,r=n.Image,i=r===void 0?En.Image:r;En.Canvas=e,En.Image=i,En.createCanvasElement=n.createCanvasElement||function(){return new e},En.createImageElement=n.createImageElement||function(){return new i},En.ImageData=n.ImageData||En.ImageData,En.Video=n.Video||En.Video,En.fetch=n.fetch||En.fetch,En.readFile=n.readFile||En.readFile}var Qn={getEnv:ny,setEnv:Dl,initialize:jl,createBrowserEnv:Pd,createFileSystem:Bd,createNodejsEnv:_d,monkeyPatch:iy,isBrowser:Md,isNodejs:Fd};jl();function Pl(n){return!Qn.isNodejs()&&typeof n=="string"?document.getElementById(n):n}function ta(n){var t=Qn.getEnv(),e=t.Canvas,r=t.CanvasRenderingContext2D;if(n instanceof r)return n;var i=Pl(n);if(!(i instanceof e))throw new Error("resolveContext2d - expected canvas to be of instance of Canvas");var a=i.getContext("2d");if(!a)throw new Error("resolveContext2d - canvas 2d context is null");return a}var Qa;(function(n){n.TOP_LEFT="TOP_LEFT",n.TOP_RIGHT="TOP_RIGHT",n.BOTTOM_LEFT="BOTTOM_LEFT",n.BOTTOM_RIGHT="BOTTOM_RIGHT"})(Qa||(Qa={}));var Ld=function(){function n(t){t===void 0&&(t={});var e=t.anchorPosition,r=t.backgroundColor,i=t.fontColor,a=t.fontSize,s=t.fontStyle,u=t.padding;this.anchorPosition=e||Qa.TOP_LEFT,this.backgroundColor=r||"rgba(0, 0, 0, 0.5)",this.fontColor=i||"rgba(255, 255, 255, 1)",this.fontSize=a||14,this.fontStyle=s||"Georgia",this.padding=u||4}return n}(),Ud=function(){function n(t,e,r){r===void 0&&(r={}),this.text=typeof t=="string"?[t]:t instanceof n?t.text:t,this.anchor=e,this.options=new Ld(r)}return n.prototype.measureWidth=function(t){var e=this.options.padding;return this.text.map(function(r){return t.measureText(r).width}).reduce(function(r,i){return r<i?i:r},0)+2*e},n.prototype.measureHeight=function(){var t=this.options,e=t.fontSize,r=t.padding;return this.text.length*e+2*r},n.prototype.getUpperLeft=function(t,e){var r=this.options.anchorPosition,i=r===Qa.BOTTOM_RIGHT||r===Qa.TOP_RIGHT,a=r===Qa.BOTTOM_LEFT||r===Qa.BOTTOM_RIGHT,s=this.measureWidth(t),u=this.measureHeight(),l=i?this.anchor.x-s:this.anchor.x,d=a?this.anchor.y-u:this.anchor.y;if(e){var A=e.width,T=e.height,D=Math.max(Math.min(l,A-s),0),U=Math.max(Math.min(d,T-u),0);return{x:D,y:U}}return{x:l,y:d}},n.prototype.draw=function(t){var e=Pl(t),r=ta(e),i=this.options,a=i.backgroundColor,s=i.fontColor,u=i.fontSize,l=i.fontStyle,d=i.padding;r.font=u+"px "+l;var A=this.measureWidth(r),T=this.measureHeight();r.fillStyle=a;var D=this.getUpperLeft(r,e);r.fillRect(D.x,D.y,A,T),r.fillStyle=s,this.text.forEach(function(U,te){var oe=d+D.x,ae=d+D.y+(te+1)*u;r.fillText(U,oe,ae)})},n}(),ay=function(){function n(t){t===void 0&&(t={});var e=t.boxColor,r=t.lineWidth,i=t.label,a=t.drawLabelOptions;this.boxColor=e||"rgba(0, 0, 255, 1)",this.lineWidth=r||2,this.label=i;var s={anchorPosition:Qa.BOTTOM_LEFT,backgroundColor:this.boxColor};this.drawLabelOptions=new Ld(Object.assign({},s,a))}return n}(),oy=function(){function n(t,e){e===void 0&&(e={}),this.box=new ea(t),this.options=new ay(e)}return n.prototype.draw=function(t){var e=ta(t),r=this.options,i=r.boxColor,a=r.lineWidth,s=this.box,u=s.x,l=s.y,d=s.width,A=s.height;e.strokeStyle=i,e.lineWidth=a,e.strokeRect(u,l,d,A);var T=this.options.label;T&&new Ud([T],{x:u-a/2,y:l},this.options.drawLabelOptions).draw(t)},n}();function sy(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof gi?r.score:Ds(r)?r.detection.score:void 0,a=r instanceof gi?r.box:Ds(r)?r.detection.box:new ea(r),s=i?""+Tl(i):void 0;new oy(a,{label:s}).draw(n)})}function Wd(n){var t=Qn.getEnv(),e=t.Image,r=t.Video;return n instanceof e&&n.complete||n instanceof r&&n.readyState>=3}function uy(n){return new Promise(function(t,e){if(n instanceof Qn.getEnv().Canvas||Wd(n))return t();function r(a){a.currentTarget&&(a.currentTarget.removeEventListener("load",r),a.currentTarget.removeEventListener("error",i),t(a))}function i(a){a.currentTarget&&(a.currentTarget.removeEventListener("load",r),a.currentTarget.removeEventListener("error",i),e(a))}n.addEventListener("load",r),n.addEventListener("error",i)})}function _b(n){return new Promise(function(t,e){if(!(n instanceof Blob))return e("bufferToImage - expected buf to be of type: Blob");var r=new FileReader;r.onload=function(){if(typeof r.result!="string")return e("bufferToImage - expected reader.result to be a string, in onload");var i=env.getEnv().createImageElement();i.onload=function(){return t(i)},i.onerror=e,i.src=r.result},r.onerror=e,r.readAsDataURL(n)})}function Bl(n){var t=Qn.getEnv(),e=t.Image,r=t.Video;return n instanceof e?new wo(n.naturalWidth,n.naturalHeight):n instanceof r?new wo(n.videoWidth,n.videoHeight):new wo(n.width,n.height)}function yu(n){var t=n.width,e=n.height,r=Qn.getEnv().createCanvasElement,i=r();return i.width=t,i.height=e,i}function _l(n,t){var e=Qn.getEnv().ImageData;if(!(n instanceof e)&&!Wd(n))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=t||Bl(n),i=r.width,a=r.height,s=yu({width:i,height:a});return n instanceof e?ta(s).putImageData(n,0,0):ta(s).drawImage(n,0,0,i,a),s}function ly(n,t){return It(this,void 0,void 0,function(){var e,r,i,a,s,u;return Tt(this,function(l){switch(l.label){case 0:return e=t||Qn.getEnv().createCanvasElement(),r=n.shape.slice(Va(n)?1:0),i=r[0],a=r[1],s=r[2],u=qe(function(){return n.as3D(i,a,s).toInt()}),[4,Al.toPixels(u,e)];case 1:return l.sent(),u.dispose(),[2,e]}})})}function zd(n){var t=Qn.getEnv(),e=t.Image,r=t.Canvas,i=t.Video;return n instanceof e||n instanceof r||n instanceof i}function cy(n,t,e){e===void 0&&(e=!1);var r=Qn.getEnv(),i=r.Image,a=r.Canvas;if(!(n instanceof i||n instanceof a))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var s=Bl(n),u=t/Math.max(s.height,s.width),l=u*s.width,d=u*s.height,A=yu({width:t,height:t}),T=n instanceof a?n:_l(n),D=Math.abs(l-d)/2,U=e&&l<d?D:0,te=e&&d<l?D:0;return ta(A).drawImage(T,U,te,l,d),A}var bu=function(){function n(t,e){var r=this;if(e===void 0&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach(function(i,a){if(vu(i)){r._imageTensors[a]=i,r._inputDimensions[a]=i.shape;return}if(Va(i)){var s=i.shape[0];if(s!==1)throw new Error("NetInput - tf.Tensor4D with batchSize "+s+" passed, but not supported in input array");r._imageTensors[a]=i,r._inputDimensions[a]=i.shape.slice(1);return}var u=i instanceof Qn.getEnv().Canvas?i:_l(i);r._canvases[a]=u,r._inputDimensions[a]=[u.height,u.width,3]})}return Object.defineProperty(n.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"reshapedInputDimensions",{get:function(){var t=this;return Rs(this.batchSize,0,1).map(function(e,r){return t.getReshapedInputDimensions(r)})},enumerable:!0,configurable:!0}),n.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},n.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},n.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},n.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},n.prototype.getReshapedInputDimensions=function(t){if(typeof this.inputSize!="number")throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");var e=this.getInputWidth(t),r=this.getInputHeight(t);return Zg({width:e,height:r},this.inputSize)},n.prototype.toBatchTensor=function(t,e){var r=this;return e===void 0&&(e=!0),this._inputSize=t,qe(function(){var i=Rs(r.batchSize,0,1).map(function(s){var u=r.getInput(s);if(u instanceof Wt){var l=Va(u)?u:u.expandDims();return l=$g(l,e),(l.shape[1]!==t||l.shape[2]!==t)&&(l=nl.resizeBilinear(l,[t,t])),l.as3D(t,t,3)}if(u instanceof Qn.getEnv().Canvas)return Al.fromPixels(cy(u,t,e));throw new Error("toBatchTensor - at batchIdx "+s+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+u)}),a=wn(i.map(function(s){return s.toFloat()})).as4D(r.batchSize,t,t,3);return a})},n}();function Rn(n){return It(this,void 0,void 0,function(){var t,e,r;return Tt(this,function(i){switch(i.label){case 0:if(n instanceof bu)return[2,n];if(t=Array.isArray(n)?n:[n],!t.length)throw new Error("toNetInput - empty array passed as input");return e=function(a){return Array.isArray(n)?" at input index "+a+":":""},r=t.map(Pl),r.forEach(function(a,s){if(!zd(a)&&!vu(a)&&!Va(a))throw typeof t[s]=="string"?new Error("toNetInput -"+e(s)+" string passed, but could not resolve HTMLElement for element id "+t[s]):new Error("toNetInput -"+e(s)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id");if(Va(a)){var u=a.shape[0];if(u!==1)throw new Error("toNetInput -"+e(s)+" tf.Tensor4D with batchSize "+u+" passed, but not supported in input array")}}),[4,Promise.all(r.map(function(a){return zd(a)&&uy(a)}))];case 1:return i.sent(),[2,new bu(r,Array.isArray(n))]}})})}function Ml(n,t){return It(this,void 0,void 0,function(){var e,r,i,a,s,u,l;return Tt(this,function(d){switch(d.label){case 0:return e=Qn.getEnv().Canvas,r=n,n instanceof e?[3,5]:[4,Rn(n)];case 1:if(i=d.sent(),i.batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return a=i.getInput(0),a instanceof e?(s=a,[3,4]):[3,2];case 2:return[4,ly(a)];case 3:s=d.sent(),d.label=4;case 4:r=s,d.label=5;case 5:return u=ta(r),l=t.map(function(A){return A instanceof gi?A.forSize(r.width,r.height).box.floor():A}).map(function(A){return A.clipAtImageBorders(r.width,r.height)}),[2,l.map(function(A){var T=A.x,D=A.y,U=A.width,te=A.height,oe=yu({width:U,height:te});return ta(oe).putImageData(u.getImageData(T,D,U,te),0,0),oe})]}})})}function Nl(n,t){return It(this,void 0,void 0,function(){return Tt(this,function(e){if(!vu(n)&&!Va(n))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(Va(n)&&n.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,qe(function(){var r=n.shape.slice(Va(n)?1:0),i=r[0],a=r[1],s=r[2],u=t.map(function(d){return d instanceof gi?d.forSize(a,i).box:d}).map(function(d){return d.clipAtImageBorders(a,i)}),l=u.map(function(d){var A=d.x,T=d.y,D=d.width,U=d.height;return Lf(n.as3D(i,a,s),[T,A,0],[U,D,s])});return l})]})})}function fy(n,t){return It(this,void 0,void 0,function(){var e,r;return Tt(this,function(i){switch(i.label){case 0:return e=Qn.getEnv().fetch,[4,e(n,t)];case 1:if(r=i.sent(),!(r.status<400))throw new Error("failed to fetch: ("+r.status+") "+r.statusText+", from url: "+r.url);return[2,r]}})})}function Mb(n){return __awaiter(this,void 0,void 0,function(){var t,e;return __generator(this,function(r){switch(r.label){case 0:return[4,fetchOrThrow(n)];case 1:return t=r.sent(),[4,t.blob()];case 2:if(e=r.sent(),!e.type.startsWith("image/"))throw new Error("fetchImage - expected blob type to be of type image/*, instead have: "+e.type+", for url: "+t.url);return[2,bufferToImage(e)]}})})}function dy(n){return It(this,void 0,void 0,function(){return Tt(this,function(t){switch(t.label){case 0:return[4,fy(n)];case 1:return[2,t.sent().json()]}})})}function Nb(n){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=Float32Array.bind,[4,fetchOrThrow(n)];case 1:return[4,e.sent().arrayBuffer()];case 2:return[2,new(t.apply(Float32Array,[void 0,e.sent()]))]}})})}function Vd(n,t){var e=t+"-weights_manifest.json";if(!n)return{modelBaseUri:"",manifestUri:e};if(n==="/")return{modelBaseUri:"/",manifestUri:"/"+e};var r=n.startsWith("http://")?"http://":n.startsWith("https://")?"https://":"";n=n.replace(r,"");var i=n.split("/").filter(function(u){return u}),a=n.endsWith(".json")?i[i.length-1]:e,s=r+(n.endsWith(".json")?i.slice(0,i.length-1):i).join("/");return s=n.startsWith("/")?"/"+s:s,{modelBaseUri:s,manifestUri:s==="/"?"/"+a:s+"/"+a}}function py(n,t){return It(this,void 0,void 0,function(){var e,r,i,a;return Tt(this,function(s){switch(s.label){case 0:return e=Vd(n,t),r=e.manifestUri,i=e.modelBaseUri,[4,dy(r)];case 1:return a=s.sent(),[2,vd.loadWeights(a,i)]}})})}function Fb(n,t,e){e===void 0&&(e=!1);var r=e?getMediaDimensions(t):t,i=r.width,a=r.height;return n.width=i,n.height=a,{width:i,height:a}}var ba=function(){function n(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(n.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),n.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t),r=e.obj,i=e.objProp;return r[i]},n.prototype.reassignParamFromPath=function(t,e){var r=this.traversePropertyPath(t),i=r.obj,a=r.objProp;i[a].dispose(),i[a]=e},n.prototype.getParamList=function(){var t=this;return this._paramMappings.map(function(e){var r=e.paramPath;return{path:r,tensor:t.getParamFromPath(r)}})},n.prototype.getTrainableParams=function(){return this.getParamList().filter(function(t){return t.tensor instanceof br})},n.prototype.getFrozenParams=function(){return this.getParamList().filter(function(t){return!(t.tensor instanceof br)})},n.prototype.variable=function(){var t=this;this.getFrozenParams().forEach(function(e){var r=e.path,i=e.tensor;t.reassignParamFromPath(r,i.variable())})},n.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach(function(e){var r=e.path,i=e.tensor,a=Mt(i.dataSync());i.dispose(),t.reassignParamFromPath(r,a)})},n.prototype.dispose=function(t){t===void 0&&(t=!0),this.getParamList().forEach(function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()}),this._params=void 0},n.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map(function(t){var e=t.tensor;return Array.from(e.dataSync())}).reduce(function(t,e){return t.concat(e)}))},n.prototype.load=function(t){return It(this,void 0,void 0,function(){return Tt(this,function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}})})},n.prototype.loadFromUri=function(t){return It(this,void 0,void 0,function(){var e;return Tt(this,function(r){switch(r.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromUri - expected model uri");return[4,py(t,this.getDefaultModelName())];case 1:return e=r.sent(),this.loadFromWeightMap(e),[2]}})})},n.prototype.loadFromDisk=function(t){return It(this,void 0,void 0,function(){var e,r,i,a,s,u,l,d,A,T;return Tt(this,function(D){switch(D.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromDisk - expected model file path");return e=Qn.getEnv().readFile,r=Vd(t,this.getDefaultModelName()),i=r.manifestUri,a=r.modelBaseUri,s=function(U){return Promise.all(U.map(function(te){return e(te).then(function(oe){return oe.buffer})}))},u=vd.weightsLoaderFactory(s),A=(d=JSON).parse,[4,e(i)];case 1:return l=A.apply(d,[D.sent().toString()]),[4,u(l,a)];case 2:return T=D.sent(),this.loadFromWeightMap(T),[2]}})})},n.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.extractWeights=function(t){var e=this.extractParams(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce(function(a,s){if(!a.nextObj.hasOwnProperty(s))throw new Error("traversePropertyPath - object does not have property "+s+", for path "+t);return{obj:a.nextObj,objProp:s,nextObj:a.nextObj[s]}},{nextObj:this.params}),r=e.obj,i=e.objProp;if(!r||!i||!(r[i]instanceof Wt))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:r,objProp:i}},n}();function yi(n,t,e){return qe(function(){var r=$u(n,t.depthwise_filter,t.pointwise_filter,e,"same");return r=er(r,t.bias),r})}function Fl(n,t,e){return e===void 0&&(e=!1),qe(function(){var r=nn(e?er(Oi(n,t.conv0.filters,[2,2],"same"),t.conv0.bias):yi(n,t.conv0,[2,2])),i=yi(r,t.conv1,[1,1]),a=nn(er(r,i)),s=yi(a,t.conv2,[1,1]);return nn(er(r,er(i,s)))})}function wu(n,t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!0),qe(function(){var i=nn(e?er(Oi(n,t.conv0.filters,r?[2,2]:[1,1],"same"),t.conv0.bias):yi(n,t.conv0,r?[2,2]:[1,1])),a=yi(i,t.conv1,[1,1]),s=nn(er(i,a)),u=yi(s,t.conv2,[1,1]),l=nn(er(i,er(a,u))),d=yi(l,t.conv3,[1,1]);return nn(er(i,er(a,er(u,d))))})}function zi(n,t,e,r){return e===void 0&&(e="same"),r===void 0&&(r=!1),qe(function(){var i=er(Oi(n,t.filters,[1,1],e),t.bias);return r?nn(i):i})}function wa(n,t){Object.keys(n).forEach(function(e){t.some(function(r){return r.originalPath===e})||n[e].dispose()})}function Au(n,t){return function(e,r,i,a){var s=un(n(e*r*i*i),[i,i,e,r]),u=nr(n(r));return t.push({paramPath:a+"/filters"},{paramPath:a+"/bias"}),{filters:s,bias:u}}}function Ll(n,t){return function(e,r,i){var a=cr(n(e*r),[e,r]),s=nr(n(r));return t.push({paramPath:i+"/weights"},{paramPath:i+"/bias"}),{weights:a,bias:s}}}var Qd=function(){function n(t,e,r){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=r}return n}();function Ul(n,t){return function(e,r,i){var a=un(n(9*e),[3,3,e,1]),s=un(n(e*r),[1,1,e,r]),u=nr(n(r));return t.push({paramPath:i+"/depthwise_filter"},{paramPath:i+"/pointwise_filter"},{paramPath:i+"/bias"}),new Qd(a,s,u)}}function Wl(n){return function(t){var e=n(t+"/depthwise_filter",4),r=n(t+"/pointwise_filter",4),i=n(t+"/bias",1);return new Qd(e,r,i)}}function Ha(n,t){return function(e,r,i){var a=n[e];if(!Ts(a,r))throw new Error("expected weightMap["+e+"] to be a Tensor"+r+"D, instead have "+a);return t.push({originalPath:e,paramPath:i||e}),a}}function Aa(n){var t=n;function e(i){var a=t.slice(0,i);return t=t.slice(i),a}function r(){return t}return{extractWeights:e,getRemainingWeights:r}}function Hd(n,t){var e=Au(n,t),r=Ul(n,t);function i(s,u,l,d){d===void 0&&(d=!1);var A=d?e(s,u,3,l+"/conv0"):r(s,u,l+"/conv0"),T=r(u,u,l+"/conv1"),D=r(u,u,l+"/conv2");return{conv0:A,conv1:T,conv2:D}}function a(s,u,l,d){d===void 0&&(d=!1);var A=i(s,u,l,d),T=A.conv0,D=A.conv1,U=A.conv2,te=r(u,u,l+"/conv3");return{conv0:T,conv1:D,conv2:U,conv3:te}}return{extractDenseBlock3Params:i,extractDenseBlock4Params:a}}function hy(n){var t=[],e=Aa(n),r=e.extractWeights,i=e.getRemainingWeights,a=Hd(r,t).extractDenseBlock4Params,s=a(3,32,"dense0",!0),u=a(32,64,"dense1"),l=a(64,128,"dense2"),d=a(128,256,"dense3");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l,dense3:d}}}function Gd(n){return function(t){var e=n(t+"/filters",4),r=n(t+"/bias",1);return{filters:e,bias:r}}}function Xd(n,t){var e=Ha(n,t),r=Gd(e),i=Wl(e);function a(u,l){l===void 0&&(l=!1);var d=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),T=i(u+"/conv2");return{conv0:d,conv1:A,conv2:T}}function s(u,l){l===void 0&&(l=!1);var d=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),T=i(u+"/conv2"),D=i(u+"/conv3");return{conv0:d,conv1:A,conv2:T,conv3:D}}return{extractDenseBlock3Params:a,extractDenseBlock4Params:s}}function vy(n){var t=[],e=Xd(n,t).extractDenseBlock4Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2"),dense3:e("dense3")};return wa(n,t),{params:r,paramMappings:t}}var Kd=function(n){zt(t,n);function t(){return n.call(this,"FaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceFeatureExtractor - load model before inference");return qe(function(){var i=e.toBatchTensor(112,!0),a=[122.782,117.001,104.298],s=Os(i,a).div(wt(255)),u=wu(s,r.dense0,!0);return u=wu(u,r.dense1),u=wu(u,r.dense2),u=wu(u,r.dense3),u=Cs(u,[7,7],[2,2],"valid"),u})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},t.prototype.extractParamsFromWeigthMap=function(e){return vy(e)},t.prototype.extractParams=function(e){return hy(e)},t}(ba);function ra(n,t){return qe(function(){return er(uu(n,t.weights),t.bias)})}function my(n,t,e){var r=[],i=Aa(n),a=i.extractWeights,s=i.getRemainingWeights,u=Ll(a,r),l=u(t,e,"fc");if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{paramMappings:r,params:{fc:l}}}function gy(n){var t=[],e=Ha(n,t);function r(a){var s=e(a+"/weights",2),u=e(a+"/bias",1);return{weights:s,bias:u}}var i={fc:r("fc")};return wa(n,t),{params:i,paramMappings:t}}function Zd(n){var t={},e={};return Object.keys(n).forEach(function(r){var i=r.startsWith("fc")?e:t;i[r]=n[r]}),{featureExtractorMap:t,classifierMap:e}}var Jd=function(n){zt(t,n);function t(e,r){var i=n.call(this,e)||this;return i._faceFeatureExtractor=r,i}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return qe(function(){var a=e instanceof bu?r.faceFeatureExtractor.forwardInput(e):e;return ra(a.as2D(a.shape[0],-1),i.fc)})},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,a=r.paramMappings;this._params=i,this._paramMappings=a},t.prototype.extractClassifierParams=function(e){return my(e,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},t.prototype.extractParamsFromWeigthMap=function(e){var r=Zd(e),i=r.featureExtractorMap,a=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),gy(a)},t.prototype.extractParams=function(e){var r=this.getClassifierChannelsIn(),i=this.getClassifierChannelsOut(),a=i*r+i,s=e.slice(0,e.length-a),u=e.slice(e.length-a);return this.faceFeatureExtractor.extractWeights(s),this.extractClassifierParams(u)},t}(ba),Yd=["neutral","happy","sad","angry","fearful","disgusted","surprised"],zl=function(){function n(t){var e=this;if(t.length!==7)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);Yd.forEach(function(r,i){e[r]=t[i]})}return n.prototype.asSortedArray=function(){var t=this;return Yd.map(function(e){return{expression:e,probability:t[e]}}).sort(function(e,r){return r.probability-e.probability})},n}(),yy=function(n){zt(t,n);function t(e){return e===void 0&&(e=new Kd),n.call(this,"FaceExpressionNet",e)||this}return t.prototype.forwardInput=function(e){var r=this;return qe(function(){return vi(r.runNet(e))})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictExpressions=function(e){return It(this,void 0,void 0,function(){var r,i,a,s,u=this;return Tt(this,function(l){switch(l.label){case 0:return[4,Rn(e)];case 1:return r=l.sent(),[4,this.forwardInput(r)];case 2:return i=l.sent(),[4,Promise.all(Ur(i).map(function(d){return It(u,void 0,void 0,function(){var A;return Tt(this,function(T){switch(T.label){case 0:return[4,d.data()];case 1:return A=T.sent(),d.dispose(),[2,A]}})})}))];case 3:return a=l.sent(),i.dispose(),s=a.map(function(d){return new zl(d)}),[2,r.isBatchInput?s:s[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_expression_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t.prototype.getClassifierChannelsOut=function(){return 7},t}(Jd);function by(n){return n.expressions instanceof zl}function $d(n,t){var e={expressions:t};return Object.assign({},n,e)}function Lb(n,t,e,r){e===void 0&&(e=.1);var i=Array.isArray(t)?t:[t];i.forEach(function(a){var s=a instanceof zl?a:by(a)?a.expressions:void 0;if(!s)throw new Error("drawFaceExpressions - expected faceExpressions to be FaceExpressions | WithFaceExpressions<{}> or array thereof");var u=s.asSortedArray(),l=u.filter(function(T){return T.probability>e}),d=Ds(a)?a.detection.box.bottomLeft:r||new gr(0,0),A=new Ud(l.map(function(T){return T.expression+" ("+Tl(T.probability)+")"}),d);A.draw(n)})}function Vl(n){return Ds(n)&&n.landmarks instanceof $o&&n.unshiftedLandmarks instanceof $o&&n.alignedRect instanceof gi}function xu(n,t){var e=n.detection.box,r=t.shiftBy(e.x,e.y),i=r.align(),a=n.detection.imageDims,s=new gi(n.detection.score,i.rescale(a.reverse()),a),u={landmarks:r,unshiftedLandmarks:t,alignedRect:s};return Object.assign({},n,u)}var wy=function(){function n(t){t===void 0&&(t={});var e=t.drawLines,r=e===void 0?!0:e,i=t.drawPoints,a=i===void 0?!0:i,s=t.lineWidth,u=t.lineColor,l=t.pointSize,d=t.pointColor;this.drawLines=r,this.drawPoints=a,this.lineWidth=s||1,this.pointSize=l||2,this.lineColor=u||"rgba(0, 255, 255, 1)",this.pointColor=d||"rgba(255, 0, 255, 1)"}return n}(),Ay=function(){function n(t,e){e===void 0&&(e={}),this.faceLandmarks=t,this.options=new wy(e)}return n.prototype.draw=function(t){var e=ta(t),r=this.options,i=r.drawLines,a=r.drawPoints,s=r.lineWidth,u=r.lineColor,l=r.pointSize,d=r.pointColor;if(i&&this.faceLandmarks instanceof Od&&(e.strokeStyle=u,e.lineWidth=s,bo(e,this.faceLandmarks.getJawOutline()),bo(e,this.faceLandmarks.getLeftEyeBrow()),bo(e,this.faceLandmarks.getRightEyeBrow()),bo(e,this.faceLandmarks.getNose()),bo(e,this.faceLandmarks.getLeftEye(),!0),bo(e,this.faceLandmarks.getRightEye(),!0),bo(e,this.faceLandmarks.getMouth(),!0)),a){e.strokeStyle=d,e.fillStyle=d;var A=function(T){e.beginPath(),e.arc(T.x,T.y,l,0,2*Math.PI),e.fill()};this.faceLandmarks.positions.forEach(A)}},n}();function Ub(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof $o?r:Vl(r)?r.landmarks:void 0;if(!i)throw new Error("drawFaceLandmarks - expected faceExpressions to be FaceLandmarks | WithFaceLandmarks<WithFaceDetection<{}>> or array thereof");new Ay(i).draw(n)})}function xy(n,t){var e=Au(n,t),r=Ul(n,t);function i(s,u,l){var d=r(s,u,l+"/separable_conv0"),A=r(u,u,l+"/separable_conv1"),T=e(s,u,1,l+"/expansion_conv");return{separable_conv0:d,separable_conv1:A,expansion_conv:T}}function a(s,u){var l=r(s,s,u+"/separable_conv0"),d=r(s,s,u+"/separable_conv1"),A=r(s,s,u+"/separable_conv2");return{separable_conv0:l,separable_conv1:d,separable_conv2:A}}return{extractConvParams:e,extractSeparableConvParams:r,extractReductionBlockParams:i,extractMainBlockParams:a}}function Ey(n,t){var e=[],r=Aa(n),i=r.extractWeights,a=r.getRemainingWeights,s=xy(i,e),u=s.extractConvParams,l=s.extractSeparableConvParams,d=s.extractReductionBlockParams,A=s.extractMainBlockParams,T=u(3,32,3,"entry_flow/conv_in"),D=d(32,64,"entry_flow/reduction_block_0"),U=d(64,128,"entry_flow/reduction_block_1"),te={conv_in:T,reduction_block_0:D,reduction_block_1:U},oe={};Rs(t,0,1).forEach(function(Ce){oe["main_block_"+Ce]=A(128,"middle_flow/main_block_"+Ce)});var ae=d(128,256,"exit_flow/reduction_block"),se=l(256,512,"exit_flow/separable_conv"),we={reduction_block:ae,separable_conv:se};if(a().length!==0)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:e,params:{entry_flow:te,middle_flow:oe,exit_flow:we}}}function Cy(n,t){var e=Ha(n,t),r=Gd(e),i=Wl(e);function a(u){var l=i(u+"/separable_conv0"),d=i(u+"/separable_conv1"),A=r(u+"/expansion_conv");return{separable_conv0:l,separable_conv1:d,expansion_conv:A}}function s(u){var l=i(u+"/separable_conv0"),d=i(u+"/separable_conv1"),A=i(u+"/separable_conv2");return{separable_conv0:l,separable_conv1:d,separable_conv2:A}}return{extractConvParams:r,extractSeparableConvParams:i,extractReductionBlockParams:a,extractMainBlockParams:s}}function Sy(n,t){var e=[],r=Cy(n,e),i=r.extractConvParams,a=r.extractSeparableConvParams,s=r.extractReductionBlockParams,u=r.extractMainBlockParams,l=i("entry_flow/conv_in"),d=s("entry_flow/reduction_block_0"),A=s("entry_flow/reduction_block_1"),T={conv_in:l,reduction_block_0:d,reduction_block_1:A},D={};Rs(t,0,1).forEach(function(ae){D["main_block_"+ae]=u("middle_flow/main_block_"+ae)});var U=s("exit_flow/reduction_block"),te=a("exit_flow/separable_conv"),oe={reduction_block:U,separable_conv:te};return wa(n,e),{params:{entry_flow:T,middle_flow:D,exit_flow:oe},paramMappings:e}}function qd(n,t,e){return er(Oi(n,t.filters,e,"same"),t.bias)}function Ql(n,t,e){e===void 0&&(e=!0);var r=e?nn(n):n;return r=yi(r,t.separable_conv0,[1,1]),r=yi(nn(r),t.separable_conv1,[1,1]),r=Tn(r,[3,3],[2,2],"same"),r=er(r,qd(n,t.expansion_conv,[2,2])),r}function Iy(n,t){var e=yi(nn(n),t.separable_conv0,[1,1]);return e=yi(nn(e),t.separable_conv1,[1,1]),e=yi(nn(e),t.separable_conv2,[1,1]),e=er(e,n),e}var Ty=function(n){zt(t,n);function t(e){var r=n.call(this,"TinyXception")||this;return r._numMainBlocks=e,r}return t.prototype.forwardInput=function(e){var r=this,i=this.params;if(!i)throw new Error("TinyXception - load model before inference");return qe(function(){var a=e.toBatchTensor(112,!0),s=[122.782,117.001,104.298],u=Os(a,s).div(wt(256)),l=nn(qd(u,i.entry_flow.conv_in,[2,2]));return l=Ql(l,i.entry_flow.reduction_block_0,!1),l=Ql(l,i.entry_flow.reduction_block_1),Rs(r._numMainBlocks,0,1).forEach(function(d){l=Iy(l,i.middle_flow["main_block_"+d])}),l=Ql(l,i.exit_flow.reduction_block),l=nn(yi(l,i.exit_flow.separable_conv,[1,1])),l})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"tiny_xception_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Sy(e,this._numMainBlocks)},t.prototype.extractParams=function(e){return Ey(e,this._numMainBlocks)},t}(ba);function Ry(n){var t=[],e=Aa(n),r=e.extractWeights,i=e.getRemainingWeights,a=Ll(r,t),s=a(512,1,"fc/age"),u=a(512,2,"fc/gender");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{fc:{age:s,gender:u}}}}function ky(n){var t=[],e=Ha(n,t);function r(a){var s=e(a+"/weights",2),u=e(a+"/bias",1);return{weights:s,bias:u}}var i={fc:{age:r("fc/age"),gender:r("fc/gender")}};return wa(n,t),{params:i,paramMappings:t}}var Eu;(function(n){n.FEMALE="female",n.MALE="male"})(Eu||(Eu={}));var Oy=function(n){zt(t,n);function t(e){e===void 0&&(e=new Ty(2));var r=n.call(this,"AgeGenderNet")||this;return r._faceFeatureExtractor=e,r}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return qe(function(){var a=e instanceof bu?r.faceFeatureExtractor.forwardInput(e):e,s=Cs(a,[7,7],[2,2],"valid").as2D(a.shape[0],-1),u=ra(s,i.fc.age).as1D(),l=ra(s,i.fc.gender);return{age:u,gender:l}})},t.prototype.forwardInput=function(e){var r=this;return qe(function(){var i=r.runNet(e),a=i.age,s=i.gender;return{age:a,gender:vi(s)}})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictAgeAndGender=function(e){return It(this,void 0,void 0,function(){var r,i,a,s,u,l,d=this;return Tt(this,function(A){switch(A.label){case 0:return[4,Rn(e)];case 1:return r=A.sent(),[4,this.forwardInput(r)];case 2:return i=A.sent(),a=Ur(i.age),s=Ur(i.gender),u=a.map(function(T,D){return{ageTensor:T,genderTensor:s[D]}}),[4,Promise.all(u.map(function(T){var D=T.ageTensor,U=T.genderTensor;return It(d,void 0,void 0,function(){var te,oe,ae,se,we;return Tt(this,function(Ce){switch(Ce.label){case 0:return[4,D.data()];case 1:return te=Ce.sent()[0],[4,U.data()];case 2:return oe=Ce.sent()[0],ae=oe>.5,se=ae?Eu.MALE:Eu.FEMALE,we=ae?oe:1-oe,D.dispose(),U.dispose(),[2,{age:te,gender:se,genderProbability:we}]}})})}))];case 3:return l=A.sent(),i.age.dispose(),i.gender.dispose(),[2,r.isBatchInput?l:l[0]]}})})},t.prototype.getDefaultModelName=function(){return"age_gender_model"},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,a=r.paramMappings;this._params=i,this._paramMappings=a},t.prototype.extractClassifierParams=function(e){return Ry(e)},t.prototype.extractParamsFromWeigthMap=function(e){var r=Zd(e),i=r.featureExtractorMap,a=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),ky(a)},t.prototype.extractParams=function(e){var r=1539,i=e.slice(0,e.length-r),a=e.slice(e.length-r);return this.faceFeatureExtractor.extractWeights(i),this.extractClassifierParams(a)},t}(ba),ep=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postProcess=function(e,r,i){var a=i.map(function(u){var l=u.width,d=u.height,A=r/Math.max(d,l);return{width:l*A,height:d*A}}),s=a.length;return qe(function(){var u=function(D,U){return wn([en([68],D),en([68],U)],1).as2D(1,136).as1D()},l=function(D,U){var te=a[D],oe=te.width,ae=te.height;return U(oe,ae)?Math.abs(oe-ae)/2:0},d=function(D){return l(D,function(U,te){return U<te})},A=function(D){return l(D,function(U,te){return te<U})},T=e.mul(en([s,136],r)).sub(wn(Array.from(Array(s),function(D,U){return u(d(U),A(U))}))).div(wn(Array.from(Array(s),function(D,U){return u(a[U].width,a[U].height)})));return T})},t.prototype.forwardInput=function(e){var r=this;return qe(function(){var i=r.runNet(e);return r.postProcess(i,e.inputSize,e.inputDimensions.map(function(a){var s=a[0],u=a[1];return{height:s,width:u}}))})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.detectLandmarks=function(e){return It(this,void 0,void 0,function(){var r,i,a,s=this;return Tt(this,function(u){switch(u.label){case 0:return[4,Rn(e)];case 1:return r=u.sent(),i=qe(function(){return Ur(s.forwardInput(r))}),[4,Promise.all(i.map(function(l,d){return It(s,void 0,void 0,function(){var A,T,D,U,te;return Tt(this,function(oe){switch(oe.label){case 0:return D=(T=Array).from,[4,l.data()];case 1:return A=D.apply(T,[oe.sent()]),U=A.filter(function(ae,se){return Id(se)}),te=A.filter(function(ae,se){return!Id(se)}),[2,new Od(Array(68).fill(0).map(function(ae,se){return new gr(U[se],te[se])}),{height:r.getInputHeight(d),width:r.getInputWidth(d)})]}})})}))];case 2:return a=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?a:a[0]]}})})},t.prototype.getClassifierChannelsOut=function(){return 136},t}(Jd),tp=function(n){zt(t,n);function t(e){return e===void 0&&(e=new Kd),n.call(this,"FaceLandmark68Net",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t}(ep);function Dy(n){var t=[],e=Xd(n,t).extractDenseBlock3Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2")};return wa(n,t),{params:r,paramMappings:t}}function jy(n){var t=[],e=Aa(n),r=e.extractWeights,i=e.getRemainingWeights,a=Hd(r,t).extractDenseBlock3Params,s=a(3,32,"dense0",!0),u=a(32,64,"dense1"),l=a(64,128,"dense2");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l}}}var Py=function(n){zt(t,n);function t(){return n.call(this,"TinyFaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("TinyFaceFeatureExtractor - load model before inference");return qe(function(){var i=e.toBatchTensor(112,!0),a=[122.782,117.001,104.298],s=Os(i,a).div(wt(255)),u=Fl(s,r.dense0,!0);return u=Fl(u,r.dense1),u=Fl(u,r.dense2),u=Cs(u,[14,14],[2,2],"valid"),u})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Dy(e)},t.prototype.extractParams=function(e){return jy(e)},t}(ba),By=function(n){zt(t,n);function t(e){return e===void 0&&(e=new Py),n.call(this,"FaceLandmark68TinyNet",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},t.prototype.getClassifierChannelsIn=function(){return 128},t}(ep),Wb=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(tp);function _y(n,t){return er(Wn(n,t.weights),t.biases)}function Hl(n,t,e,r,i){i===void 0&&(i="same");var a=t.conv,s=a.filters,u=a.bias,l=Oi(n,s,e,i);return l=er(l,u),l=_y(l,t.scale),r?nn(l):l}function My(n,t){return Hl(n,t,[1,1],!0)}function rp(n,t){return Hl(n,t,[1,1],!1)}function np(n,t){return Hl(n,t,[2,2],!0,"valid")}function Ny(n,t){function e(u,l,d){var A=n(u),T=A.length/(l*d*d);if(Kg(T))throw new Error("depth has to be an integer: "+T+", weights.length: "+A.length+", numFilters: "+l+", filterSize: "+d);return qe(function(){return La(un(A,[l,T,d,d]),[2,3,1,0])})}function r(u,l,d,A){var T=e(u,l,d),D=nr(n(l));return t.push({paramPath:A+"/filters"},{paramPath:A+"/bias"}),{filters:T,bias:D}}function i(u,l){var d=nr(n(u)),A=nr(n(u));return t.push({paramPath:l+"/weights"},{paramPath:l+"/biases"}),{weights:d,biases:A}}function a(u,l,d,A){var T=r(u,l,d,A+"/conv"),D=i(l,A+"/scale");return{conv:T,scale:D}}function s(u,l,d,A,T){T===void 0&&(T=!1);var D=a((T?.5:1)*u,l,d,A+"/conv1"),U=a(u,l,d,A+"/conv2");return{conv1:D,conv2:U}}return{extractConvLayerParams:a,extractResidualLayerParams:s}}function Fy(n){var t=Aa(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],a=Ny(e,i),s=a.extractConvLayerParams,u=a.extractResidualLayerParams,l=s(4704,32,7,"conv32_down"),d=u(9216,32,3,"conv32_1"),A=u(9216,32,3,"conv32_2"),T=u(9216,32,3,"conv32_3"),D=u(36864,64,3,"conv64_down",!0),U=u(36864,64,3,"conv64_1"),te=u(36864,64,3,"conv64_2"),oe=u(36864,64,3,"conv64_3"),ae=u(147456,128,3,"conv128_down",!0),se=u(147456,128,3,"conv128_1"),we=u(147456,128,3,"conv128_2"),Ce=u(589824,256,3,"conv256_down",!0),me=u(589824,256,3,"conv256_1"),Se=u(589824,256,3,"conv256_2"),Re=u(589824,256,3,"conv256_down_out"),Ue=qe(function(){return La(cr(e(256*128),[128,256]),[1,0])});if(i.push({paramPath:"fc"}),r().length!==0)throw new Error("weights remaing after extract: "+r().length);var We={conv32_down:l,conv32_1:d,conv32_2:A,conv32_3:T,conv64_down:D,conv64_1:U,conv64_2:te,conv64_3:oe,conv128_down:ae,conv128_1:se,conv128_2:we,conv256_down:Ce,conv256_1:me,conv256_2:Se,conv256_down_out:Re,fc:Ue};return{params:We,paramMappings:i}}function Ly(n,t){var e=Ha(n,t);function r(s){var u=e(s+"/scale/weights",1),l=e(s+"/scale/biases",1);return{weights:u,biases:l}}function i(s){var u=e(s+"/conv/filters",4),l=e(s+"/conv/bias",1),d=r(s);return{conv:{filters:u,bias:l},scale:d}}function a(s){return{conv1:i(s+"/conv1"),conv2:i(s+"/conv2")}}return{extractConvLayerParams:i,extractResidualLayerParams:a}}function Uy(n){var t=[],e=Ly(n,t),r=e.extractConvLayerParams,i=e.extractResidualLayerParams,a=r("conv32_down"),s=i("conv32_1"),u=i("conv32_2"),l=i("conv32_3"),d=i("conv64_down"),A=i("conv64_1"),T=i("conv64_2"),D=i("conv64_3"),U=i("conv128_down"),te=i("conv128_1"),oe=i("conv128_2"),ae=i("conv256_down"),se=i("conv256_1"),we=i("conv256_2"),Ce=i("conv256_down_out"),me=n.fc;if(t.push({originalPath:"fc",paramPath:"fc"}),!Xg(me))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+me);var Se={conv32_down:a,conv32_1:s,conv32_2:u,conv32_3:l,conv64_down:d,conv64_1:A,conv64_2:T,conv64_3:D,conv128_down:U,conv128_1:te,conv128_2:oe,conv256_down:ae,conv256_1:se,conv256_2:we,conv256_down_out:Ce,fc:me};return wa(n,t),{params:Se,paramMappings:t}}function na(n,t){var e=My(n,t.conv1);return e=rp(e,t.conv2),e=er(e,n),e=nn(e),e}function Cu(n,t){var e=np(n,t.conv1);e=rp(e,t.conv2);var r=Cs(n,2,2,"valid"),i=pr(r.shape),a=r.shape[3]!==e.shape[3],s=r.shape[1]!==e.shape[1]||r.shape[2]!==e.shape[2];if(s){var u=Is(e.shape);u[1]=1;var l=pr(u);e=Pr([e,l],1);var d=Is(e.shape);d[2]=1;var A=pr(d);e=Pr([e,A],2)}return r=a?Pr([r,i],3):r,e=er(r,e),e=nn(e),e}var Wy=function(n){zt(t,n);function t(){return n.call(this,"FaceRecognitionNet")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceRecognitionNet - load model before inference");return qe(function(){var i=e.toBatchTensor(150,!0).toFloat(),a=[122.782,117.001,104.298],s=Os(i,a).div(wt(256)),u=np(s,r.conv32_down);u=Tn(u,3,2,"valid"),u=na(u,r.conv32_1),u=na(u,r.conv32_2),u=na(u,r.conv32_3),u=Cu(u,r.conv64_down),u=na(u,r.conv64_1),u=na(u,r.conv64_2),u=na(u,r.conv64_3),u=Cu(u,r.conv128_down),u=na(u,r.conv128_1),u=na(u,r.conv128_2),u=Cu(u,r.conv256_down),u=na(u,r.conv256_1),u=na(u,r.conv256_2),u=Cu(u,r.conv256_down_out);var l=u.mean([1,2]),d=uu(l,r.fc);return d})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.computeFaceDescriptor=function(e){return It(this,void 0,void 0,function(){var r,i,a,s=this;return Tt(this,function(u){switch(u.label){case 0:return[4,Rn(e)];case 1:return r=u.sent(),i=qe(function(){return Ur(s.forwardInput(r))}),[4,Promise.all(i.map(function(l){return l.data()}))];case 2:return a=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?a:a[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_recognition_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Uy(e)},t.prototype.extractParams=function(e){return Fy(e)},t}(ba);function zb(n){var t=new FaceRecognitionNet;return t.extractWeights(n),t}function Vb(n){return(n.gender===Gender.MALE||n.gender===Gender.FEMALE)&&isValidProbablitiy(n.genderProbability)}function ip(n,t,e){var r={gender:t,genderProbability:e};return Object.assign({},n,r)}var ap=function(){function n(t){var e=t===void 0?{}:t,r=e.minFaceSize,i=e.scaleFactor,a=e.maxNumScales,s=e.scoreThresholds,u=e.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=r||20,this._scaleFactor=i||.709,this._maxNumScales=a||10,this._scoreThresholds=s||[.6,.7,.7],this._scaleSteps=u,typeof this._minFaceSize!="number"||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if(typeof this._scaleFactor!="number"||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if(typeof this._maxNumScales!="number"||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||this._scoreThresholds.length!==3||this._scoreThresholds.some(function(l){return typeof l!="number"}))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some(function(l){return typeof l!="number"})))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(n.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),n}();function zy(n,t){function e(l,d){var A=un(n(9*l),[3,3,l,1]),T=nr(n(l)),D=nr(n(l)),U=nr(n(l)),te=nr(n(l));return t.push({paramPath:d+"/filters"},{paramPath:d+"/batch_norm_scale"},{paramPath:d+"/batch_norm_offset"},{paramPath:d+"/batch_norm_mean"},{paramPath:d+"/batch_norm_variance"}),{filters:A,batch_norm_scale:T,batch_norm_offset:D,batch_norm_mean:U,batch_norm_variance:te}}function r(l,d,A,T,D){var U=un(n(l*d*A*A),[A,A,l,d]),te=nr(n(d));return t.push({paramPath:T+"/filters"},{paramPath:T+"/"+(D?"batch_norm_offset":"bias")}),{filters:U,bias:te}}function i(l,d,A,T){var D=r(l,d,A,T,!0),U=D.filters,te=D.bias;return{filters:U,batch_norm_offset:te}}function a(l,d,A){var T=e(l,A+"/depthwise_conv"),D=i(l,d,1,A+"/pointwise_conv");return{depthwise_conv:T,pointwise_conv:D}}function s(){var l=i(3,32,3,"mobilenetv1/conv_0"),d=a(32,64,"mobilenetv1/conv_1"),A=a(64,128,"mobilenetv1/conv_2"),T=a(128,128,"mobilenetv1/conv_3"),D=a(128,256,"mobilenetv1/conv_4"),U=a(256,256,"mobilenetv1/conv_5"),te=a(256,512,"mobilenetv1/conv_6"),oe=a(512,512,"mobilenetv1/conv_7"),ae=a(512,512,"mobilenetv1/conv_8"),se=a(512,512,"mobilenetv1/conv_9"),we=a(512,512,"mobilenetv1/conv_10"),Ce=a(512,512,"mobilenetv1/conv_11"),me=a(512,1024,"mobilenetv1/conv_12"),Se=a(1024,1024,"mobilenetv1/conv_13");return{conv_0:l,conv_1:d,conv_2:A,conv_3:T,conv_4:D,conv_5:U,conv_6:te,conv_7:oe,conv_8:ae,conv_9:se,conv_10:we,conv_11:Ce,conv_12:me,conv_13:Se}}function u(){var l=i(1024,256,1,"prediction_layer/conv_0"),d=i(256,512,3,"prediction_layer/conv_1"),A=i(512,128,1,"prediction_layer/conv_2"),T=i(128,256,3,"prediction_layer/conv_3"),D=i(256,128,1,"prediction_layer/conv_4"),U=i(128,256,3,"prediction_layer/conv_5"),te=i(256,64,1,"prediction_layer/conv_6"),oe=i(64,128,3,"prediction_layer/conv_7"),ae=r(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),se=r(512,9,1,"prediction_layer/box_predictor_0/class_predictor"),we=r(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),Ce=r(1024,18,1,"prediction_layer/box_predictor_1/class_predictor"),me=r(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),Se=r(512,18,1,"prediction_layer/box_predictor_2/class_predictor"),Re=r(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),Ue=r(256,18,1,"prediction_layer/box_predictor_3/class_predictor"),We=r(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),Ne=r(256,18,1,"prediction_layer/box_predictor_4/class_predictor"),Le=r(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),$e=r(128,18,1,"prediction_layer/box_predictor_5/class_predictor"),Ze={box_encoding_predictor:ae,class_predictor:se},et={box_encoding_predictor:we,class_predictor:Ce},tt={box_encoding_predictor:me,class_predictor:Se},st={box_encoding_predictor:Re,class_predictor:Ue},pt={box_encoding_predictor:We,class_predictor:Ne},ct={box_encoding_predictor:Le,class_predictor:$e};return{conv_0:l,conv_1:d,conv_2:A,conv_3:T,conv_4:D,conv_5:U,conv_6:te,conv_7:oe,box_predictor_0:Ze,box_predictor_1:et,box_predictor_2:tt,box_predictor_3:st,box_predictor_4:pt,box_predictor_5:ct}}return{extractMobilenetV1Params:s,extractPredictionLayerParams:u}}function Vy(n){var t=[],e=Aa(n),r=e.extractWeights,i=e.getRemainingWeights,a=zy(r,t),s=a.extractMobilenetV1Params,u=a.extractPredictionLayerParams,l=s(),d=u(),A=Dn(r(5118*4),[1,5118,4]),T={extra_dim:A};if(t.push({paramPath:"output_layer/extra_dim"}),i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{params:{mobilenetv1:l,prediction_layer:d,output_layer:T},paramMappings:t}}function Qy(n,t){var e=Ha(n,t);function r(d,A,T){var D=e(d+"/Conv2d_"+A+"_pointwise/weights",4,T+"/filters"),U=e(d+"/Conv2d_"+A+"_pointwise/convolution_bn_offset",1,T+"/batch_norm_offset");return{filters:D,batch_norm_offset:U}}function i(d){var A="mobilenetv1/conv_"+d,T="MobilenetV1/Conv2d_"+d+"_depthwise",D=A+"/depthwise_conv",U=A+"/pointwise_conv",te=e(T+"/depthwise_weights",4,D+"/filters"),oe=e(T+"/BatchNorm/gamma",1,D+"/batch_norm_scale"),ae=e(T+"/BatchNorm/beta",1,D+"/batch_norm_offset"),se=e(T+"/BatchNorm/moving_mean",1,D+"/batch_norm_mean"),we=e(T+"/BatchNorm/moving_variance",1,D+"/batch_norm_variance");return{depthwise_conv:{filters:te,batch_norm_scale:oe,batch_norm_offset:ae,batch_norm_mean:se,batch_norm_variance:we},pointwise_conv:r("MobilenetV1",d,U)}}function a(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:i(1),conv_2:i(2),conv_3:i(3),conv_4:i(4),conv_5:i(5),conv_6:i(6),conv_7:i(7),conv_8:i(8),conv_9:i(9),conv_10:i(10),conv_11:i(11),conv_12:i(12),conv_13:i(13)}}function s(d,A){var T=e(d+"/weights",4,A+"/filters"),D=e(d+"/biases",1,A+"/bias");return{filters:T,bias:D}}function u(d){var A=s("Prediction/BoxPredictor_"+d+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+d+"/box_encoding_predictor"),T=s("Prediction/BoxPredictor_"+d+"/ClassPredictor","prediction_layer/box_predictor_"+d+"/class_predictor");return{box_encoding_predictor:A,class_predictor:T}}function l(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:u(0),box_predictor_1:u(1),box_predictor_2:u(2),box_predictor_3:u(3),box_predictor_4:u(4),box_predictor_5:u(5)}}return{extractMobilenetV1Params:a,extractPredictionLayerParams:l}}function Hy(n){var t=[],e=Qy(n,t),r=e.extractMobilenetV1Params,i=e.extractPredictionLayerParams,a=n["Output/extra_dim"];if(t.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!vu(a))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+a);var s={mobilenetv1:r(),prediction_layer:i(),output_layer:{extra_dim:a}};return wa(n,t),{params:s,paramMappings:t}}function ia(n,t,e){return qe(function(){var r=Oi(n,t.filters,e,"same");return r=er(r,t.batch_norm_offset),Gu(r,0,6)})}var Gy=.0010000000474974513;function Xy(n,t,e){return qe(function(){var r=su(n,t.filters,e,"same");return r=xf(r,t.batch_norm_mean,t.batch_norm_variance,t.batch_norm_offset,t.batch_norm_scale,Gy),Gu(r,0,6)})}function Ky(n){return[2,4,6,12].some(function(t){return t===n})?[2,2]:[1,1]}function Zy(n,t){return qe(function(){var e=null,r=ia(n,t.conv_0,[2,2]),i=[t.conv_1,t.conv_2,t.conv_3,t.conv_4,t.conv_5,t.conv_6,t.conv_7,t.conv_8,t.conv_9,t.conv_10,t.conv_11,t.conv_12,t.conv_13];if(i.forEach(function(a,s){var u=s+1,l=Ky(u);r=Xy(r,a.depthwise_conv,l),r=ia(r,a.pointwise_conv,[1,1]),u===11&&(e=r)}),e===null)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:e}})}function Jy(n,t,e,r,i){var a=n.shape[0],s=Math.min(e,a),u=t.map(function(A,T){return{score:A,boxIndex:T}}).filter(function(A){return A.score>i}).sort(function(A,T){return T.score-A.score}),l=function(A){return A<=r?1:0},d=[];return u.forEach(function(A){if(!(d.length>=s)){for(var T=A.score,D=d.length-1;D>=0;--D){var U=Yy(n,A.boxIndex,d[D]);if(U!==0&&(A.score*=l(U),A.score<=i))break}T===A.score&&d.push(A.boxIndex)}}),d}function Yy(n,t,e){var r=n.arraySync(),i=Math.min(r[t][0],r[t][2]),a=Math.min(r[t][1],r[t][3]),s=Math.max(r[t][0],r[t][2]),u=Math.max(r[t][1],r[t][3]),l=Math.min(r[e][0],r[e][2]),d=Math.min(r[e][1],r[e][3]),A=Math.max(r[e][0],r[e][2]),T=Math.max(r[e][1],r[e][3]),D=(s-i)*(u-a),U=(A-l)*(T-d);if(D<=0||U<=0)return 0;var te=Math.max(i,l),oe=Math.max(a,d),ae=Math.min(s,A),se=Math.min(u,T),we=Math.max(ae-te,0)*Math.max(se-oe,0);return we/(D+U-we)}function $y(n){var t=Ur(La(n,[1,0])),e=[xn(t[2],t[0]),xn(t[3],t[1])],r=[er(t[0],Wi(e[0],wt(2))),er(t[1],Wi(e[1],wt(2)))];return{sizes:e,centers:r}}function qy(n,t){var e=$y(n),r=e.sizes,i=e.centers,a=Ur(La(t,[1,0])),s=Wi(Wn(Xu(Wi(a[2],wt(5))),r[0]),wt(2)),u=er(Wn(Wi(a[0],wt(10)),r[0]),i[0]),l=Wi(Wn(Xu(Wi(a[3],wt(5))),r[1]),wt(2)),d=er(Wn(Wi(a[1],wt(10)),r[1]),i[1]);return La(wn([xn(u,s),xn(d,l),er(u,s),er(d,l)]),[1,0])}function e0(n,t,e){return qe(function(){var r=n.shape[0],i=qy(hn(hi(e.extra_dim,[r,1,1]),[-1,4]),hn(n,[-1,4]));i=hn(i,[r,i.shape[0]/r,4]);var a=yf(qi(t,[0,0,1],[-1,-1,-1])),s=qi(a,[0,0,0],[-1,-1,1]);s=hn(s,[r,s.shape[1]]);var u=Ur(i),l=Ur(s);return{boxes:u,scores:l}})}function qo(n,t){return qe(function(){var e=n.shape[0],r=hn(zi(n,t.box_encoding_predictor),[e,-1,1,4]),i=hn(zi(n,t.class_predictor),[e,-1,3]);return{boxPredictionEncoding:r,classPrediction:i}})}function t0(n,t,e){return qe(function(){var r=ia(n,e.conv_0,[1,1]),i=ia(r,e.conv_1,[2,2]),a=ia(i,e.conv_2,[1,1]),s=ia(a,e.conv_3,[2,2]),u=ia(s,e.conv_4,[1,1]),l=ia(u,e.conv_5,[2,2]),d=ia(l,e.conv_6,[1,1]),A=ia(d,e.conv_7,[2,2]),T=qo(t,e.box_predictor_0),D=qo(n,e.box_predictor_1),U=qo(i,e.box_predictor_2),te=qo(s,e.box_predictor_3),oe=qo(l,e.box_predictor_4),ae=qo(A,e.box_predictor_5),se=Pr([T.boxPredictionEncoding,D.boxPredictionEncoding,U.boxPredictionEncoding,te.boxPredictionEncoding,oe.boxPredictionEncoding,ae.boxPredictionEncoding],1),we=Pr([T.classPrediction,D.classPrediction,U.classPrediction,te.classPrediction,oe.classPrediction,ae.classPrediction],1);return{boxPredictions:se,classPredictions:we}})}var Su=function(){function n(t){var e=t===void 0?{}:t,r=e.minConfidence,i=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=r||.5,this._maxResults=i||100,typeof this._minConfidence!="number"||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if(typeof this._maxResults!="number")throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(n.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),n}(),op=function(n){zt(t,n);function t(){return n.call(this,"SsdMobilenetv1")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("SsdMobilenetv1 - load model before inference");return qe(function(){var i=e.toBatchTensor(512,!1).toFloat(),a=xn(Wn(i,wt(.007843137718737125)),wt(1)),s=Zy(a,r.mobilenetv1),u=t0(s.out,s.conv11,r.prediction_layer),l=u.boxPredictions,d=u.classPredictions;return e0(l,d,r.output_layer)})},t.prototype.forward=function(e){return It(this,void 0,void 0,function(){var r;return Tt(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Rn(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.locateFaces=function(e,r){return r===void 0&&(r={}),It(this,void 0,void 0,function(){var i,a,s,u,l,d,A,T,D,U,te,oe,ae,se,we,Ce,me,Se,Re,Ue,We;return Tt(this,function(Ne){switch(Ne.label){case 0:return i=new Su(r),a=i.maxResults,s=i.minConfidence,[4,Rn(e)];case 1:for(u=Ne.sent(),l=this.forwardInput(u),d=l.boxes,A=l.scores,T=d[0],D=A[0],U=1;U<d.length;U++)d[U].dispose(),A[U].dispose();return ae=(oe=Array).from,[4,D.data()];case 2:return te=ae.apply(oe,[Ne.sent()]),se=.5,we=Jy(T,te,a,se,s),Ce=u.getReshapedInputDimensions(0),me=u.inputSize,Se=me/Ce.width,Re=me/Ce.height,Ue=T.arraySync(),We=we.map(function(Le){var $e=[Math.max(0,Ue[Le][0]),Math.min(1,Ue[Le][2])].map(function(ct){return ct*Re}),Ze=$e[0],et=$e[1],tt=[Math.max(0,Ue[Le][1]),Math.min(1,Ue[Le][3])].map(function(ct){return ct*Se}),st=tt[0],pt=tt[1];return new gi(te[Le],new Ol(st,Ze,pt-st,et-Ze),{height:u.getInputHeight(0),width:u.getInputWidth(0)})}),T.dispose(),D.dispose(),[2,We]}})})},t.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Hy(e)},t.prototype.extractParams=function(e){return Vy(e)},t}(ba);function r0(n){var t=new SsdMobilenetv1;return t.extractWeights(n),t}function Qb(n){return r0(n)}var Hb=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(op),n0=.4,i0=[new gr(.738768,.874946),new gr(2.42204,2.65704),new gr(4.30971,7.04493),new gr(10.246,4.59428),new gr(12.6868,11.8741)],a0=[new gr(1.603231,2.094468),new gr(6.041143,7.080126),new gr(2.882459,3.518061),new gr(4.266906,5.178857),new gr(9.041765,10.66308)],o0=[117.001,114.697,97.404],s0="tiny_yolov2_model",u0="tiny_yolov2_separable_conv_model",Iu=function(n){return typeof n=="number"};function l0(n){if(!n)throw new Error("invalid config: "+n);if(typeof n.withSeparableConvs!="boolean")throw new Error("config.withSeparableConvs has to be a boolean, have: "+n.withSeparableConvs);if(!Iu(n.iouThreshold)||n.iouThreshold<0||n.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+n.iouThreshold);if(!Array.isArray(n.classes)||!n.classes.length||!n.classes.every(function(t){return typeof t=="string"}))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(n.classes));if(!Array.isArray(n.anchors)||!n.anchors.length||!n.anchors.map(function(t){return t||{}}).every(function(t){return Iu(t.x)&&Iu(t.y)}))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(n.anchors));if(n.meanRgb&&(!Array.isArray(n.meanRgb)||n.meanRgb.length!==3||!n.meanRgb.every(Iu)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(n.meanRgb))}function Gl(n){return qe(function(){var t=Wn(n,wt(.10000000149011612));return er(nn(xn(n,t)),t)})}function Ga(n,t){return qe(function(){var e=Fn(n,[[0,0],[1,1],[1,1],[0,0]]);return e=Oi(e,t.conv.filters,[1,1],"valid"),e=xn(e,t.bn.sub),e=Wn(e,t.bn.truediv),e=er(e,t.conv.bias),Gl(e)})}function Xa(n,t){return qe(function(){var e=Fn(n,[[0,0],[1,1],[1,1],[0,0]]);return e=$u(e,t.depthwise_filter,t.pointwise_filter,[1,1],"valid"),e=er(e,t.bias),Gl(e)})}function c0(n,t){var e=Au(n,t);function r(s,u){var l=nr(n(s)),d=nr(n(s));return t.push({paramPath:u+"/sub"},{paramPath:u+"/truediv"}),{sub:l,truediv:d}}function i(s,u,l){var d=e(s,u,3,l+"/conv"),A=r(u,l+"/bn");return{conv:d,bn:A}}var a=Ul(n,t);return{extractConvParams:e,extractConvWithBatchNormParams:i,extractSeparableConvParams:a}}function f0(n,t,e,r){var i=Aa(n),a=i.extractWeights,s=i.getRemainingWeights,u=[],l=c0(a,u),d=l.extractConvParams,A=l.extractConvWithBatchNormParams,T=l.extractSeparableConvParams,D;if(t.withSeparableConvs){var U=r[0],te=r[1],oe=r[2],ae=r[3],se=r[4],we=r[5],Ce=r[6],me=r[7],Se=r[8],Re=t.isFirstLayerConv2d?d(U,te,3,"conv0"):T(U,te,"conv0"),Ue=T(te,oe,"conv1"),We=T(oe,ae,"conv2"),Ne=T(ae,se,"conv3"),Le=T(se,we,"conv4"),$e=T(we,Ce,"conv5"),Ze=me?T(Ce,me,"conv6"):void 0,et=Se?T(me,Se,"conv7"):void 0,tt=d(Se||me||Ce,5*e,1,"conv8");D={conv0:Re,conv1:Ue,conv2:We,conv3:Ne,conv4:Le,conv5:$e,conv6:Ze,conv7:et,conv8:tt}}else{var U=r[0],te=r[1],oe=r[2],ae=r[3],se=r[4],we=r[5],Ce=r[6],me=r[7],Se=r[8],Re=A(U,te,"conv0"),Ue=A(te,oe,"conv1"),We=A(oe,ae,"conv2"),Ne=A(ae,se,"conv3"),Le=A(se,we,"conv4"),$e=A(we,Ce,"conv5"),Ze=A(Ce,me,"conv6"),et=A(me,Se,"conv7"),tt=d(Se,5*e,1,"conv8");D={conv0:Re,conv1:Ue,conv2:We,conv3:Ne,conv4:Le,conv5:$e,conv6:Ze,conv7:et,conv8:tt}}if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{params:D,paramMappings:u}}function d0(n,t){var e=Ha(n,t);function r(u){var l=e(u+"/sub",1),d=e(u+"/truediv",1);return{sub:l,truediv:d}}function i(u){var l=e(u+"/filters",4),d=e(u+"/bias",1);return{filters:l,bias:d}}function a(u){var l=i(u+"/conv"),d=r(u+"/bn");return{conv:l,bn:d}}var s=Wl(e);return{extractConvParams:i,extractConvWithBatchNormParams:a,extractSeparableConvParams:s}}function p0(n,t){var e=[],r=d0(n,e),i=r.extractConvParams,a=r.extractConvWithBatchNormParams,s=r.extractSeparableConvParams,u;if(t.withSeparableConvs){var l=t.filterSizes&&t.filterSizes.length||9;u={conv0:t.isFirstLayerConv2d?i("conv0"):s("conv0"),conv1:s("conv1"),conv2:s("conv2"),conv3:s("conv3"),conv4:s("conv4"),conv5:s("conv5"),conv6:l>7?s("conv6"):void 0,conv7:l>8?s("conv7"):void 0,conv8:i("conv8")}}else u={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return wa(n,e),{params:u,paramMappings:e}}var sp;(function(n){n[n.XS=224]="XS",n[n.SM=320]="SM",n[n.MD=416]="MD",n[n.LG=608]="LG"})(sp||(sp={}));var Xl=function(){function n(t){var e=t===void 0?{}:t,r=e.inputSize,i=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=r||416,this._scoreThreshold=i||.5,typeof this._inputSize!="number"||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if(typeof this._scoreThreshold!="number"||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),n}(),up=function(n){zt(t,n);function t(e){var r=n.call(this,"TinyYolov2")||this;return l0(e),r._config=e,r}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),t.prototype.runTinyYolov2=function(e,r){var i=Ga(e,r.conv0);return i=Tn(i,[2,2],[2,2],"same"),i=Ga(i,r.conv1),i=Tn(i,[2,2],[2,2],"same"),i=Ga(i,r.conv2),i=Tn(i,[2,2],[2,2],"same"),i=Ga(i,r.conv3),i=Tn(i,[2,2],[2,2],"same"),i=Ga(i,r.conv4),i=Tn(i,[2,2],[2,2],"same"),i=Ga(i,r.conv5),i=Tn(i,[2,2],[1,1],"same"),i=Ga(i,r.conv6),i=Ga(i,r.conv7),zi(i,r.conv8,"valid",!1)},t.prototype.runMobilenet=function(e,r){var i=this.config.isFirstLayerConv2d?Gl(zi(e,r.conv0,"valid",!1)):Xa(e,r.conv0);return i=Tn(i,[2,2],[2,2],"same"),i=Xa(i,r.conv1),i=Tn(i,[2,2],[2,2],"same"),i=Xa(i,r.conv2),i=Tn(i,[2,2],[2,2],"same"),i=Xa(i,r.conv3),i=Tn(i,[2,2],[2,2],"same"),i=Xa(i,r.conv4),i=Tn(i,[2,2],[2,2],"same"),i=Xa(i,r.conv5),i=Tn(i,[2,2],[1,1],"same"),i=r.conv6?Xa(i,r.conv6):i,i=r.conv7?Xa(i,r.conv7):i,zi(i,r.conv8,"valid",!1)},t.prototype.forwardInput=function(e,r){var i=this,a=this.params;if(!a)throw new Error("TinyYolov2 - load model before inference");return qe(function(){var s=e.toBatchTensor(r,!1).toFloat();return s=i.config.meanRgb?Os(s,i.config.meanRgb):s,s=s.div(wt(256)),i.config.withSeparableConvs?i.runMobilenet(s,a):i.runTinyYolov2(s,a)})},t.prototype.forward=function(e,r){return It(this,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Rn(e)];case 1:return[4,i.apply(this,[a.sent(),r])];case 2:return[2,a.sent()]}})})},t.prototype.detect=function(e,r){return r===void 0&&(r={}),It(this,void 0,void 0,function(){var i,a,s,u,l,d,A,T,D,U,te,oe,ae,se,we=this;return Tt(this,function(Ce){switch(Ce.label){case 0:return i=new Xl(r),a=i.inputSize,s=i.scoreThreshold,[4,Rn(e)];case 1:return u=Ce.sent(),[4,this.forwardInput(u,a)];case 2:return l=Ce.sent(),d=qe(function(){return Ur(l)[0].expandDims()}),A={width:u.getInputWidth(0),height:u.getInputHeight(0)},[4,this.extractBoxes(d,u.getReshapedInputDimensions(0),s)];case 3:return T=Ce.sent(),l.dispose(),d.dispose(),D=T.map(function(me){return me.box}),U=T.map(function(me){return me.score}),te=T.map(function(me){return me.classScore}),oe=T.map(function(me){return we.config.classes[me.label]}),ae=ks(D.map(function(me){return me.rescale(a)}),U,this.config.iouThreshold,!0),se=ae.map(function(me){return new kd(U[me],te[me],oe[me],D[me],A)}),[2,se]}})})},t.prototype.getDefaultModelName=function(){return""},t.prototype.extractParamsFromWeigthMap=function(e){return p0(e,this.config)},t.prototype.extractParams=function(e){var r=this.config.filterSizes||t.DEFAULT_FILTER_SIZES,i=r?r.length:void 0;if(i!==7&&i!==8&&i!==9)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+i+" filterSizes in config");return f0(e,this.config,this.boxEncodingSize,r)},t.prototype.extractBoxes=function(e,r,i){return It(this,void 0,void 0,function(){var a,s,u,l,d,A,T,D,U,te,oe,ae,se,we,Ce,me,Se,Re,Ue,We,Ne,Le,$e,Ze,et,tt,st,pt,ct,lt=this;return Tt(this,function(mt){switch(mt.label){case 0:return a=r.width,s=r.height,u=Math.max(a,s),l=u/a,d=u/s,A=e.shape[1],T=this.config.anchors.length,D=qe(function(){var ut=e.reshape([A,A,T,lt.boxEncodingSize]),yt=ut.slice([0,0,0,0],[A,A,T,4]),At=ut.slice([0,0,0,4],[A,A,T,1]),St=lt.withClassScores?vi(ut.slice([0,0,0,5],[A,A,T,lt.config.classes.length]),3):wt(0);return[yt,At,St]}),U=D[0],te=D[1],oe=D[2],ae=[],[4,te.array()];case 1:return se=mt.sent(),[4,U.array()];case 2:we=mt.sent(),Ce=0,mt.label=3;case 3:if(!(Ce<A))return[3,12];me=0,mt.label=4;case 4:if(!(me<A))return[3,11];Se=0,mt.label=5;case 5:return Se<T?(Re=kl(se[Ce][me][Se][0]),!i||Re>i?(Ue=(me+kl(we[Ce][me][Se][0]))/A*l,We=(Ce+kl(we[Ce][me][Se][1]))/A*d,Ne=Math.exp(we[Ce][me][Se][2])*this.config.anchors[Se].x/A*l,Le=Math.exp(we[Ce][me][Se][3])*this.config.anchors[Se].y/A*d,$e=Ue-Ne/2,Ze=We-Le/2,et={row:Ce,col:me,anchor:Se},this.withClassScores?[4,this.extractPredictedClass(oe,et)]:[3,7]):[3,9]):[3,10];case 6:return ct=mt.sent(),[3,8];case 7:ct={classScore:1,label:0},mt.label=8;case 8:tt=ct,st=tt.classScore,pt=tt.label,ae.push(Vn({box:new mu($e,Ze,$e+Ne,Ze+Le),score:Re,classScore:Re*st,label:pt},et)),mt.label=9;case 9:return Se++,[3,5];case 10:return me++,[3,4];case 11:return Ce++,[3,3];case 12:return U.dispose(),te.dispose(),oe.dispose(),[2,ae]}})})},t.prototype.extractPredictedClass=function(e,r){return It(this,void 0,void 0,function(){var i,a,s,u;return Tt(this,function(l){switch(l.label){case 0:return i=r.row,a=r.col,s=r.anchor,[4,e.array()];case 1:return u=l.sent(),[2,Array(this.config.classes.length).fill(0).map(function(d,A){return u[i][a][s][A]}).map(function(d,A){return{classScore:d,label:A}}).reduce(function(d,A){return d.classScore>A.classScore?d:A})]}})})},t.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],t}(ba),h0=function(n){zt(t,n);function t(e){e===void 0&&(e=!0);var r=this,i=Object.assign({},{withSeparableConvs:e,iouThreshold:n0,classes:["face"]},e?{anchors:a0,meanRgb:o0}:{anchors:i0,withClassScores:!0});return r=n.call(this,i)||this,r}return Object.defineProperty(t.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return It(this,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return[4,this.detect(e,r)];case 1:return i=a.sent(),[2,i.map(function(s){return new gi(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return this.withSeparableConvs?u0:s0},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(up);function Gb(n,t){t===void 0&&(t=!0);var e=new TinyYolov2(t);return e.extractWeights(n),e}var lp=function(n){zt(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return t}(Xl),Ps=function(){function n(){}return n.prototype.then=function(t){return It(this,void 0,void 0,function(){var e;return Tt(this,function(r){switch(r.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[r.sent()])]}})})},n.prototype.run=function(){return It(this,void 0,void 0,function(){return Tt(this,function(t){throw new Error("ComposableTask - run is not implemented")})})},n}();function cp(n,t){var e={descriptor:t};return Object.assign({},n,e)}function Tu(n,t,e,r,i){return i===void 0&&(i=function(a){var s=a.alignedRect;return s}),It(this,void 0,void 0,function(){var a,s,u,l,d;return Tt(this,function(A){switch(A.label){case 0:return a=n.map(function(T){return Vl(T)?i(T):T.detection}),u=r,u?[3,5]:t instanceof Wt?[4,Nl(t,a)]:[3,2];case 1:return l=A.sent(),[3,4];case 2:return[4,Ml(t,a)];case 3:l=A.sent(),A.label=4;case 4:u=l,A.label=5;case 5:return s=u,[4,e(s)];case 6:return d=A.sent(),s.forEach(function(T){return T instanceof Wt&&T.dispose()}),[2,d]}})})}function Kl(n,t,e,r,i){return It(this,void 0,void 0,function(){var a=this;return Tt(this,function(s){return[2,Tu([n],t,function(u){return It(a,void 0,void 0,function(){return Tt(this,function(l){return[2,e(u[0])]})})},r,i)]})})}function v0(n){return qe(function(){return wn(Ur(n,3).reverse(),3)})}var Ru=2,ku=12;function m0(n,t){var e=Au(n,t),r=Ll(n,t);function i(d,A){var T=nr(n(d));return t.push({paramPath:A}),T}function a(d,A,T){T===void 0&&(T=!1);var D=e(d[0],d[1],3,A+"/conv1"),U=i(d[1],A+"/prelu1_alpha"),te=e(d[1],d[2],3,A+"/conv2"),oe=i(d[2],A+"/prelu2_alpha"),ae=e(d[2],d[3],T?2:3,A+"/conv3"),se=i(d[3],A+"/prelu3_alpha");return{conv1:D,prelu1_alpha:U,conv2:te,prelu2_alpha:oe,conv3:ae,prelu3_alpha:se}}function s(){var d=a([3,10,16,32],"pnet"),A=e(32,2,1,"pnet/conv4_1"),T=e(32,4,1,"pnet/conv4_2");return Vn(Vn({},d),{conv4_1:A,conv4_2:T})}function u(){var d=a([3,28,48,64],"rnet",!0),A=r(576,128,"rnet/fc1"),T=i(128,"rnet/prelu4_alpha"),D=r(128,2,"rnet/fc2_1"),U=r(128,4,"rnet/fc2_2");return Vn(Vn({},d),{fc1:A,prelu4_alpha:T,fc2_1:D,fc2_2:U})}function l(){var d=a([3,32,64,64],"onet"),A=e(64,128,2,"onet/conv4"),T=i(128,"onet/prelu4_alpha"),D=r(1152,256,"onet/fc1"),U=i(256,"onet/prelu5_alpha"),te=r(256,2,"onet/fc2_1"),oe=r(256,4,"onet/fc2_2"),ae=r(256,10,"onet/fc2_3");return Vn(Vn({},d),{conv4:A,prelu4_alpha:T,fc1:D,prelu5_alpha:U,fc2_1:te,fc2_2:oe,fc2_3:ae})}return{extractPNetParams:s,extractRNetParams:u,extractONetParams:l}}function g0(n){var t=Aa(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],a=m0(e,i),s=a.extractPNetParams,u=a.extractRNetParams,l=a.extractONetParams,d=s(),A=u(),T=l();if(r().length!==0)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:d,rnet:A,onet:T},paramMappings:i}}function y0(n,t){var e=Ha(n,t);function r(A){var T=e(A+"/weights",4,A+"/filters"),D=e(A+"/bias",1);return{filters:T,bias:D}}function i(A){var T=e(A+"/weights",2),D=e(A+"/bias",1);return{weights:T,bias:D}}function a(A){return e(A,1)}function s(A){var T=r(A+"/conv1"),D=a(A+"/prelu1_alpha"),U=r(A+"/conv2"),te=a(A+"/prelu2_alpha"),oe=r(A+"/conv3"),ae=a(A+"/prelu3_alpha");return{conv1:T,prelu1_alpha:D,conv2:U,prelu2_alpha:te,conv3:oe,prelu3_alpha:ae}}function u(){var A=s("pnet"),T=r("pnet/conv4_1"),D=r("pnet/conv4_2");return Vn(Vn({},A),{conv4_1:T,conv4_2:D})}function l(){var A=s("rnet"),T=i("rnet/fc1"),D=a("rnet/prelu4_alpha"),U=i("rnet/fc2_1"),te=i("rnet/fc2_2");return Vn(Vn({},A),{fc1:T,prelu4_alpha:D,fc2_1:U,fc2_2:te})}function d(){var A=s("onet"),T=r("onet/conv4"),D=a("onet/prelu4_alpha"),U=i("onet/fc1"),te=a("onet/prelu5_alpha"),oe=i("onet/fc2_1"),ae=i("onet/fc2_2"),se=i("onet/fc2_3");return Vn(Vn({},A),{conv4:T,prelu4_alpha:D,fc1:U,prelu5_alpha:te,fc2_1:oe,fc2_2:ae,fc2_3:se})}return{extractPNetParams:u,extractRNetParams:l,extractONetParams:d}}function b0(n){var t=[],e=y0(n,t),r=e.extractPNetParams,i=e.extractRNetParams,a=e.extractONetParams,s=r(),u=i(),l=a();return wa(n,t),{params:{pnet:s,rnet:u,onet:l},paramMappings:t}}function Zl(n,t){var e=t[0],r=t[1];return{height:Math.floor(e*n),width:Math.floor(r*n)}}function w0(n,t,e){for(var r=e[0],i=e[1],a=ku/n,s=[],u=Math.min(r,i)*a,l=0;u>=12;)s.push(a*Math.pow(t,l)),u=u*t,l+=1;return s}var Jl=function(n){zt(t,n);function t(e,r,i,a){return n.call(this,{left:e,top:r,right:i,bottom:a},!0)||this}return t}(ea);function fp(n){return qe(function(){return Wn(xn(n,wt(127.5)),wt(.0078125))})}function es(n,t){return qe(function(){return er(nn(n),Wn(t,ru(nn(ru(n)))))})}function Yl(n,t,e){return e===void 0&&(e=!1),qe(function(){var r=zi(n,t.conv1,"valid");return r=es(r,t.prelu1_alpha),r=Tn(r,e?[2,2]:[3,3],[2,2],"same"),r=zi(r,t.conv2,"valid"),r=es(r,t.prelu2_alpha),r=e?r:Tn(r,[3,3],[2,2],"valid"),r=zi(r,t.conv3,"valid"),r=es(r,t.prelu3_alpha),r})}function A0(n,t){return qe(function(){var e=Yl(n,t,!0),r=zi(e,t.conv4_1,"valid"),i=tn(lu(r,3),3),a=vi(xn(r,i),3),s=zi(e,t.conv4_2,"valid");return{prob:a,regions:s}})}function x0(n,t){return qe(function(){var e=Zl(t,n.shape.slice(1)),r=e.height,i=e.width,a=nl.resizeBilinear(n,[r,i]),s=fp(a);return La(s,[0,2,1,3])})}function E0(n,t,e,r){for(var i=[],a=n.arraySync(),s=0;s<n.shape[0];s++)for(var u=0;u<n.shape[1];u++)a[s][u]>=r&&i.push(new gr(u,s));var l=i.map(function(d){var A=new mu(Math.round((d.y*Ru+1)/e),Math.round((d.x*Ru+1)/e),Math.round((d.y*Ru+ku)/e),Math.round((d.x*Ru+ku)/e)),T=a[d.y][d.x],D=t.arraySync(),U=new Jl(D[d.y][d.x][0],D[d.y][d.x][1],D[d.y][d.x][2],D[d.y][d.x][3]);return{cell:A,score:T,region:U}});return l}function C0(n,t,e,r,i){i.stage1=[];var a=t.map(function(D){return qe(function(){var U={scale:D},te=x0(n,D),oe=Date.now(),ae=A0(te,r),se=ae.prob,we=ae.regions;U.pnet=Date.now()-oe;var Ce=Ur(Ur(se,3)[1])[0],me=Ur(we)[0];return{scoresTensor:Ce,regionsTensor:me,scale:D,statsForScale:U}})}),s=a.map(function(D){var U=D.scoresTensor,te=D.regionsTensor,oe=D.scale,ae=D.statsForScale,se=E0(U,te,oe,e);if(U.dispose(),te.dispose(),!se.length)return i.stage1.push(ae),[];var we=Date.now(),Ce=ks(se.map(function(me){return me.cell}),se.map(function(me){return me.score}),.5);return ae.nms=Date.now()-we,ae.numBoxes=Ce.length,i.stage1.push(ae),Ce.map(function(me){return se[me]})}),u=s.reduce(function(D,U){return D.concat(U)},[]),l=[],d=[];if(u.length>0){var A=Date.now(),T=ks(u.map(function(D){return D.cell}),u.map(function(D){return D.score}),.7);i.stage1_nms=Date.now()-A,d=T.map(function(D){return u[D].score}),l=T.map(function(D){return u[D]}).map(function(D){var U=D.cell,te=D.region;return new mu(U.left+te.left*U.width,U.top+te.top*U.height,U.right+te.right*U.width,U.bottom+te.bottom*U.height).toSquare().round()})}return{boxes:l,scores:d}}function dp(n,t,e){var r=e.width,i=e.height;return It(this,void 0,void 0,function(){var a,s,u,l=this;return Tt(this,function(d){switch(d.label){case 0:return a=ta(n),[4,Promise.all(t.map(function(A){return It(l,void 0,void 0,function(){var T,D,U,te,oe,ae,se,we;return Tt(this,function(Ce){return T=A.padAtBorders(n.height,n.width),D=T.y,U=T.ey,te=T.x,oe=T.ex,ae=te-1,se=D-1,we=a.getImageData(ae,se,oe-ae,U-se),[2,Qn.isNodejs()?_l(we):createImageBitmap(we)]})})}))];case 1:return s=d.sent(),u=[],s.forEach(function(A){var T=yu({width:r,height:i}),D=ta(T);D.drawImage(A,0,0,r,i);for(var U=D.getImageData(0,0,r,i).data,te=[],oe=0;oe<U.length;oe+=4)te.push(U[oe+2]),te.push(U[oe+1]),te.push(U[oe]);u.push(te)}),[2,u.map(function(A){var T=qe(function(){var D=La(un(A,[1,r,i,3]),[0,2,1,3]).toFloat();return fp(D)});return T})]}})})}function S0(n,t){return qe(function(){var e=Yl(n,t),r=hn(e,[e.shape[0],t.fc1.weights.shape[0]]),i=ra(r,t.fc1),a=es(i,t.prelu4_alpha),s=ra(a,t.fc2_1),u=tn(lu(s,1),1),l=vi(xn(s,u),1),d=ra(a,t.fc2_2),A=Ur(l,1)[1];return{scores:A,regions:d}})}function I0(n,t,e,r,i){return It(this,void 0,void 0,function(){var a,s,u,l,d,A,T,D,U,te,oe,ae,se,we;return Tt(this,function(Ce){switch(Ce.label){case 0:return a=Date.now(),[4,dp(n,t,{width:24,height:24})];case 1:return s=Ce.sent(),i.stage2_extractImagePatches=Date.now()-a,a=Date.now(),u=s.map(function(me){var Se=S0(me,r);return me.dispose(),Se}),i.stage2_rnet=Date.now()-a,l=u.length>1?Pr(u.map(function(me){return me.scores})):u[0].scores,T=(A=Array).from,[4,l.data()];case 2:return d=T.apply(A,[Ce.sent()]),l.dispose(),D=d.map(function(me,Se){return{score:me,idx:Se}}).filter(function(me){return me.score>e}).map(function(me){var Se=me.idx;return Se}),U=D.map(function(me){return t[me]}),te=D.map(function(me){return d[me]}),oe=[],ae=[],U.length>0&&(a=Date.now(),se=ks(U,te,.7),i.stage2_nms=Date.now()-a,we=se.map(function(me){var Se=u[D[me]].regions.arraySync();return new Jl(Se[0][0],Se[0][1],Se[0][2],Se[0][3])}),ae=se.map(function(me){return te[me]}),oe=se.map(function(me,Se){return U[me].calibrate(we[Se])})),u.forEach(function(me){me.regions.dispose(),me.scores.dispose()}),[2,{boxes:oe,scores:ae}]}})})}function T0(n,t){return qe(function(){var e=Yl(n,t);e=Tn(e,[2,2],[2,2],"same"),e=zi(e,t.conv4,"valid"),e=es(e,t.prelu4_alpha);var r=hn(e,[e.shape[0],t.fc1.weights.shape[0]]),i=ra(r,t.fc1),a=es(i,t.prelu5_alpha),s=ra(a,t.fc2_1),u=tn(lu(s,1),1),l=vi(xn(s,u),1),d=ra(a,t.fc2_2),A=ra(a,t.fc2_3),T=Ur(l,1)[1];return{scores:T,regions:d,points:A}})}function R0(n,t,e,r,i){return It(this,void 0,void 0,function(){var a,s,u,l,d,A,T,D,U,te,oe,ae,se,we,Ce;return Tt(this,function(me){switch(me.label){case 0:return a=Date.now(),[4,dp(n,t,{width:48,height:48})];case 1:return s=me.sent(),i.stage3_extractImagePatches=Date.now()-a,a=Date.now(),u=s.map(function(Se){var Re=T0(Se,r);return Se.dispose(),Re}),i.stage3_onet=Date.now()-a,l=u.length>1?Pr(u.map(function(Se){return Se.scores})):u[0].scores,T=(A=Array).from,[4,l.data()];case 2:return d=T.apply(A,[me.sent()]),l.dispose(),D=d.map(function(Se,Re){return{score:Se,idx:Re}}).filter(function(Se){return Se.score>e}).map(function(Se){var Re=Se.idx;return Re}),U=D.map(function(Se){var Re=u[Se].regions.arraySync();return new Jl(Re[0][0],Re[0][1],Re[0][2],Re[0][3])}),te=D.map(function(Se,Re){return t[Se].calibrate(U[Re])}),oe=D.map(function(Se){return d[Se]}),ae=[],se=[],we=[],te.length>0&&(a=Date.now(),Ce=ks(te,oe,.7,!1),i.stage3_nms=Date.now()-a,ae=Ce.map(function(Se){return te[Se]}),se=Ce.map(function(Se){return oe[Se]}),we=Ce.map(function(Se,Re){return Array(5).fill(0).map(function(Ue,We){var Ne=u[Se].points.arraySync();return new gr(Ne[0][We]*(ae[Re].width+1)+ae[Re].left,Ne[0][We+5]*(ae[Re].height+1)+ae[Re].top)})})),u.forEach(function(Se){Se.regions.dispose(),Se.scores.dispose(),Se.points.dispose()}),[2,{boxes:ae,scores:se,points:we}]}})})}var k0=function(n){zt(t,n);function t(){return n.call(this,"Mtcnn")||this}return t.prototype.load=function(e){return It(this,void 0,void 0,function(){return Tt(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.load.call(this,e)]})})},t.prototype.loadFromDisk=function(e){return It(this,void 0,void 0,function(){return Tt(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.loadFromDisk.call(this,e)]})})},t.prototype.forwardInput=function(e,r){return r===void 0&&(r={}),It(this,void 0,void 0,function(){var i,a,s,u,l,d,A,T,D,U,te,oe,ae,se,we,Ce,me,Se,Re,Ue,We;return Tt(this,function(Ne){switch(Ne.label){case 0:if(i=this.params,!i)throw new Error("Mtcnn - load model before inference");if(a=e.canvases[0],!a)throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return s={},u=Date.now(),l=qe(function(){return v0(tn(Al.fromPixels(a)).toFloat())}),d=function(Le){return l.dispose(),s.total=Date.now()-u,Le},A=l.shape.slice(1),T=A[0],D=A[1],U=new ap(r),te=U.minFaceSize,oe=U.scaleFactor,ae=U.maxNumScales,se=U.scoreThresholds,we=U.scaleSteps,Ce=(we||w0(te,oe,[T,D])).filter(function(Le){var $e=Zl(Le,[T,D]);return Math.min($e.width,$e.height)>ku}).slice(0,ae),s.scales=Ce,s.pyramid=Ce.map(function(Le){return Zl(Le,[T,D])}),me=Date.now(),[4,C0(l,Ce,se[0],i.pnet,s)];case 1:return Se=Ne.sent(),s.total_stage1=Date.now()-me,Se.boxes.length?(s.stage2_numInputBoxes=Se.boxes.length,me=Date.now(),[4,I0(a,Se.boxes,se[1],i.rnet,s)]):[2,d({results:[],stats:s})];case 2:return Re=Ne.sent(),s.total_stage2=Date.now()-me,Re.boxes.length?(s.stage3_numInputBoxes=Re.boxes.length,me=Date.now(),[4,R0(a,Re.boxes,se[2],i.onet,s)]):[2,d({results:[],stats:s})];case 3:return Ue=Ne.sent(),s.total_stage3=Date.now()-me,We=Ue.boxes.map(function(Le,$e){return xu(js({},new gi(Ue.scores[$e],new Ol(Le.left/D,Le.top/T,Le.width/D,Le.height/T),{height:T,width:D})),new ry(Ue.points[$e].map(function(Ze){return Ze.sub(new gr(Le.left,Le.top)).div(new gr(Le.width,Le.height))}),{width:Le.width,height:Le.height}))}),[2,d({results:We,stats:s})]}})})},t.prototype.forward=function(e,r){return r===void 0&&(r={}),It(this,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Rn(e)];case 1:return[4,i.apply(this,[a.sent(),r])];case 2:return[2,a.sent().results]}})})},t.prototype.forwardWithStats=function(e,r){return r===void 0&&(r={}),It(this,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Rn(e)];case 1:return[2,i.apply(this,[a.sent(),r])]}})})},t.prototype.getDefaultModelName=function(){return"mtcnn_model"},t.prototype.extractParamsFromWeigthMap=function(e){return b0(e)},t.prototype.extractParams=function(e){return g0(e)},t}(ba),O0=.4,D0=[new gr(1.603231,2.094468),new gr(6.041143,7.080126),new gr(2.882459,3.518061),new gr(4.266906,5.178857),new gr(9.041765,10.66308)],j0=[117.001,114.697,97.404],P0=function(n){zt(t,n);function t(){var e=this,r={withSeparableConvs:!0,iouThreshold:O0,classes:["face"],anchors:D0,meanRgb:j0,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return e=n.call(this,r)||this,e}return Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return It(this,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return[4,this.detect(e,r)];case 1:return i=a.sent(),[2,i.map(function(s){return new gi(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(up),wr={ssdMobilenetv1:new op,tinyFaceDetector:new P0,tinyYolov2:new h0,mtcnn:new k0,faceLandmark68Net:new tp,faceLandmark68TinyNet:new By,faceRecognitionNet:new Wy,faceExpressionNet:new yy,ageGenderNet:new Oy},Xb=function(n,t){return wr.ssdMobilenetv1.locateFaces(n,t)},Kb=function(n,t){return wr.tinyFaceDetector.locateFaces(n,t)},Zb=function(n,t){return wr.tinyYolov2.locateFaces(n,t)},Jb=function(n,t){return wr.mtcnn.forward(n,t)},Yb=function(n){return wr.faceLandmark68Net.detectLandmarks(n)},$b=function(n){return wr.faceLandmark68TinyNet.detectLandmarks(n)},qb=function(n){return wr.faceRecognitionNet.computeFaceDescriptor(n)},e1=function(n){return wr.faceExpressionNet.predictExpressions(n)},t1=function(n){return wr.ageGenderNet.predictAgeAndGender(n)},r1=function(n){return wr.ssdMobilenetv1.load(n)},B0=function(n){return wr.tinyFaceDetector.load(n)},n1=function(n){return wr.mtcnn.load(n)},i1=function(n){return wr.tinyYolov2.load(n)},_0=function(n){return wr.faceLandmark68Net.load(n)},a1=function(n){return wr.faceLandmark68TinyNet.load(n)},M0=function(n){return wr.faceRecognitionNet.load(n)},o1=function(n){return wr.faceExpressionNet.load(n)},s1=function(n){return wr.ageGenderNet.load(n)},u1=null,l1=null,c1=null;function f1(n){return typeof n.age=="number"}function pp(n,t){var e={age:t};return Object.assign({},n,e)}var hp=function(n){zt(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.extractedFaces=i,a}return t}(Ps),$l=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r,i=this;return Tt(this,function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),[4,Tu(e,this.input,function(s){return It(i,void 0,void 0,function(){return Tt(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return wr.faceExpressionNet.predictExpressions(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=a.sent(),[2,e.map(function(s,u){return $d(s,r[u])})]}})})},t.prototype.withAgeAndGender=function(){return new rc(this,this.input)},t}(hp),ql=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r;return Tt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Kl(e,this.input,function(a){return wr.faceExpressionNet.predictExpressions(a)},this.extractedFaces)]:[2];case 2:return r=i.sent(),[2,$d(e,r)]}})})},t.prototype.withAgeAndGender=function(){return new nc(this,this.input)},t}(hp),ec=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new ic(this,this.input)},t.prototype.withFaceDescriptors=function(){return new oc(this,this.input)},t}($l),tc=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new ac(this,this.input)},t.prototype.withFaceDescriptor=function(){return new sc(this,this.input)},t}(ql),vp=function(n){zt(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.extractedFaces=i,a}return t}(Ps),rc=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r,i=this;return Tt(this,function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),[4,Tu(e,this.input,function(s){return It(i,void 0,void 0,function(){return Tt(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return wr.ageGenderNet.predictAgeAndGender(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=a.sent(),[2,e.map(function(s,u){var l=r[u],d=l.age,A=l.gender,T=l.genderProbability;return pp(ip(s,A,T),d)})]}})})},t.prototype.withFaceExpressions=function(){return new $l(this,this.input)},t}(vp),nc=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r,i,a,s;return Tt(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?[4,Kl(e,this.input,function(l){return wr.ageGenderNet.predictAgeAndGender(l)},this.extractedFaces)]:[2];case 2:return r=u.sent(),i=r.age,a=r.gender,s=r.genderProbability,[2,pp(ip(e,a,s),i)]}})})},t.prototype.withFaceExpressions=function(){return new ql(this,this.input)},t}(vp),ic=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new ec(this,this.input)},t.prototype.withFaceDescriptors=function(){return new oc(this,this.input)},t}(rc),ac=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new tc(this,this.input)},t.prototype.withFaceDescriptor=function(){return new sc(this,this.input)},t}(nc),mp=function(n){zt(t,n);function t(e,r){var i=n.call(this)||this;return i.parentTask=e,i.input=r,i}return t}(Ps),oc=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r;return Tt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),[4,Tu(e,this.input,function(a){return Promise.all(a.map(function(s){return wr.faceRecognitionNet.computeFaceDescriptor(s)}))},null,function(a){return a.landmarks.align(null,{useDlibAlignment:!0})})];case 2:return r=i.sent(),[2,r.map(function(a,s){return cp(e[s],a)})]}})})},t.prototype.withFaceExpressions=function(){return new ec(this,this.input)},t.prototype.withAgeAndGender=function(){return new ic(this,this.input)},t}(mp),sc=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r;return Tt(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Kl(e,this.input,function(a){return wr.faceRecognitionNet.computeFaceDescriptor(a)},null,function(a){return a.landmarks.align(null,{useDlibAlignment:!0})})]:[2];case 2:return r=i.sent(),[2,cp(e,r)]}})})},t.prototype.withFaceExpressions=function(){return new tc(this,this.input)},t.prototype.withAgeAndGender=function(){return new ac(this,this.input)},t}(mp),gp=function(n){zt(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.useTinyLandmarkNet=i,a}return Object.defineProperty(t.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?wr.faceLandmark68TinyNet:wr.faceLandmark68Net},enumerable:!0,configurable:!0}),t}(Ps),N0=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r,i,a,s,u=this;return Tt(this,function(l){switch(l.label){case 0:return[4,this.parentTask];case 1:return e=l.sent(),r=e.map(function(d){return d.detection}),this.input instanceof Wt?[4,Nl(this.input,r)]:[3,3];case 2:return a=l.sent(),[3,5];case 3:return[4,Ml(this.input,r)];case 4:a=l.sent(),l.label=5;case 5:return i=a,[4,Promise.all(i.map(function(d){return u.landmarkNet.detectLandmarks(d)}))];case 6:return s=l.sent(),i.forEach(function(d){return d instanceof Wt&&d.dispose()}),[2,e.map(function(d,A){return xu(d,s[A])})]}})})},t.prototype.withFaceExpressions=function(){return new ec(this,this.input)},t.prototype.withAgeAndGender=function(){return new ic(this,this.input)},t.prototype.withFaceDescriptors=function(){return new oc(this,this.input)},t}(gp),F0=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r,i,a,s;return Tt(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?(r=e.detection,this.input instanceof Wt?[4,Nl(this.input,[r])]:[3,3]):[2];case 2:return a=u.sent(),[3,5];case 3:return[4,Ml(this.input,[r])];case 4:a=u.sent(),u.label=5;case 5:return i=a,[4,this.landmarkNet.detectLandmarks(i[0])];case 6:return s=u.sent(),i.forEach(function(l){return l instanceof Wt&&l.dispose()}),[2,xu(e,s)]}})})},t.prototype.withFaceExpressions=function(){return new tc(this,this.input)},t.prototype.withAgeAndGender=function(){return new ac(this,this.input)},t.prototype.withFaceDescriptor=function(){return new sc(this,this.input)},t}(gp),yp=function(n){zt(t,n);function t(e,r){r===void 0&&(r=new Su);var i=n.call(this)||this;return i.input=e,i.options=r,i}return t}(Ps),L0=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r,i,a;return Tt(this,function(s){switch(s.label){case 0:return e=this,r=e.input,i=e.options,i instanceof ap?[4,wr.mtcnn.forward(r,i)]:[3,2];case 1:return[2,s.sent().map(function(u){return u.detection})];case 2:if(a=i instanceof lp?function(u){return wr.tinyFaceDetector.locateFaces(u,i)}:i instanceof Su?function(u){return wr.ssdMobilenetv1.locateFaces(u,i)}:i instanceof Xl?function(u){return wr.tinyYolov2.locateFaces(u,i)}:null,!a)throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,a(r)]}})})},t.prototype.runAndExtendWithFaceDetections=function(){var e=this;return new Promise(function(r){return It(e,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return[4,this.run()];case 1:return i=a.sent(),[2,r(i.map(function(s){return js({},s)}))]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new N0(this.runAndExtendWithFaceDetections(),this.input,e)},t.prototype.withFaceExpressions=function(){return new $l(this.runAndExtendWithFaceDetections(),this.input)},t.prototype.withAgeAndGender=function(){return new rc(this.runAndExtendWithFaceDetections(),this.input)},t}(yp),U0=function(n){zt(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return It(this,void 0,void 0,function(){var e,r;return Tt(this,function(i){switch(i.label){case 0:return[4,new L0(this.input,this.options)];case 1:return e=i.sent(),r=e[0],e.forEach(function(a){a.score>r.score&&(r=a)}),[2,r]}})})},t.prototype.runAndExtendWithFaceDetection=function(){var e=this;return new Promise(function(r){return It(e,void 0,void 0,function(){var i;return Tt(this,function(a){switch(a.label){case 0:return[4,this.run()];case 1:return i=a.sent(),[2,r(i?js({},i):void 0)]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new F0(this.runAndExtendWithFaceDetection(),this.input,e)},t.prototype.withFaceExpressions=function(){return new ql(this.runAndExtendWithFaceDetection(),this.input)},t.prototype.withAgeAndGender=function(){return new nc(this.runAndExtendWithFaceDetection(),this.input)},t}(yp);function uc(n,t){return t===void 0&&(t=new Su),new U0(n,t)}function d1(n,t){return t===void 0&&(t=new SsdMobilenetv1Options),new DetectAllFacesTask(n,t)}function p1(n,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesSsdMobilenetv1 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new SsdMobilenetv1Options(t?{minConfidence:t}:{})).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function h1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesTinyYolov2 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new TinyYolov2Options(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function v1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesMtcnn is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new MtcnnOptions(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}var m1=null;function W0(n,t){if(n.length!==t.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var e=Array.from(n),r=Array.from(t);return Math.sqrt(e.map(function(i,a){return i-r[a]}).reduce(function(i,a){return i+Math.pow(a,2)},0))}var z0=function(){function n(t,e){e===void 0&&(e=.6),this._distanceThreshold=e;var r=Array.isArray(t)?t:[t];if(!r.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var i=1,a=function(){return"person "+i++};this._labeledDescriptors=r.map(function(s){if(s instanceof gu)return s;if(s instanceof Float32Array)return new gu(a(),[s]);if(s.descriptor&&s.descriptor instanceof Float32Array)return new gu(a(),[s.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")})}return Object.defineProperty(n.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),n.prototype.computeMeanDistance=function(t,e){return e.map(function(r){return W0(r,t)}).reduce(function(r,i){return r+i},0)/(e.length||1)},n.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map(function(r){var i=r.descriptors,a=r.label;return new Dd(a,e.computeMeanDistance(t,i))}).reduce(function(r,i){return r.distance<i.distance?r:i})},n.prototype.findBestMatch=function(t){var e=this.matchDescriptor(t);return e.distance<this.distanceThreshold?e:new Dd("unknown",e.distance)},n.prototype.toJSON=function(){return{distanceThreshold:this.distanceThreshold,labeledDescriptors:this.labeledDescriptors.map(function(t){return t.toJSON()})}},n.fromJSON=function(t){var e=t.labeledDescriptors.map(function(r){return gu.fromJSON(r)});return new n(e,t.distanceThreshold)},n}();function g1(n){var t=new Mtcnn;return t.extractWeights(n),t}function y1(n){var t=new TinyFaceDetector;return t.extractWeights(n),t}function bp(n,t){var e=new wo(t.width,t.height),r=e.width,i=e.height;if(r<=0||i<=0)throw new Error("resizeResults - invalid dimensions: "+JSON.stringify({width:r,height:i}));if(Array.isArray(n))return n.map(function(u){return bp(u,{width:r,height:i})});if(Vl(n)){var a=n.detection.forSize(r,i),s=n.unshiftedLandmarks.forSize(a.box.width,a.box.height);return xu(js(n,a),s)}return Ds(n)?js(n,n.detection.forSize(r,i)):n instanceof $o||n instanceof gi?n.forSize(r,i):n}var V0=je(74330),Q0=je(56448),H0=je.n(Q0),G0=je(25934),X0=je(59451),K0=je(33170),Z0={wrp:"wrp___x6ffm"},ts=je(67294),Vi=(n,t,e)=>new Promise((r,i)=>{var a=l=>{try{u(e.next(l))}catch(d){i(d)}},s=l=>{try{u(e.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);u((e=e.apply(n,t)).next())});const J0=function(t,e){const r=t.split(","),i=r[0].match(/:(.*?);/)[1],a=atob(r[1]);let s=a.length;const u=new Uint8Array(s);for(;s--;)u[s]=a.charCodeAt(s);return new Blob([u],{type:i})},Y0=n=>Vi(void 0,null,function*(){return new Promise((t,e)=>{let r=new Image;(n==null?void 0:n.indexOf("educoder.net"))>-1?r.setAttribute("crossOrigin","educoder.net"):r.setAttribute("crossOrigin","aliyuncs.com"),r.onload=function(){let i=document.createElement("canvas");i.width=this.naturalWidth,i.height=this.naturalHeight,i.getContext("2d").drawImage(r,0,0);let a=i.toDataURL("image/png");t(a)},r.src=n,r.onerror=()=>{e(new Error("\u56FE\u7247\u6D41\u5F02\u5E38")),O.ZP.error("\u60A8\u7684\u8EAB\u4EFD\u7167\u7247\u5F02\u5E38\uFF0C\u8BF7\u62CD\u7167\u540E\u63D0\u4EA4\u81F3\u4EBA\u5DE5\u5BA1\u6838")}})});var $0=(0,Me.forwardRef)(({outputResult:n,identity_url:t,onCameraReady:e,defaultOpen:r},i)=>{const a=(0,at.useParams)(),s=(0,Me.useRef)(),u=(0,Me.useRef)(),l=(0,Me.useRef)(),d=(0,Me.useRef)(!1);let A=(0,Me.useRef)();const[T,D]=(0,Me.useState)(!0),[U,te]=(0,Me.useState)(""),[oe,ae]=(0,Me.useState)(""),se=(0,Me.useRef)(!1),we=(0,Me.useRef)(""),[Ce]=(0,Me.useState)(!0),me=.7,Se=224,Re="\u5BA1\u6838\u5931\u8D25",Ue=(0,Me.useMemo)(()=>new lp({inputSize:Se,scoreThreshold:me}),[]),We=()=>Vi(void 0,null,function*(){yield wr.ssdMobilenetv1.loadFromUri("https://www-cdn.educoder.net/weights/"),yield B0("https://www-cdn.educoder.net/weights/"),yield _0("https://www-cdn.educoder.net/weights/"),yield M0("https://www-cdn.educoder.net/weights/"),ct(!0)});(0,Me.useEffect)(()=>{r&&We()},[r]),(0,Me.useImperativeHandle)(i,()=>({handleStop:pt,handleRemove:st,handlePlay:ct,startDiscern:et,handleUploadImage:Ze}));const Ne=ut=>Vi(void 0,null,function*(){if(!s.current){setTimeout(()=>Ne(ut));return}navigator.mediaDevices.getUserMedia({video:{width:640,height:360}}).then(yt=>Vi(void 0,null,function*(){if("srcObject"in s.current?s.current.srcObject=yt:s.current.src=window.URL.createObjectURL(yt),s.current.onloadedmetadata=function(At){D(!1),s.current.play()},ut){const At=document.createElement("img");At.src=yield Y0(t+"?t="+new Date().getTime()),A.current=yield uc(At,Ue).withFaceLandmarks().withFaceDescriptor()}})).catch(function(yt){console.log("err:",yt,yt.message),yt.message==="Permission denied"||yt.name==="NotAllowedError"?O.ZP.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):yt.message!="\u56FE\u7247\u6D41\u5F02\u5E38"&&O.ZP.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934")})}),Le=(ut,yt)=>Vi(void 0,null,function*(){return new Promise(At=>Vi(void 0,null,function*(){var St,Ft,Ht,$t,ir,tr,ar;const qt=yield(0,K0.ZP)("/api/buckets/get_upload_token.json",{method:"get"});qt.data=JSON.parse((0,X0.pe)(qt.data));const rr=(0,G0.Z)(),Er=new(H0())({endpoint:(St=qt==null?void 0:qt.data)==null?void 0:St.end_point,region:(Ft=qt==null?void 0:qt.data)==null?void 0:Ft.region,accessKeyId:(Ht=qt==null?void 0:qt.data)==null?void 0:Ht.access_key_id,accessKeySecret:($t=qt==null?void 0:qt.data)==null?void 0:$t.access_key_secret,bucket:(ir=qt==null?void 0:qt.data)==null?void 0:ir.bucket,stsToken:(tr=qt==null?void 0:qt.data)==null?void 0:tr.security_token}),vr=J0(ut,rr);Er.multipartUpload(`${rr}.png`,vr,{timeout:10*1e3,partSize:10485760,callback:{url:(ar=qt==null?void 0:qt.data)==null?void 0:ar.callback_url,host:qt==null?void 0:qt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login="+a.login+"&container_id="+a.categoryId+"&container_type=ExerciseIdentity&p="+yt}}).then(function(Wr){At(Wr),console.log("result:",Wr)}).catch(function(Wr){console.log("err:",Wr)})}))}),$e=ut=>Vi(void 0,null,function*(){try{u.current.width=s.current.videoWidth,u.current.height=360,yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),we.current=u.current.toDataURL("image/png"),ut===1&&Le(we.current,ut)}catch(yt){}}),Ze=ut=>Vi(void 0,null,function*(){return new Promise(yt=>Vi(void 0,null,function*(){yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),yield Le(we.current,ut),yt()}))}),et=()=>Vi(void 0,null,function*(){d.current=!0;const ut=yield uc(s.current,Ue).withFaceLandmarks().withFaceDescriptor();if(ut&&A.current){const At=new z0(ut).findBestMatch(A.current.descriptor);te(At._distance<.43?"\u8BC6\u522B\u6210\u529F":Re),$e(At._distance<.43?1:0),setTimeout(()=>{n==null||n({content:At._distance<.43?"\u8BC6\u522B\u6210\u529F":Re,success:At._distance<.43})},1e3),se.current=!0}else $e(0),te(Re),setTimeout(()=>{n==null||n({content:Re,success:!1})},1e3);setTimeout(()=>{s.current.pause()},600)}),tt=()=>Vi(void 0,null,function*(){var ut,yt;if((ut=s.current)!=null&&ut.paused||(yt=s.current)!=null&&yt.ended)return setTimeout(()=>tt());const At=yield uc(s.current,Ue).withFaceLandmarks().withFaceDescriptor();d.current||(d.current=!0,e(!0)),At&&s.current?(ae(""),lt(s.current,l.current,[At],Ce)):ae("\u8BF7\u5C06\u8138\u90E8\u79FB\u52A8\u81F3\u53D6\u666F\u6846\u5185"),se.current||setTimeout(()=>tt())}),st=()=>{try{s.current.srcObject.getTracks().forEach(function(At){At.stop()}),d.current=!1}catch(ut){}},pt=()=>{D(!1);try{d.current=!1}catch(ut){}},ct=ut=>{d.current=!1,se.current=!1,u.current.getContext("2d").clearRect(0,0,640,480),te(""),D(!0);try{Ne(ut||!1)}catch(yt){}},lt=(ut,yt,At,St=!0)=>{const Ft=mt(ut,yt,At);St&&sy(yt,Ft.map(Ht=>Ht.detection))},mt=(ut,yt,At)=>{const{width:St,height:Ft}=ut instanceof HTMLVideoElement?Bl(ut):ut;return yt.width=St,yt.height=Ft,bp(At,{width:St,height:Ft})};return ts.createElement("div",{className:Z0.wrp},ts.createElement(V0.Z,{spinning:T,tip:"\u6B63\u5728\u542F\u52A8\u6444\u50CF\u5934\uFF0C\u8BF7\u7A0D\u540E..."},ts.createElement("video",{onPlay:tt,ref:s,id:"inputVideo",autoPlay:!0,muted:!0}),ts.createElement("canvas",{style:{zIndex:2},ref:l}),ts.createElement("canvas",{ref:u}),ts.createElement("div",{className:"c-red mt5 tc",style:{height:22}},U," ",oe)))}),q0="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAAHoCAYAAABJiJprAAAAAXNSR0IArs4c6QAAQABJREFUeAHsnQegXFW1/r+Z23vqTe89IYEAoQpBRBBFLIiU518BeYoFffr08RQVEbF3fE9AEaygwEOUJh1CaIkEEpIQ0utNQurtbe7815q5J/fM3Jkz7ZwzZ858S4c5ZZ9dfvvumzvfrL1WAHEWDocDcZd4SgIkQAIkQAIkQAIkQAIkQAIkQAIkQAIFRSAQCITNHT4idlD4MGPhMQmQAAmQAAmQAAmQAAmQAAmQAAmQgB8IGEJIRABJV/y4/vrrjwgmfoDAMZAACZAACZAACZAACZAACZAACZAACRQugeuuuy7GyyPZSFQESSmAHBE9rrsO1/XXdPfdd1MISUaV10mABEiABEiABEiABEiABEiABEiABBwlcOGFF0aEj+u1lesj/4WVGBIRQJJ5fxjCh1QQcrTXrJwESIAESIAESIAESIAESIAESIAESIAEciQgOkaJVpFMCAkmqj8ifojHx9y5c+npkQgQr5EACZAACZAACZAACZAACZAACZAACXiKQETDEC3DcOiI79wgAeSI+MFtLvGseE4CJEACJEACJEACJEACJEACJEACJOBhAnNVy0giggwSQHQckQfkfeTIkfQA8fDEsmskQAIkQAIkQAIkQAIkQAIkQAIkQAJRAoaGYWga8VxiBBD1/pC9MpEy+uCbb75JASSeGM9JgARIgARIgARIgARIgARIgARIgAQ8R0A1DEMEUW0jfitMjACivdcML2v6xY+hQ4dSAPHclLJDJEACJEACJEACJEACJEACJEACJEAC8QRUw1ARRDWNRNlrYwWQfu+PxVrLccdh9+7dFEDiifKcBEiABEiABEiABEiABEiABEiABEjAcwQiGoZoGRFNQ3vXr3EYHT0igES2v/RfVcVk6KZNgenTpxvl+E4CJEACJEACJEACJEACJEACJEACJEACniWgGoZqGUY4Dw3wYd4Gc0QAMUawZs2aI14fe/bsOXJs3Oc7CZAACZAACZAACZAACZAACZAACZAACXiNgFnDMGsbRj9jBJDIHpnFUWcRbn8xEPGdBEiABEiABEiABEiABEiABEiABEigEAgc0TJE24iPA1KacACyZwZ79+Jgays9QBIC4kUSIAESIAESIAESIAESIAESIAESIAEvEThYUxMoHTUqjMZGoKVlUNdiPEAG3eUFEiABEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IUADxwSRyCCRAAiRAAiRAAiRAAiRAAiRAAiRAAtYEKIBY8+FdEiABEiABEiABEiABEiABEiABEiABHxCgAOKDSeQQSIAESIAESIAESIAESIAESIAESIAErAlQALHmw7skQAIkQAIkQAIkQAIkQAIkQAIkQAI+IEABxAeTyCGQAAmQAAmQAAmQAAmQAAmQAAmQAAlYE6AAYs2Hd0mABEiABEiABEiABEiABEiABEiABHxAgAKIDyaRQyABEiABEiABEiABEiABEiABEiABErAmQAHEmg/vkgAJkAAJkAAJkAAJkAAJkAAJkAAJ+IAABRAfTCKHQAIkQAIkQAIkQAIkQAIkQAIkQAIkYE2AAog1H94lARIgARIgARIgARIgARIgARIgARLwAQEKID6YRA6BBEiABEiABEiABEiABEiABEiABEjAmgAFEGs+vEsCJEACJEACJEACJEACJEACJEACJOADAhRAfDCJHAIJkAAJkAAJkAAJkAAJkAAJkAAJkIA1AQog1nx4lwRIgARIgARIgARIgARIgARIgARIwAcEKID4YBI5BBIgARIgARIgARIgARIgARIgARIgAWsCFECs+fAuCZAACZAACZAACZAACZAACZAACZCADwhQAPHBJHIIJEACJEACJEACJEACJEACJEACJEAC1gQogFjz4V0SIAESIAESIAESIAESIAESIAESIAEfEKAA4oNJ5BBIgARIgARIgARIgARIgARIgARIgASsCVAAsebDuyRAAiRAAiRAAiRAAiRAAiRAAiRAAj4gQAHEB5PIIZAACZAACZAACZAACZAACZAACZAACVgToABizYd3SYAESIAESIAESIAESIAESIAESIAEfECAAogPJpFDIAESIAESIAESIAESIAESIAESIAESsCZAAcSaD++SAAmQAAmQAAmQAAmQAAmQAAmQAAn4gAAFEB9MIodAAiRAAiRAAiRAAiRAAiRAAiRAAiRgTYACiDUf3iUBEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IlPpgDBwCCZAACZAACZAACZBACgJdPcCWPcDGJnntBjbJ+75moK0TaJVX5L0j+q5V1VQCtVX973Ks5yPqgaljgGmj5SXvk0cBFWUpGuZtEiABcP3xh4AEvEGAAog35iFlL3r7gG75T6gvgL6+cMryLEACJEACJJCcQDAYQEkwjPLSIOT/NBLwJYENInA8v0Zea4FVW4Cd+yF/Q6Q/1O5W4KC8rCwo62fccGD+ZOCUOfKaC0wXYYRGAsVOgOuv2H8COH6vEqAA4tWZ6e9XSMSOju6wCB9GRyl+GCT4TgIkQALZElAhWT8I9oiwXCIf4KrKVRAJZFsdnyMBTxBQseLRV4Cl/aLH3kPOd0vX0fa3oq+HlkXbaxwSFUNOFTHk7GOBobXO94MtkEC+CXD95XsG2D4JpEeAAkh6nPJSSr0+2ruAcL/mUVEWQFlJAPptC/9Mz8uUsFESIAEfENBfqRHxIxQWl+SowNwmv2urK0BvEB/Mb7ENobsXeHwFcO9S4OlVKurln4AKL397Ifr66u+AM+YDF5wKnLUQ4nWV//6xByRgFwGuP7tIsh4ScI8A/xlyj3VGLannR1T8CEe+nayuCIJfTmaEkIVJgARIICEBFZDV60M9PspLA/K7VrcXRn/n1ogIQk+QhNh40WMEVm4G7noW+MdLwOE2j3XO1B0VZB4TgUZfDTXAe08ELj4dWDDFVIiHJFBgBLj+CmzC2F0SMBGgAGKC4aVD3fainh/6R3pNZZAeH16aHPaFBEjANwRUWNbfsW2d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ysQfqZx0Mr/7kPRBw0nrySFfYoKAICAICAKCgCAgCAgCgkARIBD7F3QRDE6GIAhkFYE+g7PafCqNNyxcSnWz5lHTspVkrWWvk1gpdTkVatPyVbRy6iya/+n39Mcr7/PnA2pYkAdZPyAu25G1UArclq1qoxBuCuO2+PwuWx37ONbUX6iB0+D279qDNt58B0V4dGPPj+FD1wuTH9aK1eqI/fv1p+b61dShvJw01gIZvslWVNlQT01za8maHcokk0LXpKogIAikiUBdXR09/PDD9NZbb6XZUmZ2b2xsTKmhr7/+ms4880z6/vvvU9pv7Nix9P777ye1z+eff05TpkxJqq5UKl0EVqxYQatXh/6vyzYKd999N/32228xDzN//nxCne+++y5mHe+GpUuXeotirj/wwAOET6asublZtZfoPp43bx499NBDtHZt7N8kmeqTtCMIZAoB8QDJFJLSTukhAC0QeIKsSv4/qGyA1Lh4Gc356OuIpqEoAq8OfAx4d3D2FZMzgQQbmzj9abSAZrAhtR+4EQfLxAqyw/QemImW2r2N5XVrKTjXos4dGf9kst6k2GOTSSyQH41rY2vMaJxFR5s/lyr1Vk+P8eN/YH2PAA1hbRCEZNk4511C4TALF82n+vpWTRvDZAFXlrTRehS2HkuK0Ep1QSArCLz44os0adKkqLYPOugg2nzzzaPK77vvPnrhhRf4sa3RwIEDaeONN46q4y344YcfCMRJOjZs2DDq169fRBNo84wzzqD111+frrjiCtWniAo+KwMGDFCTvJ49e9JWW23lU8O/6P7776empibac889IyqgrMLltRbklN7nn38+7bXXXnTdddeF6yKL1cSJE5PCK7yTLBQtAiDuTj31VDJYn+2ee+6h7t3591qLvf7667Rs2TJnNanvwYMH0+jRo33r/vzzz/T444/TjBkz6Pbbb1d1li9fTtXV1RQIhKZaCxcuVHWqqqpo66239m3HXfjMM88QngVXX3017bbbbuFNsUiR9957T9U5/PDDw3XdCzU1NeG+uMtjLYPQALGB55BzH1v8+3Hu3Lk0a9Ys9fnmm28IhCfK0X6sY8c6hpQLAu2FgBAg7YW8HLc4EOjDk/Y6TonrQyrkaoBGRTkZnGbWVDojoaMilanJniD4sD+Ir+Ftf4eeXal6YD+qHjzAt07OCrv05MwxLAZbJLa6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",eb=je(96486),tb=Object.defineProperty,Ou=Object.getOwnPropertySymbols,wp=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,xp=(n,t,e)=>t in n?tb(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,lc=(n,t)=>{for(var e in t||(t={}))wp.call(t,e)&&xp(n,e,t[e]);if(Ou)for(var e of Ou(t))Ap.call(t,e)&&xp(n,e,t[e]);return n},rb=(n,t)=>{var e={};for(var r in n)wp.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&Ou)for(var r of Ou(n))t.indexOf(r)<0&&Ap.call(n,r)&&(e[r]=n[r]);return e},xo=(n,t,e)=>new Promise((r,i)=>{var a=l=>{try{u(e.next(l))}catch(d){i(d)}},s=l=>{try{u(e.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);u((e=e.apply(n,t)).next())});const{Countdown:nb}=o.default,{Step:ib}=_.default,w1=null,A1={0:"c-red-ee4",1:"c-green"},x1=null,ab=n=>{var t=n,{globalSetting:e,loading:r,user:i,exercise:a,dispatch:s}=t,u=rb(t,["globalSetting","loading","user","exercise","dispatch"]),l;const d=(0,at.useParams)(),[A,T]=(0,Me.useState)(0),[D,U]=(0,Me.useState)(!1),[te,oe]=(0,Me.useState)(!1),[ae,se]=(0,Me.useState)(!1),[we,Ce]=(0,Me.useState)(0),[me,Se]=(0,Me.useState)({}),Re=(0,Me.useRef)(),Ue=(0,Me.useRef)(!0),We=[{title:"\u91C7\u96C6\u7167\u7247",content:"First-content"},{title:"\u5BA1\u6838\u7ED3\u679C",content:"Second-content"},{title:"\u5F00\u542F\u624B\u673A\u5F55\u5236",content:"Last-content"}].filter(et=>me!=null&&me.open_phone_video_recording?!0:et.content!=="Last-content"),Ne=()=>xo(void 0,null,function*(){return new Promise(et=>xo(void 0,null,function*(){const tt=yield(0,c.PJ)(lc({},d));Se(lc({},tt)),et(tt)}))}),Le=()=>xo(void 0,null,function*(){var et;const tt=yield Ne();tt!=null&&tt.identity_verify||T(2),tt!=null&&tt.can_start&&tt.countdown_time===0?T(2):(tt==null?void 0:tt.identity_photo_state)==="rejected"?(Ue.current=!1,Ce(1)):(tt==null?void 0:tt.identity_photo_state)==="passed"&&(Ue.current=!1,(et=Re==null?void 0:Re.current)==null||et.handleStop(),me!=null&&me.open_phone_video_recording||T(2))}),$e=()=>xo(void 0,null,function*(){var et;const tt=yield Ne();(tt==null?void 0:tt.identity_photo_state)==="submitted"||((tt==null?void 0:tt.identity_photo_state)==="rejected"?(Ue.current=!1,Ce(2)):(tt==null?void 0:tt.identity_photo_state)==="passed"&&(Ue.current=!1,(et=Re==null?void 0:Re.current)==null||et.handleStop(),Ce(1),me!=null&&me.open_phone_video_recording||T(2))),(tt==null?void 0:tt.identity_photo_state)!=="passed"&&Ue.current&&setTimeout(()=>{$e()},30*1e3)}),Ze=()=>{var et;U(!1),(et=Re==null?void 0:Re.current)==null||et.startDiscern()};return(0,Me.useEffect)(()=>(Le(),console.log("captureRef:",Re),()=>{Ce(0),se(!1),oe(!1),T(0)}),[]),Me.createElement("div",{className:"p30 bg-white minHb100 edu-container mt20"},(me==null?void 0:me.identity_verify)&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"tc font16 blod"},"\u8EAB\u4EFD\u9A8C\u8BC1"),Me.createElement("div",{className:g.steps},Me.createElement(_.default,{current:A},We.map(et=>Me.createElement(ib,{key:et.title,title:et.title}))))),Me.createElement("div",{className:A===0?"":"hide"},Me.createElement("div",{className:"tc mt50"},"\u8BF7\u4FDD\u8BC1\u5468\u56F4\u5149\u7EBF\u5145\u8DB3\uFF0C\u4E94\u5B98\u6E05\u6670\u53EF\u89C1\uFF01"),!te&&Me.createElement("div",{className:"tc"},Me.createElement("img",{width:536,src:q0,className:"mt30"})),Me.createElement("div",{className:te?"":"hide"},Me.createElement($0,{ref:Re,onCameraReady:et=>{U(et)},defaultOpen:me==null?void 0:me.identity_verify,identity_url:(0,w.Tv)((l=i==null?void 0:i.userInfo)==null?void 0:l.identity_url),outputResult:et=>{et.success?(O.ZP.success({content:"\u4EBA\u8138\u8BC6\u522B\u6210\u529F",key:"checkapi"}),T(2)):se(!0),U(!1)}})),te&&Me.createElement(Me.Fragment,null,ae?Me.createElement("div",{className:"tc mb30 mt15"},Me.createElement(p.ZP,{type:"primary",onClick:()=>{var et;(et=Re==null?void 0:Re.current)==null||et.handlePlay(),Se(lc({},{})),se(!1)}},"\u91CD\u65B0\u8BC6\u522B"),Me.createElement(p.ZP,{type:"primary",className:"ml90",onClick:()=>xo(void 0,null,function*(){var et;yield(et=Re==null?void 0:Re.current)==null?void 0:et.handleUploadImage(0),Ue.current=!0,T(1),Ce(0),se(!1),$e()})},"\u4EBA\u5DE5\u5BA1\u6838")):D&&Me.createElement("div",{className:"tc mb30 mt15"},Me.createElement(p.ZP,{type:"primary",onClick:(0,eb.throttle)(Ze,2e3)},"\u5F00\u59CB\u8BC6\u522B"))),!te&&Me.createElement("div",{className:"tc mb30 mt15"},Me.createElement(p.ZP,{type:"primary",onClick:()=>{oe(!0)}},"\u5F00\u59CB\u91C7\u96C6"))),A===1&&Me.createElement("div",{className:"tc"},we===0&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"tc mt50"},Me.createElement("span",{className:"c-blue font50 iconfont icon-dengdaishenhe"}),Me.createElement("br",null),"\u4EBA\u5DE5\u5BA1\u6838\u4E2D...",Me.createElement("br",null),"\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u76D1\u63A7\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF01"),Me.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>xo(void 0,null,function*(){const et=yield Ne();(et==null?void 0:et.identity_photo_state)==="submitted"?O.ZP.warning({content:"\u6B63\u5728\u7B49\u5F85\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u7A0D\u540E...",key:"sh1"}):(et==null?void 0:et.identity_photo_state)==="rejected"?(Ce(2),Ue.current=!1):(et==null?void 0:et.identity_photo_state)==="passed"&&(Ue.current=!1,Ce(1),me!=null&&me.open_phone_video_recording||T(2))})},"\u67E5\u770B\u5BA1\u6838\u7ED3\u679C")),we===1&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"tc mt50"},Me.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),Me.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002"),(me==null?void 0:me.open_phone_video_recording)&&Me.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>T(2)},"\u4E0B\u4E00\u6B65")),we===2&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"tc mt50"},Me.createElement("span",{className:"c-red font50 iconfont icon-hongsejingshi"}),Me.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u4E0D\u901A\u8FC7\u3002\u8BF7\u91CD\u65B0\u62CD\u7167\u9A8C\u8BC1\u3002"),Me.createElement("div",{className:"mt20"},Me.createElement(f.Z,null,Me.createElement(h.Z,{className:"tr",flex:"430px"},"\u5931\u8D25\u539F\u56E0\uFF1A"),Me.createElement(h.Z,null,me==null?void 0:me.identity_photo_comment)),Me.createElement(f.Z,{className:"mt30"},Me.createElement(h.Z,{className:"tr",flex:"430px"},"\u91C7\u96C6\u7167\u7247\uFF1A"),Me.createElement(h.Z,null,Me.createElement("img",{src:(0,w.Tv)(me==null?void 0:me.identity_photo_url),width:200}))),Me.createElement(f.Z,null,Me.createElement(h.Z,{className:"tr",flex:"430px"}),Me.createElement(h.Z,null,Me.createElement(p.ZP,{type:"primary",className:"mt50",onClick:()=>{var et;T(0),U(!1),se(!1),oe(!1),(et=Re==null?void 0:Re.current)==null||et.handlePlay()}},"\u91CD\u65B0\u8BA4\u8BC1")))))),A===2&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"tc mt50"},!(me!=null&&me.open_phone_video_recording)&&Me.createElement(Me.Fragment,null,(me==null?void 0:me.countdown_time)<=0?Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"tc mt50"},Me.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),Me.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..."),(me==null?void 0:me.open_phone_video_recording)&&Me.createElement(Me.Fragment,null,(me==null?void 0:me.countdown_time)<=0?Me.createElement("div",{className:"tc"},"\u6839\u636E\u8003\u8BD5\u89C4\u5B9A\uFF0C\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u626B\u7801\u4E0B\u9762\u7684\u4E8C\u7EF4\u7801\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891",Me.createElement("br",null),Me.createElement("span",{className:"c-blue",style:{cursor:"default"},onClick:()=>{b.default.info({icon:null,title:"\u67E5\u770B\u64CD\u4F5C\u6307\u5F15",className:"custom-modal-divider",width:540,content:Me.createElement(f.Z,null,Me.createElement(h.Z,{flex:"178px"},Me.createElement("img",{width:148,src:"/images/operation_guidance.png"})),Me.createElement(h.Z,{flex:"1"},"\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u201C\u2026\u201D\uFF0C\u9009\u62E9",Me.createElement("span",{className:"c-orange"},"Safari\u4E2D\u6253\u5F00"),"\u6216\u8005",Me.createElement("span",{className:"c-orange"},"\u201C\u5728\u9ED8\u8BA4\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u201D"),"\u540E\uFF0C\u6D4F\u89C8\u5668\u6253\u5F00\u540E\u8BF7\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u6309\u94AE\uFF0C\u53EF\u4EE5\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891\u3002"))})}},"\u5982\u82F9\u679C\u624B\u673A\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u540E\uFF0C\u51FA\u73B0\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u65E0\u54CD\u5E94\uFF0C\u8BF7\u67E5\u770B\u64CD\u4F5C\u6307\u5F15\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...")),(me==null?void 0:me.open_phone_video_recording)&&Me.createElement("div",{className:g.qrcode},Me.createElement(m(),{value:`https://${document.domain}/live-push.html?id=${d.categoryId}&login=${d.login}&cookie=${(0,w.ej)("_educoder_session")}`})),(me==null?void 0:me.countdown_time)>0&&Me.createElement("div",{className:"tc mt20"},Me.createElement(nb,{value:Date.now()+(me==null?void 0:me.countdown_time)*1e3,valueStyle:{color:"#cf1322",fontSize:40},onFinish:()=>{Ne()}})),Me.createElement("div",{className:"tc mb30 mt50"},Me.createElement(p.ZP,{type:"primary",onClick:()=>xo(void 0,null,function*(){var et;const tt=yield Ne();tt!=null&&tt.can_start&&(tt==null?void 0:tt.countdown_time)<=0?((et=Re==null?void 0:Re.current)==null||et.handleRemove(),me!=null&&me.open_phone_video_recording?tt!=null&&tt.video_url&&setTimeout(()=>{location.href=`/classrooms/${d.coursesId}/exercise/${d.categoryId}/users/${d.login}`},300):setTimeout(()=>{location.href=`/classrooms/${d.coursesId}/exercise/${d.categoryId}/users/${d.login}`},300)):(tt==null?void 0:tt.countdown_time)>0?O.ZP.warning({content:"\u8003\u8BD5\u6682\u672A\u5F00\u59CB\uFF0C\u8BF7\u7A0D\u540E..."}):O.ZP.warning({content:"\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"})})},"\u5F00\u59CB\u8003\u8BD5"))))};var ob=(0,at.connect)(({loading:n,user:t,exercise:e,globalSetting:r})=>({globalSetting:r,user:t,exercise:e,loading:n.effects}))(ab)},56448:function(Xt){(function(vt){(function(je){if(1)Xt.exports=je();else var Me})(function(){var je,Me,at;return function(){function o(_,O,p){function f(g,w){if(!O[g]){if(!_[g]){var c=void 0;if(!w&&c)return require(g,!0);if(h)return h(g,!0);var v=new Error("Cannot find module '"+g+"'");throw v.code="MODULE_NOT_FOUND",v}var m=O[g]={exports:{}};_[g][0].call(m.exports,function(y){var x=_[g][1][y];return f(x||y)},m,m.exports,o,_,O,p)}return O[g].exports}for(var h=void 0,b=0;b<p.length;b++)f(p[b]);return f}return o}()({1:[function(o,_,O){"use strict";var p=o("./browser/client");p.Buffer=o("buffer").Buffer,p.urllib=o("../shims/xhr"),p.version=o("./browser/version").version,_.exports=p},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.slice.js");var b=o("assert"),g=o("../common/utils/checkBucketName"),w=g.checkBucketName,c=O;function v(y){return Array.isArray?Array.isArray(y):Object.prototype.toString.call(y)==="[object Array]"}function m(y){return y?v(y)?y:[y]:[]}c.useBucket=function(x){return w(x),this.options.bucket=x,this},c.setBucket=function(x){return w(x),this.options.bucket=x,this},c.getBucket=function(){return this.options.bucket},c.deleteBucket=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("DELETE",I,"",C),P.next=3,this.request(E);case 3:if(k=P.sent,!(k.status===200||k.status===204)){P.next=6;break}return P.abrupt("return",{res:k.res});case 6:return P.next=8,this.requestError(k);case 8:throw P.sent;case 9:case"end":return P.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.putBucketACL=function(){var y=(0,h.default)(f.default.mark(function S(I,C,E){var k,V;return f.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return k=this._bucketRequestParams("PUT",I,"acl",E),k.headers={"x-oss-acl":C},k.successStatuses=[200],K.next=5,this.request(k);case 5:return V=K.sent,K.abrupt("return",{bucket:V.headers.location&&V.headers.location.substring(1)||null,res:V.res});case 7:case"end":return K.stop()}},S,this)}));function x(S,I,C){return y.apply(this,arguments)}return x}(),c.getBucketACL=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("GET",I,"acl",C),E.successStatuses=[200],E.xmlResponse=!0,P.next=5,this.request(E);case 5:return k=P.sent,P.abrupt("return",{acl:k.data.AccessControlList.Grant,owner:{id:k.data.Owner.ID,displayName:k.data.Owner.DisplayName},res:k.res});case 7:case"end":return P.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.putBucketLogging=function(){var y=(0,h.default)(f.default.mark(function S(I,C,E){var k,V,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return k=this._bucketRequestParams("PUT",I,"logging",E),V=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(I,`</TargetBucket>
|
|
`),C&&(V+="<TargetPrefix>".concat(C,`</TargetPrefix>
|
|
`)),V+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,k.content=V,k.mime="xml",k.successStatuses=[200],B.next=9,this.request(k);case 9:return P=B.sent,B.abrupt("return",{res:P.res});case 11:case"end":return B.stop()}},S,this)}));function x(S,I,C){return y.apply(this,arguments)}return x}(),c.getBucketLogging=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k,V;return f.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return E=this._bucketRequestParams("GET",I,"logging",C),E.successStatuses=[200],E.xmlResponse=!0,K.next=5,this.request(E);case 5:return k=K.sent,V=k.data.LoggingEnabled,K.abrupt("return",{enable:!!V,prefix:V&&V.TargetPrefix||null,res:k.res});case 8:case"end":return K.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.deleteBucketLogging=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("DELETE",I,"logging",C),E.successStatuses=[204,200],P.next=4,this.request(E);case 4:return k=P.sent,P.abrupt("return",{res:k.res});case 6:case"end":return P.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.putBucketCORS=function(){var y=(0,h.default)(f.default.mark(function S(I,C,E){var k,V,P,K,B,R,j,N,$,z;return f.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:for(C=C||[],b(C.length,"rules is required"),C.forEach(function(X){b(X.allowedOrigin,"allowedOrigin is required"),b(X.allowedMethod,"allowedMethod is required")}),k=this._bucketRequestParams("PUT",I,"cors",E),V=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,P=function(re){V+="<AllowedOrigin>".concat(re,"</AllowedOrigin>")},K=function(re){V+="<AllowedMethod>".concat(re,"</AllowedMethod>")},B=function(re){V+="<AllowedHeader>".concat(re,"</AllowedHeader>")},R=function(re){V+="<ExposeHeader>".concat(re,"</ExposeHeader>")},j=0,N=C.length;j<N;j++)$=C[j],V+="<CORSRule>",m($.allowedOrigin).forEach(P),m($.allowedMethod).forEach(K),m($.allowedHeader).forEach(B),m($.exposeHeader).forEach(R),$.maxAgeSeconds&&(V+="<MaxAgeSeconds>".concat($.maxAgeSeconds,"</MaxAgeSeconds>")),V+="</CORSRule>";return V+="</CORSConfiguration>",k.content=V,k.mime="xml",k.successStatuses=[200],M.next=16,this.request(k);case 16:return z=M.sent,M.abrupt("return",{res:z.res});case 18:case"end":return M.stop()}},S,this)}));function x(S,I,C){return y.apply(this,arguments)}return x}(),c.getBucketCORS=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k,V,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return E=this._bucketRequestParams("GET",I,"cors",C),E.successStatuses=[200],E.xmlResponse=!0,B.next=5,this.request(E);case 5:return k=B.sent,V=[],k.data&&k.data.CORSRule&&(P=k.data.CORSRule,v(P)||(P=[P]),P.forEach(function(R){var j={};Object.keys(R).forEach(function(N){j[N.slice(0,1).toLowerCase()+N.slice(1,N.length)]=R[N]}),V.push(j)})),B.abrupt("return",{rules:V,res:k.res});case 9:case"end":return B.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.deleteBucketCORS=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return E=this._bucketRequestParams("DELETE",I,"cors",C),E.successStatuses=[204],P.next=4,this.request(E);case 4:return k=P.sent,P.abrupt("return",{res:k.res});case 6:case"end":return P.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.putBucketReferer=function(){var y=(0,h.default)(f.default.mark(function S(I,C,E,k){var V,P,K,B;return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(V=this._bucketRequestParams("PUT",I,"referer",k),P=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,P+=" <AllowEmptyReferer>".concat(C?"true":"false",`</AllowEmptyReferer>
|
|
`),E&&E.length>0){for(P+=` <RefererList>
|
|
`,K=0;K<E.length;K++)P+=" <Referer>".concat(E[K],`</Referer>
|
|
`);P+=` </RefererList>
|
|
`}else P+=` <RefererList />
|
|
`;return P+="</RefererConfiguration>",V.content=P,V.mime="xml",V.successStatuses=[200],j.next=10,this.request(V);case 10:return B=j.sent,j.abrupt("return",{res:B.res});case 12:case"end":return j.stop()}},S,this)}));function x(S,I,C,E){return y.apply(this,arguments)}return x}(),c.getBucketReferer=function(){var y=(0,h.default)(f.default.mark(function S(I,C){var E,k,V;return f.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return E=this._bucketRequestParams("GET",I,"referer",C),E.successStatuses=[200],E.xmlResponse=!0,K.next=5,this.request(E);case 5:return k=K.sent,V=k.data.RefererList.Referer||null,V&&(v(V)||(V=[V])),K.abrupt("return",{allowEmpty:k.data.AllowEmptyReferer==="true",referers:V,res:k.res});case 9:case"end":return K.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c.deleteBucketReferer=function(){var y=(0,h.default)(f.default.mark(function S(I,C){return f.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,this.putBucketReferer(I,!0,null,C);case 2:return k.abrupt("return",k.sent);case 3:case"end":return k.stop()}},S,this)}));function x(S,I){return y.apply(this,arguments)}return x}(),c._bucketRequestParams=function(x,S,I,C){return{method:x,bucket:S,subres:I,timeout:C&&C.timeout,ctx:C&&C.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(o,_,O){(function(p,f){(function(){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),b=h(o("@babel/runtime/regenerator")),g=h(o("@babel/runtime/helpers/asyncToGenerator"));o("core-js/modules/es.function.name.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.symbol.js"),o("core-js/modules/es.symbol.description.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.to-string.js");var w=o("debug")("ali-oss"),c=o("xml2js"),v=o("agentkeepalive"),m=o("merge-descriptors"),y=o("platform"),x=o("utility"),S=o("urllib"),I=o("./version"),C=o("bowser"),E=o("../common/signUtils"),k=o("../common/client/initOptions"),V=o("../common/utils/createRequest"),P=V.createRequest,K=o("../common/utils/encoder"),B=K.encoder,R=o("../common/client/getReqUrl"),j=R.getReqUrl,N=o("../common/utils/setSTSToken"),$=N.setSTSToken,z=o("../common/utils/retry"),F=z.retry,M=o("../common/utils/isFunction"),X=M.isFunction,re=new v;function ne(){var he=y.name,be=y.version;he&&he.toLowerCase&&he.toLowerCase()==="ie"&&be.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function pe(){return location&&location.protocol==="https:"}function ie(he,be){if(ne(),!(this instanceof ie))return new ie(he,be);he&&he.inited?this.options=he:this.options=ie.initOptions(he),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=S,this.agent=this.options.agent||re),this.ctx=be,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}_.exports=ie,ie.initOptions=function(be){be.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var le=Object.assign({secure:pe(),useFetch:!1},be);return k(le)};var Ae=ie.prototype;Ae.debug=w,m(Ae,o("./object")),m(Ae,o("./bucket")),m(Ae,o("../common/bucket/getBucketWebsite")),m(Ae,o("../common/bucket/putBucketWebsite")),m(Ae,o("../common/bucket/deleteBucketWebsite")),m(Ae,o("../common/bucket/getBucketLifecycle")),m(Ae,o("../common/bucket/putBucketLifecycle")),m(Ae,o("../common/bucket/deleteBucketLifecycle")),m(Ae,o("../common/bucket/putBucketVersioning")),m(Ae,o("../common/bucket/getBucketVersioning")),m(Ae,o("../common/bucket/getBucketInventory")),m(Ae,o("../common/bucket/deleteBucketInventory")),m(Ae,o("../common/bucket/listBucketInventory")),m(Ae,o("../common/bucket/putBucketInventory")),m(Ae,o("../common/bucket/abortBucketWorm")),m(Ae,o("../common/bucket/completeBucketWorm")),m(Ae,o("../common/bucket/extendBucketWorm")),m(Ae,o("../common/bucket/getBucketWorm")),m(Ae,o("../common/bucket/initiateBucketWorm")),m(Ae,o("./managed-upload")),m(Ae,o("../common/multipart-copy")),m(Ae,o("../common/multipart")),m(Ae,o("../common/parallel")),Ae.signature=function(be){return this.debug("authorization stringToSign: %s",be,"info"),E.computeSignature(this.options.accessKeySecret,be,this.options.headerEncoding)},Ae._getReqUrl=j,Ae.authorization=function(be,le,ue,ve){var Ee=E.buildCanonicalString(be.toUpperCase(),le,{headers:ve,parameters:ue});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,Ee,this.options.headerEncoding)},Ae.request=function(){var he=(0,g.default)(b.default.mark(function be(le){var ue=this;return b.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(!this.options.retryMax){Ee.next=6;break}return Ee.next=3,F(Z.bind(this),this.options.retryMax,{errorHandler:function(De){var ce=function(ye){if(le.stream)return!1;var Y=[-1,-2].includes(ye.status),H=ue.options.requestErrorRetryHandle||function(){return!0};return Y&&H(ye)};return!!ce(De)}})(le);case 3:return Ee.abrupt("return",Ee.sent);case 6:return Ee.abrupt("return",Z.call(this,le));case 7:case"end":return Ee.stop()}},be,this)}));return function(be){return he.apply(this,arguments)}}();function Z(he){return fe.apply(this,arguments)}function fe(){return fe=(0,g.default)(b.default.mark(function he(be){var le,ue,ve,Ee,Oe,De;return b.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(!(this.options.stsToken&&X(this.options.refreshSTSToken))){G.next=3;break}return G.next=3,$.call(this);case 3:return le=P.call(this,be),this.options.useFetch||(le.params.mode="disable-fetch"),Ee=!!be.stream,G.prev=6,G.next=9,this.urllib.request(le.url,le.params);case 9:ue=G.sent,this.debug("response %s %s, got %s, headers: %j",be.method,le.url,ue.status,ue.headers,"info"),G.next=16;break;case 13:G.prev=13,G.t0=G.catch(6),ve=G.t0;case 16:if(!(ue&&be.successStatuses&&be.successStatuses.indexOf(ue.status)===-1)){G.next=28;break}return G.next=19,this.requestError(ue);case 19:if(Oe=G.sent,!(Oe.code==="RequestTimeTooSkewed"&&!Ee)){G.next=25;break}return this.options.amendTimeSkewed=+new Date(Oe.serverTime)-new Date,G.next=24,this.request(be);case 24:return G.abrupt("return",G.sent);case 25:Oe.params=be,G.next=32;break;case 28:if(!ve){G.next=32;break}return G.next=31,this.requestError(ve);case 31:Oe=G.sent;case 32:if(!Oe){G.next=34;break}throw Oe;case 34:if(!be.xmlResponse){G.next=39;break}return G.next=37,this.parseXML(ue.data);case 37:De=G.sent,ue.data=De;case 39:return G.abrupt("return",ue);case 40:case"end":return G.stop()}},he,this,[[6,13]])})),fe.apply(this,arguments)}Ae._getResource=function(be){var le="/";return be.bucket&&(le+="".concat(be.bucket,"/")),be.object&&(le+=B(be.object,this.options.headerEncoding)),le},Ae._escape=function(be){return x.encodeURIComponent(be).replace(/%2F/g,"/")},Ae._getUserAgent=function(){var be=f&&f.browser?"js":"nodejs",le="aliyun-sdk-".concat(be,"/").concat(I.version),ue=y.description;return!ue&&f&&(ue="Node.js ".concat(f.version.slice(1)," on ").concat(f.platform," ").concat(f.arch)),this._checkUserAgent("".concat(le," ").concat(ue))},Ae._checkUserAgent=function(be){var le=be.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return le},Ae.checkBrowserAndVersion=function(be,le){return C.name===be&&C.version.split(".")[0]===le},Ae.parseXML=function(be){return new Promise(function(le,ue){p.isBuffer(be)&&(be=be.toString()),c.parseString(be,{explicitRoot:!1,explicitArray:!1},function(ve,Ee){ve?ue(ve):le(Ee)})})},Ae.requestError=function(){var he=(0,g.default)(b.default.mark(function le(ue){var ve,Ee,Oe,De;return b.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(ve=null,!(!ue.data||!ue.data.length)){G.next=5;break}ue.status===-1||ue.status===-2?(ve=new Error(ue.message),ve.name=ue.name,ve.status=ue.status,ve.code=ue.name):(ue.status===404?(ve=new Error("Object not exists"),ve.name="NoSuchKeyError",ve.status=404,ve.code="NoSuchKey"):ue.status===412?(ve=new Error("Pre condition failed"),ve.name="PreconditionFailedError",ve.status=412,ve.code="PreconditionFailed"):(ve=new Error("Unknow error, status: ".concat(ue.status)),ve.name="UnknownError",ve.status=ue.status),ve.requestId=ue.headers["x-oss-request-id"],ve.host=""),G.next=32;break;case 5:return Ee=String(ue.data),this.debug("request response error data: %s",Ee,"error"),G.prev=7,G.next=10,this.parseXML(Ee);case 10:if(G.t0=G.sent,G.t0){G.next=13;break}G.t0={};case 13:Oe=G.t0,G.next=23;break;case 16:return G.prev=16,G.t1=G.catch(7),this.debug(Ee,"error"),G.t1.message+=`
|
|
raw xml: `.concat(Ee),G.t1.status=ue.status,G.t1.requestId=ue.headers["x-oss-request-id"],G.abrupt("return",G.t1);case 23:De=Oe.Message||"unknow request error, status: ".concat(ue.status),Oe.Condition&&(De+=" (condition: ".concat(Oe.Condition,")")),ve=new Error(De),ve.name=Oe.Code?"".concat(Oe.Code,"Error"):"UnknownError",ve.status=ue.status,ve.code=Oe.Code,ve.requestId=Oe.RequestId,ve.hostId=Oe.HostId,ve.serverTime=Oe.ServerTime;case 32:return this.debug("generate error %j",ve,"error"),G.abrupt("return",ve);case 34:case"end":return G.stop()}},le,this,[[7,16]])}));function be(le){return he.apply(this,arguments)}return be}()}).call(this)}).call(this,{isBuffer:o("../../node_modules/is-buffer/index.js")},o("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(o,_,O){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/regenerator"));o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.typed-array.uint8-array.js"),o("core-js/modules/es.typed-array.copy-within.js"),o("core-js/modules/es.typed-array.every.js"),o("core-js/modules/es.typed-array.fill.js"),o("core-js/modules/es.typed-array.filter.js"),o("core-js/modules/es.typed-array.find.js"),o("core-js/modules/es.typed-array.find-index.js"),o("core-js/modules/es.typed-array.for-each.js"),o("core-js/modules/es.typed-array.includes.js"),o("core-js/modules/es.typed-array.index-of.js"),o("core-js/modules/es.typed-array.iterator.js"),o("core-js/modules/es.typed-array.join.js"),o("core-js/modules/es.typed-array.last-index-of.js"),o("core-js/modules/es.typed-array.map.js"),o("core-js/modules/es.typed-array.reduce.js"),o("core-js/modules/es.typed-array.reduce-right.js"),o("core-js/modules/es.typed-array.reverse.js"),o("core-js/modules/es.typed-array.set.js"),o("core-js/modules/es.typed-array.slice.js"),o("core-js/modules/es.typed-array.some.js"),o("core-js/modules/es.typed-array.sort.js"),o("core-js/modules/es.typed-array.subarray.js"),o("core-js/modules/es.typed-array.to-locale-string.js"),o("core-js/modules/es.typed-array.to-string.js");var b=f(o("@babel/runtime/helpers/asyncToGenerator")),g=o("util"),w=o("path"),c=o("mime"),v=o("copy-to"),m=o("../common/utils/isBlob"),y=m.isBlob,x=o("../common/utils/isFile"),S=x.isFile,I=o("../common/utils/isBuffer"),C=I.isBuffer,E=O;E.multipartUpload=function(){var B=(0,b.default)(h.default.mark(function j(N,$){var z,F,M,X,re,ne,pe,ie,Ae,Z=arguments;return h.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(z=Z.length>2&&Z[2]!==void 0?Z[2]:{},this.resetCancelFlag(),z.disabledMD5=z.disabledMD5===void 0?!0:!!z.disabledMD5,!(z.checkpoint&&z.checkpoint.uploadId)){he.next=8;break}return $&&S($)&&(z.checkpoint.file=$),he.next=7,this._resumeMultipart(z.checkpoint,z);case 7:return he.abrupt("return",he.sent);case 8:return F=102400,z.mime||(S($)?z.mime=c.getType(w.extname($.name)):y($)?z.mime=$.type:C($)?z.mime="":z.mime=c.getType(w.extname($))),z.headers=z.headers||{},this._convertMetaToHeaders(z.meta,z.headers),he.next=14,this._getFileSize($);case 14:if(M=he.sent,!(M<F)){he.next=26;break}return z.contentLength=M,he.next=19,this.put(N,$,z);case 19:if(X=he.sent,!(z&&z.progress)){he.next=23;break}return he.next=23,z.progress(1);case 23:return re={res:X.res,bucket:this.options.bucket,name:N,etag:X.res.headers.etag},(z.headers&&z.headers["x-oss-callback"]||z.callback)&&(re.data=X.data),he.abrupt("return",re);case 26:if(!(z.partSize&&parseInt(z.partSize,10)!==z.partSize)){he.next=28;break}throw new Error("partSize must be int number");case 28:if(!(z.partSize&&z.partSize<F)){he.next=30;break}throw new Error("partSize must not be smaller than ".concat(F));case 30:return he.next=32,this.initMultipartUpload(N,z);case 32:if(ne=he.sent,pe=ne.uploadId,ie=this._getPartSize(M,z.partSize),Ae={file:$,name:N,fileSize:M,partSize:ie,uploadId:pe,doneParts:[]},!(z&&z.progress)){he.next=39;break}return he.next=39,z.progress(0,Ae,ne.res);case 39:return he.next=41,this._resumeMultipart(Ae,z);case 41:return he.abrupt("return",he.sent);case 42:case"end":return he.stop()}},j,this)}));function R(j,N){return B.apply(this,arguments)}return R}(),E._resumeMultipart=function(){var B=(0,b.default)(h.default.mark(function j(N,$){var z,F,M,X,re,ne,pe,ie,Ae,Z,fe,he,be,le,ue,ve,Ee,Oe,De;return h.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(z=this,!this.isCancel()){G.next=3;break}throw this._makeCancelEvent();case 3:return F=N.file,M=N.fileSize,X=N.partSize,re=N.uploadId,ne=N.doneParts,pe=N.name,ie=[],ne.length>0&&v(ne).to(ie),Ae=this._divideParts(M,X),Z=Ae.length,fe=!1,he=function(Y,H){return new Promise(function(){var Q=(0,b.default)(h.default.mark(function J(ee,W){var L,q,de,Ie,He;return h.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(Je.prev=0,Y.isCancel()){Je.next=29;break}return L=Ae[H-1],Je.next=5,Y._createBuffer(F,L.start,L.end);case 5:return q=Je.sent,de={content:q,size:L.end-L.start},Je.prev=7,Je.next=10,Y._uploadPart(pe,re,H,de,$);case 10:Ie=Je.sent,Je.next=18;break;case 13:if(Je.prev=13,Je.t0=Je.catch(7),Je.t0.status!==404){Je.next=17;break}throw Y._makeAbortEvent();case 17:throw Je.t0;case 18:if(!(!Y.isCancel()&&!fe)){Je.next=26;break}if(N.doneParts.push({number:H,etag:Ie.res.headers.etag}),!$.progress){Je.next=23;break}return Je.next=23,$.progress(ne.length/(Z+1),N,Ie.res);case 23:ee({number:H,etag:Ie.res.headers.etag}),Je.next=27;break;case 26:ee();case 27:Je.next=30;break;case 29:ee();case 30:Je.next=41;break;case 32:Je.prev=32,Je.t1=Je.catch(0),He=new Error,He.name=Je.t1.name,He.message=Je.t1.message,He.stack=Je.t1.stack,He.partNum=H,v(Je.t1).to(He),W(He);case 41:case"end":return Je.stop()}},J,null,[[0,32],[7,13]])}));return function(J,ee){return Q.apply(this,arguments)}}())},be=Array.from(new Array(Z),function(ye,Y){return Y+1}),le=ie.map(function(ye){return ye.number}),ue=be.filter(function(ye){return le.indexOf(ye)<0}),ve=5,Ee=$.parallel||ve,G.next=17,this._parallel(ue,Ee,function(ye){return new Promise(function(Y,H){he(z,ye).then(function(Q){Q&&ie.push(Q),Y()}).catch(function(Q){H(Q)})})});case 17:if(Oe=G.sent,fe=!0,De=Oe.find(function(ye){return ye.name==="abort"}),!De){G.next=22;break}throw De;case 22:if(!this.isCancel()){G.next=25;break}throw he=null,this._makeCancelEvent();case 25:if(!(Oe&&Oe.length>0)){G.next=28;break}throw Oe[0].message="Failed to upload some parts with error: ".concat(Oe[0].toString()," part_num: ").concat(Oe[0].partNum),Oe[0];case 28:return G.next=30,this.completeMultipartUpload(pe,re,ie,$);case 30:return G.abrupt("return",G.sent);case 31:case"end":return G.stop()}},j,this)}));function R(j,N){return B.apply(this,arguments)}return R}(),E._getFileSize=function(){var B=(0,b.default)(h.default.mark(function j(N){return h.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(!C(N)){z.next=4;break}return z.abrupt("return",N.length);case 4:if(!(y(N)||S(N))){z.next=6;break}return z.abrupt("return",N.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return z.stop()}},j)}));function R(j){return B.apply(this,arguments)}return R}();var k=o("stream"),V=k.Readable;function P(B,R){if(!(this instanceof P))return new P(B,R);V.call(this,R),this.file=B,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}g.inherits(P,V),P.prototype.readFileAndPush=function(R){if(this.fileBuffer)for(var j=!0;j&&this.fileBuffer&&this.start<this.fileBuffer.length;){var N=this.start,$=N+R;$=$>this.fileBuffer.length?this.fileBuffer.length:$,this.start=$,j=this.push(this.fileBuffer.slice(N,$))}},P.prototype._read=function(R){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var j=16*1024;R=R||j;var N=this;this.reader.onload=function(z){N.fileBuffer=p.from(new Uint8Array(z.target.result)),N.file=null,N.readFileAndPush(R)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(R)};function K(B){return B.arrayBuffer?B.arrayBuffer():new Promise(function(R,j){var N=new FileReader;N.onload=function($){R($.target.result)},N.onerror=function($){j($)},N.readAsArrayBuffer(B)})}E._createBuffer=function(){var B=(0,b.default)(h.default.mark(function j(N,$,z){var F,M;return h.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(y(N)||S(N))){re.next=8;break}return F=N.slice($,z),re.next=4,K(F);case 4:return M=re.sent,re.abrupt("return",p.from(M));case 8:if(!C(N)){re.next=12;break}return re.abrupt("return",N.subarray($,z));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return re.stop()}},j)}));function R(j,N,$){return B.apply(this,arguments)}return R}(),E._getPartSize=function(R,j){var N=1e4,$=1*1024*1024;j||(j=$);var z=Math.ceil(R/N);return j<z&&(j=z,console.warn("partSize has been set to ".concat(j,", because the partSize you provided causes partNumber to be greater than 10,000"))),j},E._divideParts=function(R,j){for(var N=Math.ceil(R/j),$=[],z=0;z<N;z++){var F=j*z,M=Math.min(F+j,R);$.push({start:F,end:M})}return $}}).call(this)}).call(this,o("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.number.constructor.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.promise.js");var f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("fs"),g=o("copy-to"),w=o("path"),c=o("mime"),v=o("../common/callback"),m=o("merge-descriptors"),y=o("../common/utils/isBlob"),x=y.isBlob,S=o("../common/utils/isFile"),I=S.isFile,C=o("../common/utils/isBuffer"),E=C.isBuffer,k=o("../common/utils/obj2xml"),V=k.obj2xml,P=O;P.append=function(){var K=(0,h.default)(f.default.mark(function R(j,N,$){var z;return f.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return $=$||{},$.position===void 0&&($.position="0"),$.subres={append:"",position:$.position},$.method="POST",M.next=6,this.put(j,N,$);case 6:return z=M.sent,z.nextAppendPosition=z.res.headers["x-oss-next-append-position"],M.abrupt("return",z);case 9:case"end":return M.stop()}},R,this)}));function B(R,j,N){return K.apply(this,arguments)}return B}(),P.put=function(){var K=(0,h.default)(f.default.mark(function R(j,N,$){var z,F,M,X,re;return f.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if($=$||{},$.disabledMD5=$.disabledMD5===void 0?!0:!!$.disabledMD5,$.headers=$.headers||{},j=this._objectName(j),!E(N)){pe.next=8;break}z=N,pe.next=19;break;case 8:if(!(x(N)||I(N))){pe.next=18;break}return $.mime||(I(N)?$.mime=c.getType(w.extname(N.name)):$.mime=N.type),pe.next=12,this._createBuffer(N,0,N.size);case 12:return z=pe.sent,pe.next=15,this._getFileSize(N);case 15:$.contentLength=pe.sent,pe.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders($.meta,$.headers),F=$.method||"PUT",M=this._objectRequestParams(F,j,$),v.encodeCallback(M,$),M.mime=$.mime,M.disabledMD5=$.disabledMD5,M.content=z,M.successStatuses=[200],pe.next=29,this.request(M);case 29:return X=pe.sent,re={name:j,url:this._objectUrl(j),res:X.res},M.headers&&M.headers["x-oss-callback"]&&(re.data=JSON.parse(X.data.toString())),pe.abrupt("return",re);case 33:case"end":return pe.stop()}},R,this)}));function B(R,j,N){return K.apply(this,arguments)}return B}(),P.putStream=function(){var K=(0,h.default)(f.default.mark(function R(j,N,$){var z,F,M,X;return f.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return $=$||{},$.headers=$.headers||{},j=this._objectName(j),$.contentLength?$.headers["Content-Length"]=$.contentLength:$.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders($.meta,$.headers),z=$.method||"PUT",F=this._objectRequestParams(z,j,$),v.encodeCallback(F,$),F.mime=$.mime,F.stream=N,F.successStatuses=[200],ne.next=13,this.request(F);case 13:return M=ne.sent,X={name:j,url:this._objectUrl(j),res:M.res},F.headers&&F.headers["x-oss-callback"]&&(X.data=JSON.parse(M.data.toString())),ne.abrupt("return",X);case 17:case"end":return ne.stop()}},R,this)}));function B(R,j,N){return K.apply(this,arguments)}return B}(),m(P,o("../common/object/copyObject")),m(P,o("../common/object/getObjectTagging")),m(P,o("../common/object/putObjectTagging")),m(P,o("../common/object/deleteObjectTagging")),m(P,o("../common/image")),m(P,o("../common/object/getBucketVersions")),m(P,o("../common/object/getACL")),m(P,o("../common/object/putACL")),m(P,o("../common/object/head")),m(P,o("../common/object/delete")),m(P,o("../common/object/get")),m(P,o("../common/object/putSymlink")),m(P,o("../common/object/getSymlink")),m(P,o("../common/object/deleteMulti")),m(P,o("../common/object/getObjectMeta")),m(P,o("../common/object/getObjectUrl")),m(P,o("../common/object/generateObjectUrl")),m(P,o("../common/object/signatureUrl")),m(P,o("../common/object/asyncSignatureUrl")),P.putMeta=function(){var K=(0,h.default)(f.default.mark(function R(j,N,$){var z;return f.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.copy(j,j,{meta:N||{},timeout:$&&$.timeout,ctx:$&&$.ctx});case 2:return z=M.sent,M.abrupt("return",z);case 4:case"end":return M.stop()}},R,this)}));function B(R,j,N){return K.apply(this,arguments)}return B}(),P.list=function(){var K=(0,h.default)(f.default.mark(function R(j,N){var $,z,F,M,X;return f.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return $=this._objectRequestParams("GET","",N),$.query=j,$.xmlResponse=!0,$.successStatuses=[200],ne.next=6,this.request($);case 6:return z=ne.sent,F=z.data.Contents||[],M=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(pe){return{name:pe.Key,url:M._objectUrl(pe.Key),lastModified:pe.LastModified,etag:pe.ETag,type:pe.Type,size:Number(pe.Size),storageClass:pe.StorageClass,owner:{id:pe.Owner.ID,displayName:pe.Owner.DisplayName}}})),X=z.data.CommonPrefixes||null,X&&(Array.isArray(X)||(X=[X]),X=X.map(function(pe){return pe.Prefix})),ne.abrupt("return",{res:z.res,objects:F,prefixes:X,nextMarker:z.data.NextMarker||null,isTruncated:z.data.IsTruncated==="true"});case 13:case"end":return ne.stop()}},R,this)}));function B(R,j){return K.apply(this,arguments)}return B}(),P.listV2=function(){var K=(0,h.default)(f.default.mark(function R(j){var N,$,z,F,M,X,re,ne=arguments;return f.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return N=ne.length>1&&ne[1]!==void 0?ne[1]:{},$=j["continuation-token"]||j.continuationToken,$&&(N.subres=Object.assign({"continuation-token":$},N.subres)),z=this._objectRequestParams("GET","",N),z.query=Object.assign({"list-type":2},j),delete z.query["continuation-token"],delete z.query.continuationToken,z.xmlResponse=!0,z.successStatuses=[200],ie.next=11,this.request(z);case 11:return F=ie.sent,M=F.data.Contents||[],X=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(Ae){var Z=null;return Ae.Owner&&(Z={id:Ae.Owner.ID,displayName:Ae.Owner.DisplayName}),{name:Ae.Key,url:X._objectUrl(Ae.Key),lastModified:Ae.LastModified,etag:Ae.ETag,type:Ae.Type,size:Number(Ae.Size),storageClass:Ae.StorageClass,owner:Z}})),re=F.data.CommonPrefixes||null,re&&(Array.isArray(re)||(re=[re]),re=re.map(function(Ae){return Ae.Prefix})),ie.abrupt("return",{res:F.res,objects:M,prefixes:re,isTruncated:F.data.IsTruncated==="true",keyCount:+F.data.KeyCount,continuationToken:F.data.ContinuationToken||null,nextContinuationToken:F.data.NextContinuationToken||null});case 18:case"end":return ie.stop()}},R,this)}));function B(R){return K.apply(this,arguments)}return B}(),P.restore=function(){var K=(0,h.default)(f.default.mark(function R(j){var N,$,z,F,M=arguments;return f.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return N=M.length>1&&M[1]!==void 0?M[1]:{type:"Archive"},N=N||{},N.subres=Object.assign({restore:""},N.subres),N.versionId&&(N.subres.versionId=N.versionId),$=this._objectRequestParams("POST",j,N),N.type==="ColdArchive"&&(z={RestoreRequest:{Days:N.Days?N.Days:2,JobParameters:{Tier:N.JobParameters?N.JobParameters:"Standard"}}},$.content=V(z,{headers:!0}),$.mime="xml"),$.successStatuses=[202],re.next=9,this.request($);case 9:return F=re.sent,re.abrupt("return",{res:F.res});case 11:case"end":return re.stop()}},R,this)}));function B(R){return K.apply(this,arguments)}return B}(),P._objectUrl=function(B){return this._getReqUrl({bucket:this.options.bucket,object:B})},P._objectRequestParams=function(B,R,j){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");j=j||{},R=this._objectName(R);var N={object:R,bucket:this.options.bucket,method:B,subres:j&&j.subres,timeout:j&&j.timeout,ctx:j&&j.ctx};return j.headers&&(N.headers={},g(j.headers).to(N.headers)),N},P._objectName=function(B){return B.replace(/^\/+/,"")},P._convertMetaToHeaders=function(B,R){B&&Object.keys(B).forEach(function(j){R["x-oss-meta-".concat(j)]=B[j]})},P._deleteFileSafe=function(B){var R=this;return new Promise(function(j){b.exists(B,function(N){N?b.unlink(B,function($){$&&R.debug("unlink %j error: %s",B,$,"error"),j()}):j()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(o,_,O){"use strict";O.version="6.18.1"},{}],7:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.abortBucketWorm=void 0;var b=o("../utils/checkBucketName");function g(c,v){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function c(v,m){var y,x;return f.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return b.checkBucketName(v),y=this._bucketRequestParams("DELETE",v,"worm",m),I.next=4,this.request(y);case 4:return x=I.sent,I.abrupt("return",{res:x.res,status:x.status});case 6:case"end":return I.stop()}},c,this)})),w.apply(this,arguments)}O.abortBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.completeBucketWorm=void 0;var b=o("../utils/checkBucketName");function g(c,v,m){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function c(v,m,y){var x,S;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return b.checkBucketName(v),x=this._bucketRequestParams("POST",v,{wormId:m},y),C.next=4,this.request(x);case 4:return S=C.sent,C.abrupt("return",{res:S.res,status:S.status});case 6:case"end":return C.stop()}},c,this)})),w.apply(this,arguments)}O.completeBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.deleteBucketInventory=void 0;var b=o("../utils/checkBucketName");function g(c,v){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function c(v,m){var y,x,S,I,C=arguments;return f.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return y=C.length>2&&C[2]!==void 0?C[2]:{},x=Object.assign({inventory:"",inventoryId:m},y.subres),b.checkBucketName(v),S=this._bucketRequestParams("DELETE",v,x,y),S.successStatuses=[204],k.next=7,this.request(S);case 7:return I=k.sent,k.abrupt("return",{status:I.status,res:I.res});case 9:case"end":return k.stop()}},c,this)})),w.apply(this,arguments)}O.deleteBucketInventory=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=O;w.deleteBucketLifecycle=function(){var c=(0,h.default)(f.default.mark(function m(y,x){var S,I;return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return g(y),S=this._bucketRequestParams("DELETE",y,"lifecycle",x),S.successStatuses=[204],E.next=5,this.request(S);case 5:return I=E.sent,E.abrupt("return",{res:I.res});case 7:case"end":return E.stop()}},m,this)}));function v(m,y){return c.apply(this,arguments)}return v}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=O;w.deleteBucketWebsite=function(){var c=(0,h.default)(f.default.mark(function m(y,x){var S,I;return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return g(y),S=this._bucketRequestParams("DELETE",y,"website",x),S.successStatuses=[204],E.next=5,this.request(S);case 5:return I=E.sent,E.abrupt("return",{res:I.res});case 7:case"end":return E.stop()}},m,this)}));function v(m,y){return c.apply(this,arguments)}return v}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.extendBucketWorm=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/obj2xml");function w(v,m,y,x){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function v(m,y,x,S){var I,C,E;return f.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return b.checkBucketName(m),I=this._bucketRequestParams("POST",m,{wormExtend:"",wormId:y},S),C={ExtendWormConfiguration:{RetentionPeriodInDays:x}},I.mime="xml",I.content=g.obj2xml(C,{headers:!0}),I.successStatuses=[200],V.next=8,this.request(I);case 8:return E=V.sent,V.abrupt("return",{res:E.res,status:E.status});case 10:case"end":return V.stop()}},v,this)})),c.apply(this,arguments)}O.extendBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.getBucketInventory=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/formatInventoryConfig");function w(v,m){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function v(m,y){var x,S,I,C,E=arguments;return f.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return x=E.length>2&&E[2]!==void 0?E[2]:{},S=Object.assign({inventory:"",inventoryId:y},x.subres),b.checkBucketName(m),I=this._bucketRequestParams("GET",m,S,x),I.successStatuses=[200],I.xmlResponse=!0,V.next=8,this.request(I);case 8:return C=V.sent,V.abrupt("return",{status:C.status,res:C.res,inventory:g.formatInventoryConfig(C.data)});case 10:case"end":return V.stop()}},v,this)})),c.apply(this,arguments)}O.getBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.map.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/isArray"),c=w.isArray,v=o("../utils/formatObjKey"),m=v.formatObjKey,y=O;y.getBucketLifecycle=function(){var x=(0,h.default)(f.default.mark(function I(C,E){var k,V,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return g(C),k=this._bucketRequestParams("GET",C,"lifecycle",E),k.successStatuses=[200],k.xmlResponse=!0,B.next=6,this.request(k);case 6:return V=B.sent,P=V.data.Rule||null,P&&(c(P)||(P=[P]),P=P.map(function(R){return R.ID&&(R.id=R.ID,delete R.ID),R.Tag&&!c(R.Tag)&&(R.Tag=[R.Tag]),m(R,"firstLowerCase")})),B.abrupt("return",{rules:P,res:V.res});case 10:case"end":return B.stop()}},I,this)}));function S(I,C){return x.apply(this,arguments)}return S}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=O;w.getBucketVersioning=function(){var c=(0,h.default)(f.default.mark(function m(y,x){var S,I,C;return f.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return g(y),S=this._bucketRequestParams("GET",y,"versioning",x),S.xmlResponse=!0,S.successStatuses=[200],k.next=6,this.request(S);case 6:return I=k.sent,C=I.data.Status,k.abrupt("return",{status:I.status,versionStatus:C,res:I.res});case 9:case"end":return k.stop()}},m,this)}));function v(m,y){return c.apply(this,arguments)}return v}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/isObject"),c=w.isObject,v=O;v.getBucketWebsite=function(){var m=(0,h.default)(f.default.mark(function x(S,I){var C,E,k;return f.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return g(S),C=this._bucketRequestParams("GET",S,"website",I),C.successStatuses=[200],C.xmlResponse=!0,P.next=6,this.request(C);case 6:return E=P.sent,k=[],E.data.RoutingRules&&E.data.RoutingRules.RoutingRule&&(c(E.data.RoutingRules.RoutingRule)?k=[E.data.RoutingRules.RoutingRule]:k=E.data.RoutingRules.RoutingRule),P.abrupt("return",{index:E.data.IndexDocument&&E.data.IndexDocument.Suffix||"",supportSubDir:E.data.IndexDocument&&E.data.IndexDocument.SupportSubDir||"false",type:E.data.IndexDocument&&E.data.IndexDocument.Type,routingRules:k,error:E.data.ErrorDocument&&E.data.ErrorDocument.Key||null,res:E.res});case 10:case"end":return P.stop()}},x,this)}));function y(x,S){return m.apply(this,arguments)}return y}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.getBucketWorm=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/dataFix");function w(v,m){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function v(m,y){var x,S;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return b.checkBucketName(m),x=this._bucketRequestParams("GET",m,"worm",y),x.successStatuses=[200],x.xmlResponse=!0,C.next=6,this.request(x);case 6:return S=C.sent,g.dataFix(S.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),C.abrupt("return",Object.assign(Object.assign({},S.data),{res:S.res,status:S.status}));case 9:case"end":return C.stop()}},v,this)})),c.apply(this,arguments)}O.getBucketWorm=w},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.initiateBucketWorm=void 0;var b=o("../utils/obj2xml"),g=o("../utils/checkBucketName");function w(v,m,y){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function v(m,y,x){var S,I,C;return f.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return g.checkBucketName(m),S=this._bucketRequestParams("POST",m,"worm",x),I={InitiateWormConfiguration:{RetentionPeriodInDays:y}},S.mime="xml",S.content=b.obj2xml(I,{headers:!0}),S.successStatuses=[200],k.next=8,this.request(S);case 8:return C=k.sent,k.abrupt("return",{res:C.res,wormId:C.res.headers["x-oss-worm-id"],status:C.status});case 10:case"end":return k.stop()}},v,this)})),c.apply(this,arguments)}O.initiateBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.listBucketInventory=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/formatInventoryConfig");function w(v){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function v(m){var y,x,S,I,C,E,k,V,P=arguments;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return y=P.length>1&&P[1]!==void 0?P[1]:{},x=y.continuationToken,S=Object.assign({inventory:""},x&&{"continuation-token":x},y.subres),b.checkBucketName(m),I=this._bucketRequestParams("GET",m,S,y),I.successStatuses=[200],I.xmlResponse=!0,B.next=9,this.request(I);case 9:return C=B.sent,E=C.data,k=C.res,V=C.status,B.abrupt("return",{isTruncated:E.IsTruncated==="true",nextContinuationToken:E.NextContinuationToken,inventoryList:g.formatInventoryConfig(E.InventoryConfiguration,!0),status:V,res:k});case 12:case"end":return B.stop()}},v,this)})),c.apply(this,arguments)}O.listBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.concat.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.putBucketInventory=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/obj2xml");function w(v,m){return c.apply(this,arguments)}function c(){return c=(0,h.default)(f.default.mark(function v(m,y){var x,S,I,C,E,k,V,P,K,B,R,j=arguments;return f.default.wrap(function($){for(;;)switch($.prev=$.next){case 0:return x=j.length>2&&j[2]!==void 0?j[2]:{},S=Object.assign({inventory:"",inventoryId:y.id},x.subres),b.checkBucketName(m),I=y.OSSBucketDestination,C=y.optionalFields,E=y.includedObjectVersions,k="acs:oss:::",V="acs:ram::".concat(I.accountId,":role/"),P={InventoryConfiguration:{Id:y.id,IsEnabled:y.isEnabled,Filter:{Prefix:y.prefix||""},Destination:{OSSBucketDestination:{Format:I.format,AccountId:I.accountId,RoleArn:"".concat(V).concat(I.rolename),Bucket:"".concat(k).concat(I.bucket),Prefix:I.prefix||"",Encryption:I.encryption||""}},Schedule:{Frequency:y.frequency},IncludedObjectVersions:E,OptionalFields:{Field:(C==null?void 0:C.field)||[]}}},K=g.obj2xml(P,{headers:!0,firstUpperCase:!0}),B=this._bucketRequestParams("PUT",m,S,x),B.successStatuses=[200],B.mime="xml",B.content=K,$.next=14,this.request(B);case 14:return R=$.sent,$.abrupt("return",{status:R.status,res:R.res});case 16:case"end":return $.stop()}},v,this)})),c.apply(this,arguments)}O.putBucketInventory=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.array.includes.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/isArray"),c=w.isArray,v=o("../utils/deepCopy"),m=v.deepCopy,y=o("../utils/isObject"),x=y.isObject,S=o("../utils/obj2xml"),I=S.obj2xml,C=o("../utils/checkObjectTag"),E=C.checkObjectTag,k=o("../utils/getStrBytesCount"),V=k.getStrBytesCount,P=O;P.putBucketLifecycle=function(){var N=(0,h.default)(f.default.mark(function z(F,M,X){var re,ne,pe,ie,Ae;return f.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(g(F),c(M)){fe.next=3;break}throw new Error("rules must be Array");case 3:return re=this._bucketRequestParams("PUT",F,"lifecycle",X),ne=[],pe={LifecycleConfiguration:{Rule:ne}},M.forEach(function(he){K(he),j(he),he.id&&(he.ID=he.id,delete he.id),ne.push(he)}),ie=I(pe,{headers:!0,firstUpperCase:!0}),re.content=ie,re.mime="xml",re.successStatuses=[200],fe.next=13,this.request(re);case 13:return Ae=fe.sent,fe.abrupt("return",{res:Ae.res});case 15:case"end":return fe.stop()}},z,this)}));function $(z,F,M){return N.apply(this,arguments)}return $}();function K(N){N.days&&(N.expiration={days:N.days}),N.date&&(N.expiration={createdBeforeDate:N.date})}function B(N,$){var z=N.days,F=N.createdBeforeDate;if(!z&&!F)throw new Error("".concat($," must includes days or createdBeforeDate"));if(z&&!/^[1-9][0-9]*$/.test(z))throw new Error("days must be a positive integer");if(F&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(F))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function R(N){if(!c(N)&&!x(N))throw new Error("tag must be Object or Array");N=x(N)?[N]:N;var $={},z=m(N);z.forEach(function(F){$[F.key]=F.value}),E($)}function j(N){if(N.id&&V(N.id)>255)throw new Error("ID is composed of 255 bytes at most");if(N.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(N.status))throw new Error("Status must be Enabled or Disabled");if(N.transition){if(!["IA","Archive"].includes(N.transition.storageClass))throw new Error("StorageClass must be IA or Archive");B(N.transition,"Transition")}if(N.expiration){if(!N.expiration.expiredObjectDeleteMarker)B(N.expiration,"Expiration");else if(N.expiration.days||N.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(N.abortMultipartUpload&&B(N.abortMultipartUpload,"AbortMultipartUpload"),!N.expiration&&!N.abortMultipartUpload&&!N.transition&&!N.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(N.tag){if(N.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");R(N.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.includes.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/obj2xml"),c=w.obj2xml,v=O;v.putBucketVersioning=function(){var m=(0,h.default)(f.default.mark(function x(S,I){var C,E,k,V,P=arguments;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(C=P.length>2&&P[2]!==void 0?P[2]:{},g(S),["Enabled","Suspended"].includes(I)){B.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return E=this._bucketRequestParams("PUT",S,"versioning",C),k={VersioningConfiguration:{Status:I}},E.mime="xml",E.content=c(k,{headers:!0}),B.next=10,this.request(E);case 10:return V=B.sent,B.abrupt("return",{res:V.res,status:V.status});case 12:case"end":return B.stop()}},x,this)}));function y(x,S){return m.apply(this,arguments)}return y}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/obj2xml"),c=w.obj2xml,v=o("../utils/isArray"),m=v.isArray,y=O;y.putBucketWebsite=function(){var x=(0,h.default)(f.default.mark(function I(C){var E,k,V,P,K,B,R,j=arguments;return f.default.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(E=j.length>1&&j[1]!==void 0?j[1]:{},k=j.length>2?j[2]:void 0,g(C),V=this._bucketRequestParams("PUT",C,"website",k),P={Suffix:E.index||"index.html"},K={IndexDocument:P},B={WebsiteConfiguration:K},E.supportSubDir&&(P.SupportSubDir=E.supportSubDir),E.type&&(P.Type=E.type),E.error&&(K.ErrorDocument={Key:E.error}),E.routingRules===void 0){$.next=14;break}if(m(E.routingRules)){$.next=13;break}throw new Error("RoutingRules must be Array");case 13:K.RoutingRules={RoutingRule:E.routingRules};case 14:return B=c(B),V.content=B,V.mime="xml",V.successStatuses=[200],$.next=20,this.request(V);case 20:return R=$.sent,$.abrupt("return",{res:R.res});case 22:case"end":return $.stop()}},I,this)}));function S(I){return x.apply(this,arguments)}return S}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),O.encodeCallback=function(h,b){if(h.headers=h.headers||{},!Object.prototype.hasOwnProperty.call(h.headers,"x-oss-callback")&&b.callback){var g={callbackUrl:encodeURI(b.callback.url),callbackBody:b.callback.body};b.callback.host&&(g.callbackHost=b.callback.host),b.callback.contentType&&(g.callbackBodyType=b.callback.contentType);var w=p.from(JSON.stringify(g)).toString("base64");if(h.headers["x-oss-callback"]=w,b.callback.customValue){var c={};Object.keys(b.callback.customValue).forEach(function(v){c["x:".concat(v)]=b.callback.customValue[v].toString()}),h.headers["x-oss-callback-var"]=p.from(JSON.stringify(c)).toString("base64")}}}}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(o,_,O){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js");var p=function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(O,"__esModule",{value:!0}),O.getReqUrl=void 0;var f=p(o("copy-to")),h=p(o("url")),b=p(o("merge-descriptors")),g=p(o("is-type-of")),w=o("../utils/isIP"),c=o("../utils/checkConfigValid");function v(m){var y={},x=this.options.cname;c.checkConfigValid(this.options.endpoint,"endpoint"),f.default(this.options.endpoint,!1).to(y),m.bucket&&!x&&!w.isIP(y.hostname)&&!this.options.sldEnable&&(y.host="".concat(m.bucket,".").concat(y.host));var S="/";m.bucket&&this.options.sldEnable&&(S+="".concat(m.bucket,"/")),m.object&&(S+=this._escape(m.object).replace(/\+/g,"%2B")),y.pathname=S;var I={};if(m.query&&b.default(I,m.query),m.subres){var C={};g.default.string(m.subres)?C[m.subres]="":g.default.array(m.subres)?m.subres.forEach(function(E){C[E]=""}):C=m.subres,b.default(I,C)}return y.query=I,h.default.format(y)}O.getReqUrl=v},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(o,_,O){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.string.trim.js");var p=o("humanize-ms"),f=o("url"),h=o("../utils/checkBucketName"),b=h.checkBucketName,g=o("../utils/setRegion"),w=g.setRegion,c=o("../utils/checkConfigValid"),v=c.checkConfigValid;function m(y,x){v(y,"endpoint");var S=f.parse(y);if(S.protocol||(S=f.parse("http".concat(x?"s":"","://").concat(y))),S.protocol!=="http:"&&S.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return S}_.exports=function(y){if(!y||!y.accessKeyId||!y.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");y.stsToken&&!y.refreshSTSToken&&!y.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),y.bucket&&b(y.bucket);var x=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},y);if(x.accessKeyId=x.accessKeyId.trim(),x.accessKeySecret=x.accessKeySecret.trim(),x.timeout&&(x.timeout=p(x.timeout)),x.endpoint)x.endpoint=m(x.endpoint,x.secure);else if(x.region)x.endpoint=w(x.region,x.internal,x.secure);else throw new Error("require options.endpoint or options.region");return x.inited=!0,x}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(o,_,O){"use strict";var p=o("merge-descriptors"),f=O;p(f,o("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.concat.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("querystring"),c=o("js-base64"),v=c.Base64.encode,m=O;m.processObjectSave=function(){var x=(0,h.default)(f.default.mark(function I(C,E,k,V){var P,K,B,R;return f.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return y(C,"sourceObject"),y(E,"targetObject"),y(k,"process"),E=this._objectName(E),V&&g(V),P=this._objectRequestParams("POST",C,{subres:"x-oss-process"}),K=V?",b_".concat(v(V)):"",E=v(E),B={"x-oss-process":"".concat(k,"|sys/saveas,o_").concat(E).concat(K)},P.content=w.stringify(B),N.next=12,this.request(P);case 12:return R=N.sent,N.abrupt("return",{res:R.res,status:R.res.status});case 14:case"end":return N.stop()}},I,this)}));function S(I,C,E,k){return x.apply(this,arguments)}return S}();function y(x,S){if(!x)throw new Error("".concat(S," is required"));if(typeof x!="string")throw new Error("".concat(S," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.regexp.to-string.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("debug")("ali-oss:multipart-copy"),g=o("copy-to"),w=O;w.uploadPartCopy=function(){var c=(0,h.default)(f.default.mark(function m(y,x,S,I,C){var E,k,V,P,K,B=arguments;return f.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return E=B.length>5&&B[5]!==void 0?B[5]:{},E.headers=E.headers||{},k=E.versionId||E.subres&&E.subres.versionId||null,k?V="/".concat(C.sourceBucketName,"/").concat(encodeURIComponent(C.sourceKey),"?versionId=").concat(k):V="/".concat(C.sourceBucketName,"/").concat(encodeURIComponent(C.sourceKey)),E.headers["x-oss-copy-source"]=V,I&&(E.headers["x-oss-copy-source-range"]="bytes=".concat(I)),E.subres={partNumber:S,uploadId:x},P=this._objectRequestParams("PUT",y,E),P.mime=E.mime,P.successStatuses=[200],j.next=12,this.request(P);case 12:return K=j.sent,j.abrupt("return",{name:y,etag:K.res.headers.etag,res:K.res});case 14:case"end":return j.stop()}},m,this)}));function v(m,y,x,S,I){return c.apply(this,arguments)}return v}(),w.multipartUploadCopy=function(){var c=(0,h.default)(f.default.mark(function m(y,x){var S,I,C,E,k,V,P,K,B,R,j,N,$=arguments;return f.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return S=$.length>2&&$[2]!==void 0?$[2]:{},this.resetCancelFlag(),I=S.versionId,C=I===void 0?null:I,E={versionId:C},F.next=6,this._getObjectMeta(x.sourceBucketName,x.sourceKey,E);case 6:if(k=F.sent,V=k.res.headers["content-length"],x.startOffset=x.startOffset||0,x.endOffset=x.endOffset||V,!(S.checkpoint&&S.checkpoint.uploadId)){F.next=14;break}return F.next=13,this._resumeMultipartCopy(S.checkpoint,x,S);case 13:return F.abrupt("return",F.sent);case 14:if(P=102400,K=x.endOffset-x.startOffset,!(K<P)){F.next=18;break}throw new Error("copySize must not be smaller than ".concat(P));case 18:if(!(S.partSize&&S.partSize<P)){F.next=20;break}throw new Error("partSize must not be smaller than ".concat(P));case 20:return F.next=22,this.initMultipartUpload(y,S);case 22:if(B=F.sent,R=B.uploadId,j=this._getPartSize(K,S.partSize),N={name:y,copySize:K,partSize:j,uploadId:R,doneParts:[]},!(S&&S.progress)){F.next=29;break}return F.next=29,S.progress(0,N,B.res);case 29:return F.next=31,this._resumeMultipartCopy(N,x,S);case 31:return F.abrupt("return",F.sent);case 32:case"end":return F.stop()}},m,this)}));function v(m,y){return c.apply(this,arguments)}return v}(),w._resumeMultipartCopy=function(){var c=(0,h.default)(f.default.mark(function m(y,x,S){var I,C,E,k,V,P,K,B,R,j,N,$,z,F,M,X,re,ne,pe,ie,Ae;return f.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(!this.isCancel()){fe.next=2;break}throw this._makeCancelEvent();case 2:if(I=S.versionId,C=I===void 0?null:I,E={versionId:C},k=y.copySize,V=y.partSize,P=y.uploadId,K=y.doneParts,B=y.name,R=this._divideMultipartCopyParts(k,V,x.startOffset),j=R.length,N={headers:{}},S.copyheaders&&g(S.copyheaders).to(N.headers),C&&g(E).to(N),$=function(be,le,ue){return new Promise(function(){var ve=(0,h.default)(f.default.mark(function Ee(Oe,De){var ce,G,ye;return f.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(H.prev=0,be.isCancel()){H.next=22;break}return ce=R[le-1],G="".concat(ce.start,"-").concat(ce.end-1),H.prev=4,H.next=7,be.uploadPartCopy(B,P,le,G,ue,N);case 7:ye=H.sent,H.next=15;break;case 10:if(H.prev=10,H.t0=H.catch(4),H.t0.status!==404){H.next=14;break}throw be._makeAbortEvent();case 14:throw H.t0;case 15:if(be.isCancel()){H.next=22;break}if(b("content-range ".concat(ye.res.headers["content-range"])),K.push({number:le,etag:ye.res.headers.etag}),y.doneParts=K,!(S&&S.progress)){H.next=22;break}return H.next=22,S.progress(K.length/j,y,ye.res);case 22:Oe(),H.next=29;break;case 25:H.prev=25,H.t1=H.catch(0),H.t1.partNum=le,De(H.t1);case 29:case"end":return H.stop()}},Ee,null,[[0,25],[4,10]])}));return function(Ee,Oe){return ve.apply(this,arguments)}}())},z=Array.from(new Array(j),function(he,be){return be+1}),F=K.map(function(he){return he.number}),M=z.filter(function(he){return F.indexOf(he)<0}),X=5,re=S.parallel||X,!(this.checkBrowserAndVersion("Internet Explorer","10")||re===1)){fe.next=28;break}ne=0;case 18:if(!(ne<M.length)){fe.next=26;break}if(!this.isCancel()){fe.next=21;break}throw this._makeCancelEvent();case 21:return fe.next=23,$(this,M[ne],x);case 23:ne++,fe.next=18;break;case 26:fe.next=40;break;case 28:return fe.next=30,this._parallelNode(M,re,$,x);case 30:if(pe=fe.sent,ie=pe.find(function(he){return he.name==="abort"}),!ie){fe.next=34;break}throw ie;case 34:if(!this.isCancel()){fe.next=36;break}throw this._makeCancelEvent();case 36:if(!(pe&&pe.length>0)){fe.next=40;break}throw Ae=pe[0],Ae.message="Failed to copy some parts with error: ".concat(Ae.toString()," part_num: ").concat(Ae.partNum),Ae;case 40:return fe.next=42,this.completeMultipartUpload(B,P,K,S);case 42:return fe.abrupt("return",fe.sent);case 43:case"end":return fe.stop()}},m,this)}));function v(m,y,x){return c.apply(this,arguments)}return v}(),w._divideMultipartCopyParts=function(v,m,y){for(var x=Math.ceil(v/m),S=[],I=0;I<x;I++){var C=m*I+y,E=Math.min(C+m,v+y);S.push({start:C,end:E})}return S},w._getObjectMeta=function(){var c=(0,h.default)(f.default.mark(function m(y,x,S){var I,C;return f.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return I=this.getBucket(),this.setBucket(y),k.next=4,this.head(x,S);case 4:return C=k.sent,this.setBucket(I),k.abrupt("return",C);case 7:case"end":return k.stop()}},m,this)}));function v(m,y,x){return c.apply(this,arguments)}return v}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(o,_,O){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.array.sort.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js");var b=f(o("@babel/runtime/helpers/asyncToGenerator")),g=o("copy-to"),w=o("./callback"),c=o("./utils/deepCopy"),v=c.deepCopyWith,m=o("./utils/isBuffer"),y=m.isBuffer,x=o("./utils/omit"),S=x.omit,I=O;I.listUploads=function(){var C=(0,b.default)(h.default.mark(function k(V,P){var K,B,R,j;return h.default.wrap(function($){for(;;)switch($.prev=$.next){case 0:return P=P||{},K={},g(P).to(K),K.subres="uploads",B=this._objectRequestParams("GET","",K),B.query=V,B.xmlResponse=!0,B.successStatuses=[200],$.next=10,this.request(B);case 10:return R=$.sent,j=R.data.Upload||[],Array.isArray(j)||(j=[j]),j=j.map(function(z){return{name:z.Key,uploadId:z.UploadId,initiated:z.Initiated}}),$.abrupt("return",{res:R.res,uploads:j,bucket:R.data.Bucket,nextKeyMarker:R.data.NextKeyMarker,nextUploadIdMarker:R.data.NextUploadIdMarker,isTruncated:R.data.IsTruncated==="true"});case 15:case"end":return $.stop()}},k,this)}));function E(k,V){return C.apply(this,arguments)}return E}(),I.listParts=function(){var C=(0,b.default)(h.default.mark(function k(V,P,K,B){var R,j,N;return h.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return B=B||{},R={},g(B).to(R),R.subres={uploadId:P},j=this._objectRequestParams("GET",V,R),j.query=K,j.xmlResponse=!0,j.successStatuses=[200],z.next=10,this.request(j);case 10:return N=z.sent,z.abrupt("return",{res:N.res,uploadId:N.data.UploadId,bucket:N.data.Bucket,name:N.data.Key,partNumberMarker:N.data.PartNumberMarker,nextPartNumberMarker:N.data.NextPartNumberMarker,maxParts:N.data.MaxParts,isTruncated:N.data.IsTruncated,parts:N.data.Part||[]});case 12:case"end":return z.stop()}},k,this)}));function E(k,V,P,K){return C.apply(this,arguments)}return E}(),I.abortMultipartUpload=function(){var C=(0,b.default)(h.default.mark(function k(V,P,K){var B,R,j;return h.default.wrap(function($){for(;;)switch($.prev=$.next){case 0:return this._stop(),K=K||{},B={},g(K).to(B),B.subres={uploadId:P},R=this._objectRequestParams("DELETE",V,B),R.successStatuses=[204],$.next=9,this.request(R);case 9:return j=$.sent,$.abrupt("return",{res:j.res});case 11:case"end":return $.stop()}},k,this)}));function E(k,V,P){return C.apply(this,arguments)}return E}(),I.initMultipartUpload=function(){var C=(0,b.default)(h.default.mark(function k(V,P){var K,B,R;return h.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return P=P||{},K={},g(P).to(K),K.headers=K.headers||{},this._convertMetaToHeaders(P.meta,K.headers),K.subres="uploads",B=this._objectRequestParams("POST",V,K),B.mime=P.mime,B.xmlResponse=!0,B.successStatuses=[200],N.next=12,this.request(B);case 12:return R=N.sent,N.abrupt("return",{res:R.res,bucket:R.data.Bucket,name:R.data.Key,uploadId:R.data.UploadId});case 14:case"end":return N.stop()}},k,this)}));function E(k,V){return C.apply(this,arguments)}return E}(),I.uploadPart=function(){var C=(0,b.default)(h.default.mark(function k(V,P,K,B,R,j,N){var $,z;return h.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if($={size:j-R},z=p&&p.browser,!z){M.next=8;break}return M.next=5,this._createBuffer(B,R,j);case 5:$.content=M.sent,M.next=11;break;case 8:return M.next=10,this._createStream(B,R,j);case 10:$.stream=M.sent;case 11:return M.next=13,this._uploadPart(V,P,K,$,N);case 13:return M.abrupt("return",M.sent);case 14:case"end":return M.stop()}},k,this)}));function E(k,V,P,K,B,R,j){return C.apply(this,arguments)}return E}(),I.completeMultipartUpload=function(){var C=(0,b.default)(h.default.mark(function k(V,P,K,B){var R,j,N,$,z,F,M,X;return h.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:for(R=K.concat().sort(function(pe,ie){return pe.number-ie.number}).filter(function(pe,ie,Ae){return!ie||pe.number!==Ae[ie-1].number}),j=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,N=0;N<R.length;N++)$=R[N],j+=`<Part>
|
|
`,j+="<PartNumber>".concat($.number,`</PartNumber>
|
|
`),j+="<ETag>".concat($.etag,`</ETag>
|
|
`),j+=`</Part>
|
|
`;return j+="</CompleteMultipartUpload>",B=B||{},z={},z=v(B,function(pe){if(y(pe))return null}),z.subres={uploadId:P},z.headers=S(z.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),F=this._objectRequestParams("POST",V,z),w.encodeCallback(F,z),F.mime="xml",F.content=j,F.headers&&F.headers["x-oss-callback"]||(F.xmlResponse=!0),F.successStatuses=[200],ne.next=17,this.request(F);case 17:if(M=ne.sent,!B.progress){ne.next=21;break}return ne.next=21,B.progress(1,null,M.res);case 21:return X={res:M.res,bucket:F.bucket,name:V,etag:M.res.headers.etag},F.headers&&F.headers["x-oss-callback"]&&(X.data=JSON.parse(M.data.toString())),ne.abrupt("return",X);case 24:case"end":return ne.stop()}},k,this)}));function E(k,V,P,K){return C.apply(this,arguments)}return E}(),I._uploadPart=function(){var C=(0,b.default)(h.default.mark(function k(V,P,K,B,R){var j,N,$,z;return h.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return R=R||{},j={},g(R).to(j),j.headers=j.headers||{},j.headers["Content-Length"]=B.size,j.headers=S(j.headers,["x-oss-server-side-encryption"]),j.subres={partNumber:K,uploadId:P},N=this._objectRequestParams("PUT",V,j),N.mime=j.mime,$=p&&p.browser,$?N.content=B.content:N.stream=B.stream,N.successStatuses=[200],N.disabledMD5=R.disabledMD5,M.next=15,this.request(N);case 15:if(z=M.sent,z.res.headers.etag){M.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
https://help.aliyun.com/document_detail/32069.html`);case 18:return B.stream&&(B.stream=null,N.stream=null),M.abrupt("return",{name:V,etag:z.res.headers.etag,res:z.res});case 20:case"end":return M.stop()}},k,this)}));function E(k,V,P,K,B){return C.apply(this,arguments)}return E}()}).call(this)}).call(this,o("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator")),h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("url"),g=o("utility"),w=o("copy-to"),c=o("../../common/signUtils"),v=o("../utils/isIP"),m=v.isIP,y=o("../utils/setSTSToken"),x=y.setSTSToken,S=o("../utils/isFunction"),I=S.isFunction,C=O;C.asyncSignatureUrl=function(){var E=(0,h.default)(f.default.mark(function V(P,K){var B,R,j,N,$;return f.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!m(this.options.endpoint.hostname)){F.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(K=K||{},P=this._objectName(P),K.method=K.method||"GET",B=g.timestamp()+(K.expires||1800),R={bucket:this.options.bucket,object:P},j=this._getResource(R),!(this.options.stsToken&&I(this.options.refreshSTSToken))){F.next=11;break}return F.next=11,x.call(this);case 11:return this.options.stsToken&&(K["security-token"]=this.options.stsToken),N=c._signatureForURL(this.options.accessKeySecret,K,j,B),$=b.parse(this._getReqUrl(R)),$.query={OSSAccessKeyId:this.options.accessKeyId,Expires:B,Signature:N.Signature},w(N.subResource).to($.query),F.abrupt("return",$.format());case 17:case"end":return F.stop()}},V,this)}));function k(V,P){return E.apply(this,arguments)}return k}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js");var h=p(o("@babel/runtime/helpers/typeof")),b=p(o("@babel/runtime/helpers/asyncToGenerator")),g=o("../utils/checkBucketName"),w=g.checkBucketName,c=O,v=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];c.copy=function(){var m=(0,b.default)(f.default.mark(function x(S,I,C,E){var k,V,P;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return(0,h.default)(C)==="object"&&(E=C),E=E||{},E.headers=E.headers||{},Object.keys(E.headers).forEach(function(R){E.headers["x-oss-copy-source-".concat(R.toLowerCase())]=E.headers[R]}),(E.meta||Object.keys(E.headers).find(function(R){return v.includes(R.toLowerCase())}))&&(E.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(E.meta,E.headers),I=this._getSourceName(I,C),E.versionId&&(I="".concat(I,"?versionId=").concat(E.versionId)),E.headers["x-oss-copy-source"]=I,k=this._objectRequestParams("PUT",S,E),k.xmlResponse=!0,k.successStatuses=[200,304],B.next=14,this.request(k);case 14:return V=B.sent,P=V.data,P&&(P={etag:P.ETag,lastModified:P.LastModified}),B.abrupt("return",{data:P,res:V.res});case 18:case"end":return B.stop()}},x,this)}));function y(x,S,I,C){return m.apply(this,arguments)}return y}(),c._getSourceName=function(y,x){return typeof x=="string"?y=this._objectName(y):y[0]!=="/"?x=this.options.bucket:(x=y.replace(/\/(.+?)(\/.*)/,"$1"),y=y.replace(/(\/.+?\/)(.*)/,"$2")),w(x),y=encodeURIComponent(y),y="/".concat(x,"/").concat(y),y}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.delete=function(){var g=(0,h.default)(f.default.mark(function c(v){var m,y,x,S=arguments;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return m=S.length>1&&S[1]!==void 0?S[1]:{},m.subres=Object.assign({},m.subres),m.versionId&&(m.subres.versionId=m.versionId),y=this._objectRequestParams("DELETE",v,m),y.successStatuses=[204],C.next=7,this.request(y);case 7:return x=C.sent,C.abrupt("return",{res:x.res});case 9:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("utility"),g=o("../utils/obj2xml"),w=g.obj2xml,c=O;c.deleteMulti=function(){var v=(0,h.default)(f.default.mark(function y(x){var S,I,C,E,k,V,P,K,B,R,j,N,$,z=arguments;return f.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(S=z.length>1&&z[1]!==void 0?z[1]:{},I=[],!(!x||!x.length)){M.next=4;break}throw new Error("names is required");case 4:for(C=0;C<x.length;C++)E={},typeof x[C]=="string"?E.Key=b.escape(this._objectName(x[C])):(k=x[C],V=k.key,P=k.versionId,E.Key=b.escape(this._objectName(V)),E.VersionId=P),I.push(E);return K={Delete:{Quiet:!!S.quiet,Object:I}},B=w(K,{headers:!0}),S.subres=Object.assign({delete:""},S.subres),S.versionId&&(S.subres.versionId=S.versionId),R=this._objectRequestParams("POST","",S),R.mime="xml",R.content=B,R.xmlResponse=!0,R.successStatuses=[200],M.next=16,this.request(R);case 16:return j=M.sent,N=j.data,$=N&&N.Deleted||null,$&&(Array.isArray($)||($=[$])),M.abrupt("return",{res:j.res,deleted:$||[]});case 21:case"end":return M.stop()}},y,this)}));function m(y){return v.apply(this,arguments)}return m}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.deleteObjectTagging=function(){var g=(0,h.default)(f.default.mark(function c(v){var m,y,x,S=arguments;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return m=S.length>1&&S[1]!==void 0?S[1]:{},m.subres=Object.assign({tagging:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),v=this._objectName(v),y=this._objectRequestParams("DELETE",v,m),y.successStatuses=[204],C.next=8,this.request(y);case 8:return x=C.sent,C.abrupt("return",{status:x.status,res:x.res});case 10:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(o,_,O){"use strict";o("core-js/modules/es.array.concat.js");var p=o("url"),f=o("../utils/isIP"),h=f.isIP,b=O;b.generateObjectUrl=function(w,c){if(h(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(c)c[c.length-1]!=="/"&&(c+="/");else{c=this.options.endpoint.format();var v=p.parse(c),m=this.options.bucket;v.hostname="".concat(m,".").concat(v.hostname),v.host="".concat(m,".").concat(v.host),c=v.format()}return c+this._escape(this._objectName(w))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(o,_,O){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var b=f(o("@babel/runtime/helpers/asyncToGenerator")),g=o("fs"),w=o("is-type-of"),c=O;c.get=function(){var v=(0,b.default)(h.default.mark(function y(x,S){var I,C,E,k,V,P,K,B,R=arguments;return h.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return I=R.length>2&&R[2]!==void 0?R[2]:{},C=null,E=!1,w.writableStream(S)?C=S:w.string(S)?(C=g.createWriteStream(S),E=!0):I=S,I=I||{},k=p&&p.browser,V=I.responseCacheControl===null?"":"no-cache",P=k&&V?{"response-cache-control":V}:{},I.subres=Object.assign(P,I.subres),I.versionId&&(I.subres.versionId=I.versionId),I.process&&(I.subres["x-oss-process"]=I.process),N.prev=11,B=this._objectRequestParams("GET",x,I),B.writeStream=C,B.successStatuses=[200,206,304],N.next=17,this.request(B);case 17:K=N.sent,E&&C.destroy(),N.next=28;break;case 21:if(N.prev=21,N.t0=N.catch(11),!E){N.next=27;break}return C.destroy(),N.next=27,this._deleteFileSafe(S);case 27:throw N.t0;case 28:return N.abrupt("return",{res:K.res,content:K.data});case 29:case"end":return N.stop()}},y,this,[[11,21]])}));function m(y,x){return v.apply(this,arguments)}return m}()}).call(this)}).call(this,o("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.getACL=function(){var g=(0,h.default)(f.default.mark(function c(v){var m,y,x,S=arguments;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return m=S.length>1&&S[1]!==void 0?S[1]:{},m.subres=Object.assign({acl:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),v=this._objectName(v),y=this._objectRequestParams("GET",v,m),y.successStatuses=[200],y.xmlResponse=!0,C.next=9,this.request(y);case 9:return x=C.sent,C.abrupt("return",{acl:x.data.AccessControlList.Grant,owner:{id:x.data.Owner.ID,displayName:x.data.Owner.DisplayName},res:x.res});case 11:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.number.constructor.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O,g=o("../utils/isObject"),w=g.isObject,c=o("../utils/isArray"),v=c.isArray;b.getBucketVersions=m,b.listObjectVersions=m;function m(){return y.apply(this,arguments)}function y(){return y=(0,h.default)(f.default.mark(function I(){var C,E,k,V,P,K,B,R,j=arguments;return f.default.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(C=j.length>0&&j[0]!==void 0?j[0]:{},E=j.length>1&&j[1]!==void 0?j[1]:{},!(C.versionIdMarker&&C.keyMarker===void 0)){$.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return E.subres=Object.assign({versions:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),k=this._objectRequestParams("GET","",E),k.xmlResponse=!0,k.successStatuses=[200],k.query=S(C),$.next=12,this.request(k);case 12:return V=$.sent,P=V.data.Version||[],K=V.data.DeleteMarker||[],B=this,P&&(Array.isArray(P)||(P=[P]),P=P.map(function(z){return{name:z.Key,url:B._objectUrl(z.Key),lastModified:z.LastModified,isLatest:z.IsLatest==="true",versionId:z.VersionId,etag:z.ETag,type:z.Type,size:Number(z.Size),storageClass:z.StorageClass,owner:{id:z.Owner.ID,displayName:z.Owner.DisplayName}}})),K&&(v(K)||(K=[K]),K=K.map(function(z){return{name:z.Key,lastModified:z.LastModified,versionId:z.VersionId,owner:{id:z.Owner.ID,displayName:z.Owner.DisplayName}}})),R=V.data.CommonPrefixes||null,R&&(v(R)||(R=[R]),R=R.map(function(z){return z.Prefix})),$.abrupt("return",{res:V.res,objects:P,deleteMarker:K,prefixes:R,nextMarker:V.data.NextKeyMarker||null,NextVersionIdMarker:V.data.NextVersionIdMarker||null,nextKeyMarker:V.data.NextKeyMarker||null,nextVersionIdMarker:V.data.NextVersionIdMarker||null,isTruncated:V.data.IsTruncated==="true"});case 21:case"end":return $.stop()}},I,this)})),y.apply(this,arguments)}function x(I){return I.replace(/([A-Z])/g,"-$1").toLowerCase()}function S(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C={};return w(I)&&Object.keys(I).forEach(function(E){C[x(E)]=I[E]}),C}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.getObjectMeta=function(){var g=(0,h.default)(f.default.mark(function c(v,m){var y,x;return f.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return m=m||{},v=this._objectName(v),m.subres=Object.assign({objectMeta:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),y=this._objectRequestParams("HEAD",v,m),y.successStatuses=[200],I.next=8,this.request(y);case 8:return x=I.sent,I.abrupt("return",{status:x.status,res:x.res});case 10:case"end":return I.stop()}},c,this)}));function w(c,v){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O,g=o("../utils/isObject"),w=g.isObject;b.getObjectTagging=function(){var c=(0,h.default)(f.default.mark(function m(y){var x,S,I,C,E,k,V=arguments;return f.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return x=V.length>1&&V[1]!==void 0?V[1]:{},x.subres=Object.assign({tagging:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),y=this._objectName(y),S=this._objectRequestParams("GET",y,x),S.successStatuses=[200],K.next=8,this.request(S);case 8:return I=K.sent,K.next=11,this.parseXML(I.data);case 11:return C=K.sent,E=C.TagSet.Tag,E=E&&w(E)?[E]:E||[],k={},E.forEach(function(B){k[B.Key]=B.Value}),K.abrupt("return",{status:I.status,res:I.res,tag:k});case 17:case"end":return K.stop()}},m,this)}));function v(m){return c.apply(this,arguments)}return v}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(o,_,O){"use strict";var p=o("../utils/isIP"),f=p.isIP,h=O;h.getObjectUrl=function(g,w){if(f(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return w?w[w.length-1]!=="/"&&(w+="/"):w=this.options.endpoint.format(),w+this._escape(this._objectName(g))}},{"../utils/isIP":69}],43:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.getSymlink=function(){var g=(0,h.default)(f.default.mark(function c(v){var m,y,x,S,I=arguments;return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return m=I.length>1&&I[1]!==void 0?I[1]:{},m.subres=Object.assign({symlink:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),v=this._objectName(v),y=this._objectRequestParams("GET",v,m),y.successStatuses=[200],E.next=8,this.request(y);case 8:return x=E.sent,S=x.res.headers["x-oss-symlink-target"],E.abrupt("return",{targetName:decodeURIComponent(S),res:x.res});case 11:case"end":return E.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkEnv"),g=b.checkEnv,w=O;w.head=function(){var c=(0,h.default)(f.default.mark(function m(y){var x,S,I,C,E=arguments;return f.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return x=E.length>1&&E[1]!==void 0?E[1]:{},g("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),x.subres=Object.assign({},x.subres),x.versionId&&(x.subres.versionId=x.versionId),S=this._objectRequestParams("HEAD",y,x),S.successStatuses=[200,304],V.next=8,this.request(S);case 8:return I=V.sent,C={meta:null,res:I.res,status:I.status},I.status===200&&Object.keys(I.headers).forEach(function(P){P.indexOf("x-oss-meta-")===0&&(C.meta||(C.meta={}),C.meta[P.substring(11)]=I.headers[P])}),V.abrupt("return",C);case 12:case"end":return V.stop()}},m,this)}));function v(m){return c.apply(this,arguments)}return v}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.putACL=function(){var g=(0,h.default)(f.default.mark(function c(v,m,y){var x,S;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return y=y||{},y.subres=Object.assign({acl:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),y.headers=y.headers||{},y.headers["x-oss-object-acl"]=m,v=this._objectName(v),x=this._objectRequestParams("PUT",v,y),x.successStatuses=[200],C.next=10,this.request(x);case 10:return S=C.sent,C.abrupt("return",{res:S.res});case 12:case"end":return C.stop()}},c,this)}));function w(c,v,m){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.object.keys.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/obj2xml"),g=b.obj2xml,w=o("../utils/checkObjectTag"),c=w.checkObjectTag,v=O;v.putObjectTagging=function(){var m=(0,h.default)(f.default.mark(function x(S,I){var C,E,k,V,P=arguments;return f.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return C=P.length>2&&P[2]!==void 0?P[2]:{},c(I),C.subres=Object.assign({tagging:""},C.subres),C.versionId&&(C.subres.versionId=C.versionId),S=this._objectName(S),E=this._objectRequestParams("PUT",S,C),E.successStatuses=[200],I=Object.keys(I).map(function(R){return{Key:R,Value:I[R]}}),k={Tagging:{TagSet:{Tag:I}}},E.mime="xml",E.content=g(k),B.next=13,this.request(E);case 13:return V=B.sent,B.abrupt("return",{res:V.res,status:V.status});case 15:case"end":return B.stop()}},x,this)}));function y(x,S){return m.apply(this,arguments)}return y}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=O;b.putSymlink=function(){var g=(0,h.default)(f.default.mark(function c(v,m,y){var x,S;return f.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return y=y||{},y.headers=y.headers||{},m=this._escape(this._objectName(m)),this._convertMetaToHeaders(y.meta,y.headers),y.headers["x-oss-symlink-target"]=m,y.subres=Object.assign({symlink:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),y.storageClass&&(y.headers["x-oss-storage-class"]=y.storageClass),v=this._objectName(v),x=this._objectRequestParams("PUT",v,y),x.successStatuses=[200],C.next=13,this.request(x);case 13:return S=C.sent,C.abrupt("return",{res:S.res});case 15:case"end":return C.stop()}},c,this)}));function w(c,v,m){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(o,_,O){"use strict";var p=o("url"),f=o("utility"),h=o("copy-to"),b=o("../../common/signUtils"),g=o("../utils/isIP"),w=g.isIP,c=O;c.signatureUrl=function(m,y){if(w(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");y=y||{},m=this._objectName(m),y.method=y.method||"GET";var x=f.timestamp()+(y.expires||1800),S={bucket:this.options.bucket,object:m},I=this._getResource(S);this.options.stsToken&&(y["security-token"]=this.options.stsToken);var C=b._signatureForURL(this.options.accessKeySecret,y,I,x),E=p.parse(this._getReqUrl(S));return E.query={OSSAccessKeyId:this.options.accessKeyId,Expires:x,Signature:C.Signature},h(C.subResource).to(E.query),E.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/web.dom-collections.iterator.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.function.name.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator")),b=o("./utils/isArray"),g=b.isArray,w=O;w._parallelNode=function(){var c=(0,h.default)(f.default.mark(function m(y,x,S,I){var C,E,k,V,P,K,B,R;return f.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:C=this,E=[],k=[],V=y.length/x,P=y.length%x,K=P===0?V:(y.length-P)/x+1,B=1,R=0;case 8:if(!(R<y.length)){N.next=26;break}if(!C.isCancel()){N.next=11;break}return N.abrupt("break",26);case 11:if(I?k.push(S(C,y[R],I)):k.push(S(C,y[R])),!(k.length===x||B===K&&R===y.length-1)){N.next=23;break}return N.prev=13,B+=1,N.next=17,Promise.all(k);case 17:N.next=22;break;case 19:N.prev=19,N.t0=N.catch(13),E.push(N.t0);case 22:k=[];case 23:R++,N.next=8;break;case 26:return N.abrupt("return",E);case 27:case"end":return N.stop()}},m,this,[[13,19]])}));function v(m,y,x,S){return c.apply(this,arguments)}return v}(),w._parallel=function(v,m,y){var x=this;return new Promise(function(S){var I=[];if(m<=0||!v){S(I);return}function C(N){return function(){if(N===null)throw new Error("Callback was already called.");var $=N;N=null;for(var z=arguments.length,F=new Array(z),M=0;M<z;M++)F[M]=arguments[M];$.apply(this,F)}}function E(N){var $=-1,z=N.length;return function(){return++$<z&&!x.isCancel()?{value:N[$],key:$}:null}}var k=E(v),V=!1,P=0,K=!1;function B(N){P-=1,N?(V=!0,I.push(N),S(I)):V&&P<=0?(V=!0,S(I)):K||(x.isCancel()?S(I):j())}function R(N,$){y(N).then(function(z){$(null,z)}).catch(function(z){$(z)})}function j(){for(K=!0;P<m&&!V&&!x.isCancel();){var N=k();if(N===null||I.length>0){V=!0,P<=0&&S(I);return}P+=1,R(N.value,C(B))}K=!1}j()})},w.cancel=function(v){this.options.cancelFlag=!0,g(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(m){if(m.destroyed===!1){var y={name:"cancel",message:"cancel"};m.destroy(y)}}),this.multipartUploadStreams=[],v&&this.abortMultipartUpload(v.name,v.uploadId,v.options)},w.isCancel=function(){return this.options.cancelFlag},w.resetCancelFlag=function(){this.options.cancelFlag=!1},w._stop=function(){this.options.cancelFlag=!0},w._makeCancelEvent=function(){var v={status:0,name:"cancel"};return v},w._makeAbortEvent=function(){var v={status:0,name:"abort",message:"upload task has been abort"};return v}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.array.sort.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js");var f=o("./../../shims/crypto/crypto.js"),h=o("is-type-of"),b=o("./utils/lowercaseKeyHeader"),g=b.lowercaseKeyHeader;O.buildCanonicalizedResource=function(c,v){var m="".concat(c),y="?";if(h.string(v)&&v.trim()!=="")m+=y+v;else if(h.array(v))v.sort(),m+=y+v.join("&");else if(v){var x=function(C,E){return C[0]>E[0]?1:C[0]<E[0]?-1:0},S=function(C){m+=y+C,(v[C]||v[C]===0)&&(m+="=".concat(v[C])),y="&"};Object.keys(v).sort(x).forEach(S)}return m},O.buildCanonicalString=function(c,v,m,y){m=m||{};var x=g(m.headers),S="x-oss-",I=[],C={},E=[c.toUpperCase(),x["content-md5"]||"",x["content-type"],y||x["x-oss-date"]];return Object.keys(x).forEach(function(k){var V=k.toLowerCase();V.indexOf(S)===0&&(C[V]=String(x[k]).trim())}),Object.keys(C).sort().forEach(function(k){I.push("".concat(k,":").concat(C[k]))}),E=E.concat(I),E.push(this.buildCanonicalizedResource(v,m.parameters)),E.join(`
|
|
`)},O.computeSignature=function(c,v){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",y=f.createHmac("sha1",c);return y.update(p.from(v,m)).digest("base64")},O.authorization=function(c,v,m,y){return"OSS ".concat(c,":").concat(this.computeSignature(v,m,y))},O._signatureForURL=function(c){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2?arguments[2]:void 0,y=arguments.length>3?arguments[3]:void 0,x=arguments.length>4?arguments[4]:void 0,S={},I=v.subResource,C=I===void 0?{}:I;if(v.process){var E="x-oss-process";C[E]=v.process}if(v.trafficLimit){var k="x-oss-traffic-limit";C[k]=v.trafficLimit}if(v.response&&Object.keys(v.response).forEach(function(B){var R="response-".concat(B.toLowerCase());C[R]=v.response[B]}),Object.keys(v).forEach(function(B){var R=B.toLowerCase(),j=v[B];R.indexOf("x-oss-")===0?S[R]=j:(R.indexOf("content-md5")===0||R.indexOf("content-type")===0)&&(S[B]=j)}),Object.prototype.hasOwnProperty.call(v,"security-token")&&(C["security-token"]=v["security-token"]),Object.prototype.hasOwnProperty.call(v,"callback")){var V={callbackUrl:encodeURI(v.callback.url),callbackBody:v.callback.body};if(v.callback.host&&(V.callbackHost=v.callback.host),v.callback.contentType&&(V.callbackBodyType=v.callback.contentType),C.callback=p.from(JSON.stringify(V)).toString("base64"),v.callback.customValue){var P={};Object.keys(v.callback.customValue).forEach(function(B){P["x:".concat(B)]=v.callback.customValue[B]}),C["callback-var"]=p.from(JSON.stringify(P)).toString("base64")}}var K=this.buildCanonicalString(v.method,m,{headers:S,parameters:C},y.toString());return{Signature:this.computeSignature(c,K,x),subResource:C}}}).call(this)}).call(this,o("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(o,_,O){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.checkBucketName=void 0,O.checkBucketName=function(p){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h=f?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!h.test(p))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(o,_,O){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.checkConfigValid=void 0;var p={endpoint:f,region:/^[a-zA-Z0-9\-_]+$/};function f(h){return typeof h=="string"?/^[a-zA-Z0-9._:/-]+$/.test(h):h.host?/^[a-zA-Z0-9._:/-]+$/.test(h.host):!1}O.checkConfigValid=function(h,b){if(p[b]){var g=!0;if(p[b]instanceof Function?g=p[b](h):g=p[b].test(h),!g)throw new Error("The ".concat(b," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(o,_,O){(function(p){(function(){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.checkEnv=void 0;function f(h){p.browser&&console.warn(h)}O.checkEnv=f}).call(this)}).call(this,o("_process"))},{_process:467}],54:[function(o,_,O){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.entries.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.checkObjectTag=void 0;var p=o("./checkValid"),f=p.checkValid,h=o("./isObject"),b=h.isObject,g=[{validator:function(m){if(typeof m!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],w={key:[].concat(g,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(g,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function c(v){if(!b(v))throw new Error("tag must be Object");var m=Object.entries(v);if(m.length>10)throw new Error("maximum of 10 tags for a object");var y=["key","value"];m.forEach(function(x){x.forEach(function(S,I){f(S,w[y[I]])})})}O.checkObjectTag=c},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(o,_,O){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.checkValid=void 0;function p(f,h){h.forEach(function(b){if(b.validator)b.validator(f);else if(b.pattern&&!b.pattern.test(f))throw new Error(b.msg)})}O.checkValid=p},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.concat.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.createRequest=void 0;var f=o("./../../../shims/crypto/crypto.js"),h=o("debug")("ali-oss"),b=o("mime"),g=o("dateformat"),w=o("copy-to"),c=o("path"),v=o("./encoder"),m=v.encoder,y=o("./isIP"),x=y.isIP,S=o("./setRegion"),I=S.setRegion,C=o("../client/getReqUrl"),E=C.getReqUrl,k=o("./isDingTalk"),V=k.isDingTalk;function P(R,j){return R[j]||R[j.toLowerCase()]}function K(R,j){delete R[j],delete R[j.toLowerCase()]}function B(R){var j=new Date;this.options.amendTimeSkewed&&(j=+new Date+this.options.amendTimeSkewed);var N={"x-oss-date":g(j,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(N["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(N["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(N,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(N["x-oss-security-token"]=this.options.stsToken),w(R.headers).to(N),P(N,"Content-Type")||(R.mime&&R.mime.indexOf("/")>0?N["Content-Type"]=R.mime:V()?N["Content-Type"]="application/octet-stream":N["Content-Type"]=b.getType(R.mime||c.extname(R.object||""))),P(N,"Content-Type")||K(N,"Content-Type"),R.content&&(R.disabledMD5||(!R.headers||!R.headers["Content-MD5"]?N["Content-MD5"]=f.createHash("md5").update(p.from(R.content,"utf8")).digest("base64"):N["Content-MD5"]=R.headers["Content-MD5"]),N["Content-Length"]||(N["Content-Length"]=R.content.length));var $=Object.prototype.hasOwnProperty;for(var z in N)N[z]&&$.call(N,z)&&(N[z]=m(String(N[z]),this.options.headerEncoding));var F=this._getResource(R);if(N.authorization=this.authorization(R.method,F,R.subres,N,this.options.headerEncoding),x(this.options.endpoint.hostname)){var M=this.options,X=M.region,re=M.internal,ne=M.secure,pe=I(X,re,ne);N.host="".concat(R.bucket,".").concat(pe.host)}var ie=E.bind(this)(R);h("request %s %s, with headers %j, !!stream: %s",R.method,ie,N,!!R.stream);var Ae=R.timeout||this.options.timeout,Z={method:R.method,content:R.content,stream:R.stream,headers:N,timeout:Ae,writeStream:R.writeStream,customResponse:R.customResponse,ctx:R.ctx||this.ctx};return this.agent&&(Z.agent=this.agent),this.httpsAgent&&(Z.httpsAgent=this.httpsAgent),Z.enableProxy=!!this.options.enableProxy,Z.proxy=this.options.proxy?this.options.proxy:null,{url:ie,params:Z}}O.createRequest=B}).call(this)}).call(this,o("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(o,_,O){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.entries.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.object.keys.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.dataFix=void 0;var p=o("./isObject"),f=["true","TRUE","1",1],h=["false","FALSE","0",0];function b(c,v,m){if(p.isObject(c)){var y=v.remove,x=y===void 0?[]:y,S=v.rename,I=S===void 0?{}:S,C=v.camel,E=C===void 0?[]:C,k=v.bool,V=k===void 0?[]:k,P=v.lowerFirst,K=P===void 0?!1:P;return x.forEach(function(B){return delete c[B]}),Object.entries(I).forEach(function(B){c[B[0]]&&(c[B[1]]||(c[B[1]]=c[B[0]],delete c[B[0]]))}),E.forEach(function(B){if(c[B]){var R=B.replace(/^(.)/,function(j){return j.toLowerCase()}).replace(/-(\w)/g,function(j,N){return N.toUpperCase()});c[R]||(c[R]=c[B])}}),V.forEach(function(B){c[B]=g(c[B])}),typeof m=="function"&&m(c),w(c,K),b}}O.dataFix=b;function g(c){return c?f.includes(c)?!0:h.includes(c)?!1:c:!1}function w(c,v){v&&Object.keys(c).forEach(function(m){var y=m.replace(/^\w/,function(x){return x.toLowerCase()});typeof c[y]=="undefined"&&(c[y]=c[m],delete c[m])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js");var f=p(o("@babel/runtime/helpers/typeof"));Object.defineProperty(O,"__esModule",{value:!0}),O.deepCopyWith=O.deepCopy=void 0;var h=o("./isBuffer");O.deepCopy=function(b){if(b===null||(0,f.default)(b)!=="object")return b;if(h.isBuffer(b))return b.slice();var g=Array.isArray(b)?[]:{};return Object.keys(b).forEach(function(w){g[w]=O.deepCopy(b[w])}),g},O.deepCopyWith=function(b,g){function w(c,v,m){var y=g(c,v,m);if(y!==void 0)return y;if(c===null||(0,f.default)(c)!=="object")return c;if(h.isBuffer(c))return c.slice();var x=Array.isArray(c)?[]:{};return Object.keys(c).forEach(function(S){x[S]=w(c[S],S,c)}),x}return g?w(b,"",null):O.deepCopy(b)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.encoder=void 0;function f(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return b==="utf-8"?h:p.from(h).toString("latin1")}O.encoder=f}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(o,_,O){"use strict";o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.formatInventoryConfig=void 0;var p=o("../utils/dataFix"),f=o("../utils/isObject"),h=o("../utils/isArray"),b=o("../utils/formatObjKey");function g(c){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return v&&f.isObject(c)&&(c=[c]),h.isArray(c)?c=c.map(w):c=w(c),c}O.formatInventoryConfig=g;function w(c){return p.dataFix(c,{bool:["IsEnabled"]},function(v){var m,y;v.prefix=v.Filter.Prefix,delete v.Filter,v.OSSBucketDestination=v.Destination.OSSBucketDestination,v.OSSBucketDestination.rolename=v.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete v.OSSBucketDestination.RoleArn,v.OSSBucketDestination.bucket=v.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete v.OSSBucketDestination.Bucket,delete v.Destination,v.frequency=v.Schedule.Frequency,delete v.Schedule.Frequency,!((m=v==null?void 0:v.OptionalFields)===null||m===void 0)&&m.Field&&!h.isArray((y=v.OptionalFields)===null||y===void 0?void 0:y.Field)&&(v.OptionalFields.Field=[v.OptionalFields.Field])}),c=b.formatObjKey(c,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),c}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js");var f=p(o("@babel/runtime/helpers/typeof"));Object.defineProperty(O,"__esModule",{value:!0}),O.formatObjKey=void 0;function h(g,w,c){if(g===null||(0,f.default)(g)!=="object")return g;var v;if(Array.isArray(g)){v=[];for(var m=0;m<g.length;m++)v.push(h(g[m],w,c))}else v={},Object.keys(g).forEach(function(y){v[b(y,w,c)]=h(g[y],w,c)});return v}O.formatObjKey=h;function b(g,w,c){return c&&c.exclude&&c.exclude.includes(g)||(w==="firstUpperCase"?g=g.replace(/^./,function(v){return v.toUpperCase()}):w==="firstLowerCase"&&(g=g.replace(/^./,function(v){return v.toLowerCase()}))),g}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(o,_,O){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.getStrBytesCount=void 0;function p(f){for(var h=0,b=0;b<f.length;b++){var g=f.charAt(b);/^[\u00-\uff]$/.test(g)?h+=1:h+=2}return h}O.getStrBytesCount=p},{"core-js/modules/es.regexp.exec.js":300}],63:[function(o,_,O){"use strict";o("core-js/modules/es.object.to-string.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.isArray=void 0,O.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(o,_,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.isBlob=void 0;function p(f){return typeof Blob!="undefined"&&f instanceof Blob}O.isBlob=p},{}],65:[function(o,_,O){(function(p){(function(){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.isBuffer=void 0;function f(h){return p.isBuffer(h)}O.isBuffer=f}).call(this)}).call(this,{isBuffer:o("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.isDingTalk=void 0;function f(){return!!(p.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}O.isDingTalk=f}).call(this)}).call(this,o("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(o,_,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.isFile=void 0,O.isFile=function(p){return typeof File!="undefined"&&p instanceof File}},{}],68:[function(o,_,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.isFunction=void 0,O.isFunction=function(p){return typeof p=="function"}},{}],69:[function(o,_,O){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.isIP=void 0,O.isIP=function(p){var f=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,h=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return f.test(p)||h.test(p)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(o,_,O){"use strict";o("core-js/modules/es.object.to-string.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.isObject=void 0,O.isObject=function(p){return Object.prototype.toString.call(p)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(o,_,O){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.lowercaseKeyHeader=void 0;var p=o("./isObject");function f(h){var b={};return p.isObject(h)&&Object.keys(h).forEach(function(g){b[g.toLowerCase()]=h[g]}),b}O.lowercaseKeyHeader=f},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(o,_,O){"use strict";o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.obj2xml=void 0;var p=o("./formatObjKey");function f(b){return Object.prototype.toString.call(b).replace(/(.*? |])/g,"").toLowerCase()}function h(b,g){var w="";return g&&g.headers&&(w=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),g&&g.firstUpperCase&&(b=p.formatObjKey(b,"firstUpperCase")),f(b)==="object"?Object.keys(b).forEach(function(c){f(b[c])!=="undefined"&&f(b[c])!=="null"&&(f(b[c])==="string"||f(b[c])==="number"?w+="<".concat(c,">").concat(b[c],"</").concat(c,">"):f(b[c])==="object"?w+="<".concat(c,">").concat(h(b[c]),"</").concat(c,">"):f(b[c])==="array"?w+=b[c].map(function(v){return"<".concat(c,">").concat(h(v),"</").concat(c,">")}).join(""):w+="<".concat(c,">").concat(b[c].toString(),"</").concat(c,">"))}):w+=b.toString(),w}O.obj2xml=h},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(o,_,O){"use strict";o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.symbol.js"),o("core-js/modules/es.symbol.description.js"),o("core-js/modules/es.symbol.iterator.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/web.dom-collections.iterator.js"),o("core-js/modules/es.object.assign.js");function p(g,w){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(!c){if(Array.isArray(g)||(c=f(g))||w&&g&&typeof g.length=="number"){c&&(g=c);var v=0,m=function(){};return{s:m,n:function(){return v>=g.length?{done:!0}:{done:!1,value:g[v++]}},e:function(C){throw C},f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y=!0,x=!1,S;return{s:function(){c=c.call(g)},n:function(){var C=c.next();return y=C.done,C},e:function(C){x=!0,S=C},f:function(){try{!y&&c.return!=null&&c.return()}finally{if(x)throw S}}}}function f(g,w){if(g){if(typeof g=="string")return h(g,w);var c=Object.prototype.toString.call(g).slice(8,-1);if(c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set")return Array.from(g);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return h(g,w)}}function h(g,w){(w==null||w>g.length)&&(w=g.length);for(var c=0,v=new Array(w);c<w;c++)v[c]=g[c];return v}Object.defineProperty(O,"__esModule",{value:!0}),O.omit=void 0;function b(g,w){var c=Object.assign({},g),v=p(w),m;try{for(v.s();!(m=v.n()).done;){var y=m.value;delete c[y]}}catch(x){v.e(x)}finally{v.f()}return c}O.omit=b},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(o,_,O){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),Object.defineProperty(O,"__esModule",{value:!0}),O.retry=void 0;function p(f,h){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=0,w=b.retryDelay,c=w===void 0?500:w,v=b.errorHandler,m=v===void 0?function(){return!0}:v,y=function x(){for(var S=arguments.length,I=new Array(S),C=0;C<S;C++)I[C]=arguments[C];return new Promise(function(E,k){f.apply(void 0,I).then(function(V){g=0,E(V)}).catch(function(V){g<h&&m(V)?(g++,setTimeout(function(){E(x.apply(void 0,I))},c)):(g=0,k(V))})})};return y}O.retry=p},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(o,_,O){"use strict";var p=function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(O,"__esModule",{value:!0}),O.setRegion=void 0;var f=p(o("url")),h=o("./checkConfigValid");function b(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;h.checkConfigValid(g,"region");var v=c?"https://":"http://",m=w?"-internal.aliyuncs.com":".aliyuncs.com",y="vpc100-oss-cn-";return g.substr(0,y.length)===y&&(m=".aliyuncs.com"),f.default.parse(v+g+m)}O.setRegion=b},{"./checkConfigValid":52,url:472}],76:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.object.assign.js");var h=p(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(O,"__esModule",{value:!0}),O.checkCredentials=O.setSTSToken=void 0;var b=o("./formatObjKey");function g(){return w.apply(this,arguments)}function w(){return w=(0,h.default)(f.default.mark(function v(){var m,y;return f.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(this.options||(this.options={}),m=new Date,!this.stsTokenFreshTime){S.next=14;break}if(!(+m-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){S.next=12;break}return this.stsTokenFreshTime=m,S.next=7,this.options.refreshSTSToken();case 7:y=S.sent,y=b.formatObjKey(y,"firstLowerCase"),y.securityToken&&(y.stsToken=y.securityToken),c(y),Object.assign(this.options,y);case 12:S.next=15;break;case 14:this.stsTokenFreshTime=m;case 15:return S.abrupt("return",null);case 16:case"end":return S.stop()}},v,this)})),w.apply(this,arguments)}O.setSTSToken=g;function c(v){var m=["accessKeySecret","accessKeyId","stsToken"],y=Object.keys(v);m.forEach(function(x){if(!y.find(function(S){return S===x}))throw Error("refreshSTSToken must return contains ".concat(x))})}O.checkCredentials=c},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(o,_,O){function p(h,b,g,w,c,v,m){try{var y=h[v](m),x=y.value}catch(S){g(S);return}y.done?b(x):Promise.resolve(x).then(w,c)}function f(h){return function(){var b=this,g=arguments;return new Promise(function(w,c){var v=h.apply(b,g);function m(x){p(v,w,c,m,y,"next",x)}function y(x){p(v,w,c,m,y,"throw",x)}m(void 0)})}}_.exports=f,_.exports.__esModule=!0,_.exports.default=_.exports},{}],78:[function(o,_,O){function p(f){return f&&f.__esModule?f:{default:f}}_.exports=p,_.exports.__esModule=!0,_.exports.default=_.exports},{}],79:[function(o,_,O){function p(f){"@babel/helpers - typeof";return _.exports=p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},_.exports.__esModule=!0,_.exports.default=_.exports,p(f)}_.exports=p,_.exports.__esModule=!0,_.exports.default=_.exports},{}],80:[function(o,_,O){_.exports=o("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(o,_,O){_.exports=p,_.exports.HttpsAgent=p;function p(){}},{}],82:[function(o,_,O){(function(p){(function(){"use strict";var f=o("object-assign");function h(X,re){if(X===re)return 0;for(var ne=X.length,pe=re.length,ie=0,Ae=Math.min(ne,pe);ie<Ae;++ie)if(X[ie]!==re[ie]){ne=X[ie],pe=re[ie];break}return ne<pe?-1:pe<ne?1:0}function b(X){return p.Buffer&&typeof p.Buffer.isBuffer=="function"?p.Buffer.isBuffer(X):!!(X!=null&&X._isBuffer)}var g=o("util/"),w=Object.prototype.hasOwnProperty,c=Array.prototype.slice,v=function(){return function(){}.name==="foo"}();function m(X){return Object.prototype.toString.call(X)}function y(X){return b(X)||typeof p.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(X):X?!!(X instanceof DataView||X.buffer&&X.buffer instanceof ArrayBuffer):!1}var x=_.exports=P,S=/\s*function\s+([^\(\s]*)\s*/;function I(X){if(g.isFunction(X)){if(v)return X.name;var re=X.toString(),ne=re.match(S);return ne&&ne[1]}}x.AssertionError=function(re){this.name="AssertionError",this.actual=re.actual,this.expected=re.expected,this.operator=re.operator,re.message?(this.message=re.message,this.generatedMessage=!1):(this.message=k(this),this.generatedMessage=!0);var ne=re.stackStartFunction||V;if(Error.captureStackTrace)Error.captureStackTrace(this,ne);else{var pe=new Error;if(pe.stack){var ie=pe.stack,Ae=I(ne),Z=ie.indexOf(`
|
|
`+Ae);if(Z>=0){var fe=ie.indexOf(`
|
|
`,Z+1);ie=ie.substring(fe+1)}this.stack=ie}}},g.inherits(x.AssertionError,Error);function C(X,re){return typeof X=="string"?X.length<re?X:X.slice(0,re):X}function E(X){if(v||!g.isFunction(X))return g.inspect(X);var re=I(X),ne=re?": "+re:"";return"[Function"+ne+"]"}function k(X){return C(E(X.actual),128)+" "+X.operator+" "+C(E(X.expected),128)}function V(X,re,ne,pe,ie){throw new x.AssertionError({message:ne,actual:X,expected:re,operator:pe,stackStartFunction:ie})}x.fail=V;function P(X,re){X||V(X,!0,re,"==",x.ok)}x.ok=P,x.equal=function(re,ne,pe){re!=ne&&V(re,ne,pe,"==",x.equal)},x.notEqual=function(re,ne,pe){re==ne&&V(re,ne,pe,"!=",x.notEqual)},x.deepEqual=function(re,ne,pe){K(re,ne,!1)||V(re,ne,pe,"deepEqual",x.deepEqual)},x.deepStrictEqual=function(re,ne,pe){K(re,ne,!0)||V(re,ne,pe,"deepStrictEqual",x.deepStrictEqual)};function K(X,re,ne,pe){if(X===re)return!0;if(b(X)&&b(re))return h(X,re)===0;if(g.isDate(X)&&g.isDate(re))return X.getTime()===re.getTime();if(g.isRegExp(X)&&g.isRegExp(re))return X.source===re.source&&X.global===re.global&&X.multiline===re.multiline&&X.lastIndex===re.lastIndex&&X.ignoreCase===re.ignoreCase;if((X===null||typeof X!="object")&&(re===null||typeof re!="object"))return ne?X===re:X==re;if(y(X)&&y(re)&&m(X)===m(re)&&!(X instanceof Float32Array||X instanceof Float64Array))return h(new Uint8Array(X.buffer),new Uint8Array(re.buffer))===0;if(b(X)!==b(re))return!1;pe=pe||{actual:[],expected:[]};var ie=pe.actual.indexOf(X);return ie!==-1&&ie===pe.expected.indexOf(re)?!0:(pe.actual.push(X),pe.expected.push(re),R(X,re,ne,pe))}function B(X){return Object.prototype.toString.call(X)=="[object Arguments]"}function R(X,re,ne,pe){if(X==null||re===null||re===void 0)return!1;if(g.isPrimitive(X)||g.isPrimitive(re))return X===re;if(ne&&Object.getPrototypeOf(X)!==Object.getPrototypeOf(re))return!1;var ie=B(X),Ae=B(re);if(ie&&!Ae||!ie&&Ae)return!1;if(ie)return X=c.call(X),re=c.call(re),K(X,re,ne);var Z=M(X),fe=M(re),he,be;if(Z.length!==fe.length)return!1;for(Z.sort(),fe.sort(),be=Z.length-1;be>=0;be--)if(Z[be]!==fe[be])return!1;for(be=Z.length-1;be>=0;be--)if(he=Z[be],!K(X[he],re[he],ne,pe))return!1;return!0}x.notDeepEqual=function(re,ne,pe){K(re,ne,!1)&&V(re,ne,pe,"notDeepEqual",x.notDeepEqual)},x.notDeepStrictEqual=j;function j(X,re,ne){K(X,re,!0)&&V(X,re,ne,"notDeepStrictEqual",j)}x.strictEqual=function(re,ne,pe){re!==ne&&V(re,ne,pe,"===",x.strictEqual)},x.notStrictEqual=function(re,ne,pe){re===ne&&V(re,ne,pe,"!==",x.notStrictEqual)};function N(X,re){if(!X||!re)return!1;if(Object.prototype.toString.call(re)=="[object RegExp]")return re.test(X);try{if(X instanceof re)return!0}catch(ne){}return Error.isPrototypeOf(re)?!1:re.call({},X)===!0}function $(X){var re;try{X()}catch(ne){re=ne}return re}function z(X,re,ne,pe){var ie;if(typeof re!="function")throw new TypeError('"block" argument must be a function');typeof ne=="string"&&(pe=ne,ne=null),ie=$(re),pe=(ne&&ne.name?" ("+ne.name+").":".")+(pe?" "+pe:"."),X&&!ie&&V(ie,ne,"Missing expected exception"+pe);var Ae=typeof pe=="string",Z=!X&&g.isError(ie),fe=!X&&ie&&!ne;if((Z&&Ae&&N(ie,ne)||fe)&&V(ie,ne,"Got unwanted exception"+pe),X&&ie&&ne&&!N(ie,ne)||!X&&ie)throw ie}x.throws=function(X,re,ne){z(!0,X,re,ne)},x.doesNotThrow=function(X,re,ne){z(!1,X,re,ne)},x.ifError=function(X){if(X)throw X};function F(X,re){X||V(X,!0,re,"==",F)}x.strict=f(F,x,{equal:x.strictEqual,deepEqual:x.deepStrictEqual,notEqual:x.notStrictEqual,notDeepEqual:x.notDeepStrictEqual}),x.strict.strict=x.strict;var M=Object.keys||function(X){var re=[];for(var ne in X)w.call(X,ne)&&re.push(ne);return re}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(o,_,O){typeof Object.create=="function"?_.exports=function(f,h){f.super_=h,f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:_.exports=function(f,h){f.super_=h;var b=function(){};b.prototype=h.prototype,f.prototype=new b,f.prototype.constructor=f}},{}],84:[function(o,_,O){_.exports=function(f){return f&&typeof f=="object"&&typeof f.copy=="function"&&typeof f.fill=="function"&&typeof f.readUInt8=="function"}},{}],85:[function(o,_,O){(function(p,f){(function(){var h=/%[sdj%]/g;O.format=function(fe){if(!R(fe)){for(var he=[],be=0;be<arguments.length;be++)he.push(w(arguments[be]));return he.join(" ")}for(var be=1,le=arguments,ue=le.length,ve=String(fe).replace(h,function(Oe){if(Oe==="%%")return"%";if(be>=ue)return Oe;switch(Oe){case"%s":return String(le[be++]);case"%d":return Number(le[be++]);case"%j":try{return JSON.stringify(le[be++])}catch(De){return"[Circular]"}default:return Oe}}),Ee=le[be];be<ue;Ee=le[++be])P(Ee)||!z(Ee)?ve+=" "+Ee:ve+=" "+w(Ee);return ve},O.deprecate=function(fe,he){if(N(f.process))return function(){return O.deprecate(fe,he).apply(this,arguments)};if(p.noDeprecation===!0)return fe;var be=!1;function le(){if(!be){if(p.throwDeprecation)throw new Error(he);p.traceDeprecation?console.trace(he):console.error(he),be=!0}return fe.apply(this,arguments)}return le};var b={},g;O.debuglog=function(fe){if(N(g)&&(g=p.env.NODE_DEBUG||""),fe=fe.toUpperCase(),!b[fe])if(new RegExp("\\b"+fe+"\\b","i").test(g)){var he=p.pid;b[fe]=function(){var be=O.format.apply(O,arguments);console.error("%s %d: %s",fe,he,be)}}else b[fe]=function(){};return b[fe]};function w(fe,he){var be={seen:[],stylize:v};return arguments.length>=3&&(be.depth=arguments[2]),arguments.length>=4&&(be.colors=arguments[3]),V(he)?be.showHidden=he:he&&O._extend(be,he),N(be.showHidden)&&(be.showHidden=!1),N(be.depth)&&(be.depth=2),N(be.colors)&&(be.colors=!1),N(be.customInspect)&&(be.customInspect=!0),be.colors&&(be.stylize=c),y(be,fe,be.depth)}O.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(fe,he){var be=w.styles[he];return be?"\x1B["+w.colors[be][0]+"m"+fe+"\x1B["+w.colors[be][1]+"m":fe}function v(fe,he){return fe}function m(fe){var he={};return fe.forEach(function(be,le){he[be]=!0}),he}function y(fe,he,be){if(fe.customInspect&&he&&X(he.inspect)&&he.inspect!==O.inspect&&!(he.constructor&&he.constructor.prototype===he)){var le=he.inspect(be,fe);return R(le)||(le=y(fe,le,be)),le}var ue=x(fe,he);if(ue)return ue;var ve=Object.keys(he),Ee=m(ve);if(fe.showHidden&&(ve=Object.getOwnPropertyNames(he)),M(he)&&(ve.indexOf("message")>=0||ve.indexOf("description")>=0))return S(he);if(ve.length===0){if(X(he)){var Oe=he.name?": "+he.name:"";return fe.stylize("[Function"+Oe+"]","special")}if($(he))return fe.stylize(RegExp.prototype.toString.call(he),"regexp");if(F(he))return fe.stylize(Date.prototype.toString.call(he),"date");if(M(he))return S(he)}var De="",ce=!1,G=["{","}"];if(k(he)&&(ce=!0,G=["[","]"]),X(he)){var ye=he.name?": "+he.name:"";De=" [Function"+ye+"]"}if($(he)&&(De=" "+RegExp.prototype.toString.call(he)),F(he)&&(De=" "+Date.prototype.toUTCString.call(he)),M(he)&&(De=" "+S(he)),ve.length===0&&(!ce||he.length==0))return G[0]+De+G[1];if(be<0)return $(he)?fe.stylize(RegExp.prototype.toString.call(he),"regexp"):fe.stylize("[Object]","special");fe.seen.push(he);var Y;return ce?Y=I(fe,he,be,Ee,ve):Y=ve.map(function(H){return C(fe,he,be,Ee,H,ce)}),fe.seen.pop(),E(Y,De,G)}function x(fe,he){if(N(he))return fe.stylize("undefined","undefined");if(R(he)){var be="'"+JSON.stringify(he).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return fe.stylize(be,"string")}if(B(he))return fe.stylize(""+he,"number");if(V(he))return fe.stylize(""+he,"boolean");if(P(he))return fe.stylize("null","null")}function S(fe){return"["+Error.prototype.toString.call(fe)+"]"}function I(fe,he,be,le,ue){for(var ve=[],Ee=0,Oe=he.length;Ee<Oe;++Ee)Z(he,String(Ee))?ve.push(C(fe,he,be,le,String(Ee),!0)):ve.push("");return ue.forEach(function(De){De.match(/^\d+$/)||ve.push(C(fe,he,be,le,De,!0))}),ve}function C(fe,he,be,le,ue,ve){var Ee,Oe,De;if(De=Object.getOwnPropertyDescriptor(he,ue)||{value:he[ue]},De.get?De.set?Oe=fe.stylize("[Getter/Setter]","special"):Oe=fe.stylize("[Getter]","special"):De.set&&(Oe=fe.stylize("[Setter]","special")),Z(le,ue)||(Ee="["+ue+"]"),Oe||(fe.seen.indexOf(De.value)<0?(P(be)?Oe=y(fe,De.value,null):Oe=y(fe,De.value,be-1),Oe.indexOf(`
|
|
`)>-1&&(ve?Oe=Oe.split(`
|
|
`).map(function(ce){return" "+ce}).join(`
|
|
`).substr(2):Oe=`
|
|
`+Oe.split(`
|
|
`).map(function(ce){return" "+ce}).join(`
|
|
`))):Oe=fe.stylize("[Circular]","special")),N(Ee)){if(ve&&ue.match(/^\d+$/))return Oe;Ee=JSON.stringify(""+ue),Ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ee=Ee.substr(1,Ee.length-2),Ee=fe.stylize(Ee,"name")):(Ee=Ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ee=fe.stylize(Ee,"string"))}return Ee+": "+Oe}function E(fe,he,be){var le=0,ue=fe.reduce(function(ve,Ee){return le++,Ee.indexOf(`
|
|
`)>=0&&le++,ve+Ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ue>60?be[0]+(he===""?"":he+`
|
|
`)+" "+fe.join(`,
|
|
`)+" "+be[1]:be[0]+he+" "+fe.join(", ")+" "+be[1]}function k(fe){return Array.isArray(fe)}O.isArray=k;function V(fe){return typeof fe=="boolean"}O.isBoolean=V;function P(fe){return fe===null}O.isNull=P;function K(fe){return fe==null}O.isNullOrUndefined=K;function B(fe){return typeof fe=="number"}O.isNumber=B;function R(fe){return typeof fe=="string"}O.isString=R;function j(fe){return typeof fe=="symbol"}O.isSymbol=j;function N(fe){return fe===void 0}O.isUndefined=N;function $(fe){return z(fe)&&ne(fe)==="[object RegExp]"}O.isRegExp=$;function z(fe){return typeof fe=="object"&&fe!==null}O.isObject=z;function F(fe){return z(fe)&&ne(fe)==="[object Date]"}O.isDate=F;function M(fe){return z(fe)&&(ne(fe)==="[object Error]"||fe instanceof Error)}O.isError=M;function X(fe){return typeof fe=="function"}O.isFunction=X;function re(fe){return fe===null||typeof fe=="boolean"||typeof fe=="number"||typeof fe=="string"||typeof fe=="symbol"||typeof fe=="undefined"}O.isPrimitive=re,O.isBuffer=o("./support/isBuffer");function ne(fe){return Object.prototype.toString.call(fe)}function pe(fe){return fe<10?"0"+fe.toString(10):fe.toString(10)}var ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ae(){var fe=new Date,he=[pe(fe.getHours()),pe(fe.getMinutes()),pe(fe.getSeconds())].join(":");return[fe.getDate(),ie[fe.getMonth()],he].join(" ")}O.log=function(){console.log("%s - %s",Ae(),O.format.apply(O,arguments))},O.inherits=o("inherits"),O._extend=function(fe,he){if(!he||!z(he))return fe;for(var be=Object.keys(he),le=be.length;le--;)fe[be[le]]=he[be[le]];return fe};function Z(fe,he){return Object.prototype.hasOwnProperty.call(fe,he)}}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(o,_,O){(function(p){(function(){"use strict";var f=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],h=typeof globalThis=="undefined"?p:globalThis;_.exports=function(){for(var g=[],w=0;w<f.length;w++)typeof h[f[w]]=="function"&&(g[g.length]=f[w]);return g}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(o,_,O){"use strict";O.byteLength=v,O.toByteArray=y,O.fromByteArray=I;for(var p=[],f=[],h=typeof Uint8Array!="undefined"?Uint8Array:Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,w=b.length;g<w;++g)p[g]=b[g],f[b.charCodeAt(g)]=g;f[45]=62,f[95]=63;function c(C){var E=C.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=E);var V=k===E?0:4-k%4;return[k,V]}function v(C){var E=c(C),k=E[0],V=E[1];return(k+V)*3/4-V}function m(C,E,k){return(E+k)*3/4-k}function y(C){var E,k=c(C),V=k[0],P=k[1],K=new h(m(C,V,P)),B=0,R=P>0?V-4:V,j;for(j=0;j<R;j+=4)E=f[C.charCodeAt(j)]<<18|f[C.charCodeAt(j+1)]<<12|f[C.charCodeAt(j+2)]<<6|f[C.charCodeAt(j+3)],K[B++]=E>>16&255,K[B++]=E>>8&255,K[B++]=E&255;return P===2&&(E=f[C.charCodeAt(j)]<<2|f[C.charCodeAt(j+1)]>>4,K[B++]=E&255),P===1&&(E=f[C.charCodeAt(j)]<<10|f[C.charCodeAt(j+1)]<<4|f[C.charCodeAt(j+2)]>>2,K[B++]=E>>8&255,K[B++]=E&255),K}function x(C){return p[C>>18&63]+p[C>>12&63]+p[C>>6&63]+p[C&63]}function S(C,E,k){for(var V,P=[],K=E;K<k;K+=3)V=(C[K]<<16&16711680)+(C[K+1]<<8&65280)+(C[K+2]&255),P.push(x(V));return P.join("")}function I(C){for(var E,k=C.length,V=k%3,P=[],K=16383,B=0,R=k-V;B<R;B+=K)P.push(S(C,B,B+K>R?R:B+K));return V===1?(E=C[k-1],P.push(p[E>>2]+p[E<<4&63]+"==")):V===2&&(E=(C[k-2]<<8)+C[k-1],P.push(p[E>>10]+p[E>>4&63]+p[E<<2&63]+"=")),P.join("")}},{}],88:[function(o,_,O){(function(p,f,h){typeof _!="undefined"&&_.exports?_.exports=h():typeof je=="function"&&je.amd?je(f,h):p[f]=h()})(this,"bowser",function(){var p=!0;function f(m){function y(he){var be=m.match(he);return be&&be.length>1&&be[1]||""}function x(he){var be=m.match(he);return be&&be.length>1&&be[2]||""}var S=y(/(ipod|iphone|ipad)/i).toLowerCase(),I=/like android/i.test(m),C=!I&&/android/i.test(m),E=/nexus\s*[0-6]\s*/i.test(m),k=!E&&/nexus\s*[0-9]+/i.test(m),V=/CrOS/.test(m),P=/silk/i.test(m),K=/sailfish/i.test(m),B=/tizen/i.test(m),R=/(web|hpw)(o|0)s/i.test(m),j=/windows phone/i.test(m),N=/SamsungBrowser/i.test(m),$=!j&&/windows/i.test(m),z=!S&&!P&&/macintosh/i.test(m),F=!C&&!K&&!B&&!R&&/linux/i.test(m),M=x(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),X=y(/version\/(\d+(\.\d+)?)/i),re=/tablet/i.test(m)&&!/tablet pc/i.test(m),ne=!re&&/[^-]mobi/i.test(m),pe=/xbox/i.test(m),ie;/opera/i.test(m)?ie={name:"Opera",opera:p,version:X||y(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(m)?ie={name:"Opera",opera:p,version:y(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||X}:/SamsungBrowser/i.test(m)?ie={name:"Samsung Internet for Android",samsungBrowser:p,version:X||y(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(m)?ie={name:"NAVER Whale browser",whale:p,version:y(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(m)?ie={name:"MZ Browser",mzbrowser:p,version:y(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(m)?ie={name:"Opera Coast",coast:p,version:X||y(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(m)?ie={name:"Focus",focus:p,version:y(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(m)?ie={name:"Yandex Browser",yandexbrowser:p,version:X||y(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(m)?ie={name:"UC Browser",ucbrowser:p,version:y(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(m)?ie={name:"Maxthon",maxthon:p,version:y(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(m)?ie={name:"Epiphany",epiphany:p,version:y(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(m)?ie={name:"Puffin",puffin:p,version:y(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(m)?ie={name:"Sleipnir",sleipnir:p,version:y(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(m)?ie={name:"K-Meleon",kMeleon:p,version:y(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:j?(ie={name:"Windows Phone",osname:"Windows Phone",windowsphone:p},M?(ie.msedge=p,ie.version=M):(ie.msie=p,ie.version=y(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(m)?ie={name:"Internet Explorer",msie:p,version:y(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:V?ie={name:"Chrome",osname:"Chrome OS",chromeos:p,chromeBook:p,chrome:p,version:y(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(m)?ie={name:"Microsoft Edge",msedge:p,version:M}:/vivaldi/i.test(m)?ie={name:"Vivaldi",vivaldi:p,version:y(/vivaldi\/(\d+(\.\d+)?)/i)||X}:K?ie={name:"Sailfish",osname:"Sailfish OS",sailfish:p,version:y(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(m)?ie={name:"SeaMonkey",seamonkey:p,version:y(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(m)?(ie={name:"Firefox",firefox:p,version:y(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(m)&&(ie.firefoxos=p,ie.osname="Firefox OS")):P?ie={name:"Amazon Silk",silk:p,version:y(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(m)?ie={name:"PhantomJS",phantom:p,version:y(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(m)?ie={name:"SlimerJS",slimer:p,version:y(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(m)||/rim\stablet/i.test(m)?ie={name:"BlackBerry",osname:"BlackBerry OS",blackberry:p,version:X||y(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:R?(ie={name:"WebOS",osname:"WebOS",webos:p,version:X||y(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(m)&&(ie.touchpad=p)):/bada/i.test(m)?ie={name:"Bada",osname:"Bada",bada:p,version:y(/dolfin\/(\d+(\.\d+)?)/i)}:B?ie={name:"Tizen",osname:"Tizen",tizen:p,version:y(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||X}:/qupzilla/i.test(m)?ie={name:"QupZilla",qupzilla:p,version:y(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||X}:/chromium/i.test(m)?ie={name:"Chromium",chromium:p,version:y(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||X}:/chrome|crios|crmo/i.test(m)?ie={name:"Chrome",chrome:p,version:y(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:C?ie={name:"Android",version:X}:/safari|applewebkit/i.test(m)?(ie={name:"Safari",safari:p},X&&(ie.version=X)):S?(ie={name:S=="iphone"?"iPhone":S=="ipad"?"iPad":"iPod"},X&&(ie.version=X)):/googlebot/i.test(m)?ie={name:"Googlebot",googlebot:p,version:y(/googlebot\/(\d+(\.\d+))/i)||X}:ie={name:y(/^(.*)\/(.*) /),version:x(/^(.*)\/(.*) /)},!ie.msedge&&/(apple)?webkit/i.test(m)?(/(apple)?webkit\/537\.36/i.test(m)?(ie.name=ie.name||"Blink",ie.blink=p):(ie.name=ie.name||"Webkit",ie.webkit=p),!ie.version&&X&&(ie.version=X)):!ie.opera&&/gecko\//i.test(m)&&(ie.name=ie.name||"Gecko",ie.gecko=p,ie.version=ie.version||y(/gecko\/(\d+(\.\d+)?)/i)),!ie.windowsphone&&(C||ie.silk)?(ie.android=p,ie.osname="Android"):!ie.windowsphone&&S?(ie[S]=p,ie.ios=p,ie.osname="iOS"):z?(ie.mac=p,ie.osname="macOS"):pe?(ie.xbox=p,ie.osname="Xbox"):$?(ie.windows=p,ie.osname="Windows"):F&&(ie.linux=p,ie.osname="Linux");function Ae(he){switch(he){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var Z="";ie.windows?Z=Ae(y(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ie.windowsphone?Z=y(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ie.mac?(Z=y(/Mac OS X (\d+([_\.\s]\d+)*)/i),Z=Z.replace(/[_\s]/g,".")):S?(Z=y(/os (\d+([_\s]\d+)*) like mac os x/i),Z=Z.replace(/[_\s]/g,".")):C?Z=y(/android[ \/-](\d+(\.\d+)*)/i):ie.webos?Z=y(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ie.blackberry?Z=y(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ie.bada?Z=y(/bada\/(\d+(\.\d+)*)/i):ie.tizen&&(Z=y(/tizen[\/\s](\d+(\.\d+)*)/i)),Z&&(ie.osversion=Z);var fe=!ie.windows&&Z.split(".")[0];return re||k||S=="ipad"||C&&(fe==3||fe>=4&&!ne)||ie.silk?ie.tablet=p:(ne||S=="iphone"||S=="ipod"||C||E||ie.blackberry||ie.webos||ie.bada)&&(ie.mobile=p),ie.msedge||ie.msie&&ie.version>=10||ie.yandexbrowser&&ie.version>=15||ie.vivaldi&&ie.version>=1||ie.chrome&&ie.version>=20||ie.samsungBrowser&&ie.version>=4||ie.whale&&w([ie.version,"1.0"])===1||ie.mzbrowser&&w([ie.version,"6.0"])===1||ie.focus&&w([ie.version,"1.0"])===1||ie.firefox&&ie.version>=20||ie.safari&&ie.version>=6||ie.opera&&ie.version>=10||ie.ios&&ie.osversion&&ie.osversion.split(".")[0]>=6||ie.blackberry&&ie.version>=10.1||ie.chromium&&ie.version>=20?ie.a=p:ie.msie&&ie.version<10||ie.chrome&&ie.version<20||ie.firefox&&ie.version<20||ie.safari&&ie.version<6||ie.opera&&ie.version<10||ie.ios&&ie.osversion&&ie.osversion.split(".")[0]<6||ie.chromium&&ie.version<20?ie.c=p:ie.x=p,ie}var h=f(typeof navigator!="undefined"&&navigator.userAgent||"");h.test=function(m){for(var y=0;y<m.length;++y){var x=m[y];if(typeof x=="string"&&x in h)return!0}return!1};function b(m){return m.split(".").length}function g(m,y){var x=[],S;if(Array.prototype.map)return Array.prototype.map.call(m,y);for(S=0;S<m.length;S++)x.push(y(m[S]));return x}function w(m){for(var y=Math.max(b(m[0]),b(m[1])),x=g(m,function(S){var I=y-b(S);return S=S+new Array(I+1).join(".0"),g(S.split("."),function(C){return new Array(20-C.length).join("0")+C}).reverse()});--y>=0;){if(x[0][y]>x[1][y])return 1;if(x[0][y]===x[1][y]){if(y===0)return 0}else return-1}}function c(m,y,x){var S=h;typeof y=="string"&&(x=y,y=void 0),y===void 0&&(y=!1),x&&(S=f(x));var I=""+S.version;for(var C in m)if(m.hasOwnProperty(C)&&S[C]){if(typeof m[C]!="string")throw new Error("Browser version in the minVersion map should be a string: "+C+": "+String(m));return w([I,m[C]])<0}return y}function v(m,y,x){return!c(m,y,x)}return h.isUnsupportedBrowser=c,h.compareVersions=w,h.check=v,h._detect=f,h.detect=f,h})},{}],89:[function(o,_,O){},{}],90:[function(o,_,O){(function(p){(function(){"use strict";var f=o("base64-js"),h=o("ieee754");O.Buffer=c,O.SlowBuffer=V,O.INSPECT_MAX_BYTES=50;var b=2147483647;O.kMaxLength=b,c.TYPED_ARRAY_SUPPORT=g(),!c.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{var W=new Uint8Array(1);return W.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},W.foo()===42}catch(L){return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function w(W){if(W>b)throw new RangeError('The value "'+W+'" is invalid for option "size"');var L=new Uint8Array(W);return L.__proto__=c.prototype,L}function c(W,L,q){if(typeof W=="number"){if(typeof L=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(W)}return v(W,L,q)}typeof Symbol!="undefined"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192;function v(W,L,q){if(typeof W=="string")return S(W,L);if(ArrayBuffer.isView(W))return I(W);if(W==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W);if(J(W,ArrayBuffer)||W&&J(W.buffer,ArrayBuffer))return C(W,L,q);if(typeof W=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var de=W.valueOf&&W.valueOf();if(de!=null&&de!==W)return c.from(de,L,q);var Ie=E(W);if(Ie)return Ie;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof W[Symbol.toPrimitive]=="function")return c.from(W[Symbol.toPrimitive]("string"),L,q);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W)}c.from=function(W,L,q){return v(W,L,q)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array;function m(W){if(typeof W!="number")throw new TypeError('"size" argument must be of type number');if(W<0)throw new RangeError('The value "'+W+'" is invalid for option "size"')}function y(W,L,q){return m(W),W<=0?w(W):L!==void 0?typeof q=="string"?w(W).fill(L,q):w(W).fill(L):w(W)}c.alloc=function(W,L,q){return y(W,L,q)};function x(W){return m(W),w(W<0?0:k(W)|0)}c.allocUnsafe=function(W){return x(W)},c.allocUnsafeSlow=function(W){return x(W)};function S(W,L){if((typeof L!="string"||L==="")&&(L="utf8"),!c.isEncoding(L))throw new TypeError("Unknown encoding: "+L);var q=P(W,L)|0,de=w(q),Ie=de.write(W,L);return Ie!==q&&(de=de.slice(0,Ie)),de}function I(W){for(var L=W.length<0?0:k(W.length)|0,q=w(L),de=0;de<L;de+=1)q[de]=W[de]&255;return q}function C(W,L,q){if(L<0||W.byteLength<L)throw new RangeError('"offset" is outside of buffer bounds');if(W.byteLength<L+(q||0))throw new RangeError('"length" is outside of buffer bounds');var de;return L===void 0&&q===void 0?de=new Uint8Array(W):q===void 0?de=new Uint8Array(W,L):de=new Uint8Array(W,L,q),de.__proto__=c.prototype,de}function E(W){if(c.isBuffer(W)){var L=k(W.length)|0,q=w(L);return q.length===0||W.copy(q,0,0,L),q}if(W.length!==void 0)return typeof W.length!="number"||ee(W.length)?w(0):I(W);if(W.type==="Buffer"&&Array.isArray(W.data))return I(W.data)}function k(W){if(W>=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return W|0}function V(W){return+W!=W&&(W=0),c.alloc(+W)}c.isBuffer=function(L){return L!=null&&L._isBuffer===!0&&L!==c.prototype},c.compare=function(L,q){if(J(L,Uint8Array)&&(L=c.from(L,L.offset,L.byteLength)),J(q,Uint8Array)&&(q=c.from(q,q.offset,q.byteLength)),!c.isBuffer(L)||!c.isBuffer(q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(L===q)return 0;for(var de=L.length,Ie=q.length,He=0,ze=Math.min(de,Ie);He<ze;++He)if(L[He]!==q[He]){de=L[He],Ie=q[He];break}return de<Ie?-1:Ie<de?1:0},c.isEncoding=function(L){switch(String(L).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(L,q){if(!Array.isArray(L))throw new TypeError('"list" argument must be an Array of Buffers');if(L.length===0)return c.alloc(0);var de;if(q===void 0)for(q=0,de=0;de<L.length;++de)q+=L[de].length;var Ie=c.allocUnsafe(q),He=0;for(de=0;de<L.length;++de){var ze=L[de];if(J(ze,Uint8Array)&&(ze=c.from(ze)),!c.isBuffer(ze))throw new TypeError('"list" argument must be an Array of Buffers');ze.copy(Ie,He),He+=ze.length}return Ie};function P(W,L){if(c.isBuffer(W))return W.length;if(ArrayBuffer.isView(W)||J(W,ArrayBuffer))return W.byteLength;if(typeof W!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof W);var q=W.length,de=arguments.length>2&&arguments[2]===!0;if(!de&&q===0)return 0;for(var Ie=!1;;)switch(L){case"ascii":case"latin1":case"binary":return q;case"utf8":case"utf-8":return G(W).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q*2;case"hex":return q>>>1;case"base64":return H(W).length;default:if(Ie)return de?-1:G(W).length;L=(""+L).toLowerCase(),Ie=!0}}c.byteLength=P;function K(W,L,q){var de=!1;if((L===void 0||L<0)&&(L=0),L>this.length||((q===void 0||q>this.length)&&(q=this.length),q<=0)||(q>>>=0,L>>>=0,q<=L))return"";for(W||(W="utf8");;)switch(W){case"hex":return fe(this,L,q);case"utf8":case"utf-8":return ne(this,L,q);case"ascii":return Ae(this,L,q);case"latin1":case"binary":return Z(this,L,q);case"base64":return re(this,L,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,L,q);default:if(de)throw new TypeError("Unknown encoding: "+W);W=(W+"").toLowerCase(),de=!0}}c.prototype._isBuffer=!0;function B(W,L,q){var de=W[L];W[L]=W[q],W[q]=de}c.prototype.swap16=function(){var L=this.length;if(L%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var q=0;q<L;q+=2)B(this,q,q+1);return this},c.prototype.swap32=function(){var L=this.length;if(L%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var q=0;q<L;q+=4)B(this,q,q+3),B(this,q+1,q+2);return this},c.prototype.swap64=function(){var L=this.length;if(L%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var q=0;q<L;q+=8)B(this,q,q+7),B(this,q+1,q+6),B(this,q+2,q+5),B(this,q+3,q+4);return this},c.prototype.toString=function(){var L=this.length;return L===0?"":arguments.length===0?ne(this,0,L):K.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(L){if(!c.isBuffer(L))throw new TypeError("Argument must be a Buffer");return this===L?!0:c.compare(this,L)===0},c.prototype.inspect=function(){var L="",q=O.INSPECT_MAX_BYTES;return L=this.toString("hex",0,q).replace(/(.{2})/g,"$1 ").trim(),this.length>q&&(L+=" ... "),"<Buffer "+L+">"},c.prototype.compare=function(L,q,de,Ie,He){if(J(L,Uint8Array)&&(L=c.from(L,L.offset,L.byteLength)),!c.isBuffer(L))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof L);if(q===void 0&&(q=0),de===void 0&&(de=L?L.length:0),Ie===void 0&&(Ie=0),He===void 0&&(He=this.length),q<0||de>L.length||Ie<0||He>this.length)throw new RangeError("out of range index");if(Ie>=He&&q>=de)return 0;if(Ie>=He)return-1;if(q>=de)return 1;if(q>>>=0,de>>>=0,Ie>>>=0,He>>>=0,this===L)return 0;for(var ze=He-Ie,Je=de-q,dt=Math.min(ze,Je),ge=this.slice(Ie,He),Be=L.slice(q,de),_e=0;_e<dt;++_e)if(ge[_e]!==Be[_e]){ze=ge[_e],Je=Be[_e];break}return ze<Je?-1:Je<ze?1:0};function R(W,L,q,de,Ie){if(W.length===0)return-1;if(typeof q=="string"?(de=q,q=0):q>2147483647?q=2147483647:q<-2147483648&&(q=-2147483648),q=+q,ee(q)&&(q=Ie?0:W.length-1),q<0&&(q=W.length+q),q>=W.length){if(Ie)return-1;q=W.length-1}else if(q<0)if(Ie)q=0;else return-1;if(typeof L=="string"&&(L=c.from(L,de)),c.isBuffer(L))return L.length===0?-1:j(W,L,q,de,Ie);if(typeof L=="number")return L=L&255,typeof Uint8Array.prototype.indexOf=="function"?Ie?Uint8Array.prototype.indexOf.call(W,L,q):Uint8Array.prototype.lastIndexOf.call(W,L,q):j(W,[L],q,de,Ie);throw new TypeError("val must be string, number or Buffer")}function j(W,L,q,de,Ie){var He=1,ze=W.length,Je=L.length;if(de!==void 0&&(de=String(de).toLowerCase(),de==="ucs2"||de==="ucs-2"||de==="utf16le"||de==="utf-16le")){if(W.length<2||L.length<2)return-1;He=2,ze/=2,Je/=2,q/=2}function dt(Ve,Xe){return He===1?Ve[Xe]:Ve.readUInt16BE(Xe*He)}var ge;if(Ie){var Be=-1;for(ge=q;ge<ze;ge++)if(dt(W,ge)===dt(L,Be===-1?0:ge-Be)){if(Be===-1&&(Be=ge),ge-Be+1===Je)return Be*He}else Be!==-1&&(ge-=ge-Be),Be=-1}else for(q+Je>ze&&(q=ze-Je),ge=q;ge>=0;ge--){for(var _e=!0,Fe=0;Fe<Je;Fe++)if(dt(W,ge+Fe)!==dt(L,Fe)){_e=!1;break}if(_e)return ge}return-1}c.prototype.includes=function(L,q,de){return this.indexOf(L,q,de)!==-1},c.prototype.indexOf=function(L,q,de){return R(this,L,q,de,!0)},c.prototype.lastIndexOf=function(L,q,de){return R(this,L,q,de,!1)};function N(W,L,q,de){q=Number(q)||0;var Ie=W.length-q;de?(de=Number(de),de>Ie&&(de=Ie)):de=Ie;var He=L.length;de>He/2&&(de=He/2);for(var ze=0;ze<de;++ze){var Je=parseInt(L.substr(ze*2,2),16);if(ee(Je))return ze;W[q+ze]=Je}return ze}function $(W,L,q,de){return Q(G(L,W.length-q),W,q,de)}function z(W,L,q,de){return Q(ye(L),W,q,de)}function F(W,L,q,de){return z(W,L,q,de)}function M(W,L,q,de){return Q(H(L),W,q,de)}function X(W,L,q,de){return Q(Y(L,W.length-q),W,q,de)}c.prototype.write=function(L,q,de,Ie){if(q===void 0)Ie="utf8",de=this.length,q=0;else if(de===void 0&&typeof q=="string")Ie=q,de=this.length,q=0;else if(isFinite(q))q=q>>>0,isFinite(de)?(de=de>>>0,Ie===void 0&&(Ie="utf8")):(Ie=de,de=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var He=this.length-q;if((de===void 0||de>He)&&(de=He),L.length>0&&(de<0||q<0)||q>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ie||(Ie="utf8");for(var ze=!1;;)switch(Ie){case"hex":return N(this,L,q,de);case"utf8":case"utf-8":return $(this,L,q,de);case"ascii":return z(this,L,q,de);case"latin1":case"binary":return F(this,L,q,de);case"base64":return M(this,L,q,de);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,L,q,de);default:if(ze)throw new TypeError("Unknown encoding: "+Ie);Ie=(""+Ie).toLowerCase(),ze=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(W,L,q){return L===0&&q===W.length?f.fromByteArray(W):f.fromByteArray(W.slice(L,q))}function ne(W,L,q){q=Math.min(W.length,q);for(var de=[],Ie=L;Ie<q;){var He=W[Ie],ze=null,Je=He>239?4:He>223?3:He>191?2:1;if(Ie+Je<=q){var dt,ge,Be,_e;switch(Je){case 1:He<128&&(ze=He);break;case 2:dt=W[Ie+1],(dt&192)===128&&(_e=(He&31)<<6|dt&63,_e>127&&(ze=_e));break;case 3:dt=W[Ie+1],ge=W[Ie+2],(dt&192)===128&&(ge&192)===128&&(_e=(He&15)<<12|(dt&63)<<6|ge&63,_e>2047&&(_e<55296||_e>57343)&&(ze=_e));break;case 4:dt=W[Ie+1],ge=W[Ie+2],Be=W[Ie+3],(dt&192)===128&&(ge&192)===128&&(Be&192)===128&&(_e=(He&15)<<18|(dt&63)<<12|(ge&63)<<6|Be&63,_e>65535&&_e<1114112&&(ze=_e))}}ze===null?(ze=65533,Je=1):ze>65535&&(ze-=65536,de.push(ze>>>10&1023|55296),ze=56320|ze&1023),de.push(ze),Ie+=Je}return ie(de)}var pe=4096;function ie(W){var L=W.length;if(L<=pe)return String.fromCharCode.apply(String,W);for(var q="",de=0;de<L;)q+=String.fromCharCode.apply(String,W.slice(de,de+=pe));return q}function Ae(W,L,q){var de="";q=Math.min(W.length,q);for(var Ie=L;Ie<q;++Ie)de+=String.fromCharCode(W[Ie]&127);return de}function Z(W,L,q){var de="";q=Math.min(W.length,q);for(var Ie=L;Ie<q;++Ie)de+=String.fromCharCode(W[Ie]);return de}function fe(W,L,q){var de=W.length;(!L||L<0)&&(L=0),(!q||q<0||q>de)&&(q=de);for(var Ie="",He=L;He<q;++He)Ie+=ce(W[He]);return Ie}function he(W,L,q){for(var de=W.slice(L,q),Ie="",He=0;He<de.length;He+=2)Ie+=String.fromCharCode(de[He]+de[He+1]*256);return Ie}c.prototype.slice=function(L,q){var de=this.length;L=~~L,q=q===void 0?de:~~q,L<0?(L+=de,L<0&&(L=0)):L>de&&(L=de),q<0?(q+=de,q<0&&(q=0)):q>de&&(q=de),q<L&&(q=L);var Ie=this.subarray(L,q);return Ie.__proto__=c.prototype,Ie};function be(W,L,q){if(W%1!==0||W<0)throw new RangeError("offset is not uint");if(W+L>q)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(L,q,de){L=L>>>0,q=q>>>0,de||be(L,q,this.length);for(var Ie=this[L],He=1,ze=0;++ze<q&&(He*=256);)Ie+=this[L+ze]*He;return Ie},c.prototype.readUIntBE=function(L,q,de){L=L>>>0,q=q>>>0,de||be(L,q,this.length);for(var Ie=this[L+--q],He=1;q>0&&(He*=256);)Ie+=this[L+--q]*He;return Ie},c.prototype.readUInt8=function(L,q){return L=L>>>0,q||be(L,1,this.length),this[L]},c.prototype.readUInt16LE=function(L,q){return L=L>>>0,q||be(L,2,this.length),this[L]|this[L+1]<<8},c.prototype.readUInt16BE=function(L,q){return L=L>>>0,q||be(L,2,this.length),this[L]<<8|this[L+1]},c.prototype.readUInt32LE=function(L,q){return L=L>>>0,q||be(L,4,this.length),(this[L]|this[L+1]<<8|this[L+2]<<16)+this[L+3]*16777216},c.prototype.readUInt32BE=function(L,q){return L=L>>>0,q||be(L,4,this.length),this[L]*16777216+(this[L+1]<<16|this[L+2]<<8|this[L+3])},c.prototype.readIntLE=function(L,q,de){L=L>>>0,q=q>>>0,de||be(L,q,this.length);for(var Ie=this[L],He=1,ze=0;++ze<q&&(He*=256);)Ie+=this[L+ze]*He;return He*=128,Ie>=He&&(Ie-=Math.pow(2,8*q)),Ie},c.prototype.readIntBE=function(L,q,de){L=L>>>0,q=q>>>0,de||be(L,q,this.length);for(var Ie=q,He=1,ze=this[L+--Ie];Ie>0&&(He*=256);)ze+=this[L+--Ie]*He;return He*=128,ze>=He&&(ze-=Math.pow(2,8*q)),ze},c.prototype.readInt8=function(L,q){return L=L>>>0,q||be(L,1,this.length),this[L]&128?(255-this[L]+1)*-1:this[L]},c.prototype.readInt16LE=function(L,q){L=L>>>0,q||be(L,2,this.length);var de=this[L]|this[L+1]<<8;return de&32768?de|4294901760:de},c.prototype.readInt16BE=function(L,q){L=L>>>0,q||be(L,2,this.length);var de=this[L+1]|this[L]<<8;return de&32768?de|4294901760:de},c.prototype.readInt32LE=function(L,q){return L=L>>>0,q||be(L,4,this.length),this[L]|this[L+1]<<8|this[L+2]<<16|this[L+3]<<24},c.prototype.readInt32BE=function(L,q){return L=L>>>0,q||be(L,4,this.length),this[L]<<24|this[L+1]<<16|this[L+2]<<8|this[L+3]},c.prototype.readFloatLE=function(L,q){return L=L>>>0,q||be(L,4,this.length),h.read(this,L,!0,23,4)},c.prototype.readFloatBE=function(L,q){return L=L>>>0,q||be(L,4,this.length),h.read(this,L,!1,23,4)},c.prototype.readDoubleLE=function(L,q){return L=L>>>0,q||be(L,8,this.length),h.read(this,L,!0,52,8)},c.prototype.readDoubleBE=function(L,q){return L=L>>>0,q||be(L,8,this.length),h.read(this,L,!1,52,8)};function le(W,L,q,de,Ie,He){if(!c.isBuffer(W))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>Ie||L<He)throw new RangeError('"value" argument is out of bounds');if(q+de>W.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(L,q,de,Ie){if(L=+L,q=q>>>0,de=de>>>0,!Ie){var He=Math.pow(2,8*de)-1;le(this,L,q,de,He,0)}var ze=1,Je=0;for(this[q]=L&255;++Je<de&&(ze*=256);)this[q+Je]=L/ze&255;return q+de},c.prototype.writeUIntBE=function(L,q,de,Ie){if(L=+L,q=q>>>0,de=de>>>0,!Ie){var He=Math.pow(2,8*de)-1;le(this,L,q,de,He,0)}var ze=de-1,Je=1;for(this[q+ze]=L&255;--ze>=0&&(Je*=256);)this[q+ze]=L/Je&255;return q+de},c.prototype.writeUInt8=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,1,255,0),this[q]=L&255,q+1},c.prototype.writeUInt16LE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,2,65535,0),this[q]=L&255,this[q+1]=L>>>8,q+2},c.prototype.writeUInt16BE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,2,65535,0),this[q]=L>>>8,this[q+1]=L&255,q+2},c.prototype.writeUInt32LE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,4,4294967295,0),this[q+3]=L>>>24,this[q+2]=L>>>16,this[q+1]=L>>>8,this[q]=L&255,q+4},c.prototype.writeUInt32BE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,4,4294967295,0),this[q]=L>>>24,this[q+1]=L>>>16,this[q+2]=L>>>8,this[q+3]=L&255,q+4},c.prototype.writeIntLE=function(L,q,de,Ie){if(L=+L,q=q>>>0,!Ie){var He=Math.pow(2,8*de-1);le(this,L,q,de,He-1,-He)}var ze=0,Je=1,dt=0;for(this[q]=L&255;++ze<de&&(Je*=256);)L<0&&dt===0&&this[q+ze-1]!==0&&(dt=1),this[q+ze]=(L/Je>>0)-dt&255;return q+de},c.prototype.writeIntBE=function(L,q,de,Ie){if(L=+L,q=q>>>0,!Ie){var He=Math.pow(2,8*de-1);le(this,L,q,de,He-1,-He)}var ze=de-1,Je=1,dt=0;for(this[q+ze]=L&255;--ze>=0&&(Je*=256);)L<0&&dt===0&&this[q+ze+1]!==0&&(dt=1),this[q+ze]=(L/Je>>0)-dt&255;return q+de},c.prototype.writeInt8=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,1,127,-128),L<0&&(L=255+L+1),this[q]=L&255,q+1},c.prototype.writeInt16LE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,2,32767,-32768),this[q]=L&255,this[q+1]=L>>>8,q+2},c.prototype.writeInt16BE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,2,32767,-32768),this[q]=L>>>8,this[q+1]=L&255,q+2},c.prototype.writeInt32LE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,4,2147483647,-2147483648),this[q]=L&255,this[q+1]=L>>>8,this[q+2]=L>>>16,this[q+3]=L>>>24,q+4},c.prototype.writeInt32BE=function(L,q,de){return L=+L,q=q>>>0,de||le(this,L,q,4,2147483647,-2147483648),L<0&&(L=4294967295+L+1),this[q]=L>>>24,this[q+1]=L>>>16,this[q+2]=L>>>8,this[q+3]=L&255,q+4};function ue(W,L,q,de,Ie,He){if(q+de>W.length)throw new RangeError("Index out of range");if(q<0)throw new RangeError("Index out of range")}function ve(W,L,q,de,Ie){return L=+L,q=q>>>0,Ie||ue(W,L,q,4,34028234663852886e22,-34028234663852886e22),h.write(W,L,q,de,23,4),q+4}c.prototype.writeFloatLE=function(L,q,de){return ve(this,L,q,!0,de)},c.prototype.writeFloatBE=function(L,q,de){return ve(this,L,q,!1,de)};function Ee(W,L,q,de,Ie){return L=+L,q=q>>>0,Ie||ue(W,L,q,8,17976931348623157e292,-17976931348623157e292),h.write(W,L,q,de,52,8),q+8}c.prototype.writeDoubleLE=function(L,q,de){return Ee(this,L,q,!0,de)},c.prototype.writeDoubleBE=function(L,q,de){return Ee(this,L,q,!1,de)},c.prototype.copy=function(L,q,de,Ie){if(!c.isBuffer(L))throw new TypeError("argument should be a Buffer");if(de||(de=0),!Ie&&Ie!==0&&(Ie=this.length),q>=L.length&&(q=L.length),q||(q=0),Ie>0&&Ie<de&&(Ie=de),Ie===de||L.length===0||this.length===0)return 0;if(q<0)throw new RangeError("targetStart out of bounds");if(de<0||de>=this.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("sourceEnd out of bounds");Ie>this.length&&(Ie=this.length),L.length-q<Ie-de&&(Ie=L.length-q+de);var He=Ie-de;if(this===L&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(q,de,Ie);else if(this===L&&de<q&&q<Ie)for(var ze=He-1;ze>=0;--ze)L[ze+q]=this[ze+de];else Uint8Array.prototype.set.call(L,this.subarray(de,Ie),q);return He},c.prototype.fill=function(L,q,de,Ie){if(typeof L=="string"){if(typeof q=="string"?(Ie=q,q=0,de=this.length):typeof de=="string"&&(Ie=de,de=this.length),Ie!==void 0&&typeof Ie!="string")throw new TypeError("encoding must be a string");if(typeof Ie=="string"&&!c.isEncoding(Ie))throw new TypeError("Unknown encoding: "+Ie);if(L.length===1){var He=L.charCodeAt(0);(Ie==="utf8"&&He<128||Ie==="latin1")&&(L=He)}}else typeof L=="number"&&(L=L&255);if(q<0||this.length<q||this.length<de)throw new RangeError("Out of range index");if(de<=q)return this;q=q>>>0,de=de===void 0?this.length:de>>>0,L||(L=0);var ze;if(typeof L=="number")for(ze=q;ze<de;++ze)this[ze]=L;else{var Je=c.isBuffer(L)?L:c.from(L,Ie),dt=Je.length;if(dt===0)throw new TypeError('The value "'+L+'" is invalid for argument "value"');for(ze=0;ze<de-q;++ze)this[ze+q]=Je[ze%dt]}return this};var Oe=/[^+/0-9A-Za-z-_]/g;function De(W){if(W=W.split("=")[0],W=W.trim().replace(Oe,""),W.length<2)return"";for(;W.length%4!==0;)W=W+"=";return W}function ce(W){return W<16?"0"+W.toString(16):W.toString(16)}function G(W,L){L=L||1/0;for(var q,de=W.length,Ie=null,He=[],ze=0;ze<de;++ze){if(q=W.charCodeAt(ze),q>55295&&q<57344){if(!Ie){if(q>56319){(L-=3)>-1&&He.push(239,191,189);continue}else if(ze+1===de){(L-=3)>-1&&He.push(239,191,189);continue}Ie=q;continue}if(q<56320){(L-=3)>-1&&He.push(239,191,189),Ie=q;continue}q=(Ie-55296<<10|q-56320)+65536}else Ie&&(L-=3)>-1&&He.push(239,191,189);if(Ie=null,q<128){if((L-=1)<0)break;He.push(q)}else if(q<2048){if((L-=2)<0)break;He.push(q>>6|192,q&63|128)}else if(q<65536){if((L-=3)<0)break;He.push(q>>12|224,q>>6&63|128,q&63|128)}else if(q<1114112){if((L-=4)<0)break;He.push(q>>18|240,q>>12&63|128,q>>6&63|128,q&63|128)}else throw new Error("Invalid code point")}return He}function ye(W){for(var L=[],q=0;q<W.length;++q)L.push(W.charCodeAt(q)&255);return L}function Y(W,L){for(var q,de,Ie,He=[],ze=0;ze<W.length&&!((L-=2)<0);++ze)q=W.charCodeAt(ze),de=q>>8,Ie=q%256,He.push(Ie),He.push(de);return He}function H(W){return f.toByteArray(De(W))}function Q(W,L,q,de){for(var Ie=0;Ie<de&&!(Ie+q>=L.length||Ie>=W.length);++Ie)L[Ie+q]=W[Ie];return Ie}function J(W,L){return W instanceof L||W!=null&&W.constructor!=null&&W.constructor.name!=null&&W.constructor.name===L.name}function ee(W){return W!==W}}).call(this)}).call(this,o("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(o,_,O){_.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(o,_,O){"use strict";var p=o("get-intrinsic"),f=o("./"),h=f(p("String.prototype.indexOf"));_.exports=function(g,w){var c=p(g,!!w);return typeof c=="function"&&h(g,".prototype.")>-1?f(c):c}},{"./":93,"get-intrinsic":348}],93:[function(o,_,O){"use strict";var p=o("function-bind"),f=o("get-intrinsic"),h=f("%Function.prototype.apply%"),b=f("%Function.prototype.call%"),g=f("%Reflect.apply%",!0)||p.call(b,h),w=f("%Object.getOwnPropertyDescriptor%",!0),c=f("%Object.defineProperty%",!0),v=f("%Math.max%");if(c)try{c({},"a",{value:1})}catch(y){c=null}_.exports=function(x){var S=g(p,b,arguments);if(w&&c){var I=w(S,"length");I.configurable&&c(S,"length",{value:1+v(0,x.length-(arguments.length-1))})}return S};var m=function(){return g(p,h,arguments)};c?c(_.exports,"apply",{value:m}):_.exports.apply=m},{"function-bind":347,"get-intrinsic":348}],94:[function(o,_,O){"use strict";var p=Array.prototype.slice;_.exports=f;function f(b,g){if(!(this instanceof f))return new f(b,g);this.src=b,this._withAccess=g}f.prototype.withAccess=function(b){return this._withAccess=b!==!1,this},f.prototype.pick=function(b){return Array.isArray(b)||(b=p.call(arguments)),b.length&&(this.keys=b),this},f.prototype.to=function(b){if(b=b||{},!this.src)return b;var g=this.keys||Object.keys(this.src);if(!this._withAccess){for(var w=0;w<g.length;w++)c=g[w],b[c]===void 0&&(b[c]=this.src[c]);return b}for(var w=0;w<g.length;w++){var c=g[w];if(h(b,c)){var v=this.src.__lookupGetter__(c),m=this.src.__lookupSetter__(c);v&&b.__defineGetter__(c,v),m&&b.__defineSetter__(c,m),!v&&!m&&(b[c]=this.src[c])}}return b},f.prototype.toCover=function(b){for(var g=this.keys||Object.keys(this.src),w=0;w<g.length;w++){var c=g[w];delete b[c];var v=this.src.__lookupGetter__(c),m=this.src.__lookupSetter__(c);v&&b.__defineGetter__(c,v),m&&b.__defineSetter__(c,m),!v&&!m&&(b[c]=this.src[c])}},f.prototype.override=f.prototype.toCover,f.prototype.and=function(b){var g={};return this.to(g),this.src=b,this.to(g),this.src=g,this};function h(b,g){return b[g]===void 0&&b.__lookupGetter__(g)===void 0&&b.__lookupSetter__(g)===void 0}},{}],95:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-callable"),h=o("../internals/try-to-string"),b=p.TypeError;_.exports=function(g){if(f(g))return g;throw b(h(g)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-constructor"),h=o("../internals/try-to-string"),b=p.TypeError;_.exports=function(g){if(f(g))return g;throw b(h(g)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-callable"),h=p.String,b=p.TypeError;_.exports=function(g){if(typeof g=="object"||f(g))return g;throw b("Can't set "+h(g)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(o,_,O){var p=o("../internals/well-known-symbol"),f=o("../internals/object-create"),h=o("../internals/object-define-property"),b=p("unscopables"),g=Array.prototype;g[b]==null&&h.f(g,b,{configurable:!0,value:f(null)}),_.exports=function(w){g[b][w]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(o,_,O){"use strict";var p=o("../internals/string-multibyte").charAt;_.exports=function(f,h,b){return h+(b?p(f,h).length:1)}},{"../internals/string-multibyte":239}],100:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/object-is-prototype-of"),h=p.TypeError;_.exports=function(b,g){if(f(g,b))return b;throw h("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-object"),h=p.String,b=p.TypeError;_.exports=function(g){if(f(g))return g;throw b(h(g)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(o,_,O){_.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-native"),f=o("../internals/descriptors"),h=o("../internals/global"),b=o("../internals/is-callable"),g=o("../internals/is-object"),w=o("../internals/has-own-property"),c=o("../internals/classof"),v=o("../internals/try-to-string"),m=o("../internals/create-non-enumerable-property"),y=o("../internals/redefine"),x=o("../internals/object-define-property").f,S=o("../internals/object-is-prototype-of"),I=o("../internals/object-get-prototype-of"),C=o("../internals/object-set-prototype-of"),E=o("../internals/well-known-symbol"),k=o("../internals/uid"),V=h.Int8Array,P=V&&V.prototype,K=h.Uint8ClampedArray,B=K&&K.prototype,R=V&&I(V),j=P&&I(P),N=Object.prototype,$=h.TypeError,z=E("toStringTag"),F=k("TYPED_ARRAY_TAG"),M=k("TYPED_ARRAY_CONSTRUCTOR"),X=p&&!!C&&c(h.opera)!=="Opera",re=!1,ne,pe,ie,Ae={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Z={BigInt64Array:8,BigUint64Array:8},fe=function(Oe){if(!g(Oe))return!1;var De=c(Oe);return De==="DataView"||w(Ae,De)||w(Z,De)},he=function(Ee){if(!g(Ee))return!1;var Oe=c(Ee);return w(Ae,Oe)||w(Z,Oe)},be=function(Ee){if(he(Ee))return Ee;throw $("Target is not a typed array")},le=function(Ee){if(b(Ee)&&(!C||S(R,Ee)))return Ee;throw $(v(Ee)+" is not a typed array constructor")},ue=function(Ee,Oe,De,ce){if(f){if(De)for(var G in Ae){var ye=h[G];if(ye&&w(ye.prototype,Ee))try{delete ye.prototype[Ee]}catch(Y){try{ye.prototype[Ee]=Oe}catch(H){}}}(!j[Ee]||De)&&y(j,Ee,De?Oe:X&&P[Ee]||Oe,ce)}},ve=function(Ee,Oe,De){var ce,G;if(f){if(C){if(De){for(ce in Ae)if(G=h[ce],G&&w(G,Ee))try{delete G[Ee]}catch(ye){}}if(!R[Ee]||De)try{return y(R,Ee,De?Oe:X&&R[Ee]||Oe)}catch(ye){}else return}for(ce in Ae)G=h[ce],G&&(!G[Ee]||De)&&y(G,Ee,Oe)}};for(ne in Ae)pe=h[ne],ie=pe&&pe.prototype,ie?m(ie,M,pe):X=!1;for(ne in Z)pe=h[ne],ie=pe&&pe.prototype,ie&&m(ie,M,pe);if((!X||!b(R)||R===Function.prototype)&&(R=function(){throw $("Incorrect invocation")},X))for(ne in Ae)h[ne]&&C(h[ne],R);if((!X||!j||j===N)&&(j=R.prototype,X))for(ne in Ae)h[ne]&&C(h[ne].prototype,j);if(X&&I(B)!==j&&C(B,j),f&&!w(j,z)){re=!0,x(j,z,{get:function(){return g(this)?this[F]:void 0}});for(ne in Ae)h[ne]&&m(h[ne],F,ne)}_.exports={NATIVE_ARRAY_BUFFER_VIEWS:X,TYPED_ARRAY_CONSTRUCTOR:M,TYPED_ARRAY_TAG:re&&F,aTypedArray:be,aTypedArrayConstructor:le,exportTypedArrayMethod:ue,exportTypedArrayStaticMethod:ve,isView:fe,isTypedArray:he,TypedArray:R,TypedArrayPrototype:j}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(o,_,O){"use strict";var p=o("../internals/global"),f=o("../internals/function-uncurry-this"),h=o("../internals/descriptors"),b=o("../internals/array-buffer-native"),g=o("../internals/function-name"),w=o("../internals/create-non-enumerable-property"),c=o("../internals/redefine-all"),v=o("../internals/fails"),m=o("../internals/an-instance"),y=o("../internals/to-integer-or-infinity"),x=o("../internals/to-length"),S=o("../internals/to-index"),I=o("../internals/ieee754"),C=o("../internals/object-get-prototype-of"),E=o("../internals/object-set-prototype-of"),k=o("../internals/object-get-own-property-names").f,V=o("../internals/object-define-property").f,P=o("../internals/array-fill"),K=o("../internals/array-slice-simple"),B=o("../internals/set-to-string-tag"),R=o("../internals/internal-state"),j=g.PROPER,N=g.CONFIGURABLE,$=R.get,z=R.set,F="ArrayBuffer",M="DataView",X="prototype",re="Wrong length",ne="Wrong index",pe=p[F],ie=pe,Ae=ie&&ie[X],Z=p[M],fe=Z&&Z[X],he=Object.prototype,be=p.Array,le=p.RangeError,ue=f(P),ve=f([].reverse),Ee=I.pack,Oe=I.unpack,De=function(ze){return[ze&255]},ce=function(ze){return[ze&255,ze>>8&255]},G=function(ze){return[ze&255,ze>>8&255,ze>>16&255,ze>>24&255]},ye=function(ze){return ze[3]<<24|ze[2]<<16|ze[1]<<8|ze[0]},Y=function(ze){return Ee(ze,23,4)},H=function(ze){return Ee(ze,52,8)},Q=function(ze,Je){V(ze[X],Je,{get:function(){return $(this)[Je]}})},J=function(ze,Je,dt,ge){var Be=S(dt),_e=$(ze);if(Be+Je>_e.byteLength)throw le(ne);var Fe=$(_e.buffer).bytes,Ve=Be+_e.byteOffset,Xe=K(Fe,Ve,Ve+Je);return ge?Xe:ve(Xe)},ee=function(ze,Je,dt,ge,Be,_e){var Fe=S(dt),Ve=$(ze);if(Fe+Je>Ve.byteLength)throw le(ne);for(var Xe=$(Ve.buffer).bytes,Ye=Fe+Ve.byteOffset,it=ge(+Be),ot=0;ot<Je;ot++)Xe[Ye+ot]=it[_e?ot:Je-ot-1]};if(!b)ie=function(Je){m(this,Ae);var dt=S(Je);z(this,{bytes:ue(be(dt),0),byteLength:dt}),h||(this.byteLength=dt)},Ae=ie[X],Z=function(Je,dt,ge){m(this,fe),m(Je,Ae);var Be=$(Je).byteLength,_e=y(dt);if(_e<0||_e>Be)throw le("Wrong offset");if(ge=ge===void 0?Be-_e:x(ge),_e+ge>Be)throw le(re);z(this,{buffer:Je,byteLength:ge,byteOffset:_e}),h||(this.buffer=Je,this.byteLength=ge,this.byteOffset=_e)},fe=Z[X],h&&(Q(ie,"byteLength"),Q(Z,"buffer"),Q(Z,"byteLength"),Q(Z,"byteOffset")),c(fe,{getInt8:function(Je){return J(this,1,Je)[0]<<24>>24},getUint8:function(Je){return J(this,1,Je)[0]},getInt16:function(Je){var dt=J(this,2,Je,arguments.length>1?arguments[1]:void 0);return(dt[1]<<8|dt[0])<<16>>16},getUint16:function(Je){var dt=J(this,2,Je,arguments.length>1?arguments[1]:void 0);return dt[1]<<8|dt[0]},getInt32:function(Je){return ye(J(this,4,Je,arguments.length>1?arguments[1]:void 0))},getUint32:function(Je){return ye(J(this,4,Je,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Je){return Oe(J(this,4,Je,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Je){return Oe(J(this,8,Je,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Je,dt){ee(this,1,Je,De,dt)},setUint8:function(Je,dt){ee(this,1,Je,De,dt)},setInt16:function(Je,dt){ee(this,2,Je,ce,dt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Je,dt){ee(this,2,Je,ce,dt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Je,dt){ee(this,4,Je,G,dt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Je,dt){ee(this,4,Je,G,dt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Je,dt){ee(this,4,Je,Y,dt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Je,dt){ee(this,8,Je,H,dt,arguments.length>2?arguments[2]:void 0)}});else{var W=j&&pe.name!==F;if(!v(function(){pe(1)})||!v(function(){new pe(-1)})||v(function(){return new pe,new pe(1.5),new pe(NaN),W&&!N})){ie=function(Je){return m(this,Ae),new pe(S(Je))},ie[X]=Ae;for(var L=k(pe),q=0,de;L.length>q;)(de=L[q++])in ie||w(ie,de,pe[de]);Ae.constructor=ie}else W&&N&&w(pe,"name",F);E&&C(fe)!==he&&E(fe,he);var Ie=new Z(new ie(2)),He=f(fe.setInt8);Ie.setInt8(0,2147483648),Ie.setInt8(1,2147483649),(Ie.getInt8(0)||!Ie.getInt8(1))&&c(fe,{setInt8:function(Je,dt){He(this,Je,dt<<24>>24)},setUint8:function(Je,dt){He(this,Je,dt<<24>>24)}},{unsafe:!0})}B(ie,F),B(Z,M),_.exports={ArrayBuffer:ie,DataView:Z}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(o,_,O){"use strict";var p=o("../internals/to-object"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like"),b=Math.min;_.exports=[].copyWithin||function(w,c){var v=p(this),m=h(v),y=f(w,m),x=f(c,m),S=arguments.length>2?arguments[2]:void 0,I=b((S===void 0?m:f(S,m))-x,m-y),C=1;for(x<y&&y<x+I&&(C=-1,x+=I-1,y+=I-1);I-- >0;)x in v?v[y]=v[x]:delete v[y],y+=C,x+=C;return v}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(o,_,O){"use strict";var p=o("../internals/to-object"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like");_.exports=function(g){for(var w=p(this),c=h(w),v=arguments.length,m=f(v>1?arguments[1]:void 0,c),y=v>2?arguments[2]:void 0,x=y===void 0?c:f(y,c);x>m;)w[m++]=g;return w}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(o,_,O){"use strict";var p=o("../internals/array-iteration").forEach,f=o("../internals/array-method-is-strict"),h=f("forEach");_.exports=h?[].forEach:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(o,_,O){var p=o("../internals/length-of-array-like");_.exports=function(f,h){for(var b=0,g=p(h),w=new f(g);g>b;)w[b]=h[b++];return w}},{"../internals/length-of-array-like":188}],109:[function(o,_,O){"use strict";var p=o("../internals/global"),f=o("../internals/function-bind-context"),h=o("../internals/function-call"),b=o("../internals/to-object"),g=o("../internals/call-with-safe-iteration-closing"),w=o("../internals/is-array-iterator-method"),c=o("../internals/is-constructor"),v=o("../internals/length-of-array-like"),m=o("../internals/create-property"),y=o("../internals/get-iterator"),x=o("../internals/get-iterator-method"),S=p.Array;_.exports=function(C){var E=b(C),k=c(this),V=arguments.length,P=V>1?arguments[1]:void 0,K=P!==void 0;K&&(P=f(P,V>2?arguments[2]:void 0));var B=x(E),R=0,j,N,$,z,F,M;if(B&&!(this==S&&w(B)))for(z=y(E,B),F=z.next,N=k?new this:[];!($=h(F,z)).done;R++)M=K?g(z,P,[$.value,R],!0):$.value,m(N,R,M);else for(j=v(E),N=k?new this(j):S(j);j>R;R++)M=K?P(E[R],R):E[R],m(N,R,M);return N.length=R,N}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(o,_,O){var p=o("../internals/to-indexed-object"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like"),b=function(g){return function(w,c,v){var m=p(w),y=h(m),x=f(v,y),S;if(g&&c!=c){for(;y>x;)if(S=m[x++],S!=S)return!0}else for(;y>x;x++)if((g||x in m)&&m[x]===c)return g||x||0;return!g&&-1}};_.exports={includes:b(!0),indexOf:b(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(o,_,O){var p=o("../internals/function-bind-context"),f=o("../internals/function-uncurry-this"),h=o("../internals/indexed-object"),b=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/array-species-create"),c=f([].push),v=function(m){var y=m==1,x=m==2,S=m==3,I=m==4,C=m==6,E=m==7,k=m==5||C;return function(V,P,K,B){for(var R=b(V),j=h(R),N=p(P,K),$=g(j),z=0,F=B||w,M=y?F(V,$):x||E?F(V,0):void 0,X,re;$>z;z++)if((k||z in j)&&(X=j[z],re=N(X,z,R),m))if(y)M[z]=re;else if(re)switch(m){case 3:return!0;case 5:return X;case 6:return z;case 2:c(M,X)}else switch(m){case 4:return!1;case 7:c(M,X)}return C?-1:S||I?I:M}};_.exports={forEach:v(0),map:v(1),filter:v(2),some:v(3),every:v(4),find:v(5),findIndex:v(6),filterReject:v(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(o,_,O){"use strict";var p=o("../internals/function-apply"),f=o("../internals/to-indexed-object"),h=o("../internals/to-integer-or-infinity"),b=o("../internals/length-of-array-like"),g=o("../internals/array-method-is-strict"),w=Math.min,c=[].lastIndexOf,v=!!c&&1/[1].lastIndexOf(1,-0)<0,m=g("lastIndexOf"),y=v||!m;_.exports=y?function(S){if(v)return p(c,this,arguments)||0;var I=f(this),C=b(I),E=C-1;for(arguments.length>1&&(E=w(E,h(arguments[1]))),E<0&&(E=C+E);E>=0;E--)if(E in I&&I[E]===S)return E||0;return-1}:c},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(o,_,O){var p=o("../internals/fails"),f=o("../internals/well-known-symbol"),h=o("../internals/engine-v8-version"),b=f("species");_.exports=function(g){return h>=51||!p(function(){var w=[],c=w.constructor={};return c[b]=function(){return{foo:1}},w[g](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(o,_,O){"use strict";var p=o("../internals/fails");_.exports=function(f,h){var b=[][f];return!!b&&p(function(){b.call(null,h||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/a-callable"),h=o("../internals/to-object"),b=o("../internals/indexed-object"),g=o("../internals/length-of-array-like"),w=p.TypeError,c=function(v){return function(m,y,x,S){f(y);var I=h(m),C=b(I),E=g(I),k=v?E-1:0,V=v?-1:1;if(x<2)for(;;){if(k in C){S=C[k],k+=V;break}if(k+=V,v?k<0:E<=k)throw w("Reduce of empty array with no initial value")}for(;v?k>=0:E>k;k+=V)k in C&&(S=y(S,C[k],k,I));return S}};_.exports={left:c(!1),right:c(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/to-absolute-index"),h=o("../internals/length-of-array-like"),b=o("../internals/create-property"),g=p.Array,w=Math.max;_.exports=function(c,v,m){for(var y=h(c),x=f(v,y),S=f(m===void 0?y:m,y),I=g(w(S-x,0)),C=0;x<S;x++,C++)b(I,C,c[x]);return I.length=C,I}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(o,_,O){var p=o("../internals/function-uncurry-this");_.exports=p([].slice)},{"../internals/function-uncurry-this":157}],118:[function(o,_,O){var p=o("../internals/array-slice-simple"),f=Math.floor,h=function(w,c){var v=w.length,m=f(v/2);return v<8?b(w,c):g(w,h(p(w,0,m),c),h(p(w,m),c),c)},b=function(w,c){for(var v=w.length,m=1,y,x;m<v;){for(x=m,y=w[m];x&&c(w[x-1],y)>0;)w[x]=w[--x];x!==m++&&(w[x]=y)}return w},g=function(w,c,v,m){for(var y=c.length,x=v.length,S=0,I=0;S<y||I<x;)w[S+I]=S<y&&I<x?m(c[S],v[I])<=0?c[S++]:v[I++]:S<y?c[S++]:v[I++];return w};_.exports=h},{"../internals/array-slice-simple":116}],119:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-array"),h=o("../internals/is-constructor"),b=o("../internals/is-object"),g=o("../internals/well-known-symbol"),w=g("species"),c=p.Array;_.exports=function(v){var m;return f(v)&&(m=v.constructor,h(m)&&(m===c||f(m.prototype))?m=void 0:b(m)&&(m=m[w],m===null&&(m=void 0))),m===void 0?c:m}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(o,_,O){var p=o("../internals/array-species-constructor");_.exports=function(f,h){return new(p(f))(h===0?0:h)}},{"../internals/array-species-constructor":119}],121:[function(o,_,O){var p=o("../internals/an-object"),f=o("../internals/iterator-close");_.exports=function(h,b,g,w){try{return w?b(p(g)[0],g[1]):b(g)}catch(c){f(h,"throw",c)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(o,_,O){var p=o("../internals/well-known-symbol"),f=p("iterator"),h=!1;try{var b=0,g={next:function(){return{done:!!b++}},return:function(){h=!0}};g[f]=function(){return this},Array.from(g,function(){throw 2})}catch(w){}_.exports=function(w,c){if(!c&&!h)return!1;var v=!1;try{var m={};m[f]=function(){return{next:function(){return{done:v=!0}}}},w(m)}catch(y){}return v}},{"../internals/well-known-symbol":268}],123:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=p({}.toString),h=p("".slice);_.exports=function(b){return h(f(b),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/to-string-tag-support"),h=o("../internals/is-callable"),b=o("../internals/classof-raw"),g=o("../internals/well-known-symbol"),w=g("toStringTag"),c=p.Object,v=b(function(){return arguments}())=="Arguments",m=function(y,x){try{return y[x]}catch(S){}};_.exports=f?b:function(y){var x,S,I;return y===void 0?"Undefined":y===null?"Null":typeof(S=m(x=c(y),w))=="string"?S:v?b(x):(I=b(x))=="Object"&&h(x.callee)?"Arguments":I}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(o,_,O){var p=o("../internals/has-own-property"),f=o("../internals/own-keys"),h=o("../internals/object-get-own-property-descriptor"),b=o("../internals/object-define-property");_.exports=function(g,w,c){for(var v=f(w),m=b.f,y=h.f,x=0;x<v.length;x++){var S=v[x];!p(g,S)&&!(c&&p(c,S))&&m(g,S,y(w,S))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(o,_,O){var p=o("../internals/well-known-symbol"),f=p("match");_.exports=function(h){var b=/./;try{"/./"[h](b)}catch(g){try{return b[f]=!1,"/./"[h](b)}catch(w){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(o,_,O){var p=o("../internals/fails");_.exports=!p(function(){function f(){}return f.prototype.constructor=null,Object.getPrototypeOf(new f)!==f.prototype})},{"../internals/fails":150}],128:[function(o,_,O){"use strict";var p=o("../internals/iterators-core").IteratorPrototype,f=o("../internals/object-create"),h=o("../internals/create-property-descriptor"),b=o("../internals/set-to-string-tag"),g=o("../internals/iterators"),w=function(){return this};_.exports=function(c,v,m,y){var x=v+" Iterator";return c.prototype=f(p,{next:h(+!y,m)}),b(c,x,!1,!0),g[x]=w,c}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/object-define-property"),h=o("../internals/create-property-descriptor");_.exports=p?function(b,g,w){return f.f(b,g,h(1,w))}:function(b,g,w){return b[g]=w,b}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(o,_,O){_.exports=function(p,f){return{enumerable:!(p&1),configurable:!(p&2),writable:!(p&4),value:f}}},{}],131:[function(o,_,O){"use strict";var p=o("../internals/to-property-key"),f=o("../internals/object-define-property"),h=o("../internals/create-property-descriptor");_.exports=function(b,g,w){var c=p(g);c in b?f.f(b,c,h(0,w)):b[c]=w}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/is-pure"),b=o("../internals/function-name"),g=o("../internals/is-callable"),w=o("../internals/create-iterator-constructor"),c=o("../internals/object-get-prototype-of"),v=o("../internals/object-set-prototype-of"),m=o("../internals/set-to-string-tag"),y=o("../internals/create-non-enumerable-property"),x=o("../internals/redefine"),S=o("../internals/well-known-symbol"),I=o("../internals/iterators"),C=o("../internals/iterators-core"),E=b.PROPER,k=b.CONFIGURABLE,V=C.IteratorPrototype,P=C.BUGGY_SAFARI_ITERATORS,K=S("iterator"),B="keys",R="values",j="entries",N=function(){return this};_.exports=function($,z,F,M,X,re,ne){w(F,z,M);var pe=function(Ee){if(Ee===X&&he)return he;if(!P&&Ee in Z)return Z[Ee];switch(Ee){case B:return function(){return new F(this,Ee)};case R:return function(){return new F(this,Ee)};case j:return function(){return new F(this,Ee)}}return function(){return new F(this)}},ie=z+" Iterator",Ae=!1,Z=$.prototype,fe=Z[K]||Z["@@iterator"]||X&&Z[X],he=!P&&fe||pe(X),be=z=="Array"&&Z.entries||fe,le,ue,ve;if(be&&(le=c(be.call(new $)),le!==Object.prototype&&le.next&&(!h&&c(le)!==V&&(v?v(le,V):g(le[K])||x(le,K,N)),m(le,ie,!0,!0),h&&(I[ie]=N))),E&&X==R&&fe&&fe.name!==R&&(!h&&k?y(Z,"name",R):(Ae=!0,he=function(){return f(fe,this)})),X)if(ue={values:pe(R),keys:re?he:pe(B),entries:pe(j)},ne)for(ve in ue)(P||Ae||!(ve in Z))&&x(Z,ve,ue[ve]);else p({target:z,proto:!0,forced:P||Ae},ue);return(!h||ne)&&Z[K]!==he&&x(Z,K,he,{name:X}),I[z]=he,ue}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(o,_,O){var p=o("../internals/path"),f=o("../internals/has-own-property"),h=o("../internals/well-known-symbol-wrapped"),b=o("../internals/object-define-property").f;_.exports=function(g){var w=p.Symbol||(p.Symbol={});f(w,g)||b(w,g,{value:h.f(g)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(o,_,O){var p=o("../internals/fails");_.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-object"),h=p.document,b=f(h)&&f(h.createElement);_.exports=function(g){return b?h.createElement(g):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(o,_,O){_.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(o,_,O){var p=o("../internals/document-create-element"),f=p("span").classList,h=f&&f.constructor&&f.constructor.prototype;_.exports=h===Object.prototype?void 0:h},{"../internals/document-create-element":135}],138:[function(o,_,O){var p=o("../internals/engine-user-agent"),f=p.match(/firefox\/(\d+)/i);_.exports=!!f&&+f[1]},{"../internals/engine-user-agent":145}],139:[function(o,_,O){_.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(o,_,O){var p=o("../internals/engine-user-agent");_.exports=/MSIE|Trident/.test(p)},{"../internals/engine-user-agent":145}],141:[function(o,_,O){var p=o("../internals/engine-user-agent"),f=o("../internals/global");_.exports=/ipad|iphone|ipod/i.test(p)&&f.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(o,_,O){var p=o("../internals/engine-user-agent");_.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(p)},{"../internals/engine-user-agent":145}],143:[function(o,_,O){var p=o("../internals/classof-raw"),f=o("../internals/global");_.exports=p(f.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(o,_,O){var p=o("../internals/engine-user-agent");_.exports=/web0s(?!.*chrome)/i.test(p)},{"../internals/engine-user-agent":145}],145:[function(o,_,O){var p=o("../internals/get-built-in");_.exports=p("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/engine-user-agent"),h=p.process,b=p.Deno,g=h&&h.versions||b&&b.version,w=g&&g.v8,c,v;w&&(c=w.split("."),v=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!v&&f&&(c=f.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=f.match(/Chrome\/(\d+)/),c&&(v=+c[1]))),_.exports=v},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(o,_,O){var p=o("../internals/engine-user-agent"),f=p.match(/AppleWebKit\/(\d+)\./);_.exports=!!f&&+f[1]},{"../internals/engine-user-agent":145}],148:[function(o,_,O){_.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/object-get-own-property-descriptor").f,h=o("../internals/create-non-enumerable-property"),b=o("../internals/redefine"),g=o("../internals/set-global"),w=o("../internals/copy-constructor-properties"),c=o("../internals/is-forced");_.exports=function(v,m){var y=v.target,x=v.global,S=v.stat,I,C,E,k,V,P;if(x?C=p:S?C=p[y]||g(y,{}):C=(p[y]||{}).prototype,C)for(E in m){if(V=m[E],v.noTargetGet?(P=f(C,E),k=P&&P.value):k=C[E],I=c(x?E:y+(S?".":"#")+E,v.forced),!I&&k!==void 0){if(typeof V==typeof k)continue;w(V,k)}(v.sham||k&&k.sham)&&h(V,"sham",!0),b(C,E,V,v)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(o,_,O){_.exports=function(p){try{return!!p()}catch(f){return!0}}},{}],151:[function(o,_,O){"use strict";o("../modules/es.regexp.exec");var p=o("../internals/function-uncurry-this"),f=o("../internals/redefine"),h=o("../internals/regexp-exec"),b=o("../internals/fails"),g=o("../internals/well-known-symbol"),w=o("../internals/create-non-enumerable-property"),c=g("species"),v=RegExp.prototype;_.exports=function(m,y,x,S){var I=g(m),C=!b(function(){var P={};return P[I]=function(){return 7},""[m](P)!=7}),E=C&&!b(function(){var P=!1,K=/a/;return m==="split"&&(K={},K.constructor={},K.constructor[c]=function(){return K},K.flags="",K[I]=/./[I]),K.exec=function(){return P=!0,null},K[I](""),!P});if(!C||!E||x){var k=p(/./[I]),V=y(I,""[m],function(P,K,B,R,j){var N=p(P),$=K.exec;return $===h||$===v.exec?C&&!j?{done:!0,value:k(K,B,R)}:{done:!0,value:N(B,K,R)}:{done:!1}});f(String.prototype,m,V[0]),f(v,I,V[1])}S&&w(v[I],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(o,_,O){var p=o("../internals/function-bind-native"),f=Function.prototype,h=f.apply,b=f.call;_.exports=typeof Reflect=="object"&&Reflect.apply||(p?b.bind(h):function(){return b.apply(h,arguments)})},{"../internals/function-bind-native":154}],153:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/a-callable"),h=o("../internals/function-bind-native"),b=p(p.bind);_.exports=function(g,w){return f(g),w===void 0?g:h?b(g,w):function(){return g.apply(w,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(o,_,O){var p=o("../internals/fails");_.exports=!p(function(){var f=function(){}.bind();return typeof f!="function"||f.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(o,_,O){var p=o("../internals/function-bind-native"),f=Function.prototype.call;_.exports=p?f.bind(f):function(){return f.apply(f,arguments)}},{"../internals/function-bind-native":154}],156:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/has-own-property"),h=Function.prototype,b=p&&Object.getOwnPropertyDescriptor,g=f(h,"name"),w=g&&function(){}.name==="something",c=g&&(!p||p&&b(h,"name").configurable);_.exports={EXISTS:g,PROPER:w,CONFIGURABLE:c}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(o,_,O){var p=o("../internals/function-bind-native"),f=Function.prototype,h=f.bind,b=f.call,g=p&&h.bind(b,b);_.exports=p?function(w){return w&&g(w)}:function(w){return w&&function(){return b.apply(w,arguments)}}},{"../internals/function-bind-native":154}],158:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-callable"),h=function(b){return f(b)?b:void 0};_.exports=function(b,g){return arguments.length<2?h(p[b]):p[b]&&p[b][g]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(o,_,O){var p=o("../internals/classof"),f=o("../internals/get-method"),h=o("../internals/iterators"),b=o("../internals/well-known-symbol"),g=b("iterator");_.exports=function(w){if(w!=null)return f(w,g)||f(w,"@@iterator")||h[p(w)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/a-callable"),b=o("../internals/an-object"),g=o("../internals/try-to-string"),w=o("../internals/get-iterator-method"),c=p.TypeError;_.exports=function(v,m){var y=arguments.length<2?w(v):m;if(h(y))return b(f(y,v));throw c(g(v)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(o,_,O){var p=o("../internals/a-callable");_.exports=function(f,h){var b=f[h];return b==null?void 0:p(b)}},{"../internals/a-callable":95}],162:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/to-object"),h=Math.floor,b=p("".charAt),g=p("".replace),w=p("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,v=/\$([$&'`]|\d{1,2})/g;_.exports=function(m,y,x,S,I,C){var E=x+m.length,k=S.length,V=v;return I!==void 0&&(I=f(I),V=c),g(C,V,function(P,K){var B;switch(b(K,0)){case"$":return"$";case"&":return m;case"`":return w(y,0,x);case"'":return w(y,E);case"<":B=I[w(K,1,-1)];break;default:var R=+K;if(R===0)return P;if(R>k){var j=h(R/10);return j===0?P:j<=k?S[j-1]===void 0?b(K,1):S[j-1]+b(K,1):P}B=S[R-1]}return B===void 0?"":B})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(o,_,O){(function(p){(function(){var f=function(h){return h&&h.Math==Math&&h};_.exports=f(typeof globalThis=="object"&&globalThis)||f(typeof window=="object"&&window)||f(typeof self=="object"&&self)||f(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/to-object"),h=p({}.hasOwnProperty);_.exports=Object.hasOwn||function(g,w){return h(f(g),w)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(o,_,O){_.exports={}},{}],166:[function(o,_,O){var p=o("../internals/global");_.exports=function(f,h){var b=p.console;b&&b.error&&(arguments.length==1?b.error(f):b.error(f,h))}},{"../internals/global":163}],167:[function(o,_,O){var p=o("../internals/get-built-in");_.exports=p("document","documentElement")},{"../internals/get-built-in":158}],168:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/fails"),h=o("../internals/document-create-element");_.exports=!p&&!f(function(){return Object.defineProperty(h("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(o,_,O){var p=o("../internals/global"),f=p.Array,h=Math.abs,b=Math.pow,g=Math.floor,w=Math.log,c=Math.LN2,v=function(y,x,S){var I=f(S),C=S*8-x-1,E=(1<<C)-1,k=E>>1,V=x===23?b(2,-24)-b(2,-77):0,P=y<0||y===0&&1/y<0?1:0,K=0,B,R,j;for(y=h(y),y!=y||y===1/0?(R=y!=y?1:0,B=E):(B=g(w(y)/c),j=b(2,-B),y*j<1&&(B--,j*=2),B+k>=1?y+=V/j:y+=V*b(2,1-k),y*j>=2&&(B++,j/=2),B+k>=E?(R=0,B=E):B+k>=1?(R=(y*j-1)*b(2,x),B=B+k):(R=y*b(2,k-1)*b(2,x),B=0));x>=8;)I[K++]=R&255,R/=256,x-=8;for(B=B<<x|R,C+=x;C>0;)I[K++]=B&255,B/=256,C-=8;return I[--K]|=P*128,I},m=function(y,x){var S=y.length,I=S*8-x-1,C=(1<<I)-1,E=C>>1,k=I-7,V=S-1,P=y[V--],K=P&127,B;for(P>>=7;k>0;)K=K*256+y[V--],k-=8;for(B=K&(1<<-k)-1,K>>=-k,k+=x;k>0;)B=B*256+y[V--],k-=8;if(K===0)K=1-E;else{if(K===C)return B?NaN:P?-1/0:1/0;B=B+b(2,x),K=K-E}return(P?-1:1)*B*b(2,K-x)};_.exports={pack:v,unpack:m}},{"../internals/global":163}],170:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-uncurry-this"),h=o("../internals/fails"),b=o("../internals/classof-raw"),g=p.Object,w=f("".split);_.exports=h(function(){return!g("z").propertyIsEnumerable(0)})?function(c){return b(c)=="String"?w(c,""):g(c)}:g},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(o,_,O){var p=o("../internals/is-callable"),f=o("../internals/is-object"),h=o("../internals/object-set-prototype-of");_.exports=function(b,g,w){var c,v;return h&&p(c=g.constructor)&&c!==w&&f(v=c.prototype)&&v!==w.prototype&&h(b,v),b}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/is-callable"),h=o("../internals/shared-store"),b=p(Function.toString);f(h.inspectSource)||(h.inspectSource=function(g){return b(g)}),_.exports=h.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(o,_,O){var p=o("../internals/native-weak-map"),f=o("../internals/global"),h=o("../internals/function-uncurry-this"),b=o("../internals/is-object"),g=o("../internals/create-non-enumerable-property"),w=o("../internals/has-own-property"),c=o("../internals/shared-store"),v=o("../internals/shared-key"),m=o("../internals/hidden-keys"),y="Object already initialized",x=f.TypeError,S=f.WeakMap,I,C,E,k=function(N){return E(N)?C(N):I(N,{})},V=function(N){return function($){var z;if(!b($)||(z=C($)).type!==N)throw x("Incompatible receiver, "+N+" required");return z}};if(p||c.state){var P=c.state||(c.state=new S),K=h(P.get),B=h(P.has),R=h(P.set);I=function(N,$){if(B(P,N))throw new x(y);return $.facade=N,R(P,N,$),$},C=function(N){return K(P,N)||{}},E=function(N){return B(P,N)}}else{var j=v("state");m[j]=!0,I=function(N,$){if(w(N,j))throw new x(y);return $.facade=N,g(N,j,$),$},C=function(N){return w(N,j)?N[j]:{}},E=function(N){return w(N,j)}}_.exports={set:I,get:C,has:E,enforce:k,getterFor:V}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(o,_,O){var p=o("../internals/well-known-symbol"),f=o("../internals/iterators"),h=p("iterator"),b=Array.prototype;_.exports=function(g){return g!==void 0&&(f.Array===g||b[h]===g)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(o,_,O){var p=o("../internals/classof-raw");_.exports=Array.isArray||function(h){return p(h)=="Array"}},{"../internals/classof-raw":123}],176:[function(o,_,O){_.exports=function(p){return typeof p=="function"}},{}],177:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/fails"),h=o("../internals/is-callable"),b=o("../internals/classof"),g=o("../internals/get-built-in"),w=o("../internals/inspect-source"),c=function(){},v=[],m=g("Reflect","construct"),y=/^\s*(?:class|function)\b/,x=p(y.exec),S=!y.exec(c),I=function(k){if(!h(k))return!1;try{return m(c,v,k),!0}catch(V){return!1}},C=function(k){if(!h(k))return!1;switch(b(k)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return S||!!x(y,w(k))}catch(V){return!0}};C.sham=!0,_.exports=!m||f(function(){var E;return I(I.call)||!I(Object)||!I(function(){E=!0})||E})?C:I},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(o,_,O){var p=o("../internals/fails"),f=o("../internals/is-callable"),h=/#|\.prototype\./,b=function(m,y){var x=w[g(m)];return x==v?!0:x==c?!1:f(y)?p(y):!!y},g=b.normalize=function(m){return String(m).replace(h,".").toLowerCase()},w=b.data={},c=b.NATIVE="N",v=b.POLYFILL="P";_.exports=b},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(o,_,O){var p=o("../internals/is-object"),f=Math.floor;_.exports=Number.isInteger||function(b){return!p(b)&&isFinite(b)&&f(b)===b}},{"../internals/is-object":180}],180:[function(o,_,O){var p=o("../internals/is-callable");_.exports=function(f){return typeof f=="object"?f!==null:p(f)}},{"../internals/is-callable":176}],181:[function(o,_,O){_.exports=!1},{}],182:[function(o,_,O){var p=o("../internals/is-object"),f=o("../internals/classof-raw"),h=o("../internals/well-known-symbol"),b=h("match");_.exports=function(g){var w;return p(g)&&((w=g[b])!==void 0?!!w:f(g)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/get-built-in"),h=o("../internals/is-callable"),b=o("../internals/object-is-prototype-of"),g=o("../internals/use-symbol-as-uid"),w=p.Object;_.exports=g?function(c){return typeof c=="symbol"}:function(c){var v=f("Symbol");return h(v)&&b(v.prototype,w(c))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-bind-context"),h=o("../internals/function-call"),b=o("../internals/an-object"),g=o("../internals/try-to-string"),w=o("../internals/is-array-iterator-method"),c=o("../internals/length-of-array-like"),v=o("../internals/object-is-prototype-of"),m=o("../internals/get-iterator"),y=o("../internals/get-iterator-method"),x=o("../internals/iterator-close"),S=p.TypeError,I=function(E,k){this.stopped=E,this.result=k},C=I.prototype;_.exports=function(E,k,V){var P=V&&V.that,K=!!(V&&V.AS_ENTRIES),B=!!(V&&V.IS_ITERATOR),R=!!(V&&V.INTERRUPTED),j=f(k,P),N,$,z,F,M,X,re,ne=function(ie){return N&&x(N,"normal",ie),new I(!0,ie)},pe=function(ie){return K?(b(ie),R?j(ie[0],ie[1],ne):j(ie[0],ie[1])):R?j(ie,ne):j(ie)};if(B)N=E;else{if($=y(E),!$)throw S(g(E)+" is not iterable");if(w($)){for(z=0,F=c(E);F>z;z++)if(M=pe(E[z]),M&&v(C,M))return M;return new I(!1)}N=m(E,$)}for(X=N.next;!(re=h(X,N)).done;){try{M=pe(re.value)}catch(ie){x(N,"throw",ie)}if(typeof M=="object"&&M&&v(C,M))return M}return new I(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(o,_,O){var p=o("../internals/function-call"),f=o("../internals/an-object"),h=o("../internals/get-method");_.exports=function(b,g,w){var c,v;f(b);try{if(c=h(b,"return"),!c){if(g==="throw")throw w;return w}c=p(c,b)}catch(m){v=!0,c=m}if(g==="throw")throw w;if(v)throw c;return f(c),w}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(o,_,O){"use strict";var p=o("../internals/fails"),f=o("../internals/is-callable"),h=o("../internals/object-create"),b=o("../internals/object-get-prototype-of"),g=o("../internals/redefine"),w=o("../internals/well-known-symbol"),c=o("../internals/is-pure"),v=w("iterator"),m=!1,y,x,S;[].keys&&(S=[].keys(),"next"in S?(x=b(b(S)),x!==Object.prototype&&(y=x)):m=!0);var I=y==null||p(function(){var C={};return y[v].call(C)!==C});I?y={}:c&&(y=h(y)),f(y[v])||g(y,v,function(){return this}),_.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:m}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(o,_,O){arguments[4][165][0].apply(O,arguments)},{dup:165}],188:[function(o,_,O){var p=o("../internals/to-length");_.exports=function(f){return p(f.length)}},{"../internals/to-length":249}],189:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-bind-context"),h=o("../internals/object-get-own-property-descriptor").f,b=o("../internals/task").set,g=o("../internals/engine-is-ios"),w=o("../internals/engine-is-ios-pebble"),c=o("../internals/engine-is-webos-webkit"),v=o("../internals/engine-is-node"),m=p.MutationObserver||p.WebKitMutationObserver,y=p.document,x=p.process,S=p.Promise,I=h(p,"queueMicrotask"),C=I&&I.value,E,k,V,P,K,B,R,j;C||(E=function(){var N,$;for(v&&(N=x.domain)&&N.exit();k;){$=k.fn,k=k.next;try{$()}catch(z){throw k?P():V=void 0,z}}V=void 0,N&&N.enter()},!g&&!v&&!c&&m&&y?(K=!0,B=y.createTextNode(""),new m(E).observe(B,{characterData:!0}),P=function(){B.data=K=!K}):!w&&S&&S.resolve?(R=S.resolve(void 0),R.constructor=S,j=f(R.then,R),P=function(){j(E)}):v?P=function(){x.nextTick(E)}:(b=f(b,p),P=function(){b(E)})),_.exports=C||function(N){var $={fn:N,next:void 0};V&&(V.next=$),k||(k=$,P()),V=$}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(o,_,O){var p=o("../internals/native-symbol");_.exports=p&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(o,_,O){var p=o("../internals/engine-v8-version"),f=o("../internals/fails");_.exports=!!Object.getOwnPropertySymbols&&!f(function(){var h=Symbol();return!String(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&p&&p<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-callable"),h=o("../internals/inspect-source"),b=p.WeakMap;_.exports=f(b)&&/native code/.test(h(b))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(o,_,O){"use strict";var p=o("../internals/a-callable"),f=function(h){var b,g;this.promise=new h(function(w,c){if(b!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");b=w,g=c}),this.resolve=p(b),this.reject=p(g)};_.exports.f=function(h){return new f(h)}},{"../internals/a-callable":95}],194:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-regexp"),h=p.TypeError;_.exports=function(b){if(f(b))throw h("The method doesn't accept regular expressions");return b}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(o,_,O){"use strict";var p=o("../internals/descriptors"),f=o("../internals/function-uncurry-this"),h=o("../internals/function-call"),b=o("../internals/fails"),g=o("../internals/object-keys"),w=o("../internals/object-get-own-property-symbols"),c=o("../internals/object-property-is-enumerable"),v=o("../internals/to-object"),m=o("../internals/indexed-object"),y=Object.assign,x=Object.defineProperty,S=f([].concat);_.exports=!y||b(function(){if(p&&y({b:1},y(x({},"a",{enumerable:!0,get:function(){x(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},C={},E=Symbol(),k="abcdefghijklmnopqrst";return I[E]=7,k.split("").forEach(function(V){C[V]=V}),y({},I)[E]!=7||g(y({},C)).join("")!=k})?function(C,E){for(var k=v(C),V=arguments.length,P=1,K=w.f,B=c.f;V>P;)for(var R=m(arguments[P++]),j=K?S(g(R),K(R)):g(R),N=j.length,$=0,z;N>$;)z=j[$++],(!p||h(B,R,z))&&(k[z]=R[z]);return k}:y},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(o,_,O){var p=o("../internals/an-object"),f=o("../internals/object-define-properties"),h=o("../internals/enum-bug-keys"),b=o("../internals/hidden-keys"),g=o("../internals/html"),w=o("../internals/document-create-element"),c=o("../internals/shared-key"),v=">",m="<",y="prototype",x="script",S=c("IE_PROTO"),I=function(){},C=function(K){return m+x+v+K+m+"/"+x+v},E=function(K){K.write(C("")),K.close();var B=K.parentWindow.Object;return K=null,B},k=function(){var K=w("iframe"),B="java"+x+":",R;return K.style.display="none",g.appendChild(K),K.src=String(B),R=K.contentWindow.document,R.open(),R.write(C("document.F=Object")),R.close(),R.F},V,P=function(){try{V=new ActiveXObject("htmlfile")}catch(B){}P=typeof document!="undefined"?document.domain&&V?E(V):k():E(V);for(var K=h.length;K--;)delete P[y][h[K]];return P()};b[S]=!0,_.exports=Object.create||function(B,R){var j;return B!==null?(I[y]=p(B),j=new I,I[y]=null,j[S]=B):j=P(),R===void 0?j:f.f(j,R)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/v8-prototype-define-bug"),h=o("../internals/object-define-property"),b=o("../internals/an-object"),g=o("../internals/to-indexed-object"),w=o("../internals/object-keys");O.f=p&&!f?Object.defineProperties:function(v,m){b(v);for(var y=g(m),x=w(m),S=x.length,I=0,C;S>I;)h.f(v,C=x[I++],y[C]);return v}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/descriptors"),h=o("../internals/ie8-dom-define"),b=o("../internals/v8-prototype-define-bug"),g=o("../internals/an-object"),w=o("../internals/to-property-key"),c=p.TypeError,v=Object.defineProperty,m=Object.getOwnPropertyDescriptor,y="enumerable",x="configurable",S="writable";O.f=f?b?function(C,E,k){if(g(C),E=w(E),g(k),typeof C=="function"&&E==="prototype"&&"value"in k&&S in k&&!k[S]){var V=m(C,E);V&&V[S]&&(C[E]=k.value,k={configurable:x in k?k[x]:V[x],enumerable:y in k?k[y]:V[y],writable:!1})}return v(C,E,k)}:v:function(C,E,k){if(g(C),E=w(E),g(k),h)try{return v(C,E,k)}catch(V){}if("get"in k||"set"in k)throw c("Accessors not supported");return"value"in k&&(C[E]=k.value),C}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/function-call"),h=o("../internals/object-property-is-enumerable"),b=o("../internals/create-property-descriptor"),g=o("../internals/to-indexed-object"),w=o("../internals/to-property-key"),c=o("../internals/has-own-property"),v=o("../internals/ie8-dom-define"),m=Object.getOwnPropertyDescriptor;O.f=p?m:function(x,S){if(x=g(x),S=w(S),v)try{return m(x,S)}catch(I){}if(c(x,S))return b(!f(h.f,x,S),x[S])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(o,_,O){var p=o("../internals/classof-raw"),f=o("../internals/to-indexed-object"),h=o("../internals/object-get-own-property-names").f,b=o("../internals/array-slice-simple"),g=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],w=function(c){try{return h(c)}catch(v){return b(g)}};_.exports.f=function(v){return g&&p(v)=="Window"?w(v):h(f(v))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(o,_,O){var p=o("../internals/object-keys-internal"),f=o("../internals/enum-bug-keys"),h=f.concat("length","prototype");O.f=Object.getOwnPropertyNames||function(g){return p(g,h)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(o,_,O){O.f=Object.getOwnPropertySymbols},{}],203:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/has-own-property"),h=o("../internals/is-callable"),b=o("../internals/to-object"),g=o("../internals/shared-key"),w=o("../internals/correct-prototype-getter"),c=g("IE_PROTO"),v=p.Object,m=v.prototype;_.exports=w?v.getPrototypeOf:function(y){var x=b(y);if(f(x,c))return x[c];var S=x.constructor;return h(S)&&x instanceof S?S.prototype:x instanceof v?m:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(o,_,O){var p=o("../internals/function-uncurry-this");_.exports=p({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/has-own-property"),h=o("../internals/to-indexed-object"),b=o("../internals/array-includes").indexOf,g=o("../internals/hidden-keys"),w=p([].push);_.exports=function(c,v){var m=h(c),y=0,x=[],S;for(S in m)!f(g,S)&&f(m,S)&&w(x,S);for(;v.length>y;)f(m,S=v[y++])&&(~b(x,S)||w(x,S));return x}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(o,_,O){var p=o("../internals/object-keys-internal"),f=o("../internals/enum-bug-keys");_.exports=Object.keys||function(b){return p(b,f)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(o,_,O){"use strict";var p={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h=f&&!p.call({1:2},1);O.f=h?function(g){var w=f(this,g);return!!w&&w.enumerable}:p},{}],208:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/an-object"),h=o("../internals/a-possible-prototype");_.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b=!1,g={},w;try{w=p(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),w(g,[]),b=g instanceof Array}catch(c){}return function(v,m){return f(v),h(m),b?w(v,m):v.__proto__=m,v}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/function-uncurry-this"),h=o("../internals/object-keys"),b=o("../internals/to-indexed-object"),g=o("../internals/object-property-is-enumerable").f,w=f(g),c=f([].push),v=function(m){return function(y){for(var x=b(y),S=h(x),I=S.length,C=0,E=[],k;I>C;)k=S[C++],(!p||w(x,k))&&c(E,m?[k,x[k]]:x[k]);return E}};_.exports={entries:v(!0),values:v(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(o,_,O){"use strict";var p=o("../internals/to-string-tag-support"),f=o("../internals/classof");_.exports=p?{}.toString:function(){return"[object "+f(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/is-callable"),b=o("../internals/is-object"),g=p.TypeError;_.exports=function(w,c){var v,m;if(c==="string"&&h(v=w.toString)&&!b(m=f(v,w))||h(v=w.valueOf)&&!b(m=f(v,w))||c!=="string"&&h(v=w.toString)&&!b(m=f(v,w)))return m;throw g("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(o,_,O){var p=o("../internals/get-built-in"),f=o("../internals/function-uncurry-this"),h=o("../internals/object-get-own-property-names"),b=o("../internals/object-get-own-property-symbols"),g=o("../internals/an-object"),w=f([].concat);_.exports=p("Reflect","ownKeys")||function(v){var m=h.f(g(v)),y=b.f;return y?w(m,y(v)):m}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(o,_,O){var p=o("../internals/global");_.exports=p},{"../internals/global":163}],214:[function(o,_,O){_.exports=function(p){try{return{error:!1,value:p()}}catch(f){return{error:!0,value:f}}}},{}],215:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/promise-native-constructor"),h=o("../internals/is-callable"),b=o("../internals/is-forced"),g=o("../internals/inspect-source"),w=o("../internals/well-known-symbol"),c=o("../internals/engine-is-browser"),v=o("../internals/is-pure"),m=o("../internals/engine-v8-version"),y=f&&f.prototype,x=w("species"),S=!1,I=h(p.PromiseRejectionEvent),C=b("Promise",function(){var E=g(f),k=E!==String(f);if(!k&&m===66||v&&!(y.catch&&y.finally))return!0;if(m>=51&&/native code/.test(E))return!1;var V=new f(function(B){B(1)}),P=function(B){B(function(){},function(){})},K=V.constructor={};return K[x]=P,S=V.then(function(){})instanceof P,S?!k&&c&&!I:!0});_.exports={CONSTRUCTOR:C,REJECTION_EVENT:I,SUBCLASSING:S}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(o,_,O){var p=o("../internals/global");_.exports=p.Promise},{"../internals/global":163}],217:[function(o,_,O){var p=o("../internals/an-object"),f=o("../internals/is-object"),h=o("../internals/new-promise-capability");_.exports=function(b,g){if(p(b),f(g)&&g.constructor===b)return g;var w=h.f(b),c=w.resolve;return c(g),w.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(o,_,O){var p=o("../internals/promise-native-constructor"),f=o("../internals/check-correctness-of-iteration"),h=o("../internals/promise-constructor-detection").CONSTRUCTOR;_.exports=h||!f(function(b){p.all(b).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(o,_,O){var p=o("../internals/object-define-property").f;_.exports=function(f,h,b){b in f||p(f,b,{configurable:!0,get:function(){return h[b]},set:function(g){h[b]=g}})}},{"../internals/object-define-property":198}],220:[function(o,_,O){var p=function(){this.head=null,this.tail=null};p.prototype={add:function(f){var h={item:f,next:null};this.head?this.tail.next=h:this.head=h,this.tail=h},get:function(){var f=this.head;if(f)return this.head=f.next,this.tail===f&&(this.tail=null),f.item}},_.exports=p},{}],221:[function(o,_,O){var p=o("../internals/redefine");_.exports=function(f,h,b){for(var g in h)p(f,g,h[g],b);return f}},{"../internals/redefine":222}],222:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/is-callable"),h=o("../internals/has-own-property"),b=o("../internals/create-non-enumerable-property"),g=o("../internals/set-global"),w=o("../internals/inspect-source"),c=o("../internals/internal-state"),v=o("../internals/function-name").CONFIGURABLE,m=c.get,y=c.enforce,x=String(String).split("String");(_.exports=function(S,I,C,E){var k=E?!!E.unsafe:!1,V=E?!!E.enumerable:!1,P=E?!!E.noTargetGet:!1,K=E&&E.name!==void 0?E.name:I,B;if(f(C)&&(String(K).slice(0,7)==="Symbol("&&(K="["+String(K).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!h(C,"name")||v&&C.name!==K)&&b(C,"name",K),B=y(C),B.source||(B.source=x.join(typeof K=="string"?K:""))),S===p){V?S[I]=C:g(I,C);return}else k?!P&&S[I]&&(V=!0):delete S[I];V?S[I]=C:b(S,I,C)})(Function.prototype,"toString",function(){return f(this)&&m(this).source||w(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/an-object"),b=o("../internals/is-callable"),g=o("../internals/classof-raw"),w=o("../internals/regexp-exec"),c=p.TypeError;_.exports=function(v,m){var y=v.exec;if(b(y)){var x=f(y,v,m);return x!==null&&h(x),x}if(g(v)==="RegExp")return f(w,v,m);throw c("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(o,_,O){"use strict";var p=o("../internals/function-call"),f=o("../internals/function-uncurry-this"),h=o("../internals/to-string"),b=o("../internals/regexp-flags"),g=o("../internals/regexp-sticky-helpers"),w=o("../internals/shared"),c=o("../internals/object-create"),v=o("../internals/internal-state").get,m=o("../internals/regexp-unsupported-dot-all"),y=o("../internals/regexp-unsupported-ncg"),x=w("native-string-replace",String.prototype.replace),S=RegExp.prototype.exec,I=S,C=f("".charAt),E=f("".indexOf),k=f("".replace),V=f("".slice),P=function(){var j=/a/,N=/b*/g;return p(S,j,"a"),p(S,N,"a"),j.lastIndex!==0||N.lastIndex!==0}(),K=g.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0,R=P||B||K||m||y;R&&(I=function(N){var $=this,z=v($),F=h(N),M=z.raw,X,re,ne,pe,ie,Ae,Z;if(M)return M.lastIndex=$.lastIndex,X=p(I,M,F),$.lastIndex=M.lastIndex,X;var fe=z.groups,he=K&&$.sticky,be=p(b,$),le=$.source,ue=0,ve=F;if(he&&(be=k(be,"y",""),E(be,"g")===-1&&(be+="g"),ve=V(F,$.lastIndex),$.lastIndex>0&&(!$.multiline||$.multiline&&C(F,$.lastIndex-1)!==`
|
|
`)&&(le="(?: "+le+")",ve=" "+ve,ue++),re=new RegExp("^(?:"+le+")",be)),B&&(re=new RegExp("^"+le+"$(?!\\s)",be)),P&&(ne=$.lastIndex),pe=p(S,he?re:$,ve),he?pe?(pe.input=V(pe.input,ue),pe[0]=V(pe[0],ue),pe.index=$.lastIndex,$.lastIndex+=pe[0].length):$.lastIndex=0:P&&pe&&($.lastIndex=$.global?pe.index+pe[0].length:ne),B&&pe&&pe.length>1&&p(x,pe[0],re,function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(pe[ie]=void 0)}),pe&&fe)for(pe.groups=Ae=c(null),ie=0;ie<fe.length;ie++)Z=fe[ie],Ae[Z[0]]=pe[Z[1]];return pe}),_.exports=I},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(o,_,O){"use strict";var p=o("../internals/an-object");_.exports=function(){var f=p(this),h="";return f.hasIndices&&(h+="d"),f.global&&(h+="g"),f.ignoreCase&&(h+="i"),f.multiline&&(h+="m"),f.dotAll&&(h+="s"),f.unicode&&(h+="u"),f.sticky&&(h+="y"),h}},{"../internals/an-object":101}],226:[function(o,_,O){var p=o("../internals/function-call"),f=o("../internals/has-own-property"),h=o("../internals/object-is-prototype-of"),b=o("../internals/regexp-flags"),g=RegExp.prototype;_.exports=function(w){var c=w.flags;return c===void 0&&!("flags"in g)&&!f(w,"flags")&&h(g,w)?p(b,w):c}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(o,_,O){var p=o("../internals/fails"),f=o("../internals/global"),h=f.RegExp,b=p(function(){var c=h("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),g=b||p(function(){return!h("a","y").sticky}),w=b||p(function(){var c=h("^r","gy");return c.lastIndex=2,c.exec("str")!=null});_.exports={BROKEN_CARET:w,MISSED_STICKY:g,UNSUPPORTED_Y:b}},{"../internals/fails":150,"../internals/global":163}],228:[function(o,_,O){var p=o("../internals/fails"),f=o("../internals/global"),h=f.RegExp;_.exports=p(function(){var b=h(".","s");return!(b.dotAll&&b.exec(`
|
|
`)&&b.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(o,_,O){var p=o("../internals/fails"),f=o("../internals/global"),h=f.RegExp;_.exports=p(function(){var b=h("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(o,_,O){var p=o("../internals/global"),f=p.TypeError;_.exports=function(h){if(h==null)throw f("Can't call method on "+h);return h}},{"../internals/global":163}],231:[function(o,_,O){_.exports=Object.is||function(f,h){return f===h?f!==0||1/f===1/h:f!=f&&h!=h}},{}],232:[function(o,_,O){var p=o("../internals/global"),f=Object.defineProperty;_.exports=function(h,b){try{f(p,h,{value:b,configurable:!0,writable:!0})}catch(g){p[h]=b}return b}},{"../internals/global":163}],233:[function(o,_,O){"use strict";var p=o("../internals/get-built-in"),f=o("../internals/object-define-property"),h=o("../internals/well-known-symbol"),b=o("../internals/descriptors"),g=h("species");_.exports=function(w){var c=p(w),v=f.f;b&&c&&!c[g]&&v(c,g,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(o,_,O){var p=o("../internals/object-define-property").f,f=o("../internals/has-own-property"),h=o("../internals/well-known-symbol"),b=h("toStringTag");_.exports=function(g,w,c){g&&!c&&(g=g.prototype),g&&!f(g,b)&&p(g,b,{configurable:!0,value:w})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(o,_,O){var p=o("../internals/shared"),f=o("../internals/uid"),h=p("keys");_.exports=function(b){return h[b]||(h[b]=f(b))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/set-global"),h="__core-js_shared__",b=p[h]||f(h,{});_.exports=b},{"../internals/global":163,"../internals/set-global":232}],237:[function(o,_,O){var p=o("../internals/is-pure"),f=o("../internals/shared-store");(_.exports=function(h,b){return f[h]||(f[h]=b!==void 0?b:{})})("versions",[]).push({version:"3.22.1",mode:p?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(o,_,O){var p=o("../internals/an-object"),f=o("../internals/a-constructor"),h=o("../internals/well-known-symbol"),b=h("species");_.exports=function(g,w){var c=p(g).constructor,v;return c===void 0||(v=p(c)[b])==null?w:f(v)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/to-integer-or-infinity"),h=o("../internals/to-string"),b=o("../internals/require-object-coercible"),g=p("".charAt),w=p("".charCodeAt),c=p("".slice),v=function(m){return function(y,x){var S=h(b(y)),I=f(x),C=S.length,E,k;return I<0||I>=C?m?"":void 0:(E=w(S,I),E<55296||E>56319||I+1===C||(k=w(S,I+1))<56320||k>57343?m?g(S,I):E:m?c(S,I,I+2):(E-55296<<10)+(k-56320)+65536)}};_.exports={codeAt:v(!1),charAt:v(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(o,_,O){var p=o("../internals/function-name").PROPER,f=o("../internals/fails"),h=o("../internals/whitespaces"),b="\u200B\x85\u180E";_.exports=function(g){return f(function(){return!!h[g]()||b[g]()!==b||p&&h[g].name!==g})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=o("../internals/require-object-coercible"),h=o("../internals/to-string"),b=o("../internals/whitespaces"),g=p("".replace),w="["+b+"]",c=RegExp("^"+w+w+"*"),v=RegExp(w+w+"*$"),m=function(y){return function(x){var S=h(f(x));return y&1&&(S=g(S,c,"")),y&2&&(S=g(S,v,"")),S}};_.exports={start:m(1),end:m(2),trim:m(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(o,_,O){var p=o("../internals/function-call"),f=o("../internals/get-built-in"),h=o("../internals/well-known-symbol"),b=o("../internals/redefine");_.exports=function(){var g=f("Symbol"),w=g&&g.prototype,c=w&&w.valueOf,v=h("toPrimitive");w&&!w[v]&&b(w,v,function(m){return p(c,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-apply"),h=o("../internals/function-bind-context"),b=o("../internals/is-callable"),g=o("../internals/has-own-property"),w=o("../internals/fails"),c=o("../internals/html"),v=o("../internals/array-slice"),m=o("../internals/document-create-element"),y=o("../internals/validate-arguments-length"),x=o("../internals/engine-is-ios"),S=o("../internals/engine-is-node"),I=p.setImmediate,C=p.clearImmediate,E=p.process,k=p.Dispatch,V=p.Function,P=p.MessageChannel,K=p.String,B=0,R={},j="onreadystatechange",N,$,z,F;try{N=p.location}catch(pe){}var M=function(pe){if(g(R,pe)){var ie=R[pe];delete R[pe],ie()}},X=function(pe){return function(){M(pe)}},re=function(pe){M(pe.data)},ne=function(pe){p.postMessage(K(pe),N.protocol+"//"+N.host)};(!I||!C)&&(I=function(ie){y(arguments.length,1);var Ae=b(ie)?ie:V(ie),Z=v(arguments,1);return R[++B]=function(){f(Ae,void 0,Z)},$(B),B},C=function(ie){delete R[ie]},S?$=function(pe){E.nextTick(X(pe))}:k&&k.now?$=function(pe){k.now(X(pe))}:P&&!x?(z=new P,F=z.port2,z.port1.onmessage=re,$=h(F.postMessage,F)):p.addEventListener&&b(p.postMessage)&&!p.importScripts&&N&&N.protocol!=="file:"&&!w(ne)?($=ne,p.addEventListener("message",re,!1)):j in m("script")?$=function(pe){c.appendChild(m("script"))[j]=function(){c.removeChild(this),M(pe)}}:$=function(pe){setTimeout(X(pe),0)}),_.exports={set:I,clear:C}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(o,_,O){var p=o("../internals/function-uncurry-this");_.exports=p(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(o,_,O){var p=o("../internals/to-integer-or-infinity"),f=Math.max,h=Math.min;_.exports=function(b,g){var w=p(b);return w<0?f(w+g,0):h(w,g)}},{"../internals/to-integer-or-infinity":248}],246:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/to-integer-or-infinity"),h=o("../internals/to-length"),b=p.RangeError;_.exports=function(g){if(g===void 0)return 0;var w=f(g),c=h(w);if(w!==c)throw b("Wrong length or index");return c}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(o,_,O){var p=o("../internals/indexed-object"),f=o("../internals/require-object-coercible");_.exports=function(h){return p(f(h))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(o,_,O){var p=Math.ceil,f=Math.floor;_.exports=function(h){var b=+h;return b!==b||b===0?0:(b>0?f:p)(b)}},{}],249:[function(o,_,O){var p=o("../internals/to-integer-or-infinity"),f=Math.min;_.exports=function(h){return h>0?f(p(h),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/require-object-coercible"),h=p.Object;_.exports=function(b){return h(f(b))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/to-positive-integer"),h=p.RangeError;_.exports=function(b,g){var w=f(b);if(w%g)throw h("Wrong offset");return w}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/to-integer-or-infinity"),h=p.RangeError;_.exports=function(b){var g=f(b);if(g<0)throw h("The argument can't be less than 0");return g}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/is-object"),b=o("../internals/is-symbol"),g=o("../internals/get-method"),w=o("../internals/ordinary-to-primitive"),c=o("../internals/well-known-symbol"),v=p.TypeError,m=c("toPrimitive");_.exports=function(y,x){if(!h(y)||b(y))return y;var S=g(y,m),I;if(S){if(x===void 0&&(x="default"),I=f(S,y,x),!h(I)||b(I))return I;throw v("Can't convert object to primitive value")}return x===void 0&&(x="number"),w(y,x)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(o,_,O){var p=o("../internals/to-primitive"),f=o("../internals/is-symbol");_.exports=function(h){var b=p(h,"string");return f(b)?b:b+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(o,_,O){var p=o("../internals/well-known-symbol"),f=p("toStringTag"),h={};h[f]="z",_.exports=String(h)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/classof"),h=p.String;_.exports=function(b){if(f(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return h(b)}},{"../internals/classof":124,"../internals/global":163}],257:[function(o,_,O){var p=o("../internals/global"),f=p.String;_.exports=function(h){try{return f(h)}catch(b){return"Object"}}},{"../internals/global":163}],258:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/function-call"),b=o("../internals/descriptors"),g=o("../internals/typed-array-constructors-require-wrappers"),w=o("../internals/array-buffer-view-core"),c=o("../internals/array-buffer"),v=o("../internals/an-instance"),m=o("../internals/create-property-descriptor"),y=o("../internals/create-non-enumerable-property"),x=o("../internals/is-integral-number"),S=o("../internals/to-length"),I=o("../internals/to-index"),C=o("../internals/to-offset"),E=o("../internals/to-property-key"),k=o("../internals/has-own-property"),V=o("../internals/classof"),P=o("../internals/is-object"),K=o("../internals/is-symbol"),B=o("../internals/object-create"),R=o("../internals/object-is-prototype-of"),j=o("../internals/object-set-prototype-of"),N=o("../internals/object-get-own-property-names").f,$=o("../internals/typed-array-from"),z=o("../internals/array-iteration").forEach,F=o("../internals/set-species"),M=o("../internals/object-define-property"),X=o("../internals/object-get-own-property-descriptor"),re=o("../internals/internal-state"),ne=o("../internals/inherit-if-required"),pe=re.get,ie=re.set,Ae=M.f,Z=X.f,fe=Math.round,he=f.RangeError,be=c.ArrayBuffer,le=be.prototype,ue=c.DataView,ve=w.NATIVE_ARRAY_BUFFER_VIEWS,Ee=w.TYPED_ARRAY_CONSTRUCTOR,Oe=w.TYPED_ARRAY_TAG,De=w.TypedArray,ce=w.TypedArrayPrototype,G=w.aTypedArrayConstructor,ye=w.isTypedArray,Y="BYTES_PER_ELEMENT",H="Wrong length",Q=function(de,Ie){G(de);for(var He=0,ze=Ie.length,Je=new de(ze);ze>He;)Je[He]=Ie[He++];return Je},J=function(de,Ie){Ae(de,Ie,{get:function(){return pe(this)[Ie]}})},ee=function(de){var Ie;return R(le,de)||(Ie=V(de))=="ArrayBuffer"||Ie=="SharedArrayBuffer"},W=function(de,Ie){return ye(de)&&!K(Ie)&&Ie in de&&x(+Ie)&&Ie>=0},L=function(Ie,He){return He=E(He),W(Ie,He)?m(2,Ie[He]):Z(Ie,He)},q=function(Ie,He,ze){return He=E(He),W(Ie,He)&&P(ze)&&k(ze,"value")&&!k(ze,"get")&&!k(ze,"set")&&!ze.configurable&&(!k(ze,"writable")||ze.writable)&&(!k(ze,"enumerable")||ze.enumerable)?(Ie[He]=ze.value,Ie):Ae(Ie,He,ze)};b?(ve||(X.f=L,M.f=q,J(ce,"buffer"),J(ce,"byteOffset"),J(ce,"byteLength"),J(ce,"length")),p({target:"Object",stat:!0,forced:!ve},{getOwnPropertyDescriptor:L,defineProperty:q}),_.exports=function(de,Ie,He){var ze=de.match(/\d+$/)[0]/8,Je=de+(He?"Clamped":"")+"Array",dt="get"+de,ge="set"+de,Be=f[Je],_e=Be,Fe=_e&&_e.prototype,Ve={},Xe=function(ot,ft){var Ct=pe(ot);return Ct.view[dt](ft*ze+Ct.byteOffset,!0)},Ye=function(ot,ft,Ct){var jt=pe(ot);He&&(Ct=(Ct=fe(Ct))<0?0:Ct>255?255:Ct&255),jt.view[ge](ft*ze+jt.byteOffset,Ct,!0)},it=function(ot,ft){Ae(ot,ft,{get:function(){return Xe(this,ft)},set:function(Ct){return Ye(this,ft,Ct)},enumerable:!0})};ve?g&&(_e=Ie(function(ot,ft,Ct,jt){return v(ot,Fe),ne(function(){return P(ft)?ee(ft)?jt!==void 0?new Be(ft,C(Ct,ze),jt):Ct!==void 0?new Be(ft,C(Ct,ze)):new Be(ft):ye(ft)?Q(_e,ft):h($,_e,ft):new Be(I(ft))}(),ot,_e)}),j&&j(_e,De),z(N(Be),function(ot){ot in _e||y(_e,ot,Be[ot])}),_e.prototype=Fe):(_e=Ie(function(ot,ft,Ct,jt){v(ot,Fe);var Ot=0,Gt=0,Bt,Lt,Pt;if(!P(ft))Pt=I(ft),Lt=Pt*ze,Bt=new be(Lt);else if(ee(ft)){Bt=ft,Gt=C(Ct,ze);var mr=ft.byteLength;if(jt===void 0){if(mr%ze||(Lt=mr-Gt,Lt<0))throw he(H)}else if(Lt=S(jt)*ze,Lt+Gt>mr)throw he(H);Pt=Lt/ze}else return ye(ft)?Q(_e,ft):h($,_e,ft);for(ie(ot,{buffer:Bt,byteOffset:Gt,byteLength:Lt,length:Pt,view:new ue(Bt)});Ot<Pt;)it(ot,Ot++)}),j&&j(_e,De),Fe=_e.prototype=B(ce)),Fe.constructor!==_e&&y(Fe,"constructor",_e),y(Fe,Ee,_e),Oe&&y(Fe,Oe,Je),Ve[Je]=_e,p({global:!0,forced:_e!=Be,sham:!ve},Ve),Y in _e||y(_e,Y,ze),Y in Fe||y(Fe,Y,ze),F(Je)}):_.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/fails"),h=o("../internals/check-correctness-of-iteration"),b=o("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,g=p.ArrayBuffer,w=p.Int8Array;_.exports=!b||!f(function(){w(1)})||!f(function(){new w(-1)})||!h(function(c){new w,new w(null),new w(1.5),new w(c)},!0)||f(function(){return new w(new g(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(o,_,O){var p=o("../internals/array-from-constructor-and-list"),f=o("../internals/typed-array-species-constructor");_.exports=function(h,b){return p(f(h),b)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(o,_,O){var p=o("../internals/function-bind-context"),f=o("../internals/function-call"),h=o("../internals/a-constructor"),b=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/get-iterator"),c=o("../internals/get-iterator-method"),v=o("../internals/is-array-iterator-method"),m=o("../internals/array-buffer-view-core").aTypedArrayConstructor;_.exports=function(x){var S=h(this),I=b(x),C=arguments.length,E=C>1?arguments[1]:void 0,k=E!==void 0,V=c(I),P,K,B,R,j,N;if(V&&!v(V))for(j=w(I,V),N=j.next,I=[];!(R=f(N,j)).done;)I.push(R.value);for(k&&C>2&&(E=p(E,arguments[2])),K=g(I),B=new(m(S))(K),P=0;K>P;P++)B[P]=k?E(I[P],P):I[P];return B}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(o,_,O){var p=o("../internals/array-buffer-view-core"),f=o("../internals/species-constructor"),h=p.TYPED_ARRAY_CONSTRUCTOR,b=p.aTypedArrayConstructor;_.exports=function(g){return b(f(g,g[h]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(o,_,O){var p=o("../internals/function-uncurry-this"),f=0,h=Math.random(),b=p(1 .toString);_.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+b(++f+h,36)}},{"../internals/function-uncurry-this":157}],264:[function(o,_,O){var p=o("../internals/native-symbol");_.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/fails");_.exports=p&&f(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(o,_,O){var p=o("../internals/global"),f=p.TypeError;_.exports=function(h,b){if(h<b)throw f("Not enough arguments");return h}},{"../internals/global":163}],267:[function(o,_,O){var p=o("../internals/well-known-symbol");O.f=p},{"../internals/well-known-symbol":268}],268:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/shared"),h=o("../internals/has-own-property"),b=o("../internals/uid"),g=o("../internals/native-symbol"),w=o("../internals/use-symbol-as-uid"),c=f("wks"),v=p.Symbol,m=v&&v.for,y=w?v:v&&v.withoutSetter||b;_.exports=function(x){if(!h(c,x)||!(g||typeof c[x]=="string")){var S="Symbol."+x;g&&h(v,x)?c[x]=v[x]:w&&m?c[x]=m(S):c[x]=y(S)}return c[x]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(o,_,O){_.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/array-buffer"),b=o("../internals/set-species"),g="ArrayBuffer",w=h[g],c=f[g];p({global:!0,forced:c!==w},{ArrayBuffer:w}),b(g)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/fails"),b=o("../internals/array-buffer"),g=o("../internals/an-object"),w=o("../internals/to-absolute-index"),c=o("../internals/to-length"),v=o("../internals/species-constructor"),m=b.ArrayBuffer,y=b.DataView,x=y.prototype,S=f(m.prototype.slice),I=f(x.getUint8),C=f(x.setUint8),E=h(function(){return!new m(2).slice(1,void 0).byteLength});p({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:E},{slice:function(V,P){if(S&&P===void 0)return S(g(this),V);for(var K=g(this).byteLength,B=w(V,K),R=w(P===void 0?K:P,K),j=new(v(this,m))(c(R-B)),N=new y(this),$=new y(j),z=0;B<R;)C($,z++,I(N,B++));return j}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/fails"),b=o("../internals/is-array"),g=o("../internals/is-object"),w=o("../internals/to-object"),c=o("../internals/length-of-array-like"),v=o("../internals/create-property"),m=o("../internals/array-species-create"),y=o("../internals/array-method-has-species-support"),x=o("../internals/well-known-symbol"),S=o("../internals/engine-v8-version"),I=x("isConcatSpreadable"),C=9007199254740991,E="Maximum allowed index exceeded",k=f.TypeError,V=S>=51||!h(function(){var R=[];return R[I]=!1,R.concat()[0]!==R}),P=y("concat"),K=function(R){if(!g(R))return!1;var j=R[I];return j!==void 0?!!j:b(R)},B=!V||!P;p({target:"Array",proto:!0,forced:B},{concat:function(j){var N=w(this),$=m(N,0),z=0,F,M,X,re,ne;for(F=-1,X=arguments.length;F<X;F++)if(ne=F===-1?N:arguments[F],K(ne)){if(re=c(ne),z+re>C)throw k(E);for(M=0;M<re;M++,z++)M in ne&&v($,z,ne[M])}else{if(z>=C)throw k(E);v($,z++,ne)}return $.length=z,$}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/array-fill"),h=o("../internals/add-to-unscopables");p({target:"Array",proto:!0},{fill:f}),h("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/array-iteration").filter,h=o("../internals/array-method-has-species-support"),b=h("filter");p({target:"Array",proto:!0,forced:!b},{filter:function(w){return f(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/array-iteration").find,h=o("../internals/add-to-unscopables"),b="find",g=!0;b in[]&&Array(1)[b](function(){g=!1}),p({target:"Array",proto:!0,forced:g},{find:function(c){return f(this,c,arguments.length>1?arguments[1]:void 0)}}),h(b)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/array-from"),h=o("../internals/check-correctness-of-iteration"),b=!h(function(g){Array.from(g)});p({target:"Array",stat:!0,forced:b},{from:f})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/array-includes").includes,h=o("../internals/add-to-unscopables");p({target:"Array",proto:!0},{includes:function(g){return f(this,g,arguments.length>1?arguments[1]:void 0)}}),h("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(o,_,O){"use strict";var p=o("../internals/to-indexed-object"),f=o("../internals/add-to-unscopables"),h=o("../internals/iterators"),b=o("../internals/internal-state"),g=o("../internals/object-define-property").f,w=o("../internals/define-iterator"),c=o("../internals/is-pure"),v=o("../internals/descriptors"),m="Array Iterator",y=b.set,x=b.getterFor(m);_.exports=w(Array,"Array",function(I,C){y(this,{type:m,target:p(I),index:0,kind:C})},function(){var I=x(this),C=I.target,E=I.kind,k=I.index++;return!C||k>=C.length?(I.target=void 0,{value:void 0,done:!0}):E=="keys"?{value:k,done:!1}:E=="values"?{value:C[k],done:!1}:{value:[k,C[k]],done:!1}},"values");var S=h.Arguments=h.Array;if(f("keys"),f("values"),f("entries"),!c&&v&&S.name!=="values")try{g(S,"name",{value:"values"})}catch(I){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/indexed-object"),b=o("../internals/to-indexed-object"),g=o("../internals/array-method-is-strict"),w=f([].join),c=h!=Object,v=g("join",",");p({target:"Array",proto:!0,forced:c||!v},{join:function(y){return w(b(this),y===void 0?",":y)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/array-iteration").map,h=o("../internals/array-method-has-species-support"),b=h("map");p({target:"Array",proto:!0,forced:!b},{map:function(w){return f(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/is-array"),b=o("../internals/is-constructor"),g=o("../internals/is-object"),w=o("../internals/to-absolute-index"),c=o("../internals/length-of-array-like"),v=o("../internals/to-indexed-object"),m=o("../internals/create-property"),y=o("../internals/well-known-symbol"),x=o("../internals/array-method-has-species-support"),S=o("../internals/array-slice"),I=x("slice"),C=y("species"),E=f.Array,k=Math.max;p({target:"Array",proto:!0,forced:!I},{slice:function(P,K){var B=v(this),R=c(B),j=w(P,R),N=w(K===void 0?R:K,R),$,z,F;if(h(B)&&($=B.constructor,b($)&&($===E||h($.prototype))?$=void 0:g($)&&($=$[C],$===null&&($=void 0)),$===E||$===void 0))return S(B,j,N);for(z=new($===void 0?E:$)(k(N-j,0)),F=0;j<N;j++,F++)j in B&&m(z,F,B[j]);return z.length=F,z}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/a-callable"),b=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/to-string"),c=o("../internals/fails"),v=o("../internals/array-sort"),m=o("../internals/array-method-is-strict"),y=o("../internals/engine-ff-version"),x=o("../internals/engine-is-ie-or-edge"),S=o("../internals/engine-v8-version"),I=o("../internals/engine-webkit-version"),C=[],E=f(C.sort),k=f(C.push),V=c(function(){C.sort(void 0)}),P=c(function(){C.sort(null)}),K=m("sort"),B=!c(function(){if(S)return S<70;if(!(y&&y>3)){if(x)return!0;if(I)return I<603;var N="",$,z,F,M;for($=65;$<76;$++){switch(z=String.fromCharCode($),$){case 66:case 69:case 70:case 72:F=3;break;case 68:case 71:F=4;break;default:F=2}for(M=0;M<47;M++)C.push({k:z+M,v:F})}for(C.sort(function(X,re){return re.v-X.v}),M=0;M<C.length;M++)z=C[M].k.charAt(0),N.charAt(N.length-1)!==z&&(N+=z);return N!=="DGBEFHACIJK"}}),R=V||!P||!K||!B,j=function(N){return function($,z){return z===void 0?-1:$===void 0?1:N!==void 0?+N($,z)||0:w($)>w(z)?1:-1}};p({target:"Array",proto:!0,forced:R},{sort:function($){$!==void 0&&h($);var z=b(this);if(B)return $===void 0?E(z):E(z,$);var F=[],M=g(z),X,re;for(re=0;re<M;re++)re in z&&k(F,z[re]);for(v(F,j($)),X=F.length,re=0;re<X;)z[re]=F[re++];for(;re<M;)delete z[re++];return z}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/to-absolute-index"),b=o("../internals/to-integer-or-infinity"),g=o("../internals/length-of-array-like"),w=o("../internals/to-object"),c=o("../internals/array-species-create"),v=o("../internals/create-property"),m=o("../internals/array-method-has-species-support"),y=m("splice"),x=f.TypeError,S=Math.max,I=Math.min,C=9007199254740991,E="Maximum allowed length exceeded";p({target:"Array",proto:!0,forced:!y},{splice:function(V,P){var K=w(this),B=g(K),R=h(V,B),j=arguments.length,N,$,z,F,M,X;if(j===0?N=$=0:j===1?(N=0,$=B-R):(N=j-2,$=I(S(b(P),0),B-R)),B+N-$>C)throw x(E);for(z=c(K,$),F=0;F<$;F++)M=R+F,M in K&&v(z,F,K[M]);if(z.length=$,N<$){for(F=R;F<B-$;F++)M=F+$,X=F+N,M in K?K[X]=K[M]:delete K[X];for(F=B;F>B-$+N;F--)delete K[F-1]}else if(N>$)for(F=B-$;F>R;F--)M=F+$-1,X=F+N-1,M in K?K[X]=K[M]:delete K[X];for(F=0;F<N;F++)K[F+R]=arguments[F+2];return K.length=B-$+N,z}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/function-name").EXISTS,h=o("../internals/function-uncurry-this"),b=o("../internals/object-define-property").f,g=Function.prototype,w=h(g.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,v=h(c.exec),m="name";p&&!f&&b(g,m,{configurable:!0,get:function(){try{return v(c,w(this))[1]}catch(y){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/get-built-in"),h=o("../internals/function-apply"),b=o("../internals/function-call"),g=o("../internals/function-uncurry-this"),w=o("../internals/fails"),c=o("../internals/is-array"),v=o("../internals/is-callable"),m=o("../internals/is-object"),y=o("../internals/is-symbol"),x=o("../internals/array-slice"),S=o("../internals/native-symbol"),I=f("JSON","stringify"),C=g(/./.exec),E=g("".charAt),k=g("".charCodeAt),V=g("".replace),P=g(1 .toString),K=/[\uD800-\uDFFF]/g,B=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,j=!S||w(function(){var F=f("Symbol")();return I([F])!="[null]"||I({a:F})!="{}"||I(Object(F))!="{}"}),N=w(function(){return I("\uDF06\uD834")!=='"\\udf06\\ud834"'||I("\uDEAD")!=='"\\udead"'}),$=function(F,M){var X=x(arguments),re=M;if(!(!m(M)&&F===void 0||y(F)))return c(M)||(M=function(ne,pe){if(v(re)&&(pe=b(re,this,ne,pe)),!y(pe))return pe}),X[1]=M,h(I,null,X)},z=function(F,M,X){var re=E(X,M-1),ne=E(X,M+1);return C(B,F)&&!C(R,ne)||C(R,F)&&!C(B,re)?"\\u"+P(k(F,0),16):F};I&&p({target:"JSON",stat:!0,forced:j||N},{stringify:function(M,X,re){var ne=x(arguments),pe=h(j?$:I,null,ne);return N&&typeof pe=="string"?V(pe,K,z):pe}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(o,_,O){"use strict";var p=o("../internals/descriptors"),f=o("../internals/global"),h=o("../internals/function-uncurry-this"),b=o("../internals/is-forced"),g=o("../internals/redefine"),w=o("../internals/has-own-property"),c=o("../internals/inherit-if-required"),v=o("../internals/object-is-prototype-of"),m=o("../internals/is-symbol"),y=o("../internals/to-primitive"),x=o("../internals/fails"),S=o("../internals/object-get-own-property-names").f,I=o("../internals/object-get-own-property-descriptor").f,C=o("../internals/object-define-property").f,E=o("../internals/this-number-value"),k=o("../internals/string-trim").trim,V="Number",P=f[V],K=P.prototype,B=f.TypeError,R=h("".slice),j=h("".charCodeAt),N=function(re){var ne=y(re,"number");return typeof ne=="bigint"?ne:$(ne)},$=function(re){var ne=y(re,"number"),pe,ie,Ae,Z,fe,he,be,le;if(m(ne))throw B("Cannot convert a Symbol value to a number");if(typeof ne=="string"&&ne.length>2){if(ne=k(ne),pe=j(ne,0),pe===43||pe===45){if(ie=j(ne,2),ie===88||ie===120)return NaN}else if(pe===48){switch(j(ne,1)){case 66:case 98:Ae=2,Z=49;break;case 79:case 111:Ae=8,Z=55;break;default:return+ne}for(fe=R(ne,2),he=fe.length,be=0;be<he;be++)if(le=j(fe,be),le<48||le>Z)return NaN;return parseInt(fe,Ae)}}return+ne};if(b(V,!P(" 0o1")||!P("0b1")||P("+0x1"))){for(var z=function(ne){var pe=arguments.length<1?0:P(N(ne)),ie=this;return v(K,ie)&&x(function(){E(ie)})?c(Object(pe),ie,z):pe},F=p?S(P):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),M=0,X;F.length>M;M++)w(P,X=F[M])&&!w(z,X)&&C(z,X,I(P,X));z.prototype=K,K.constructor=z,g(f,V,z)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/object-assign");p({target:"Object",stat:!0,forced:Object.assign!==f},{assign:f})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/object-to-array").entries;p({target:"Object",stat:!0},{entries:function(b){return f(b)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/native-symbol"),h=o("../internals/fails"),b=o("../internals/object-get-own-property-symbols"),g=o("../internals/to-object"),w=!f||h(function(){b.f(1)});p({target:"Object",stat:!0,forced:w},{getOwnPropertySymbols:function(v){var m=b.f;return m?m(g(v)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/to-object"),h=o("../internals/object-keys"),b=o("../internals/fails"),g=b(function(){h(1)});p({target:"Object",stat:!0,forced:g},{keys:function(c){return h(f(c))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(o,_,O){var p=o("../internals/to-string-tag-support"),f=o("../internals/redefine"),h=o("../internals/object-to-string");p||f(Object.prototype,"toString",h,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/a-callable"),b=o("../internals/new-promise-capability"),g=o("../internals/perform"),w=o("../internals/iterate"),c=o("../internals/promise-statics-incorrect-iteration");p({target:"Promise",stat:!0,forced:c},{all:function(m){var y=this,x=b.f(y),S=x.resolve,I=x.reject,C=g(function(){var E=h(y.resolve),k=[],V=0,P=1;w(m,function(K){var B=V++,R=!1;P++,f(E,y,K).then(function(j){R||(R=!0,k[B]=j,--P||S(k))},I)}),--P||S(k)});return C.error&&I(C.value),x.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/is-pure"),h=o("../internals/promise-constructor-detection").CONSTRUCTOR,b=o("../internals/promise-native-constructor"),g=o("../internals/get-built-in"),w=o("../internals/is-callable"),c=o("../internals/redefine"),v=b&&b.prototype;if(p({target:"Promise",proto:!0,forced:h,real:!0},{catch:function(y){return this.then(void 0,y)}}),!f&&w(b)){var m=g("Promise").prototype.catch;v.catch!==m&&c(v,"catch",m,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/is-pure"),h=o("../internals/engine-is-node"),b=o("../internals/global"),g=o("../internals/function-call"),w=o("../internals/redefine"),c=o("../internals/redefine-all"),v=o("../internals/object-set-prototype-of"),m=o("../internals/set-to-string-tag"),y=o("../internals/set-species"),x=o("../internals/a-callable"),S=o("../internals/is-callable"),I=o("../internals/is-object"),C=o("../internals/an-instance"),E=o("../internals/species-constructor"),k=o("../internals/task").set,V=o("../internals/microtask"),P=o("../internals/host-report-errors"),K=o("../internals/perform"),B=o("../internals/queue"),R=o("../internals/internal-state"),j=o("../internals/promise-native-constructor"),N=o("../internals/promise-constructor-detection"),$=o("../internals/new-promise-capability"),z="Promise",F=N.CONSTRUCTOR,M=N.REJECTION_EVENT,X=N.SUBCLASSING,re=R.getterFor(z),ne=R.set,pe=j&&j.prototype,ie=j,Ae=pe,Z=b.TypeError,fe=b.document,he=b.process,be=$.f,le=be,ue=!!(fe&&fe.createEvent&&b.dispatchEvent),ve="unhandledrejection",Ee="rejectionhandled",Oe=0,De=1,ce=2,G=1,ye=2,Y,H,Q,J,ee=function(ge){var Be;return I(ge)&&S(Be=ge.then)?Be:!1},W=function(ge,Be){var _e=Be.value,Fe=Be.state==De,Ve=Fe?ge.ok:ge.fail,Xe=ge.resolve,Ye=ge.reject,it=ge.domain,ot,ft,Ct;try{Ve?(Fe||(Be.rejection===ye&&He(Be),Be.rejection=G),Ve===!0?ot=_e:(it&&it.enter(),ot=Ve(_e),it&&(it.exit(),Ct=!0)),ot===ge.promise?Ye(Z("Promise-chain cycle")):(ft=ee(ot))?g(ft,ot,Xe,Ye):Xe(ot)):Ye(_e)}catch(jt){it&&!Ct&&it.exit(),Ye(jt)}},L=function(ge,Be){ge.notified||(ge.notified=!0,V(function(){for(var _e=ge.reactions,Fe;Fe=_e.get();)W(Fe,ge);ge.notified=!1,Be&&!ge.rejection&&de(ge)}))},q=function(ge,Be,_e){var Fe,Ve;ue?(Fe=fe.createEvent("Event"),Fe.promise=Be,Fe.reason=_e,Fe.initEvent(ge,!1,!0),b.dispatchEvent(Fe)):Fe={promise:Be,reason:_e},!M&&(Ve=b["on"+ge])?Ve(Fe):ge===ve&&P("Unhandled promise rejection",_e)},de=function(ge){g(k,b,function(){var Be=ge.facade,_e=ge.value,Fe=Ie(ge),Ve;if(Fe&&(Ve=K(function(){h?he.emit("unhandledRejection",_e,Be):q(ve,Be,_e)}),ge.rejection=h||Ie(ge)?ye:G,Ve.error))throw Ve.value})},Ie=function(ge){return ge.rejection!==G&&!ge.parent},He=function(ge){g(k,b,function(){var Be=ge.facade;h?he.emit("rejectionHandled",Be):q(Ee,Be,ge.value)})},ze=function(ge,Be,_e){return function(Fe){ge(Be,Fe,_e)}},Je=function(ge,Be,_e){ge.done||(ge.done=!0,_e&&(ge=_e),ge.value=Be,ge.state=ce,L(ge,!0))},dt=function(ge,Be,_e){if(!ge.done){ge.done=!0,_e&&(ge=_e);try{if(ge.facade===Be)throw Z("Promise can't be resolved itself");var Fe=ee(Be);Fe?V(function(){var Ve={done:!1};try{g(Fe,Be,ze(dt,Ve,ge),ze(Je,Ve,ge))}catch(Xe){Je(Ve,Xe,ge)}}):(ge.value=Be,ge.state=De,L(ge,!1))}catch(Ve){Je({done:!1},Ve,ge)}}};if(F&&(ie=function(Be){C(this,Ae),x(Be),g(Y,this);var _e=re(this);try{Be(ze(dt,_e),ze(Je,_e))}catch(Fe){Je(_e,Fe)}},Ae=ie.prototype,Y=function(Be){ne(this,{type:z,done:!1,notified:!1,parent:!1,reactions:new B,rejection:!1,state:Oe,value:void 0})},Y.prototype=c(Ae,{then:function(Be,_e){var Fe=re(this),Ve=be(E(this,ie));return Fe.parent=!0,Ve.ok=S(Be)?Be:!0,Ve.fail=S(_e)&&_e,Ve.domain=h?he.domain:void 0,Fe.state==Oe?Fe.reactions.add(Ve):V(function(){W(Ve,Fe)}),Ve.promise}}),H=function(){var ge=new Y,Be=re(ge);this.promise=ge,this.resolve=ze(dt,Be),this.reject=ze(Je,Be)},$.f=be=function(ge){return ge===ie||ge===Q?new H(ge):le(ge)},!f&&S(j)&&pe!==Object.prototype)){J=pe.then,X||w(pe,"then",function(Be,_e){var Fe=this;return new ie(function(Ve,Xe){g(J,Fe,Ve,Xe)}).then(Be,_e)},{unsafe:!0});try{delete pe.constructor}catch(ge){}v&&v(pe,Ae)}p({global:!0,wrap:!0,forced:F},{Promise:ie}),m(ie,z,!1,!0),y(z)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(o,_,O){o("../modules/es.promise.constructor"),o("../modules/es.promise.all"),o("../modules/es.promise.catch"),o("../modules/es.promise.race"),o("../modules/es.promise.reject"),o("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/a-callable"),b=o("../internals/new-promise-capability"),g=o("../internals/perform"),w=o("../internals/iterate"),c=o("../internals/promise-statics-incorrect-iteration");p({target:"Promise",stat:!0,forced:c},{race:function(m){var y=this,x=b.f(y),S=x.reject,I=g(function(){var C=h(y.resolve);w(m,function(E){f(C,y,E).then(x.resolve,S)})});return I.error&&S(I.value),x.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-call"),h=o("../internals/new-promise-capability"),b=o("../internals/promise-constructor-detection").CONSTRUCTOR;p({target:"Promise",stat:!0,forced:b},{reject:function(w){var c=h.f(this);return f(c.reject,void 0,w),c.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/get-built-in"),h=o("../internals/is-pure"),b=o("../internals/promise-native-constructor"),g=o("../internals/promise-constructor-detection").CONSTRUCTOR,w=o("../internals/promise-resolve"),c=f("Promise"),v=h&&!g;p({target:"Promise",stat:!0,forced:h||g},{resolve:function(y){return w(v&&this===c?b:this,y)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(o,_,O){var p=o("../internals/descriptors"),f=o("../internals/global"),h=o("../internals/function-uncurry-this"),b=o("../internals/is-forced"),g=o("../internals/inherit-if-required"),w=o("../internals/create-non-enumerable-property"),c=o("../internals/object-get-own-property-names").f,v=o("../internals/object-is-prototype-of"),m=o("../internals/is-regexp"),y=o("../internals/to-string"),x=o("../internals/regexp-get-flags"),S=o("../internals/regexp-sticky-helpers"),I=o("../internals/proxy-accessor"),C=o("../internals/redefine"),E=o("../internals/fails"),k=o("../internals/has-own-property"),V=o("../internals/internal-state").enforce,P=o("../internals/set-species"),K=o("../internals/well-known-symbol"),B=o("../internals/regexp-unsupported-dot-all"),R=o("../internals/regexp-unsupported-ncg"),j=K("match"),N=f.RegExp,$=N.prototype,z=f.SyntaxError,F=h($.exec),M=h("".charAt),X=h("".replace),re=h("".indexOf),ne=h("".slice),pe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ie=/a/g,Ae=/a/g,Z=new N(ie)!==ie,fe=S.MISSED_STICKY,he=S.UNSUPPORTED_Y,be=p&&(!Z||fe||B||R||E(function(){return Ae[j]=!1,N(ie)!=ie||N(Ae)==Ae||N(ie,"i")!="/a/i"})),le=function(De){for(var ce=De.length,G=0,ye="",Y=!1,H;G<=ce;G++){if(H=M(De,G),H==="\\"){ye+=H+M(De,++G);continue}!Y&&H==="."?ye+="[\\s\\S]":(H==="["?Y=!0:H==="]"&&(Y=!1),ye+=H)}return ye},ue=function(De){for(var ce=De.length,G=0,ye="",Y=[],H={},Q=!1,J=!1,ee=0,W="",L;G<=ce;G++){if(L=M(De,G),L==="\\")L=L+M(De,++G);else if(L==="]")Q=!1;else if(!Q)switch(!0){case L==="[":Q=!0;break;case L==="(":F(pe,ne(De,G+1))&&(G+=2,J=!0),ye+=L,ee++;continue;case(L===">"&&J):if(W===""||k(H,W))throw new z("Invalid capture group name");H[W]=!0,Y[Y.length]=[W,ee],J=!1,W="";continue}J?W+=L:ye+=L}return[ye,Y]};if(b("RegExp",be)){for(var ve=function(ce,G){var ye=v($,this),Y=m(ce),H=G===void 0,Q=[],J=ce,ee,W,L,q,de,Ie;if(!ye&&Y&&H&&ce.constructor===ve)return ce;if((Y||v($,ce))&&(ce=ce.source,H&&(G=x(J))),ce=ce===void 0?"":y(ce),G=G===void 0?"":y(G),J=ce,B&&"dotAll"in ie&&(W=!!G&&re(G,"s")>-1,W&&(G=X(G,/s/g,""))),ee=G,fe&&"sticky"in ie&&(L=!!G&&re(G,"y")>-1,L&&he&&(G=X(G,/y/g,""))),R&&(q=ue(ce),ce=q[0],Q=q[1]),de=g(N(ce,G),ye?this:$,ve),(W||L||Q.length)&&(Ie=V(de),W&&(Ie.dotAll=!0,Ie.raw=ve(le(ce),ee)),L&&(Ie.sticky=!0),Q.length&&(Ie.groups=Q)),ce!==J)try{w(de,"source",J===""?"(?:)":J)}catch(He){}return de},Ee=c(N),Oe=0;Ee.length>Oe;)I(ve,N,Ee[Oe++]);$.constructor=ve,ve.prototype=$,C(f,"RegExp",ve)}P("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/regexp-exec");p({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(o,_,O){"use strict";var p=o("../internals/function-name").PROPER,f=o("../internals/redefine"),h=o("../internals/an-object"),b=o("../internals/to-string"),g=o("../internals/fails"),w=o("../internals/regexp-get-flags"),c="toString",v=RegExp.prototype,m=v[c],y=g(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),x=p&&m.name!=c;(y||x)&&f(RegExp.prototype,c,function(){var I=h(this),C=b(I.source),E=b(w(I));return"/"+C+"/"+E},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/function-uncurry-this"),h=o("../internals/not-a-regexp"),b=o("../internals/require-object-coercible"),g=o("../internals/to-string"),w=o("../internals/correct-is-regexp-logic"),c=f("".indexOf);p({target:"String",proto:!0,forced:!w("includes")},{includes:function(m){return!!~c(g(b(this)),g(h(m)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(o,_,O){"use strict";var p=o("../internals/string-multibyte").charAt,f=o("../internals/to-string"),h=o("../internals/internal-state"),b=o("../internals/define-iterator"),g="String Iterator",w=h.set,c=h.getterFor(g);b(String,"String",function(v){w(this,{type:g,string:f(v),index:0})},function(){var m=c(this),y=m.string,x=m.index,S;return x>=y.length?{value:void 0,done:!0}:(S=p(y,x),m.index+=S.length,{value:S,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(o,_,O){"use strict";var p=o("../internals/function-call"),f=o("../internals/fix-regexp-well-known-symbol-logic"),h=o("../internals/an-object"),b=o("../internals/to-length"),g=o("../internals/to-string"),w=o("../internals/require-object-coercible"),c=o("../internals/get-method"),v=o("../internals/advance-string-index"),m=o("../internals/regexp-exec-abstract");f("match",function(y,x,S){return[function(C){var E=w(this),k=C==null?void 0:c(C,y);return k?p(k,C,E):new RegExp(C)[y](g(E))},function(I){var C=h(this),E=g(I),k=S(x,C,E);if(k.done)return k.value;if(!C.global)return m(C,E);var V=C.unicode;C.lastIndex=0;for(var P=[],K=0,B;(B=m(C,E))!==null;){var R=g(B[0]);P[K]=R,R===""&&(C.lastIndex=v(E,b(C.lastIndex),V)),K++}return K===0?null:P}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(o,_,O){"use strict";var p=o("../internals/function-apply"),f=o("../internals/function-call"),h=o("../internals/function-uncurry-this"),b=o("../internals/fix-regexp-well-known-symbol-logic"),g=o("../internals/fails"),w=o("../internals/an-object"),c=o("../internals/is-callable"),v=o("../internals/to-integer-or-infinity"),m=o("../internals/to-length"),y=o("../internals/to-string"),x=o("../internals/require-object-coercible"),S=o("../internals/advance-string-index"),I=o("../internals/get-method"),C=o("../internals/get-substitution"),E=o("../internals/regexp-exec-abstract"),k=o("../internals/well-known-symbol"),V=k("replace"),P=Math.max,K=Math.min,B=h([].concat),R=h([].push),j=h("".indexOf),N=h("".slice),$=function(X){return X===void 0?X:String(X)},z=function(){return"a".replace(/./,"$0")==="$0"}(),F=function(){return/./[V]?/./[V]("a","$0")==="":!1}(),M=!g(function(){var X=/./;return X.exec=function(){var re=[];return re.groups={a:"7"},re},"".replace(X,"$<a>")!=="7"});b("replace",function(X,re,ne){var pe=F?"$":"$0";return[function(Ae,Z){var fe=x(this),he=Ae==null?void 0:I(Ae,V);return he?f(he,Ae,fe,Z):f(re,y(fe),Ae,Z)},function(ie,Ae){var Z=w(this),fe=y(ie);if(typeof Ae=="string"&&j(Ae,pe)===-1&&j(Ae,"$<")===-1){var he=ne(re,Z,fe,Ae);if(he.done)return he.value}var be=c(Ae);be||(Ae=y(Ae));var le=Z.global;if(le){var ue=Z.unicode;Z.lastIndex=0}for(var ve=[];;){var Ee=E(Z,fe);if(Ee===null||(R(ve,Ee),!le))break;var Oe=y(Ee[0]);Oe===""&&(Z.lastIndex=S(fe,m(Z.lastIndex),ue))}for(var De="",ce=0,G=0;G<ve.length;G++){Ee=ve[G];for(var ye=y(Ee[0]),Y=P(K(v(Ee.index),fe.length),0),H=[],Q=1;Q<Ee.length;Q++)R(H,$(Ee[Q]));var J=Ee.groups;if(be){var ee=B([ye],H,Y,fe);J!==void 0&&R(ee,J);var W=y(p(Ae,void 0,ee))}else W=C(ye,fe,Y,H,J,Ae);Y>=ce&&(De+=N(fe,ce,Y)+W,ce=Y+ye.length)}return De+N(fe,ce)}]},!M||!z||F)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(o,_,O){"use strict";var p=o("../internals/function-call"),f=o("../internals/fix-regexp-well-known-symbol-logic"),h=o("../internals/an-object"),b=o("../internals/require-object-coercible"),g=o("../internals/same-value"),w=o("../internals/to-string"),c=o("../internals/get-method"),v=o("../internals/regexp-exec-abstract");f("search",function(m,y,x){return[function(I){var C=b(this),E=I==null?void 0:c(I,m);return E?p(E,I,C):new RegExp(I)[m](w(C))},function(S){var I=h(this),C=w(S),E=x(y,I,C);if(E.done)return E.value;var k=I.lastIndex;g(k,0)||(I.lastIndex=0);var V=v(I,C);return g(I.lastIndex,k)||(I.lastIndex=k),V===null?-1:V.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(o,_,O){"use strict";var p=o("../internals/function-apply"),f=o("../internals/function-call"),h=o("../internals/function-uncurry-this"),b=o("../internals/fix-regexp-well-known-symbol-logic"),g=o("../internals/is-regexp"),w=o("../internals/an-object"),c=o("../internals/require-object-coercible"),v=o("../internals/species-constructor"),m=o("../internals/advance-string-index"),y=o("../internals/to-length"),x=o("../internals/to-string"),S=o("../internals/get-method"),I=o("../internals/array-slice-simple"),C=o("../internals/regexp-exec-abstract"),E=o("../internals/regexp-exec"),k=o("../internals/regexp-sticky-helpers"),V=o("../internals/fails"),P=k.UNSUPPORTED_Y,K=4294967295,B=Math.min,R=[].push,j=h(/./.exec),N=h(R),$=h("".slice),z=!V(function(){var F=/(?:)/,M=F.exec;F.exec=function(){return M.apply(this,arguments)};var X="ab".split(F);return X.length!==2||X[0]!=="a"||X[1]!=="b"});b("split",function(F,M,X){var re;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?re=function(ne,pe){var ie=x(c(this)),Ae=pe===void 0?K:pe>>>0;if(Ae===0)return[];if(ne===void 0)return[ie];if(!g(ne))return f(M,ie,ne,Ae);for(var Z=[],fe=(ne.ignoreCase?"i":"")+(ne.multiline?"m":"")+(ne.unicode?"u":"")+(ne.sticky?"y":""),he=0,be=new RegExp(ne.source,fe+"g"),le,ue,ve;(le=f(E,be,ie))&&(ue=be.lastIndex,!(ue>he&&(N(Z,$(ie,he,le.index)),le.length>1&&le.index<ie.length&&p(R,Z,I(le,1)),ve=le[0].length,he=ue,Z.length>=Ae)));)be.lastIndex===le.index&&be.lastIndex++;return he===ie.length?(ve||!j(be,""))&&N(Z,""):N(Z,$(ie,he)),Z.length>Ae?I(Z,0,Ae):Z}:"0".split(void 0,0).length?re=function(ne,pe){return ne===void 0&&pe===0?[]:f(M,this,ne,pe)}:re=M,[function(pe,ie){var Ae=c(this),Z=pe==null?void 0:S(pe,F);return Z?f(Z,pe,Ae,ie):f(re,x(Ae),pe,ie)},function(ne,pe){var ie=w(this),Ae=x(ne),Z=X(re,ie,Ae,pe,re!==M);if(Z.done)return Z.value;var fe=v(ie,RegExp),he=ie.unicode,be=(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")+(P?"g":"y"),le=new fe(P?"^(?:"+ie.source+")":ie,be),ue=pe===void 0?K:pe>>>0;if(ue===0)return[];if(Ae.length===0)return C(le,Ae)===null?[Ae]:[];for(var ve=0,Ee=0,Oe=[];Ee<Ae.length;){le.lastIndex=P?0:Ee;var De=C(le,P?$(Ae,Ee):Ae),ce;if(De===null||(ce=B(y(le.lastIndex+(P?Ee:0)),Ae.length))===ve)Ee=m(Ae,Ee,he);else{if(N(Oe,$(Ae,ve,Ee)),Oe.length===ue)return Oe;for(var G=1;G<=De.length-1;G++)if(N(Oe,De[G]),Oe.length===ue)return Oe;Ee=ve=ce}}return N(Oe,$(Ae,ve)),Oe}]},!z,P)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/string-trim").trim,h=o("../internals/string-trim-forced");p({target:"String",proto:!0,forced:h("trim")},{trim:function(){return f(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/global"),h=o("../internals/function-call"),b=o("../internals/function-uncurry-this"),g=o("../internals/is-pure"),w=o("../internals/descriptors"),c=o("../internals/native-symbol"),v=o("../internals/fails"),m=o("../internals/has-own-property"),y=o("../internals/object-is-prototype-of"),x=o("../internals/an-object"),S=o("../internals/to-indexed-object"),I=o("../internals/to-property-key"),C=o("../internals/to-string"),E=o("../internals/create-property-descriptor"),k=o("../internals/object-create"),V=o("../internals/object-keys"),P=o("../internals/object-get-own-property-names"),K=o("../internals/object-get-own-property-names-external"),B=o("../internals/object-get-own-property-symbols"),R=o("../internals/object-get-own-property-descriptor"),j=o("../internals/object-define-property"),N=o("../internals/object-define-properties"),$=o("../internals/object-property-is-enumerable"),z=o("../internals/redefine"),F=o("../internals/shared"),M=o("../internals/shared-key"),X=o("../internals/hidden-keys"),re=o("../internals/uid"),ne=o("../internals/well-known-symbol"),pe=o("../internals/well-known-symbol-wrapped"),ie=o("../internals/define-well-known-symbol"),Ae=o("../internals/symbol-define-to-primitive"),Z=o("../internals/set-to-string-tag"),fe=o("../internals/internal-state"),he=o("../internals/array-iteration").forEach,be=M("hidden"),le="Symbol",ue="prototype",ve=fe.set,Ee=fe.getterFor(le),Oe=Object[ue],De=f.Symbol,ce=De&&De[ue],G=f.TypeError,ye=f.QObject,Y=R.f,H=j.f,Q=K.f,J=$.f,ee=b([].push),W=F("symbols"),L=F("op-symbols"),q=F("wks"),de=!ye||!ye[ue]||!ye[ue].findChild,Ie=w&&v(function(){return k(H({},"a",{get:function(){return H(this,"a",{value:7}).a}})).a!=7})?function(Ve,Xe,Ye){var it=Y(Oe,Xe);it&&delete Oe[Xe],H(Ve,Xe,Ye),it&&Ve!==Oe&&H(Oe,Xe,it)}:H,He=function(Ve,Xe){var Ye=W[Ve]=k(ce);return ve(Ye,{type:le,tag:Ve,description:Xe}),w||(Ye.description=Xe),Ye},ze=function(Xe,Ye,it){Xe===Oe&&ze(L,Ye,it),x(Xe);var ot=I(Ye);return x(it),m(W,ot)?(it.enumerable?(m(Xe,be)&&Xe[be][ot]&&(Xe[be][ot]=!1),it=k(it,{enumerable:E(0,!1)})):(m(Xe,be)||H(Xe,be,E(1,{})),Xe[be][ot]=!0),Ie(Xe,ot,it)):H(Xe,ot,it)},Je=function(Xe,Ye){x(Xe);var it=S(Ye),ot=V(it).concat(Fe(it));return he(ot,function(ft){(!w||h(ge,it,ft))&&ze(Xe,ft,it[ft])}),Xe},dt=function(Xe,Ye){return Ye===void 0?k(Xe):Je(k(Xe),Ye)},ge=function(Xe){var Ye=I(Xe),it=h(J,this,Ye);return this===Oe&&m(W,Ye)&&!m(L,Ye)?!1:it||!m(this,Ye)||!m(W,Ye)||m(this,be)&&this[be][Ye]?it:!0},Be=function(Xe,Ye){var it=S(Xe),ot=I(Ye);if(!(it===Oe&&m(W,ot)&&!m(L,ot))){var ft=Y(it,ot);return ft&&m(W,ot)&&!(m(it,be)&&it[be][ot])&&(ft.enumerable=!0),ft}},_e=function(Xe){var Ye=Q(S(Xe)),it=[];return he(Ye,function(ot){!m(W,ot)&&!m(X,ot)&&ee(it,ot)}),it},Fe=function(Ve){var Xe=Ve===Oe,Ye=Q(Xe?L:S(Ve)),it=[];return he(Ye,function(ot){m(W,ot)&&(!Xe||m(Oe,ot))&&ee(it,W[ot])}),it};c||(De=function(){if(y(ce,this))throw G("Symbol is not a constructor");var Xe=!arguments.length||arguments[0]===void 0?void 0:C(arguments[0]),Ye=re(Xe),it=function(ot){this===Oe&&h(it,L,ot),m(this,be)&&m(this[be],Ye)&&(this[be][Ye]=!1),Ie(this,Ye,E(1,ot))};return w&&de&&Ie(Oe,Ye,{configurable:!0,set:it}),He(Ye,Xe)},ce=De[ue],z(ce,"toString",function(){return Ee(this).tag}),z(De,"withoutSetter",function(Ve){return He(re(Ve),Ve)}),$.f=ge,j.f=ze,N.f=Je,R.f=Be,P.f=K.f=_e,B.f=Fe,pe.f=function(Ve){return He(ne(Ve),Ve)},w&&(H(ce,"description",{configurable:!0,get:function(){return Ee(this).description}}),g||z(Oe,"propertyIsEnumerable",ge,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:De}),he(V(q),function(Ve){ie(Ve)}),p({target:le,stat:!0,forced:!c},{useSetter:function(){de=!0},useSimple:function(){de=!1}}),p({target:"Object",stat:!0,forced:!c,sham:!w},{create:dt,defineProperty:ze,defineProperties:Je,getOwnPropertyDescriptor:Be}),p({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:_e}),Ae(),Z(De,le),X[be]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(o,_,O){"use strict";var p=o("../internals/export"),f=o("../internals/descriptors"),h=o("../internals/global"),b=o("../internals/function-uncurry-this"),g=o("../internals/has-own-property"),w=o("../internals/is-callable"),c=o("../internals/object-is-prototype-of"),v=o("../internals/to-string"),m=o("../internals/object-define-property").f,y=o("../internals/copy-constructor-properties"),x=h.Symbol,S=x&&x.prototype;if(f&&w(x)&&(!("description"in S)||x().description!==void 0)){var I={},C=function(){var j=arguments.length<1||arguments[0]===void 0?void 0:v(arguments[0]),N=c(S,this)?new x(j):j===void 0?x():x(j);return j===""&&(I[N]=!0),N};y(C,x),C.prototype=S,S.constructor=C;var E=String(x("test"))=="Symbol(test)",k=b(S.toString),V=b(S.valueOf),P=/^Symbol\((.*)\)[^)]+$/,K=b("".replace),B=b("".slice);m(S,"description",{configurable:!0,get:function(){var j=V(this),N=k(j);if(g(I,j))return"";var $=E?B(N,7,-1):K(N,P,"$1");return $===""?void 0:$}}),p({global:!0,forced:!0},{Symbol:C})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/get-built-in"),h=o("../internals/has-own-property"),b=o("../internals/to-string"),g=o("../internals/shared"),w=o("../internals/native-symbol-registry"),c=g("string-to-symbol-registry"),v=g("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!w},{for:function(m){var y=b(m);if(h(c,y))return c[y];var x=f("Symbol")(y);return c[y]=x,v[x]=y,x}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(o,_,O){var p=o("../internals/define-well-known-symbol");p("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(o,_,O){o("../modules/es.symbol.constructor"),o("../modules/es.symbol.for"),o("../modules/es.symbol.key-for"),o("../modules/es.json.stringify"),o("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(o,_,O){var p=o("../internals/export"),f=o("../internals/has-own-property"),h=o("../internals/is-symbol"),b=o("../internals/try-to-string"),g=o("../internals/shared"),w=o("../internals/native-symbol-registry"),c=g("symbol-to-string-registry");p({target:"Symbol",stat:!0,forced:!w},{keyFor:function(m){if(!h(m))throw TypeError(b(m)+" is not a symbol");if(f(c,m))return c[m]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(o,_,O){"use strict";var p=o("../internals/function-uncurry-this"),f=o("../internals/array-buffer-view-core"),h=o("../internals/array-copy-within"),b=p(h),g=f.aTypedArray,w=f.exportTypedArrayMethod;w("copyWithin",function(v,m){return b(g(this),v,m,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").every,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("every",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/function-call"),h=o("../internals/array-fill"),b=p.aTypedArray,g=p.exportTypedArrayMethod;g("fill",function(c){var v=arguments.length;return f(h,b(this),c,v>1?arguments[1]:void 0,v>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").filter,h=o("../internals/typed-array-from-species-and-list"),b=p.aTypedArray,g=p.exportTypedArrayMethod;g("filter",function(c){var v=f(b(this),c,arguments.length>1?arguments[1]:void 0);return h(this,v)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").findIndex,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("findIndex",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").find,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("find",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").forEach,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("forEach",function(w){f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-includes").includes,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("includes",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-includes").indexOf,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("indexOf",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(o,_,O){"use strict";var p=o("../internals/global"),f=o("../internals/fails"),h=o("../internals/function-uncurry-this"),b=o("../internals/array-buffer-view-core"),g=o("../modules/es.array.iterator"),w=o("../internals/well-known-symbol"),c=w("iterator"),v=p.Uint8Array,m=h(g.values),y=h(g.keys),x=h(g.entries),S=b.aTypedArray,I=b.exportTypedArrayMethod,C=v&&v.prototype,E=!f(function(){C[c].call([1])}),k=!!C&&C.values&&C[c]===C.values&&C.values.name==="values",V=function(){return m(S(this))};I("entries",function(){return x(S(this))},E),I("keys",function(){return y(S(this))},E),I("values",V,E||!k,{name:"values"}),I(c,V,E||!k,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/function-uncurry-this"),h=p.aTypedArray,b=p.exportTypedArrayMethod,g=f([].join);b("join",function(c){return g(h(this),c)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/function-apply"),h=o("../internals/array-last-index-of"),b=p.aTypedArray,g=p.exportTypedArrayMethod;g("lastIndexOf",function(c){var v=arguments.length;return f(h,b(this),v>1?[c,arguments[1]]:[c])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").map,h=o("../internals/typed-array-species-constructor"),b=p.aTypedArray,g=p.exportTypedArrayMethod;g("map",function(c){return f(b(this),c,arguments.length>1?arguments[1]:void 0,function(v,m){return new(h(v))(m)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-reduce").right,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("reduceRight",function(w){var c=arguments.length;return f(h(this),w,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-reduce").left,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("reduce",function(w){var c=arguments.length;return f(h(this),w,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=p.aTypedArray,h=p.exportTypedArrayMethod,b=Math.floor;h("reverse",function(){for(var w=this,c=f(w).length,v=b(c/2),m=0,y;m<v;)y=w[m],w[m++]=w[--c],w[c]=y;return w})},{"../internals/array-buffer-view-core":103}],331:[function(o,_,O){"use strict";var p=o("../internals/global"),f=o("../internals/function-call"),h=o("../internals/array-buffer-view-core"),b=o("../internals/length-of-array-like"),g=o("../internals/to-offset"),w=o("../internals/to-object"),c=o("../internals/fails"),v=p.RangeError,m=p.Int8Array,y=m&&m.prototype,x=y&&y.set,S=h.aTypedArray,I=h.exportTypedArrayMethod,C=!c(function(){var k=new Uint8ClampedArray(2);return f(x,k,{length:1,0:3},1),k[1]!==3}),E=C&&h.NATIVE_ARRAY_BUFFER_VIEWS&&c(function(){var k=new m(2);return k.set(1),k.set("2",1),k[0]!==0||k[1]!==2});I("set",function(V){S(this);var P=g(arguments.length>1?arguments[1]:void 0,1),K=w(V);if(C)return f(x,this,K,P);var B=this.length,R=b(K),j=0;if(R+P>B)throw v("Wrong length");for(;j<R;)this[P+j]=K[j++]},!C||E)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/typed-array-species-constructor"),h=o("../internals/fails"),b=o("../internals/array-slice"),g=p.aTypedArray,w=p.exportTypedArrayMethod,c=h(function(){new Int8Array(1).slice()});w("slice",function(m,y){for(var x=b(g(this),m,y),S=f(this),I=0,C=x.length,E=new S(C);C>I;)E[I]=x[I++];return E},c)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/array-iteration").some,h=p.aTypedArray,b=p.exportTypedArrayMethod;b("some",function(w){return f(h(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(o,_,O){"use strict";var p=o("../internals/global"),f=o("../internals/function-uncurry-this"),h=o("../internals/fails"),b=o("../internals/a-callable"),g=o("../internals/array-sort"),w=o("../internals/array-buffer-view-core"),c=o("../internals/engine-ff-version"),v=o("../internals/engine-is-ie-or-edge"),m=o("../internals/engine-v8-version"),y=o("../internals/engine-webkit-version"),x=w.aTypedArray,S=w.exportTypedArrayMethod,I=p.Uint16Array,C=I&&f(I.prototype.sort),E=!!C&&!(h(function(){C(new I(2),null)})&&h(function(){C(new I(2),{})})),k=!!C&&!h(function(){if(m)return m<74;if(c)return c<67;if(v)return!0;if(y)return y<602;var P=new I(516),K=Array(516),B,R;for(B=0;B<516;B++)R=B%4,P[B]=515-B,K[B]=B-2*R+3;for(C(P,function(j,N){return(j/4|0)-(N/4|0)}),B=0;B<516;B++)if(P[B]!==K[B])return!0}),V=function(P){return function(K,B){return P!==void 0?+P(K,B)||0:B!==B?-1:K!==K?1:K===0&&B===0?1/K>0&&1/B<0?1:-1:K>B}};S("sort",function(K){return K!==void 0&&b(K),k?C(this,K):g(x(this),V(K))},!k||E)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core"),f=o("../internals/to-length"),h=o("../internals/to-absolute-index"),b=o("../internals/typed-array-species-constructor"),g=p.aTypedArray,w=p.exportTypedArrayMethod;w("subarray",function(v,m){var y=g(this),x=y.length,S=h(v,x),I=b(y);return new I(y.buffer,y.byteOffset+S*y.BYTES_PER_ELEMENT,f((m===void 0?x:h(m,x))-S))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(o,_,O){"use strict";var p=o("../internals/global"),f=o("../internals/function-apply"),h=o("../internals/array-buffer-view-core"),b=o("../internals/fails"),g=o("../internals/array-slice"),w=p.Int8Array,c=h.aTypedArray,v=h.exportTypedArrayMethod,m=[].toLocaleString,y=!!w&&b(function(){m.call(new w(1))}),x=b(function(){return[1,2].toLocaleString()!=new w([1,2]).toLocaleString()})||!b(function(){w.prototype.toLocaleString.call([1,2])});v("toLocaleString",function(){return f(m,y?g(c(this)):c(this),g(arguments))},x)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(o,_,O){"use strict";var p=o("../internals/array-buffer-view-core").exportTypedArrayMethod,f=o("../internals/fails"),h=o("../internals/global"),b=o("../internals/function-uncurry-this"),g=h.Uint8Array,w=g&&g.prototype||{},c=[].toString,v=b([].join);f(function(){c.call({})})&&(c=function(){return v(this)});var m=w.toString!=c;p("toString",c,m)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(o,_,O){var p=o("../internals/typed-array-constructor");p("Uint8",function(f){return function(b,g,w){return f(this,b,g,w)}})},{"../internals/typed-array-constructor":258}],339:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/dom-iterables"),h=o("../internals/dom-token-list-prototype"),b=o("../internals/array-for-each"),g=o("../internals/create-non-enumerable-property"),w=function(v){if(v&&v.forEach!==b)try{g(v,"forEach",b)}catch(m){v.forEach=b}};for(var c in f)f[c]&&w(p[c]&&p[c].prototype);w(h)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(o,_,O){var p=o("../internals/global"),f=o("../internals/dom-iterables"),h=o("../internals/dom-token-list-prototype"),b=o("../modules/es.array.iterator"),g=o("../internals/create-non-enumerable-property"),w=o("../internals/well-known-symbol"),c=w("iterator"),v=w("toStringTag"),m=b.values,y=function(S,I){if(S){if(S[c]!==m)try{g(S,c,m)}catch(E){S[c]=m}if(S[v]||g(S,v,I),f[I]){for(var C in b)if(S[C]!==b[C])try{g(S,C,b[C])}catch(E){S[C]=b[C]}}}};for(var x in f)y(p[x]&&p[x].prototype,x);y(h,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(o,_,O){function p(k){return Array.isArray?Array.isArray(k):E(k)==="[object Array]"}O.isArray=p;function f(k){return typeof k=="boolean"}O.isBoolean=f;function h(k){return k===null}O.isNull=h;function b(k){return k==null}O.isNullOrUndefined=b;function g(k){return typeof k=="number"}O.isNumber=g;function w(k){return typeof k=="string"}O.isString=w;function c(k){return typeof k=="symbol"}O.isSymbol=c;function v(k){return k===void 0}O.isUndefined=v;function m(k){return E(k)==="[object RegExp]"}O.isRegExp=m;function y(k){return typeof k=="object"&&k!==null}O.isObject=y;function x(k){return E(k)==="[object Date]"}O.isDate=x;function S(k){return E(k)==="[object Error]"||k instanceof Error}O.isError=S;function I(k){return typeof k=="function"}O.isFunction=I;function C(k){return k===null||typeof k=="boolean"||typeof k=="number"||typeof k=="string"||typeof k=="symbol"||typeof k=="undefined"}O.isPrimitive=C,O.isBuffer=o("buffer").Buffer.isBuffer;function E(k){return Object.prototype.toString.call(k)}},{buffer:90}],342:[function(o,_,O){(function(p){"use strict";var f=function(){var c=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g;return function(y,x,S,I){if(arguments.length===1&&w(y)==="string"&&!/\d/.test(y)&&(x=y,y=void 0),y=y||new Date,y instanceof Date||(y=new Date(y)),isNaN(y))throw TypeError("Invalid date");x=String(f.masks[x]||x||f.masks.default);var C=x.slice(0,4);(C==="UTC:"||C==="GMT:")&&(x=x.slice(4),S=!0,C==="GMT:"&&(I=!0));var E=S?"getUTC":"get",k=y[E+"Date"](),V=y[E+"Day"](),P=y[E+"Month"](),K=y[E+"FullYear"](),B=y[E+"Hours"](),R=y[E+"Minutes"](),j=y[E+"Seconds"](),N=y[E+"Milliseconds"](),$=S?0:y.getTimezoneOffset(),z=b(y),F=g(y),M={d:k,dd:h(k),ddd:f.i18n.dayNames[V],dddd:f.i18n.dayNames[V+7],m:P+1,mm:h(P+1),mmm:f.i18n.monthNames[P],mmmm:f.i18n.monthNames[P+12],yy:String(K).slice(2),yyyy:K,h:B%12||12,hh:h(B%12||12),H:B,HH:h(B),M:R,MM:h(R),s:j,ss:h(j),l:h(N,3),L:h(Math.round(N/10)),t:B<12?"a":"p",tt:B<12?"am":"pm",T:B<12?"A":"P",TT:B<12?"AM":"PM",Z:I?"GMT":S?"UTC":(String(y).match(v)||[""]).pop().replace(m,""),o:($>0?"-":"+")+h(Math.floor(Math.abs($)/60)*100+Math.abs($)%60,4),S:["th","st","nd","rd"][k%10>3?0:(k%100-k%10!=10)*k%10],W:z,N:F};return x.replace(c,function(X){return X in M?M[X]:X.slice(1,X.length-1)})}}();f.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},f.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function h(c,v){for(c=String(c),v=v||2;c.length<v;)c="0"+c;return c}function b(c){var v=new Date(c.getFullYear(),c.getMonth(),c.getDate());v.setDate(v.getDate()-(v.getDay()+6)%7+3);var m=new Date(v.getFullYear(),0,4);m.setDate(m.getDate()-(m.getDay()+6)%7+3);var y=v.getTimezoneOffset()-m.getTimezoneOffset();v.setHours(v.getHours()-y);var x=(v-m)/(864e5*7);return 1+Math.floor(x)}function g(c){var v=c.getDay();return v===0&&(v=7),v}function w(c){return c===null?"null":c===void 0?"undefined":typeof c!="object"?typeof c:Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()}typeof je=="function"&&je.amd?je(function(){return f}):typeof O=="object"?_.exports=f:p.dateFormat=f})(this)},{}],343:[function(o,_,O){"use strict";var p=/["'&<>]/;_.exports=f;function f(h){var b=""+h,g=p.exec(b);if(!g)return b;var w,c="",v=0,m=0;for(v=g.index;v<b.length;v++){switch(b.charCodeAt(v)){case 34:w=""";break;case 38:w="&";break;case 39:w="'";break;case 60:w="<";break;case 62:w=">";break;default:continue}m!==v&&(c+=b.substring(m,v)),m=v+1,c+=w}return m!==v?c+b.substring(m,v):c}},{}],344:[function(o,_,O){"use strict";var p=typeof Reflect=="object"?Reflect:null,f=p&&typeof p.apply=="function"?p.apply:function(j,N,$){return Function.prototype.apply.call(j,N,$)},h;p&&typeof p.ownKeys=="function"?h=p.ownKeys:Object.getOwnPropertySymbols?h=function(j){return Object.getOwnPropertyNames(j).concat(Object.getOwnPropertySymbols(j))}:h=function(j){return Object.getOwnPropertyNames(j)};function b(R){console&&console.warn&&console.warn(R)}var g=Number.isNaN||function(j){return j!==j};function w(){w.init.call(this)}_.exports=w,_.exports.once=P,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var c=10;function v(R){if(typeof R!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof R)}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(R){if(typeof R!="number"||R<0||g(R))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+R+".");c=R}}),w.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(j){if(typeof j!="number"||j<0||g(j))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+j+".");return this._maxListeners=j,this};function m(R){return R._maxListeners===void 0?w.defaultMaxListeners:R._maxListeners}w.prototype.getMaxListeners=function(){return m(this)},w.prototype.emit=function(j){for(var N=[],$=1;$<arguments.length;$++)N.push(arguments[$]);var z=j==="error",F=this._events;if(F!==void 0)z=z&&F.error===void 0;else if(!z)return!1;if(z){var M;if(N.length>0&&(M=N[0]),M instanceof Error)throw M;var X=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw X.context=M,X}var re=F[j];if(re===void 0)return!1;if(typeof re=="function")f(re,this,N);else for(var ne=re.length,pe=E(re,ne),$=0;$<ne;++$)f(pe[$],this,N);return!0};function y(R,j,N,$){var z,F,M;if(v(N),F=R._events,F===void 0?(F=R._events=Object.create(null),R._eventsCount=0):(F.newListener!==void 0&&(R.emit("newListener",j,N.listener?N.listener:N),F=R._events),M=F[j]),M===void 0)M=F[j]=N,++R._eventsCount;else if(typeof M=="function"?M=F[j]=$?[N,M]:[M,N]:$?M.unshift(N):M.push(N),z=m(R),z>0&&M.length>z&&!M.warned){M.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(j)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=R,X.type=j,X.count=M.length,b(X)}return R}w.prototype.addListener=function(j,N){return y(this,j,N,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(j,N){return y(this,j,N,!0)};function x(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(R,j,N){var $={fired:!1,wrapFn:void 0,target:R,type:j,listener:N},z=x.bind($);return z.listener=N,$.wrapFn=z,z}w.prototype.once=function(j,N){return v(N),this.on(j,S(this,j,N)),this},w.prototype.prependOnceListener=function(j,N){return v(N),this.prependListener(j,S(this,j,N)),this},w.prototype.removeListener=function(j,N){var $,z,F,M,X;if(v(N),z=this._events,z===void 0)return this;if($=z[j],$===void 0)return this;if($===N||$.listener===N)--this._eventsCount===0?this._events=Object.create(null):(delete z[j],z.removeListener&&this.emit("removeListener",j,$.listener||N));else if(typeof $!="function"){for(F=-1,M=$.length-1;M>=0;M--)if($[M]===N||$[M].listener===N){X=$[M].listener,F=M;break}if(F<0)return this;F===0?$.shift():k($,F),$.length===1&&(z[j]=$[0]),z.removeListener!==void 0&&this.emit("removeListener",j,X||N)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(j){var N,$,z;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[j]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[j]),this;if(arguments.length===0){var F=Object.keys($),M;for(z=0;z<F.length;++z)M=F[z],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(N=$[j],typeof N=="function")this.removeListener(j,N);else if(N!==void 0)for(z=N.length-1;z>=0;z--)this.removeListener(j,N[z]);return this};function I(R,j,N){var $=R._events;if($===void 0)return[];var z=$[j];return z===void 0?[]:typeof z=="function"?N?[z.listener||z]:[z]:N?V(z):E(z,z.length)}w.prototype.listeners=function(j){return I(this,j,!0)},w.prototype.rawListeners=function(j){return I(this,j,!1)},w.listenerCount=function(R,j){return typeof R.listenerCount=="function"?R.listenerCount(j):C.call(R,j)},w.prototype.listenerCount=C;function C(R){var j=this._events;if(j!==void 0){var N=j[R];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}w.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]};function E(R,j){for(var N=new Array(j),$=0;$<j;++$)N[$]=R[$];return N}function k(R,j){for(;j+1<R.length;j++)R[j]=R[j+1];R.pop()}function V(R){for(var j=new Array(R.length),N=0;N<j.length;++N)j[N]=R[N].listener||R[N];return j}function P(R,j){return new Promise(function(N,$){function z(M){R.removeListener(j,F),$(M)}function F(){typeof R.removeListener=="function"&&R.removeListener("error",z),N([].slice.call(arguments))}B(R,j,F,{once:!0}),j!=="error"&&K(R,z,{once:!0})})}function K(R,j,N){typeof R.on=="function"&&B(R,"error",j,N)}function B(R,j,N,$){if(typeof R.on=="function")$.once?R.once(j,N):R.on(j,N);else if(typeof R.addEventListener=="function")R.addEventListener(j,function z(F){$.once&&R.removeEventListener(j,z),N(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof R)}},{}],345:[function(o,_,O){"use strict";var p=o("is-callable"),f=Object.prototype.toString,h=Object.prototype.hasOwnProperty,b=function(m,y,x){for(var S=0,I=m.length;S<I;S++)h.call(m,S)&&(x==null?y(m[S],S,m):y.call(x,m[S],S,m))},g=function(m,y,x){for(var S=0,I=m.length;S<I;S++)x==null?y(m.charAt(S),S,m):y.call(x,m.charAt(S),S,m)},w=function(m,y,x){for(var S in m)h.call(m,S)&&(x==null?y(m[S],S,m):y.call(x,m[S],S,m))},c=function(m,y,x){if(!p(y))throw new TypeError("iterator must be a function");var S;arguments.length>=3&&(S=x),f.call(m)==="[object Array]"?b(m,y,S):typeof m=="string"?g(m,y,S):w(m,y,S)};_.exports=c},{"is-callable":367}],346:[function(o,_,O){"use strict";var p="Function.prototype.bind called on incompatible ",f=Array.prototype.slice,h=Object.prototype.toString,b="[object Function]";_.exports=function(w){var c=this;if(typeof c!="function"||h.call(c)!==b)throw new TypeError(p+c);for(var v=f.call(arguments,1),m,y=function(){if(this instanceof m){var E=c.apply(this,v.concat(f.call(arguments)));return Object(E)===E?E:this}else return c.apply(w,v.concat(f.call(arguments)))},x=Math.max(0,c.length-v.length),S=[],I=0;I<x;I++)S.push("$"+I);if(m=Function("binder","return function ("+S.join(",")+"){ return binder.apply(this,arguments); }")(y),c.prototype){var C=function(){};C.prototype=c.prototype,m.prototype=new C,C.prototype=null}return m}},{}],347:[function(o,_,O){"use strict";var p=o("./implementation");_.exports=Function.prototype.bind||p},{"./implementation":346}],348:[function(o,_,O){"use strict";var p,f=SyntaxError,h=Function,b=TypeError,g=function(re){try{return h('"use strict"; return ('+re+").constructor;")()}catch(ne){}},w=Object.getOwnPropertyDescriptor;if(w)try{w({},"")}catch(re){w=null}var c=function(){throw new b},v=w?function(){try{return arguments.callee,c}catch(re){try{return w(arguments,"callee").get}catch(ne){return c}}}():c,m=o("has-symbols")(),y=o("has-proto")(),x=Object.getPrototypeOf||(y?function(re){return re.__proto__}:null),S={},I=typeof Uint8Array=="undefined"||!x?p:x(Uint8Array),C={"%AggregateError%":typeof AggregateError=="undefined"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?p:ArrayBuffer,"%ArrayIteratorPrototype%":m&&x?x([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics=="undefined"?p:Atomics,"%BigInt%":typeof BigInt=="undefined"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?p:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?p:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array=="undefined"?p:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?p:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&x?x(x([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map=="undefined"?p:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!m||!x?p:x(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?p:Promise,"%Proxy%":typeof Proxy=="undefined"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?p:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!m||!x?p:x(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&x?x(""[Symbol.iterator]()):p,"%Symbol%":m?Symbol:p,"%SyntaxError%":f,"%ThrowTypeError%":v,"%TypedArray%":I,"%TypeError%":b,"%Uint8Array%":typeof Uint8Array=="undefined"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?p:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?p:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?p:WeakSet};if(x)try{null.error}catch(re){var E=x(x(re));C["%Error.prototype%"]=E}var k=function re(ne){var pe;if(ne==="%AsyncFunction%")pe=g("async function () {}");else if(ne==="%GeneratorFunction%")pe=g("function* () {}");else if(ne==="%AsyncGeneratorFunction%")pe=g("async function* () {}");else if(ne==="%AsyncGenerator%"){var ie=re("%AsyncGeneratorFunction%");ie&&(pe=ie.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Ae=re("%AsyncGenerator%");Ae&&x&&(pe=x(Ae.prototype))}return C[ne]=pe,pe},V={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=o("function-bind"),K=o("has"),B=P.call(Function.call,Array.prototype.concat),R=P.call(Function.apply,Array.prototype.splice),j=P.call(Function.call,String.prototype.replace),N=P.call(Function.call,String.prototype.slice),$=P.call(Function.call,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,M=function(ne){var pe=N(ne,0,1),ie=N(ne,-1);if(pe==="%"&&ie!=="%")throw new f("invalid intrinsic syntax, expected closing `%`");if(ie==="%"&&pe!=="%")throw new f("invalid intrinsic syntax, expected opening `%`");var Ae=[];return j(ne,z,function(Z,fe,he,be){Ae[Ae.length]=he?j(be,F,"$1"):fe||Z}),Ae},X=function(ne,pe){var ie=ne,Ae;if(K(V,ie)&&(Ae=V[ie],ie="%"+Ae[0]+"%"),K(C,ie)){var Z=C[ie];if(Z===S&&(Z=k(ie)),typeof Z=="undefined"&&!pe)throw new b("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Ae,name:ie,value:Z}}throw new f("intrinsic "+ne+" does not exist!")};_.exports=function(ne,pe){if(typeof ne!="string"||ne.length===0)throw new b("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new b('"allowMissing" argument must be a boolean');if($(/^%?[^%]*%?$/,ne)===null)throw new f("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ie=M(ne),Ae=ie.length>0?ie[0]:"",Z=X("%"+Ae+"%",pe),fe=Z.name,he=Z.value,be=!1,le=Z.alias;le&&(Ae=le[0],R(ie,B([0,1],le)));for(var ue=1,ve=!0;ue<ie.length;ue+=1){var Ee=ie[ue],Oe=N(Ee,0,1),De=N(Ee,-1);if((Oe==='"'||Oe==="'"||Oe==="`"||De==='"'||De==="'"||De==="`")&&Oe!==De)throw new f("property names with quotes must have matching quotes");if((Ee==="constructor"||!ve)&&(be=!0),Ae+="."+Ee,fe="%"+Ae+"%",K(C,fe))he=C[fe];else if(he!=null){if(!(Ee in he)){if(!pe)throw new b("base intrinsic for "+ne+" exists, but the property is not available.");return}if(w&&ue+1>=ie.length){var ce=w(he,Ee);ve=!!ce,ve&&"get"in ce&&!("originalValue"in ce.get)?he=ce.get:he=he[Ee]}else ve=K(he,Ee),he=he[Ee];ve&&!be&&(C[fe]=he)}}return he}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(o,_,O){"use strict";var p=o("get-intrinsic"),f=p("%Object.getOwnPropertyDescriptor%",!0);if(f)try{f([],"length")}catch(h){f=null}_.exports=f},{"get-intrinsic":348}],350:[function(o,_,O){"use strict";var p={foo:{}},f=Object;_.exports=function(){return{__proto__:p}.foo===p.foo&&!({__proto__:null}instanceof f)}},{}],351:[function(o,_,O){"use strict";var p=typeof Symbol!="undefined"&&Symbol,f=o("./shams");_.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:f()}},{"./shams":352}],352:[function(o,_,O){"use strict";_.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var f={},h=Symbol("test"),b=Object(h);if(typeof h=="string"||Object.prototype.toString.call(h)!=="[object Symbol]"||Object.prototype.toString.call(b)!=="[object Symbol]")return!1;var g=42;f[h]=g;for(h in f)return!1;if(typeof Object.keys=="function"&&Object.keys(f).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(f).length!==0)return!1;var w=Object.getOwnPropertySymbols(f);if(w.length!==1||w[0]!==h||!Object.prototype.propertyIsEnumerable.call(f,h))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(f,h);if(c.value!==g||c.enumerable!==!0)return!1}return!0}},{}],353:[function(o,_,O){"use strict";var p=o("has-symbols/shams");_.exports=function(){return p()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(o,_,O){"use strict";var p=o("function-bind");_.exports=p.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(o,_,O){var p=o("http"),f=o("url"),h=_.exports;for(var b in p)p.hasOwnProperty(b)&&(h[b]=p[b]);h.request=function(w,c){return w=g(w),p.request.call(this,w,c)},h.get=function(w,c){return w=g(w),p.get.call(this,w,c)};function g(w){if(typeof w=="string"&&(w=f.parse(w)),w.protocol||(w.protocol="https:"),w.protocol!=="https:")throw new Error('Protocol "'+w.protocol+'" not supported. Expected "https:"');return w}},{http:468,url:472}],356:[function(o,_,O){"use strict";var p=o("util"),f=o("ms");_.exports=function(h){if(typeof h=="number")return h;var b=f(h);if(b===void 0){var g=new Error(p.format("humanize-ms(%j) result undefined",h));console.warn(g.stack)}return b}},{ms:376,util:419}],357:[function(o,_,O){O.read=function(p,f,h,b,g){var w,c,v=g*8-b-1,m=(1<<v)-1,y=m>>1,x=-7,S=h?g-1:0,I=h?-1:1,C=p[f+S];for(S+=I,w=C&(1<<-x)-1,C>>=-x,x+=v;x>0;w=w*256+p[f+S],S+=I,x-=8);for(c=w&(1<<-x)-1,w>>=-x,x+=b;x>0;c=c*256+p[f+S],S+=I,x-=8);if(w===0)w=1-y;else{if(w===m)return c?NaN:(C?-1:1)*(1/0);c=c+Math.pow(2,b),w=w-y}return(C?-1:1)*c*Math.pow(2,w-b)},O.write=function(p,f,h,b,g,w){var c,v,m,y=w*8-g-1,x=(1<<y)-1,S=x>>1,I=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=b?0:w-1,E=b?1:-1,k=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(v=isNaN(f)?1:0,c=x):(c=Math.floor(Math.log(f)/Math.LN2),f*(m=Math.pow(2,-c))<1&&(c--,m*=2),c+S>=1?f+=I/m:f+=I*Math.pow(2,1-S),f*m>=2&&(c++,m/=2),c+S>=x?(v=0,c=x):c+S>=1?(v=(f*m-1)*Math.pow(2,g),c=c+S):(v=f*Math.pow(2,S-1)*Math.pow(2,g),c=0));g>=8;p[h+C]=v&255,C+=E,v/=256,g-=8);for(c=c<<g|v,y+=g;y>0;p[h+C]=c&255,C+=E,c/=256,y-=8);p[h+C-E]|=k*128}},{}],358:[function(o,_,O){"use strict";var p=[o("./nextTick"),o("./queueMicrotask"),o("./mutation.js"),o("./messageChannel"),o("./stateChange"),o("./timeout")],f,h,b=-1,g=[],w=!1;function c(){!f||!h||(f=!1,h.length?g=h.concat(g):b=-1,g.length&&v())}function v(){if(!f){w=!1,f=!0;for(var C=g.length,E=setTimeout(c);C;){for(h=g,g=[];h&&++b<C;)h[b].run();b=-1,C=g.length}h=null,b=-1,f=!1,clearTimeout(E)}}for(var m,y=-1,x=p.length;++y<x;)if(p[y]&&p[y].test&&p[y].test()){m=p[y].install(v);break}function S(C,E){this.fun=C,this.array=E}S.prototype.run=function(){var C=this.fun,E=this.array;switch(E.length){case 0:return C();case 1:return C(E[0]);case 2:return C(E[0],E[1]);case 3:return C(E[0],E[1],E[2]);default:return C.apply(null,E)}},_.exports=I;function I(C){var E=new Array(arguments.length-1);if(arguments.length>1)for(var k=1;k<arguments.length;k++)E[k-1]=arguments[k];g.push(new S(C,E)),!w&&!f&&(w=!0,m())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(o,_,O){(function(p){(function(){"use strict";O.test=function(){return p.setImmediate?!1:typeof p.MessageChannel!="undefined"},O.install=function(f){var h=new p.MessageChannel;return h.port1.onmessage=f,function(){h.port2.postMessage(0)}}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(o,_,O){(function(p){(function(){"use strict";var f=p.MutationObserver||p.WebKitMutationObserver;O.test=function(){return f},O.install=function(h){var b=0,g=new f(h),w=p.document.createTextNode("");return g.observe(w,{characterData:!0}),function(){w.data=b=++b%2}}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(o,_,O){(function(p){(function(){"use strict";O.test=function(){return typeof p.queueMicrotask=="function"},O.install=function(f){return function(){p.queueMicrotask(f)}}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(o,_,O){(function(p){(function(){"use strict";O.test=function(){return"document"in p&&"onreadystatechange"in p.document.createElement("script")},O.install=function(f){return function(){var h=p.document.createElement("script");return h.onreadystatechange=function(){f(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},p.document.documentElement.appendChild(h),f}}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(o,_,O){"use strict";O.test=function(){return!0},O.install=function(p){return function(){setTimeout(p,0)}}},{}],364:[function(o,_,O){typeof Object.create=="function"?_.exports=function(f,h){h&&(f.super_=h,f.prototype=Object.create(h.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:_.exports=function(f,h){if(h){f.super_=h;var b=function(){};b.prototype=h.prototype,f.prototype=new b,f.prototype.constructor=f}}},{}],365:[function(o,_,O){"use strict";var p=o("has-tostringtag/shams")(),f=o("call-bind/callBound"),h=f("Object.prototype.toString"),b=function(v){return p&&v&&typeof v=="object"&&Symbol.toStringTag in v?!1:h(v)==="[object Arguments]"},g=function(v){return b(v)?!0:v!==null&&typeof v=="object"&&typeof v.length=="number"&&v.length>=0&&h(v)!=="[object Array]"&&h(v.callee)==="[object Function]"},w=function(){return b(arguments)}();b.isLegacyArguments=g,_.exports=w?b:g},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(o,_,O){_.exports=function(h){return h!=null&&(p(h)||f(h)||!!h._isBuffer)};function p(h){return!!h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h)}function f(h){return typeof h.readFloatLE=="function"&&typeof h.slice=="function"&&p(h.slice(0,0))}},{}],367:[function(o,_,O){"use strict";var p=Function.prototype.toString,f=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,h,b;if(typeof f=="function"&&typeof Object.defineProperty=="function")try{h=Object.defineProperty({},"length",{get:function(){throw b}}),b={},f(function(){throw 42},null,h)}catch(K){K!==b&&(f=null)}else f=null;var g=/^\s*class\b/,w=function(B){try{var R=p.call(B);return g.test(R)}catch(j){return!1}},c=function(B){try{return w(B)?!1:(p.call(B),!0)}catch(R){return!1}},v=Object.prototype.toString,m="[object Object]",y="[object Function]",x="[object GeneratorFunction]",S="[object HTMLAllCollection]",I="[object HTML document.all class]",C="[object HTMLCollection]",E=typeof Symbol=="function"&&!!Symbol.toStringTag,k=!(0 in[,]),V=function(){return!1};if(typeof document=="object"){var P=document.all;v.call(P)===v.call(document.all)&&(V=function(B){if((k||!B)&&(typeof B=="undefined"||typeof B=="object"))try{var R=v.call(B);return(R===S||R===I||R===C||R===m)&&B("")==null}catch(j){}return!1})}_.exports=f?function(B){if(V(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;try{f(B,null,h)}catch(R){if(R!==b)return!1}return!w(B)&&c(B)}:function(B){if(V(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;if(E)return c(B);if(w(B))return!1;var R=v.call(B);return R!==y&&R!==x&&!/^\[object HTML/.test(R)?!1:c(B)}},{}],368:[function(o,_,O){"use strict";var p=Object.prototype.toString,f=Function.prototype.toString,h=/^\s*(?:function)?\*/,b=o("has-tostringtag/shams")(),g=Object.getPrototypeOf,w=function(){if(!b)return!1;try{return Function("return function*() {}")()}catch(v){}},c;_.exports=function(m){if(typeof m!="function")return!1;if(h.test(f.call(m)))return!0;if(!b){var y=p.call(m);return y==="[object GeneratorFunction]"}if(!g)return!1;if(typeof c=="undefined"){var x=w();c=x?g(x):!1}return g(m)===c}},{"has-tostringtag/shams":353}],369:[function(o,_,O){"use strict";var p=o("which-typed-array");_.exports=function(h){return!!p(h)}},{"which-typed-array":420}],370:[function(o,_,O){var p={}.toString;_.exports=Array.isArray||function(f){return p.call(f)=="[object Array]"}},{}],371:[function(o,_,O){(function(p){(function(){(function(f,h){typeof O=="object"&&typeof _!="undefined"?_.exports=h(f):typeof je=="function"&&je.amd?je(h):h(f)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof p!="undefined"?p:this,function(f){"use strict";f=f||{};var h=f.Base64,b="2.6.4",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=function(ne){for(var pe={},ie=0,Ae=ne.length;ie<Ae;ie++)pe[ne.charAt(ie)]=ie;return pe}(g),c=String.fromCharCode,v=function(ne){if(ne.length<2){var pe=ne.charCodeAt(0);return pe<128?ne:pe<2048?c(192|pe>>>6)+c(128|pe&63):c(224|pe>>>12&15)+c(128|pe>>>6&63)+c(128|pe&63)}else{var pe=65536+(ne.charCodeAt(0)-55296)*1024+(ne.charCodeAt(1)-56320);return c(240|pe>>>18&7)+c(128|pe>>>12&63)+c(128|pe>>>6&63)+c(128|pe&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,y=function(ne){return ne.replace(m,v)},x=function(ne){var pe=[0,2,1][ne.length%3],ie=ne.charCodeAt(0)<<16|(ne.length>1?ne.charCodeAt(1):0)<<8|(ne.length>2?ne.charCodeAt(2):0),Ae=[g.charAt(ie>>>18),g.charAt(ie>>>12&63),pe>=2?"=":g.charAt(ie>>>6&63),pe>=1?"=":g.charAt(ie&63)];return Ae.join("")},S=f.btoa&&typeof f.btoa=="function"?function(ne){return f.btoa(ne)}:function(ne){if(ne.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ne.replace(/[\s\S]{1,3}/g,x)},I=function(ne){return S(y(String(ne)))},C=function(ne){return ne.replace(/[+\/]/g,function(pe){return pe=="+"?"-":"_"}).replace(/=/g,"")},E=function(ne,pe){return pe?C(I(ne)):I(ne)},k=function(ne){return E(ne,!0)},V;f.Uint8Array&&(V=function(ne,pe){for(var ie="",Ae=0,Z=ne.length;Ae<Z;Ae+=3){var fe=ne[Ae],he=ne[Ae+1],be=ne[Ae+2],le=fe<<16|he<<8|be;ie+=g.charAt(le>>>18)+g.charAt(le>>>12&63)+(typeof he!="undefined"?g.charAt(le>>>6&63):"=")+(typeof be!="undefined"?g.charAt(le&63):"=")}return pe?C(ie):ie});var P=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,K=function(ne){switch(ne.length){case 4:var pe=(7&ne.charCodeAt(0))<<18|(63&ne.charCodeAt(1))<<12|(63&ne.charCodeAt(2))<<6|63&ne.charCodeAt(3),ie=pe-65536;return c((ie>>>10)+55296)+c((ie&1023)+56320);case 3:return c((15&ne.charCodeAt(0))<<12|(63&ne.charCodeAt(1))<<6|63&ne.charCodeAt(2));default:return c((31&ne.charCodeAt(0))<<6|63&ne.charCodeAt(1))}},B=function(ne){return ne.replace(P,K)},R=function(ne){var pe=ne.length,ie=pe%4,Ae=(pe>0?w[ne.charAt(0)]<<18:0)|(pe>1?w[ne.charAt(1)]<<12:0)|(pe>2?w[ne.charAt(2)]<<6:0)|(pe>3?w[ne.charAt(3)]:0),Z=[c(Ae>>>16),c(Ae>>>8&255),c(Ae&255)];return Z.length-=[0,0,2,1][ie],Z.join("")},j=f.atob&&typeof f.atob=="function"?function(ne){return f.atob(ne)}:function(ne){return ne.replace(/\S{1,4}/g,R)},N=function(ne){return j(String(ne).replace(/[^A-Za-z0-9\+\/]/g,""))},$=function(ne){return B(j(ne))},z=function(ne){return String(ne).replace(/[-_]/g,function(pe){return pe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},F=function(ne){return $(z(ne))},M;f.Uint8Array&&(M=function(ne){return Uint8Array.from(N(z(ne)),function(pe){return pe.charCodeAt(0)})});var X=function(){var ne=f.Base64;return f.Base64=h,ne};if(f.Base64={VERSION:b,atob:N,btoa:S,fromBase64:F,toBase64:E,utob:y,encode:E,encodeURI:k,btou:B,decode:F,noConflict:X,fromUint8Array:V,toUint8Array:M},typeof Object.defineProperty=="function"){var re=function(ne){return{value:ne,enumerable:!1,writable:!0,configurable:!0}};f.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",re(function(){return F(this)})),Object.defineProperty(String.prototype,"toBase64",re(function(ne){return E(this,ne)})),Object.defineProperty(String.prototype,"toBase64URI",re(function(){return E(this,!0)}))}}return f.Meteor&&(Base64=f.Base64),typeof _!="undefined"&&_.exports?_.exports.Base64=f.Base64:typeof je=="function"&&je.amd&&je([],function(){return f.Base64}),{Base64:f.Base64}})}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(o,_,O){"use strict";_.exports=f;var p=Object.prototype.hasOwnProperty;function f(h,b,g){if(!h)throw new TypeError("argument dest is required");if(!b)throw new TypeError("argument src is required");return g===void 0&&(g=!0),Object.getOwnPropertyNames(b).forEach(function(c){if(!(!g&&p.call(h,c))){var v=Object.getOwnPropertyDescriptor(b,c);Object.defineProperty(h,c,v)}}),h}},{}],373:[function(o,_,O){"use strict";o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.regexp.constructor.js"),o("core-js/modules/es.regexp.to-string.js");function p(){this._types=Object.create(null),this._extensions=Object.create(null);for(var f=0;f<arguments.length;f++)this.define(arguments[f]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}p.prototype.define=function(f,h){for(var b in f){var g=f[b].map(function(m){return m.toLowerCase()});b=b.toLowerCase();for(var w=0;w<g.length;w++){var c=g[w];if(c[0]!=="*"){if(!h&&c in this._types)throw new Error('Attempt to change mapping for "'+c+'" extension from "'+this._types[c]+'" to "'+b+'". Pass `force=true` to allow this, otherwise remove "'+c+'" from the list of extensions for "'+b+'".');this._types[c]=b}}if(h||!this._extensions[b]){var v=g[0];this._extensions[b]=v[0]!=="*"?v:v.substr(1)}}},p.prototype.getType=function(f){f=String(f);var h=f.replace(/^.*[/\\]/,"").toLowerCase(),b=h.replace(/^.*\./,"").toLowerCase(),g=h.length<f.length,w=b.length<h.length-1;return(w||!g)&&this._types[b]||null},p.prototype.getExtension=function(f){return f=/^\s*([^;\s]*)/.test(f)&&RegExp.$1,f&&this._extensions[f.toLowerCase()]||null},_.exports=p},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(o,_,O){"use strict";var p=o("./Mime");_.exports=new p(o("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(o,_,O){"use strict";_.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(o,_,O){var p=1e3,f=p*60,h=f*60,b=h*24,g=b*7,w=b*365.25;_.exports=function(x,S){S=S||{};var I=typeof x;if(I==="string"&&x.length>0)return c(x);if(I==="number"&&isFinite(x))return S.long?m(x):v(x);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(x))};function c(x){if(x=String(x),!(x.length>100)){var S=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(x);if(S){var I=parseFloat(S[1]),C=(S[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return I*w;case"weeks":case"week":case"w":return I*g;case"days":case"day":case"d":return I*b;case"hours":case"hour":case"hrs":case"hr":case"h":return I*h;case"minutes":case"minute":case"mins":case"min":case"m":return I*f;case"seconds":case"second":case"secs":case"sec":case"s":return I*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function v(x){var S=Math.abs(x);return S>=b?Math.round(x/b)+"d":S>=h?Math.round(x/h)+"h":S>=f?Math.round(x/f)+"m":S>=p?Math.round(x/p)+"s":x+"ms"}function m(x){var S=Math.abs(x);return S>=b?y(x,S,b,"day"):S>=h?y(x,S,h,"hour"):S>=f?y(x,S,f,"minute"):S>=p?y(x,S,p,"second"):x+" ms"}function y(x,S,I,C){var E=S>=I*1.5;return Math.round(x/I)+" "+C+(E?"s":"")}},{}],377:[function(o,_,O){"use strict";var p=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;function b(w){if(w==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}function g(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de",Object.getOwnPropertyNames(w)[0]==="5")return!1;for(var c={},v=0;v<10;v++)c["_"+String.fromCharCode(v)]=v;var m=Object.getOwnPropertyNames(c).map(function(x){return c[x]});if(m.join("")!=="0123456789")return!1;var y={};return"abcdefghijklmnopqrst".split("").forEach(function(x){y[x]=x}),Object.keys(Object.assign({},y)).join("")==="abcdefghijklmnopqrst"}catch(x){return!1}}_.exports=g()?Object.assign:function(w,c){for(var v,m=b(w),y,x=1;x<arguments.length;x++){v=Object(arguments[x]);for(var S in v)f.call(v,S)&&(m[S]=v[S]);if(p){y=p(v);for(var I=0;I<y.length;I++)h.call(v,y[I])&&(m[y[I]]=v[y[I]])}}return m}},{}],378:[function(o,_,O){(function(p){(function(){"use strict";function f(w){if(typeof w!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function h(w,c){for(var v="",m=0,y=-1,x=0,S,I=0;I<=w.length;++I){if(I<w.length)S=w.charCodeAt(I);else{if(S===47)break;S=47}if(S===47){if(!(y===I-1||x===1))if(y!==I-1&&x===2){if(v.length<2||m!==2||v.charCodeAt(v.length-1)!==46||v.charCodeAt(v.length-2)!==46){if(v.length>2){var C=v.lastIndexOf("/");if(C!==v.length-1){C===-1?(v="",m=0):(v=v.slice(0,C),m=v.length-1-v.lastIndexOf("/")),y=I,x=0;continue}}else if(v.length===2||v.length===1){v="",m=0,y=I,x=0;continue}}c&&(v.length>0?v+="/..":v="..",m=2)}else v.length>0?v+="/"+w.slice(y+1,I):v=w.slice(y+1,I),m=I-y-1;y=I,x=0}else S===46&&x!==-1?++x:x=-1}return v}function b(w,c){var v=c.dir||c.root,m=c.base||(c.name||"")+(c.ext||"");return v?v===c.root?v+m:v+w+m:m}var g={resolve:function(){for(var c="",v=!1,m,y=arguments.length-1;y>=-1&&!v;y--){var x;y>=0?x=arguments[y]:(m===void 0&&(m=p.cwd()),x=m),f(x),x.length!==0&&(c=x+"/"+c,v=x.charCodeAt(0)===47)}return c=h(c,!v),v?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(c){if(f(c),c.length===0)return".";var v=c.charCodeAt(0)===47,m=c.charCodeAt(c.length-1)===47;return c=h(c,!v),c.length===0&&!v&&(c="."),c.length>0&&m&&(c+="/"),v?"/"+c:c},isAbsolute:function(c){return f(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,v=0;v<arguments.length;++v){var m=arguments[v];f(m),m.length>0&&(c===void 0?c=m:c+="/"+m)}return c===void 0?".":g.normalize(c)},relative:function(c,v){if(f(c),f(v),c===v||(c=g.resolve(c),v=g.resolve(v),c===v))return"";for(var m=1;m<c.length&&c.charCodeAt(m)===47;++m);for(var y=c.length,x=y-m,S=1;S<v.length&&v.charCodeAt(S)===47;++S);for(var I=v.length,C=I-S,E=x<C?x:C,k=-1,V=0;V<=E;++V){if(V===E){if(C>E){if(v.charCodeAt(S+V)===47)return v.slice(S+V+1);if(V===0)return v.slice(S+V)}else x>E&&(c.charCodeAt(m+V)===47?k=V:V===0&&(k=0));break}var P=c.charCodeAt(m+V),K=v.charCodeAt(S+V);if(P!==K)break;P===47&&(k=V)}var B="";for(V=m+k+1;V<=y;++V)(V===y||c.charCodeAt(V)===47)&&(B.length===0?B+="..":B+="/..");return B.length>0?B+v.slice(S+k):(S+=k,v.charCodeAt(S)===47&&++S,v.slice(S))},_makeLong:function(c){return c},dirname:function(c){if(f(c),c.length===0)return".";for(var v=c.charCodeAt(0),m=v===47,y=-1,x=!0,S=c.length-1;S>=1;--S)if(v=c.charCodeAt(S),v===47){if(!x){y=S;break}}else x=!1;return y===-1?m?"/":".":m&&y===1?"//":c.slice(0,y)},basename:function(c,v){if(v!==void 0&&typeof v!="string")throw new TypeError('"ext" argument must be a string');f(c);var m=0,y=-1,x=!0,S;if(v!==void 0&&v.length>0&&v.length<=c.length){if(v.length===c.length&&v===c)return"";var I=v.length-1,C=-1;for(S=c.length-1;S>=0;--S){var E=c.charCodeAt(S);if(E===47){if(!x){m=S+1;break}}else C===-1&&(x=!1,C=S+1),I>=0&&(E===v.charCodeAt(I)?--I===-1&&(y=S):(I=-1,y=C))}return m===y?y=C:y===-1&&(y=c.length),c.slice(m,y)}else{for(S=c.length-1;S>=0;--S)if(c.charCodeAt(S)===47){if(!x){m=S+1;break}}else y===-1&&(x=!1,y=S+1);return y===-1?"":c.slice(m,y)}},extname:function(c){f(c);for(var v=-1,m=0,y=-1,x=!0,S=0,I=c.length-1;I>=0;--I){var C=c.charCodeAt(I);if(C===47){if(!x){m=I+1;break}continue}y===-1&&(x=!1,y=I+1),C===46?v===-1?v=I:S!==1&&(S=1):v!==-1&&(S=-1)}return v===-1||y===-1||S===0||S===1&&v===y-1&&v===m+1?"":c.slice(v,y)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return b("/",c)},parse:function(c){f(c);var v={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return v;var m=c.charCodeAt(0),y=m===47,x;y?(v.root="/",x=1):x=0;for(var S=-1,I=0,C=-1,E=!0,k=c.length-1,V=0;k>=x;--k){if(m=c.charCodeAt(k),m===47){if(!E){I=k+1;break}continue}C===-1&&(E=!1,C=k+1),m===46?S===-1?S=k:V!==1&&(V=1):S!==-1&&(V=-1)}return S===-1||C===-1||V===0||V===1&&S===C-1&&S===I+1?C!==-1&&(I===0&&y?v.base=v.name=c.slice(1,C):v.base=v.name=c.slice(I,C)):(I===0&&y?(v.name=c.slice(1,S),v.base=c.slice(1,C)):(v.name=c.slice(I,S),v.base=c.slice(I,C)),v.ext=c.slice(S,C)),I>0?v.dir=c.slice(0,I-1):y&&(v.dir="/"),v},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g,_.exports=g}).call(this)}).call(this,o("_process"))},{_process:467}],379:[function(o,_,O){(function(p){(function(){(function(){"use strict";var f={function:!0,object:!0},h=f[typeof window]&&window||this,b=h,g=f[typeof O]&&O,w=f[typeof _]&&_&&!_.nodeType&&_,c=g&&w&&typeof p=="object"&&p;c&&(c.global===c||c.window===c||c.self===c)&&(h=c);var v=Math.pow(2,53)-1,m=/\bOpera/,y=this,x=Object.prototype,S=x.hasOwnProperty,I=x.toString;function C(F){return F=String(F),F.charAt(0).toUpperCase()+F.slice(1)}function E(F,M,X){var re={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return M&&X&&/^Win/i.test(F)&&!/^Windows Phone /i.test(F)&&(re=re[/[\d.]+$/.exec(F)])&&(F="Windows "+re),F=String(F),M&&X&&(F=F.replace(RegExp(M,"i"),X)),F=V(F.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),F}function k(F,M){var X=-1,re=F?F.length:0;if(typeof re=="number"&&re>-1&&re<=v)for(;++X<re;)M(F[X],X,F);else P(F,M)}function V(F){return F=N(F),/^(?:webOS|i(?:OS|P))/.test(F)?F:C(F)}function P(F,M){for(var X in F)S.call(F,X)&&M(F[X],X,F)}function K(F){return F==null?C(F):I.call(F).slice(8,-1)}function B(F,M){var X=F!=null?typeof F[M]:"number";return!/^(?:boolean|number|string|undefined)$/.test(X)&&(X=="object"?!!F[M]:!0)}function R(F){return String(F).replace(/([ -])(?!$)/g,"$1?")}function j(F,M){var X=null;return k(F,function(re,ne){X=M(X,re,ne,F)}),X}function N(F){return String(F).replace(/^ +| +$/g,"")}function $(F){var M=h,X=F&&typeof F=="object"&&K(F)!="String";X&&(M=F,F=null);var re=M.navigator||{},ne=re.userAgent||"";F||(F=ne);var pe=X||y==b,ie=X?!!re.likeChrome:/\bChrome\b/.test(F)&&!/internal|\n/i.test(I.toString()),Ae="Object",Z=X?Ae:"ScriptBridgingProxyObject",fe=X?Ae:"Environment",he=X&&M.java?"JavaPackage":K(M.java),be=X?Ae:"RuntimeObject",le=/\bJava/.test(he)&&M.java,ue=le&&K(M.environment)==fe,ve=le?"a":"\u03B1",Ee=le?"b":"\u03B2",Oe=M.document||{},De=M.operamini||M.opera,ce=m.test(ce=X&&De?De["[[Class]]"]:K(De))?ce:De=null,G,ye=F,Y=[],H=null,Q=F==ne,J=Q&&De&&typeof De.version=="function"&&De.version(),ee,W=He([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),L=Je(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),q=ge([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),de=ze({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),Ie=dt(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function He(Ve){return j(Ve,function(Xe,Ye){return Xe||RegExp("\\b"+(Ye.pattern||R(Ye))+"\\b","i").exec(F)&&(Ye.label||Ye)})}function ze(Ve){return j(Ve,function(Xe,Ye,it){return Xe||(Ye[q]||Ye[/^[a-z]+(?: +[a-z]+\b)*/i.exec(q)]||RegExp("\\b"+R(it)+"(?:\\b|\\w*\\d)","i").exec(F))&&it})}function Je(Ve){return j(Ve,function(Xe,Ye){return Xe||RegExp("\\b"+(Ye.pattern||R(Ye))+"\\b","i").exec(F)&&(Ye.label||Ye)})}function dt(Ve){return j(Ve,function(Xe,Ye){var it=Ye.pattern||R(Ye);return!Xe&&(Xe=RegExp("\\b"+it+"(?:/[\\d.]+|[ \\w.]*)","i").exec(F))&&(Xe=E(Xe,it,Ye.label||Ye)),Xe})}function ge(Ve){return j(Ve,function(Xe,Ye){var it=Ye.pattern||R(Ye);return!Xe&&(Xe=RegExp("\\b"+it+" *\\d+[.\\w_]*","i").exec(F)||RegExp("\\b"+it+" *\\w+-[\\w]*","i").exec(F)||RegExp("\\b"+it+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(F))&&((Xe=String(Ye.label&&!RegExp(it,"i").test(Ye.label)?Ye.label:Xe).split("/"))[1]&&!/[\d.]+/.test(Xe[0])&&(Xe[0]+=" "+Xe[1]),Ye=Ye.label||Ye,Xe=V(Xe[0].replace(RegExp(it,"i"),Ye).replace(RegExp("; *(?:"+Ye+"[_-])?","i")," ").replace(RegExp("("+Ye+")[-_.]?(\\w)","i"),"$1 $2"))),Xe})}function Be(Ve){return j(Ve,function(Xe,Ye){return Xe||(RegExp(Ye+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(F)||0)[1]||null})}function _e(){return this.description||""}if(W&&(W=[W]),/\bAndroid\b/.test(Ie)&&!q&&(G=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(F))&&(q=N(G[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),de&&!q?q=ge([de]):de&&q&&(q=q.replace(RegExp("^("+R(de)+")[-_.\\s]","i"),de+" ").replace(RegExp("^("+R(de)+")[-_.]?(\\w)","i"),de+" $2")),(G=/\bGoogle TV\b/.exec(q))&&(q=G[0]),/\bSimulator\b/i.test(F)&&(q=(q?q+" ":"")+"Simulator"),L=="Opera Mini"&&/\bOPiOS\b/.test(F)&&Y.push("running in Turbo/Uncompressed mode"),L=="IE"&&/\blike iPhone OS\b/.test(F)?(G=$(F.replace(/like iPhone OS/,"")),de=G.manufacturer,q=G.product):/^iP/.test(q)?(L||(L="Safari"),Ie="iOS"+((G=/ OS ([\d_]+)/i.exec(F))?" "+G[1].replace(/_/g,"."):"")):L=="Konqueror"&&/^Linux\b/i.test(Ie)?Ie="Kubuntu":de&&de!="Google"&&(/Chrome/.test(L)&&!/\bMobile Safari\b/i.test(F)||/\bVita\b/.test(q))||/\bAndroid\b/.test(Ie)&&/^Chrome/.test(L)&&/\bVersion\//i.test(F)?(L="Android Browser",Ie=/\bAndroid\b/.test(Ie)?Ie:"Android"):L=="Silk"?(/\bMobi/i.test(F)||(Ie="Android",Y.unshift("desktop mode")),/Accelerated *= *true/i.test(F)&&Y.unshift("accelerated")):L=="UC Browser"&&/\bUCWEB\b/.test(F)?Y.push("speed mode"):L=="PaleMoon"&&(G=/\bFirefox\/([\d.]+)\b/.exec(F))?Y.push("identifying as Firefox "+G[1]):L=="Firefox"&&(G=/\b(Mobile|Tablet|TV)\b/i.exec(F))?(Ie||(Ie="Firefox OS"),q||(q=G[1])):!L||(G=!/\bMinefield\b/i.test(F)&&/\b(?:Firefox|Safari)\b/.exec(L))?(L&&!q&&/[\/,]|^[^(]+?\)/.test(F.slice(F.indexOf(G+"/")+8))&&(L=null),(G=q||de||Ie)&&(q||de||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Ie))&&(L=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Ie)?Ie:G)+" Browser")):L=="Electron"&&(G=(/\bChrome\/([\d.]+)\b/.exec(F)||0)[1])&&Y.push("Chromium "+G),J||(J=Be(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",R(L),"(?:Firefox|Minefield|NetFront)"])),(G=W=="iCab"&&parseFloat(J)>3&&"WebKit"||/\bOpera\b/.test(L)&&(/\bOPR\b/.test(F)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(F)&&!/^(?:Trident|EdgeHTML)$/.test(W)&&"WebKit"||!W&&/\bMSIE\b/i.test(F)&&(Ie=="Mac OS"?"Tasman":"Trident")||W=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(L)&&"NetFront")&&(W=[G]),L=="IE"&&(G=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(F)||0)[1])?(L+=" Mobile",Ie="Windows Phone "+(/\+$/.test(G)?G:G+".x"),Y.unshift("desktop mode")):/\bWPDesktop\b/i.test(F)?(L="IE Mobile",Ie="Windows Phone 8.x",Y.unshift("desktop mode"),J||(J=(/\brv:([\d.]+)/.exec(F)||0)[1])):L!="IE"&&W=="Trident"&&(G=/\brv:([\d.]+)/.exec(F))&&(L&&Y.push("identifying as "+L+(J?" "+J:"")),L="IE",J=G[1]),Q){if(B(M,"global"))if(le&&(G=le.lang.System,ye=G.getProperty("os.arch"),Ie=Ie||G.getProperty("os.name")+" "+G.getProperty("os.version")),ue){try{J=M.require("ringo/engine").version.join("."),L="RingoJS"}catch(Ve){(G=M.system)&&G.global.system==M.system&&(L="Narwhal",Ie||(Ie=G[0].os||null))}L||(L="Rhino")}else typeof M.process=="object"&&!M.process.browser&&(G=M.process)&&(typeof G.versions=="object"&&(typeof G.versions.electron=="string"?(Y.push("Node "+G.versions.node),L="Electron",J=G.versions.electron):typeof G.versions.nw=="string"&&(Y.push("Chromium "+J,"Node "+G.versions.node),L="NW.js",J=G.versions.nw)),L||(L="Node.js",ye=G.arch,Ie=G.platform,J=/[\d.]+/.exec(G.version),J=J?J[0]:null));else K(G=M.runtime)==Z?(L="Adobe AIR",Ie=G.flash.system.Capabilities.os):K(G=M.phantom)==be?(L="PhantomJS",J=(G=G.version||null)&&G.major+"."+G.minor+"."+G.patch):typeof Oe.documentMode=="number"&&(G=/\bTrident\/(\d+)/i.exec(F))?(J=[J,Oe.documentMode],(G=+G[1]+4)!=J[1]&&(Y.push("IE "+J[1]+" mode"),W&&(W[1]=""),J[1]=G),J=L=="IE"?String(J[1].toFixed(1)):J[0]):typeof Oe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(L)&&(Y.push("masking as "+L+" "+J),L="IE",J="11.0",W=["Trident"],Ie="Windows");Ie=Ie&&V(Ie)}if(J&&(G=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(J)||/(?:alpha|beta)(?: ?\d)?/i.exec(F+";"+(Q&&re.appMinorVersion))||/\bMinefield\b/i.test(F)&&"a")&&(H=/b/i.test(G)?"beta":"alpha",J=J.replace(RegExp(G+"\\+?$"),"")+(H=="beta"?Ee:ve)+(/\d+\+?/.exec(G)||"")),L=="Fennec"||L=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Ie))L="Firefox Mobile";else if(L=="Maxthon"&&J)J=J.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(q))q=="Xbox 360"&&(Ie=null),q=="Xbox 360"&&/\bIEMobile\b/.test(F)&&Y.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(L)||L&&!q&&!/Browser|Mobi/.test(L))&&(Ie=="Windows CE"||/Mobi/i.test(F)))L+=" Mobile";else if(L=="IE"&&Q)try{M.external===null&&Y.unshift("platform preview")}catch(Ve){Y.unshift("embedded")}else(/\bBlackBerry\b/.test(q)||/\bBB10\b/.test(F))&&(G=(RegExp(q.replace(/ +/g," *")+"/([.\\d]+)","i").exec(F)||0)[1]||J)?(G=[G,/BB10/.test(F)],Ie=(G[1]?(q=null,de="BlackBerry"):"Device Software")+" "+G[0],J=null):this!=P&&q!="Wii"&&(Q&&De||/Opera/.test(L)&&/\b(?:MSIE|Firefox)\b/i.test(F)||L=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Ie)||L=="IE"&&(Ie&&!/^Win/.test(Ie)&&J>5.5||/\bWindows XP\b/.test(Ie)&&J>8||J==8&&!/\bTrident\b/.test(F)))&&!m.test(G=$.call(P,F.replace(m,"")+";"))&&G.name&&(G="ing as "+G.name+((G=G.version)?" "+G:""),m.test(L)?(/\bIE\b/.test(G)&&Ie=="Mac OS"&&(Ie=null),G="identify"+G):(G="mask"+G,ce?L=V(ce.replace(/([a-z])([A-Z])/g,"$1 $2")):L="Opera",/\bIE\b/.test(G)&&(Ie=null),Q||(J=null)),W=["Presto"],Y.push(G));(G=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(F)||0)[1])&&(G=[parseFloat(G.replace(/\.(\d)$/,".0$1")),G],L=="Safari"&&G[1].slice(-1)=="+"?(L="WebKit Nightly",H="alpha",J=G[1].slice(0,-1)):(J==G[1]||J==(G[2]=(/\bSafari\/([\d.]+\+?)/i.exec(F)||0)[1]))&&(J=null),G[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(F)||0)[1],G[0]==537.36&&G[2]==537.36&&parseFloat(G[1])>=28&&W=="WebKit"&&(W=["Blink"]),!Q||!ie&&!G[1]?(W&&(W[1]="like Safari"),G=(G=G[0],G<400?1:G<500?2:G<526?3:G<533?4:G<534?"4+":G<535?5:G<537?6:G<538?7:G<601?8:G<602?9:G<604?10:G<606?11:G<608?12:"12")):(W&&(W[1]="like Chrome"),G=G[1]||(G=G[0],G<530?1:G<532?2:G<532.05?3:G<533?4:G<534.03?5:G<534.07?6:G<534.1?7:G<534.13?8:G<534.16?9:G<534.24?10:G<534.3?11:G<535.01?12:G<535.02?"13+":G<535.07?15:G<535.11?16:G<535.19?17:G<536.05?18:G<536.1?19:G<537.01?20:G<537.11?"21+":G<537.13?23:G<537.18?24:G<537.24?25:G<537.36?26:W!="Blink"?"27":"28")),W&&(W[1]+=" "+(G+=typeof G=="number"?".x":/[.+]/.test(G)?"":"+")),L=="Safari"&&(!J||parseInt(J)>45)?J=G:L=="Chrome"&&/\bHeadlessChrome/i.test(F)&&Y.unshift("headless")),L=="Opera"&&(G=/\bzbov|zvav$/.exec(Ie))?(L+=" ",Y.unshift("desktop mode"),G=="zvav"?(L+="Mini",J=null):L+="Mobile",Ie=Ie.replace(RegExp(" *"+G+"$"),"")):L=="Safari"&&/\bChrome\b/.exec(W&&W[1])?(Y.unshift("desktop mode"),L="Chrome Mobile",J=null,/\bOS X\b/.test(Ie)?(de="Apple",Ie="iOS 4.3+"):Ie=null):/\bSRWare Iron\b/.test(L)&&!J&&(J=Be("Chrome")),J&&J.indexOf(G=/[\d.]+$/.exec(Ie))==0&&F.indexOf("/"+G+"-")>-1&&(Ie=N(Ie.replace(G,""))),Ie&&Ie.indexOf(L)!=-1&&!RegExp(L+" OS").test(Ie)&&(Ie=Ie.replace(RegExp(" *"+R(L)+" *"),"")),W&&!/\b(?:Avant|Nook)\b/.test(L)&&(/Browser|Lunascape|Maxthon/.test(L)||L!="Safari"&&/^iOS/.test(Ie)&&/\bSafari\b/.test(W[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(L)&&W[1])&&(G=W[W.length-1])&&Y.push(G),Y.length&&(Y=["("+Y.join("; ")+")"]),de&&q&&q.indexOf(de)<0&&Y.push("on "+de),q&&Y.push((/^on /.test(Y[Y.length-1])?"":"on ")+q),Ie&&(G=/ ([\d.+]+)$/.exec(Ie),ee=G&&Ie.charAt(Ie.length-G[0].length-1)=="/",Ie={architecture:32,family:G&&!ee?Ie.replace(G[0],""):Ie,version:G?G[1]:null,toString:function(){var Ve=this.version;return this.family+(Ve&&!ee?" "+Ve:"")+(this.architecture==64?" 64-bit":"")}}),(G=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ye))&&!/\bi686\b/i.test(ye)?(Ie&&(Ie.architecture=64,Ie.family=Ie.family.replace(RegExp(" *"+G),"")),L&&(/\bWOW64\b/i.test(F)||Q&&/\w(?:86|32)$/.test(re.cpuClass||re.platform)&&!/\bWin64; x64\b/i.test(F))&&Y.unshift("32-bit")):Ie&&/^OS X/.test(Ie.family)&&L=="Chrome"&&parseFloat(J)>=39&&(Ie.architecture=64),F||(F=null);var Fe={};return Fe.description=F,Fe.layout=W&&W[0],Fe.manufacturer=de,Fe.name=L,Fe.prerelease=H,Fe.product=q,Fe.ua=F,Fe.version=L&&J,Fe.os=Ie||{architecture:null,family:null,version:null,toString:function(){return"null"}},Fe.parse=$,Fe.toString=_e,Fe.version&&Y.unshift(J),Fe.name&&Y.unshift(L),Ie&&L&&!(Ie==String(Ie).split(" ")[0]&&(Ie==L.split(" ")[0]||q))&&Y.push(q?"("+Ie+")":"on "+Ie),Y.length&&(Fe.description=Y.join(" ")),Fe}var z=$();typeof je=="function"&&typeof je.amd=="object"&&je.amd?(h.platform=z,je(function(){return z})):g&&w?P(z,function(F,M){g[M]=F}):h.platform=z}).call(this)}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(o,_,O){(function(p){(function(){"use strict";typeof p=="undefined"||!p.version||p.version.indexOf("v0.")===0||p.version.indexOf("v1.")===0&&p.version.indexOf("v1.8.")!==0?_.exports={nextTick:f}:_.exports=p;function f(h,b,g,w){if(typeof h!="function")throw new TypeError('"callback" argument must be a function');var c=arguments.length,v,m;switch(c){case 0:case 1:return p.nextTick(h);case 2:return p.nextTick(function(){h.call(null,b)});case 3:return p.nextTick(function(){h.call(null,b,g)});case 4:return p.nextTick(function(){h.call(null,b,g,w)});default:for(v=new Array(c-1),m=0;m<v.length;)v[m++]=arguments[m];return p.nextTick(function(){h.apply(null,v)})}}}).call(this)}).call(this,o("_process"))},{_process:467}],381:[function(o,_,O){var p=_.exports={},f,h;function b(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?f=setTimeout:f=b}catch(k){f=b}try{typeof clearTimeout=="function"?h=clearTimeout:h=g}catch(k){h=g}})();function w(k){if(f===setTimeout)return setTimeout(k,0);if((f===b||!f)&&setTimeout)return f=setTimeout,setTimeout(k,0);try{return f(k,0)}catch(V){try{return f.call(null,k,0)}catch(P){return f.call(this,k,0)}}}function c(k){if(h===clearTimeout)return clearTimeout(k);if((h===g||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(k);try{return h(k)}catch(V){try{return h.call(null,k)}catch(P){return h.call(this,k)}}}var v=[],m=!1,y,x=-1;function S(){!m||!y||(m=!1,y.length?v=y.concat(v):x=-1,v.length&&I())}function I(){if(!m){var k=w(S);m=!0;for(var V=v.length;V;){for(y=v,v=[];++x<V;)y&&y[x].run();x=-1,V=v.length}y=null,m=!1,c(k)}}p.nextTick=function(k){var V=new Array(arguments.length-1);if(arguments.length>1)for(var P=1;P<arguments.length;P++)V[P-1]=arguments[P];v.push(new C(k,V)),v.length===1&&!m&&w(I)};function C(k,V){this.fun=k,this.array=V}C.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={};function E(){}p.on=E,p.addListener=E,p.once=E,p.off=E,p.removeListener=E,p.removeAllListeners=E,p.emit=E,p.prependListener=E,p.prependOnceListener=E,p.listeners=function(k){return[]},p.binding=function(k){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(k){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],382:[function(o,_,O){(function(p){(function(){(function(f){var h=typeof O=="object"&&O&&!O.nodeType&&O,b=typeof _=="object"&&_&&!_.nodeType&&_,g=typeof p=="object"&&p;(g.global===g||g.window===g||g.self===g)&&(f=g);var w,c=2147483647,v=36,m=1,y=26,x=38,S=700,I=72,C=128,E="-",k=/^xn--/,V=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,K={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=v-m,R=Math.floor,j=String.fromCharCode,N;function $(he){throw new RangeError(K[he])}function z(he,be){for(var le=he.length,ue=[];le--;)ue[le]=be(he[le]);return ue}function F(he,be){var le=he.split("@"),ue="";le.length>1&&(ue=le[0]+"@",he=le[1]),he=he.replace(P,".");var ve=he.split("."),Ee=z(ve,be).join(".");return ue+Ee}function M(he){for(var be=[],le=0,ue=he.length,ve,Ee;le<ue;)ve=he.charCodeAt(le++),ve>=55296&&ve<=56319&&le<ue?(Ee=he.charCodeAt(le++),(Ee&64512)==56320?be.push(((ve&1023)<<10)+(Ee&1023)+65536):(be.push(ve),le--)):be.push(ve);return be}function X(he){return z(he,function(be){var le="";return be>65535&&(be-=65536,le+=j(be>>>10&1023|55296),be=56320|be&1023),le+=j(be),le}).join("")}function re(he){return he-48<10?he-22:he-65<26?he-65:he-97<26?he-97:v}function ne(he,be){return he+22+75*(he<26)-((be!=0)<<5)}function pe(he,be,le){var ue=0;for(he=le?R(he/S):he>>1,he+=R(he/be);he>B*y>>1;ue+=v)he=R(he/B);return R(ue+(B+1)*he/(he+x))}function ie(he){var be=[],le=he.length,ue,ve=0,Ee=C,Oe=I,De,ce,G,ye,Y,H,Q,J,ee;for(De=he.lastIndexOf(E),De<0&&(De=0),ce=0;ce<De;++ce)he.charCodeAt(ce)>=128&&$("not-basic"),be.push(he.charCodeAt(ce));for(G=De>0?De+1:0;G<le;){for(ye=ve,Y=1,H=v;G>=le&&$("invalid-input"),Q=re(he.charCodeAt(G++)),(Q>=v||Q>R((c-ve)/Y))&&$("overflow"),ve+=Q*Y,J=H<=Oe?m:H>=Oe+y?y:H-Oe,!(Q<J);H+=v)ee=v-J,Y>R(c/ee)&&$("overflow"),Y*=ee;ue=be.length+1,Oe=pe(ve-ye,ue,ye==0),R(ve/ue)>c-Ee&&$("overflow"),Ee+=R(ve/ue),ve%=ue,be.splice(ve++,0,Ee)}return X(be)}function Ae(he){var be,le,ue,ve,Ee,Oe,De,ce,G,ye,Y,H=[],Q,J,ee,W;for(he=M(he),Q=he.length,be=C,le=0,Ee=I,Oe=0;Oe<Q;++Oe)Y=he[Oe],Y<128&&H.push(j(Y));for(ue=ve=H.length,ve&&H.push(E);ue<Q;){for(De=c,Oe=0;Oe<Q;++Oe)Y=he[Oe],Y>=be&&Y<De&&(De=Y);for(J=ue+1,De-be>R((c-le)/J)&&$("overflow"),le+=(De-be)*J,be=De,Oe=0;Oe<Q;++Oe)if(Y=he[Oe],Y<be&&++le>c&&$("overflow"),Y==be){for(ce=le,G=v;ye=G<=Ee?m:G>=Ee+y?y:G-Ee,!(ce<ye);G+=v)W=ce-ye,ee=v-ye,H.push(j(ne(ye+W%ee,0))),ce=R(W/ee);H.push(j(ne(ce,0))),Ee=pe(le,J,ue==ve),le=0,++ue}++le,++be}return H.join("")}function Z(he){return F(he,function(be){return k.test(be)?ie(be.slice(4).toLowerCase()):be})}function fe(he){return F(he,function(be){return V.test(be)?"xn--"+Ae(be):be})}if(w={version:"1.4.1",ucs2:{decode:M,encode:X},decode:ie,encode:Ae,toASCII:fe,toUnicode:Z},typeof je=="function"&&typeof je.amd=="object"&&je.amd)je("punycode",function(){return w});else if(h&&b)if(_.exports==h)b.exports=w;else for(N in w)w.hasOwnProperty(N)&&(h[N]=w[N]);else f.punycode=w})(this)}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(o,_,O){"use strict";function p(h,b){return Object.prototype.hasOwnProperty.call(h,b)}_.exports=function(h,b,g,w){b=b||"&",g=g||"=";var c={};if(typeof h!="string"||h.length===0)return c;var v=/\+/g;h=h.split(b);var m=1e3;w&&typeof w.maxKeys=="number"&&(m=w.maxKeys);var y=h.length;m>0&&y>m&&(y=m);for(var x=0;x<y;++x){var S=h[x].replace(v,"%20"),I=S.indexOf(g),C,E,k,V;I>=0?(C=S.substr(0,I),E=S.substr(I+1)):(C=S,E=""),k=decodeURIComponent(C),V=decodeURIComponent(E),p(c,k)?f(c[k])?c[k].push(V):c[k]=[c[k],V]:c[k]=V}return c};var f=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{}],384:[function(o,_,O){"use strict";var p=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};_.exports=function(g,w,c,v){return w=w||"&",c=c||"=",g===null&&(g=void 0),typeof g=="object"?h(b(g),function(m){var y=encodeURIComponent(p(m))+c;return f(g[m])?h(g[m],function(x){return y+encodeURIComponent(p(x))}).join(w):y+encodeURIComponent(p(g[m]))}).join(w):v?encodeURIComponent(p(v))+c+encodeURIComponent(p(g)):""};var f=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function h(g,w){if(g.map)return g.map(w);for(var c=[],v=0;v<g.length;v++)c.push(w(g[v],v));return c}var b=Object.keys||function(g){var w=[];for(var c in g)Object.prototype.hasOwnProperty.call(g,c)&&w.push(c);return w}},{}],385:[function(o,_,O){"use strict";O.decode=O.parse=o("./decode"),O.encode=O.stringify=o("./encode")},{"./decode":383,"./encode":384}],386:[function(o,_,O){"use strict";var p=o("process-nextick-args"),f=Object.keys||function(S){var I=[];for(var C in S)I.push(C);return I};_.exports=m;var h=Object.create(o("core-util-is"));h.inherits=o("inherits");var b=o("./_stream_readable"),g=o("./_stream_writable");h.inherits(m,b);for(var w=f(g.prototype),c=0;c<w.length;c++){var v=w[c];m.prototype[v]||(m.prototype[v]=g.prototype[v])}function m(S){if(!(this instanceof m))return new m(S);b.call(this,S),g.call(this,S),S&&S.readable===!1&&(this.readable=!1),S&&S.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,S&&S.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||p.nextTick(x,this)}function x(S){S.end()}Object.defineProperty(m.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(S){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=S,this._writableState.destroyed=S)}}),m.prototype._destroy=function(S,I){this.push(null),this.end(),p.nextTick(I,S)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(o,_,O){"use strict";_.exports=h;var p=o("./_stream_transform"),f=Object.create(o("core-util-is"));f.inherits=o("inherits"),f.inherits(h,p);function h(b){if(!(this instanceof h))return new h(b);p.call(this,b)}h.prototype._transform=function(b,g,w){w(null,b)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(o,_,O){(function(p,f){(function(){"use strict";var h=o("process-nextick-args");_.exports=j;var b=o("isarray"),g;j.ReadableState=R;var w=o("events").EventEmitter,c=function(Y,H){return Y.listeners(H).length},v=o("./internal/streams/stream"),m=o("safe-buffer").Buffer,y=f.Uint8Array||function(){};function x(Y){return m.from(Y)}function S(Y){return m.isBuffer(Y)||Y instanceof y}var I=Object.create(o("core-util-is"));I.inherits=o("inherits");var C=o("util"),E=void 0;C&&C.debuglog?E=C.debuglog("stream"):E=function(){};var k=o("./internal/streams/BufferList"),V=o("./internal/streams/destroy"),P;I.inherits(j,v);var K=["error","close","destroy","pause","resume"];function B(Y,H,Q){if(typeof Y.prependListener=="function")return Y.prependListener(H,Q);!Y._events||!Y._events[H]?Y.on(H,Q):b(Y._events[H])?Y._events[H].unshift(Q):Y._events[H]=[Q,Y._events[H]]}function R(Y,H){g=g||o("./_stream_duplex"),Y=Y||{};var Q=H instanceof g;this.objectMode=!!Y.objectMode,Q&&(this.objectMode=this.objectMode||!!Y.readableObjectMode);var J=Y.highWaterMark,ee=Y.readableHighWaterMark,W=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:Q&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=W,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new k,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=Y.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Y.encoding&&(P||(P=o("string_decoder/").StringDecoder),this.decoder=new P(Y.encoding),this.encoding=Y.encoding)}function j(Y){if(g=g||o("./_stream_duplex"),!(this instanceof j))return new j(Y);this._readableState=new R(Y,this),this.readable=!0,Y&&(typeof Y.read=="function"&&(this._read=Y.read),typeof Y.destroy=="function"&&(this._destroy=Y.destroy)),v.call(this)}Object.defineProperty(j.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),j.prototype.destroy=V.destroy,j.prototype._undestroy=V.undestroy,j.prototype._destroy=function(Y,H){this.push(null),H(Y)},j.prototype.push=function(Y,H){var Q=this._readableState,J;return Q.objectMode?J=!0:typeof Y=="string"&&(H=H||Q.defaultEncoding,H!==Q.encoding&&(Y=m.from(Y,H),H=""),J=!0),N(this,Y,H,!1,J)},j.prototype.unshift=function(Y){return N(this,Y,null,!0,!1)};function N(Y,H,Q,J,ee){var W=Y._readableState;if(H===null)W.reading=!1,ne(Y,W);else{var L;ee||(L=z(W,H)),L?Y.emit("error",L):W.objectMode||H&&H.length>0?(typeof H!="string"&&!W.objectMode&&Object.getPrototypeOf(H)!==m.prototype&&(H=x(H)),J?W.endEmitted?Y.emit("error",new Error("stream.unshift() after end event")):$(Y,W,H,!0):W.ended?Y.emit("error",new Error("stream.push() after EOF")):(W.reading=!1,W.decoder&&!Q?(H=W.decoder.write(H),W.objectMode||H.length!==0?$(Y,W,H,!1):Ae(Y,W)):$(Y,W,H,!1))):J||(W.reading=!1)}return F(W)}function $(Y,H,Q,J){H.flowing&&H.length===0&&!H.sync?(Y.emit("data",Q),Y.read(0)):(H.length+=H.objectMode?1:Q.length,J?H.buffer.unshift(Q):H.buffer.push(Q),H.needReadable&&pe(Y)),Ae(Y,H)}function z(Y,H){var Q;return!S(H)&&typeof H!="string"&&H!==void 0&&!Y.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q}function F(Y){return!Y.ended&&(Y.needReadable||Y.length<Y.highWaterMark||Y.length===0)}j.prototype.isPaused=function(){return this._readableState.flowing===!1},j.prototype.setEncoding=function(Y){return P||(P=o("string_decoder/").StringDecoder),this._readableState.decoder=new P(Y),this._readableState.encoding=Y,this};var M=8388608;function X(Y){return Y>=M?Y=M:(Y--,Y|=Y>>>1,Y|=Y>>>2,Y|=Y>>>4,Y|=Y>>>8,Y|=Y>>>16,Y++),Y}function re(Y,H){return Y<=0||H.length===0&&H.ended?0:H.objectMode?1:Y!==Y?H.flowing&&H.length?H.buffer.head.data.length:H.length:(Y>H.highWaterMark&&(H.highWaterMark=X(Y)),Y<=H.length?Y:H.ended?H.length:(H.needReadable=!0,0))}j.prototype.read=function(Y){E("read",Y),Y=parseInt(Y,10);var H=this._readableState,Q=Y;if(Y!==0&&(H.emittedReadable=!1),Y===0&&H.needReadable&&(H.length>=H.highWaterMark||H.ended))return E("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?ce(this):pe(this),null;if(Y=re(Y,H),Y===0&&H.ended)return H.length===0&&ce(this),null;var J=H.needReadable;E("need readable",J),(H.length===0||H.length-Y<H.highWaterMark)&&(J=!0,E("length less than watermark",J)),H.ended||H.reading?(J=!1,E("reading or ended",J)):J&&(E("do read"),H.reading=!0,H.sync=!0,H.length===0&&(H.needReadable=!0),this._read(H.highWaterMark),H.sync=!1,H.reading||(Y=re(Q,H)));var ee;return Y>0?ee=ve(Y,H):ee=null,ee===null?(H.needReadable=!0,Y=0):H.length-=Y,H.length===0&&(H.ended||(H.needReadable=!0),Q!==Y&&H.ended&&ce(this)),ee!==null&&this.emit("data",ee),ee};function ne(Y,H){if(!H.ended){if(H.decoder){var Q=H.decoder.end();Q&&Q.length&&(H.buffer.push(Q),H.length+=H.objectMode?1:Q.length)}H.ended=!0,pe(Y)}}function pe(Y){var H=Y._readableState;H.needReadable=!1,H.emittedReadable||(E("emitReadable",H.flowing),H.emittedReadable=!0,H.sync?h.nextTick(ie,Y):ie(Y))}function ie(Y){E("emit readable"),Y.emit("readable"),ue(Y)}function Ae(Y,H){H.readingMore||(H.readingMore=!0,h.nextTick(Z,Y,H))}function Z(Y,H){for(var Q=H.length;!H.reading&&!H.flowing&&!H.ended&&H.length<H.highWaterMark&&(E("maybeReadMore read 0"),Y.read(0),Q!==H.length);)Q=H.length;H.readingMore=!1}j.prototype._read=function(Y){this.emit("error",new Error("_read() is not implemented"))},j.prototype.pipe=function(Y,H){var Q=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=Y;break;case 1:J.pipes=[J.pipes,Y];break;default:J.pipes.push(Y);break}J.pipesCount+=1,E("pipe count=%d opts=%j",J.pipesCount,H);var ee=(!H||H.end!==!1)&&Y!==p.stdout&&Y!==p.stderr,W=ee?q:_e;J.endEmitted?h.nextTick(W):Q.once("end",W),Y.on("unpipe",L);function L(Fe,Ve){E("onunpipe"),Fe===Q&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,He())}function q(){E("onend"),Y.end()}var de=fe(Q);Y.on("drain",de);var Ie=!1;function He(){E("cleanup"),Y.removeListener("close",ge),Y.removeListener("finish",Be),Y.removeListener("drain",de),Y.removeListener("error",dt),Y.removeListener("unpipe",L),Q.removeListener("end",q),Q.removeListener("end",_e),Q.removeListener("data",Je),Ie=!0,J.awaitDrain&&(!Y._writableState||Y._writableState.needDrain)&&de()}var ze=!1;Q.on("data",Je);function Je(Fe){E("ondata"),ze=!1;var Ve=Y.write(Fe);Ve===!1&&!ze&&((J.pipesCount===1&&J.pipes===Y||J.pipesCount>1&&ye(J.pipes,Y)!==-1)&&!Ie&&(E("false write response, pause",Q._readableState.awaitDrain),Q._readableState.awaitDrain++,ze=!0),Q.pause())}function dt(Fe){E("onerror",Fe),_e(),Y.removeListener("error",dt),c(Y,"error")===0&&Y.emit("error",Fe)}B(Y,"error",dt);function ge(){Y.removeListener("finish",Be),_e()}Y.once("close",ge);function Be(){E("onfinish"),Y.removeListener("close",ge),_e()}Y.once("finish",Be);function _e(){E("unpipe"),Q.unpipe(Y)}return Y.emit("pipe",Q),J.flowing||(E("pipe resume"),Q.resume()),Y};function fe(Y){return function(){var H=Y._readableState;E("pipeOnDrain",H.awaitDrain),H.awaitDrain&&H.awaitDrain--,H.awaitDrain===0&&c(Y,"data")&&(H.flowing=!0,ue(Y))}}j.prototype.unpipe=function(Y){var H=this._readableState,Q={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return Y&&Y!==H.pipes?this:(Y||(Y=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,Y&&Y.emit("unpipe",this,Q),this);if(!Y){var J=H.pipes,ee=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var W=0;W<ee;W++)J[W].emit("unpipe",this,Q);return this}var L=ye(H.pipes,Y);return L===-1?this:(H.pipes.splice(L,1),H.pipesCount-=1,H.pipesCount===1&&(H.pipes=H.pipes[0]),Y.emit("unpipe",this,Q),this)},j.prototype.on=function(Y,H){var Q=v.prototype.on.call(this,Y,H);if(Y==="data")this._readableState.flowing!==!1&&this.resume();else if(Y==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&pe(this):h.nextTick(he,this))}return Q},j.prototype.addListener=j.prototype.on;function he(Y){E("readable nexttick read 0"),Y.read(0)}j.prototype.resume=function(){var Y=this._readableState;return Y.flowing||(E("resume"),Y.flowing=!0,be(this,Y)),this};function be(Y,H){H.resumeScheduled||(H.resumeScheduled=!0,h.nextTick(le,Y,H))}function le(Y,H){H.reading||(E("resume read 0"),Y.read(0)),H.resumeScheduled=!1,H.awaitDrain=0,Y.emit("resume"),ue(Y),H.flowing&&!H.reading&&Y.read(0)}j.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ue(Y){var H=Y._readableState;for(E("flow",H.flowing);H.flowing&&Y.read()!==null;);}j.prototype.wrap=function(Y){var H=this,Q=this._readableState,J=!1;Y.on("end",function(){if(E("wrapped end"),Q.decoder&&!Q.ended){var L=Q.decoder.end();L&&L.length&&H.push(L)}H.push(null)}),Y.on("data",function(L){if(E("wrapped data"),Q.decoder&&(L=Q.decoder.write(L)),!(Q.objectMode&&L==null)&&!(!Q.objectMode&&(!L||!L.length))){var q=H.push(L);q||(J=!0,Y.pause())}});for(var ee in Y)this[ee]===void 0&&typeof Y[ee]=="function"&&(this[ee]=function(L){return function(){return Y[L].apply(Y,arguments)}}(ee));for(var W=0;W<K.length;W++)Y.on(K[W],this.emit.bind(this,K[W]));return this._read=function(L){E("wrapped _read",L),J&&(J=!1,Y.resume())},this},Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),j._fromList=ve;function ve(Y,H){if(H.length===0)return null;var Q;return H.objectMode?Q=H.buffer.shift():!Y||Y>=H.length?(H.decoder?Q=H.buffer.join(""):H.buffer.length===1?Q=H.buffer.head.data:Q=H.buffer.concat(H.length),H.buffer.clear()):Q=Ee(Y,H.buffer,H.decoder),Q}function Ee(Y,H,Q){var J;return Y<H.head.data.length?(J=H.head.data.slice(0,Y),H.head.data=H.head.data.slice(Y)):Y===H.head.data.length?J=H.shift():J=Q?Oe(Y,H):De(Y,H),J}function Oe(Y,H){var Q=H.head,J=1,ee=Q.data;for(Y-=ee.length;Q=Q.next;){var W=Q.data,L=Y>W.length?W.length:Y;if(L===W.length?ee+=W:ee+=W.slice(0,Y),Y-=L,Y===0){L===W.length?(++J,Q.next?H.head=Q.next:H.head=H.tail=null):(H.head=Q,Q.data=W.slice(L));break}++J}return H.length-=J,ee}function De(Y,H){var Q=m.allocUnsafe(Y),J=H.head,ee=1;for(J.data.copy(Q),Y-=J.data.length;J=J.next;){var W=J.data,L=Y>W.length?W.length:Y;if(W.copy(Q,Q.length-Y,0,L),Y-=L,Y===0){L===W.length?(++ee,J.next?H.head=J.next:H.head=H.tail=null):(H.head=J,J.data=W.slice(L));break}++ee}return H.length-=ee,Q}function ce(Y){var H=Y._readableState;if(H.length>0)throw new Error('"endReadable()" called on non-empty stream');H.endEmitted||(H.ended=!0,h.nextTick(G,H,Y))}function G(Y,H){!Y.endEmitted&&Y.length===0&&(Y.endEmitted=!0,H.readable=!1,H.emit("end"))}function ye(Y,H){for(var Q=0,J=Y.length;Q<J;Q++)if(Y[Q]===H)return Q;return-1}}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(o,_,O){"use strict";_.exports=b;var p=o("./_stream_duplex"),f=Object.create(o("core-util-is"));f.inherits=o("inherits"),f.inherits(b,p);function h(c,v){var m=this._transformState;m.transforming=!1;var y=m.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));m.writechunk=null,m.writecb=null,v!=null&&this.push(v),y(c);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function b(c){if(!(this instanceof b))return new b(c);p.call(this,c),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",g)}function g(){var c=this;typeof this._flush=="function"?this._flush(function(v,m){w(c,v,m)}):w(this,null,null)}b.prototype.push=function(c,v){return this._transformState.needTransform=!1,p.prototype.push.call(this,c,v)},b.prototype._transform=function(c,v,m){throw new Error("_transform() is not implemented")},b.prototype._write=function(c,v,m){var y=this._transformState;if(y.writecb=m,y.writechunk=c,y.writeencoding=v,!y.transforming){var x=this._readableState;(y.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},b.prototype._read=function(c){var v=this._transformState;v.writechunk!==null&&v.writecb&&!v.transforming?(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform)):v.needTransform=!0},b.prototype._destroy=function(c,v){var m=this;p.prototype._destroy.call(this,c,function(y){v(y),m.emit("close")})};function w(c,v,m){if(v)return c.emit("error",v);if(m!=null&&c.push(m),c._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(c._transformState.transforming)throw new Error("Calling transform done when still transforming");return c.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(o,_,O){(function(p,f,h){(function(){"use strict";var b=o("process-nextick-args");_.exports=B;function g(le,ue,ve){this.chunk=le,this.encoding=ue,this.callback=ve,this.next=null}function w(le){var ue=this;this.next=null,this.entry=null,this.finish=function(){be(ue,le)}}var c=!p.browser&&["v0.10","v0.9."].indexOf(p.version.slice(0,5))>-1?h:b.nextTick,v;B.WritableState=P;var m=Object.create(o("core-util-is"));m.inherits=o("inherits");var y={deprecate:o("util-deprecate")},x=o("./internal/streams/stream"),S=o("safe-buffer").Buffer,I=f.Uint8Array||function(){};function C(le){return S.from(le)}function E(le){return S.isBuffer(le)||le instanceof I}var k=o("./internal/streams/destroy");m.inherits(B,x);function V(){}function P(le,ue){v=v||o("./_stream_duplex"),le=le||{};var ve=ue instanceof v;this.objectMode=!!le.objectMode,ve&&(this.objectMode=this.objectMode||!!le.writableObjectMode);var Ee=le.highWaterMark,Oe=le.writableHighWaterMark,De=this.objectMode?16:16*1024;Ee||Ee===0?this.highWaterMark=Ee:ve&&(Oe||Oe===0)?this.highWaterMark=Oe:this.highWaterMark=De,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ce=le.decodeStrings===!1;this.decodeStrings=!ce,this.defaultEncoding=le.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){X(ue,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}P.prototype.getBuffer=function(){for(var ue=this.bufferedRequest,ve=[];ue;)ve.push(ue),ue=ue.next;return ve},function(){try{Object.defineProperty(P.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(le){}}();var K;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(K=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(le){return K.call(this,le)?!0:this!==B?!1:le&&le._writableState instanceof P}})):K=function(le){return le instanceof this};function B(le){if(v=v||o("./_stream_duplex"),!K.call(B,this)&&!(this instanceof v))return new B(le);this._writableState=new P(le,this),this.writable=!0,le&&(typeof le.write=="function"&&(this._write=le.write),typeof le.writev=="function"&&(this._writev=le.writev),typeof le.destroy=="function"&&(this._destroy=le.destroy),typeof le.final=="function"&&(this._final=le.final)),x.call(this)}B.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function R(le,ue){var ve=new Error("write after end");le.emit("error",ve),b.nextTick(ue,ve)}function j(le,ue,ve,Ee){var Oe=!0,De=!1;return ve===null?De=new TypeError("May not write null values to stream"):typeof ve!="string"&&ve!==void 0&&!ue.objectMode&&(De=new TypeError("Invalid non-string/buffer chunk")),De&&(le.emit("error",De),b.nextTick(Ee,De),Oe=!1),Oe}B.prototype.write=function(le,ue,ve){var Ee=this._writableState,Oe=!1,De=!Ee.objectMode&&E(le);return De&&!S.isBuffer(le)&&(le=C(le)),typeof ue=="function"&&(ve=ue,ue=null),De?ue="buffer":ue||(ue=Ee.defaultEncoding),typeof ve!="function"&&(ve=V),Ee.ended?R(this,ve):(De||j(this,Ee,le,ve))&&(Ee.pendingcb++,Oe=$(this,Ee,De,le,ue,ve)),Oe},B.prototype.cork=function(){var le=this._writableState;le.corked++},B.prototype.uncork=function(){var le=this._writableState;le.corked&&(le.corked--,!le.writing&&!le.corked&&!le.finished&&!le.bufferProcessing&&le.bufferedRequest&&pe(this,le))},B.prototype.setDefaultEncoding=function(ue){if(typeof ue=="string"&&(ue=ue.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ue+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ue);return this._writableState.defaultEncoding=ue,this};function N(le,ue,ve){return!le.objectMode&&le.decodeStrings!==!1&&typeof ue=="string"&&(ue=S.from(ue,ve)),ue}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $(le,ue,ve,Ee,Oe,De){if(!ve){var ce=N(ue,Ee,Oe);Ee!==ce&&(ve=!0,Oe="buffer",Ee=ce)}var G=ue.objectMode?1:Ee.length;ue.length+=G;var ye=ue.length<ue.highWaterMark;if(ye||(ue.needDrain=!0),ue.writing||ue.corked){var Y=ue.lastBufferedRequest;ue.lastBufferedRequest={chunk:Ee,encoding:Oe,isBuf:ve,callback:De,next:null},Y?Y.next=ue.lastBufferedRequest:ue.bufferedRequest=ue.lastBufferedRequest,ue.bufferedRequestCount+=1}else z(le,ue,!1,G,Ee,Oe,De);return ye}function z(le,ue,ve,Ee,Oe,De,ce){ue.writelen=Ee,ue.writecb=ce,ue.writing=!0,ue.sync=!0,ve?le._writev(Oe,ue.onwrite):le._write(Oe,De,ue.onwrite),ue.sync=!1}function F(le,ue,ve,Ee,Oe){--ue.pendingcb,ve?(b.nextTick(Oe,Ee),b.nextTick(fe,le,ue),le._writableState.errorEmitted=!0,le.emit("error",Ee)):(Oe(Ee),le._writableState.errorEmitted=!0,le.emit("error",Ee),fe(le,ue))}function M(le){le.writing=!1,le.writecb=null,le.length-=le.writelen,le.writelen=0}function X(le,ue){var ve=le._writableState,Ee=ve.sync,Oe=ve.writecb;if(M(ve),ue)F(le,ve,Ee,ue,Oe);else{var De=ie(ve);!De&&!ve.corked&&!ve.bufferProcessing&&ve.bufferedRequest&&pe(le,ve),Ee?c(re,le,ve,De,Oe):re(le,ve,De,Oe)}}function re(le,ue,ve,Ee){ve||ne(le,ue),ue.pendingcb--,Ee(),fe(le,ue)}function ne(le,ue){ue.length===0&&ue.needDrain&&(ue.needDrain=!1,le.emit("drain"))}function pe(le,ue){ue.bufferProcessing=!0;var ve=ue.bufferedRequest;if(le._writev&&ve&&ve.next){var Ee=ue.bufferedRequestCount,Oe=new Array(Ee),De=ue.corkedRequestsFree;De.entry=ve;for(var ce=0,G=!0;ve;)Oe[ce]=ve,ve.isBuf||(G=!1),ve=ve.next,ce+=1;Oe.allBuffers=G,z(le,ue,!0,ue.length,Oe,"",De.finish),ue.pendingcb++,ue.lastBufferedRequest=null,De.next?(ue.corkedRequestsFree=De.next,De.next=null):ue.corkedRequestsFree=new w(ue),ue.bufferedRequestCount=0}else{for(;ve;){var ye=ve.chunk,Y=ve.encoding,H=ve.callback,Q=ue.objectMode?1:ye.length;if(z(le,ue,!1,Q,ye,Y,H),ve=ve.next,ue.bufferedRequestCount--,ue.writing)break}ve===null&&(ue.lastBufferedRequest=null)}ue.bufferedRequest=ve,ue.bufferProcessing=!1}B.prototype._write=function(le,ue,ve){ve(new Error("_write() is not implemented"))},B.prototype._writev=null,B.prototype.end=function(le,ue,ve){var Ee=this._writableState;typeof le=="function"?(ve=le,le=null,ue=null):typeof ue=="function"&&(ve=ue,ue=null),le!=null&&this.write(le,ue),Ee.corked&&(Ee.corked=1,this.uncork()),!Ee.ending&&!Ee.finished&&he(this,Ee,ve)};function ie(le){return le.ending&&le.length===0&&le.bufferedRequest===null&&!le.finished&&!le.writing}function Ae(le,ue){le._final(function(ve){ue.pendingcb--,ve&&le.emit("error",ve),ue.prefinished=!0,le.emit("prefinish"),fe(le,ue)})}function Z(le,ue){!ue.prefinished&&!ue.finalCalled&&(typeof le._final=="function"?(ue.pendingcb++,ue.finalCalled=!0,b.nextTick(Ae,le,ue)):(ue.prefinished=!0,le.emit("prefinish")))}function fe(le,ue){var ve=ie(ue);return ve&&(Z(le,ue),ue.pendingcb===0&&(ue.finished=!0,le.emit("finish"))),ve}function he(le,ue,ve){ue.ending=!0,fe(le,ue),ve&&(ue.finished?b.nextTick(ve):le.once("finish",ve)),ue.ended=!0,le.writable=!1}function be(le,ue,ve){var Ee=le.entry;for(le.entry=null;Ee;){var Oe=Ee.callback;ue.pendingcb--,Oe(ve),Ee=Ee.next}ue.corkedRequestsFree?ue.corkedRequestsFree.next=le:ue.corkedRequestsFree=le}Object.defineProperty(B.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){this._writableState&&(this._writableState.destroyed=le)}}),B.prototype.destroy=k.destroy,B.prototype._undestroy=k.undestroy,B.prototype._destroy=function(le,ue){this.end(),ue(le)}}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(o,_,O){"use strict";function p(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}var f=o("safe-buffer").Buffer,h=o("util");function b(g,w,c){g.copy(w,c)}_.exports=function(){function g(){p(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(c){var v={data:c,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},g.prototype.unshift=function(c){var v={data:c,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},g.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(c){if(this.length===0)return"";for(var v=this.head,m=""+v.data;v=v.next;)m+=c+v.data;return m},g.prototype.concat=function(c){if(this.length===0)return f.alloc(0);if(this.length===1)return this.head.data;for(var v=f.allocUnsafe(c>>>0),m=this.head,y=0;m;)b(m.data,v,y),y+=m.data.length,m=m.next;return v},g}(),h&&h.inspect&&h.inspect.custom&&(_.exports.prototype[h.inspect.custom]=function(){var g=h.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":396,util:89}],392:[function(o,_,O){"use strict";var p=o("process-nextick-args");function f(g,w){var c=this,v=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return v||m?(w?w(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&p.nextTick(b,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(y){!w&&y?(p.nextTick(b,c,y),c._writableState&&(c._writableState.errorEmitted=!0)):w&&w(y)}),this)}function h(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function b(g,w){g.emit("error",w)}_.exports={destroy:f,undestroy:h}},{"process-nextick-args":380}],393:[function(o,_,O){_.exports=o("events").EventEmitter},{events:344}],394:[function(o,_,O){O=_.exports=o("./lib/_stream_readable.js"),O.Stream=O,O.Readable=O,O.Writable=o("./lib/_stream_writable.js"),O.Duplex=o("./lib/_stream_duplex.js"),O.Transform=o("./lib/_stream_transform.js"),O.PassThrough=o("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(o,_,O){var p=function(f){"use strict";var h=Object.prototype,b=h.hasOwnProperty,g,w=typeof Symbol=="function"?Symbol:{},c=w.iterator||"@@iterator",v=w.asyncIterator||"@@asyncIterator",m=w.toStringTag||"@@toStringTag";function y(Z,fe,he){return Object.defineProperty(Z,fe,{value:he,enumerable:!0,configurable:!0,writable:!0}),Z[fe]}try{y({},"")}catch(Z){y=function(fe,he,be){return fe[he]=be}}function x(Z,fe,he,be){var le=fe&&fe.prototype instanceof P?fe:P,ue=Object.create(le.prototype),ve=new pe(be||[]);return ue._invoke=M(Z,he,ve),ue}f.wrap=x;function S(Z,fe,he){try{return{type:"normal",arg:Z.call(fe,he)}}catch(be){return{type:"throw",arg:be}}}var I="suspendedStart",C="suspendedYield",E="executing",k="completed",V={};function P(){}function K(){}function B(){}var R={};y(R,c,function(){return this});var j=Object.getPrototypeOf,N=j&&j(j(ie([])));N&&N!==h&&b.call(N,c)&&(R=N);var $=B.prototype=P.prototype=Object.create(R);K.prototype=B,y($,"constructor",B),y(B,"constructor",K),K.displayName=y(B,m,"GeneratorFunction");function z(Z){["next","throw","return"].forEach(function(fe){y(Z,fe,function(he){return this._invoke(fe,he)})})}f.isGeneratorFunction=function(Z){var fe=typeof Z=="function"&&Z.constructor;return fe?fe===K||(fe.displayName||fe.name)==="GeneratorFunction":!1},f.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,B):(Z.__proto__=B,y(Z,m,"GeneratorFunction")),Z.prototype=Object.create($),Z},f.awrap=function(Z){return{__await:Z}};function F(Z,fe){function he(ue,ve,Ee,Oe){var De=S(Z[ue],Z,ve);if(De.type==="throw")Oe(De.arg);else{var ce=De.arg,G=ce.value;return G&&typeof G=="object"&&b.call(G,"__await")?fe.resolve(G.__await).then(function(ye){he("next",ye,Ee,Oe)},function(ye){he("throw",ye,Ee,Oe)}):fe.resolve(G).then(function(ye){ce.value=ye,Ee(ce)},function(ye){return he("throw",ye,Ee,Oe)})}}var be;function le(ue,ve){function Ee(){return new fe(function(Oe,De){he(ue,ve,Oe,De)})}return be=be?be.then(Ee,Ee):Ee()}this._invoke=le}z(F.prototype),y(F.prototype,v,function(){return this}),f.AsyncIterator=F,f.async=function(Z,fe,he,be,le){le===void 0&&(le=Promise);var ue=new F(x(Z,fe,he,be),le);return f.isGeneratorFunction(fe)?ue:ue.next().then(function(ve){return ve.done?ve.value:ue.next()})};function M(Z,fe,he){var be=I;return function(ue,ve){if(be===E)throw new Error("Generator is already running");if(be===k){if(ue==="throw")throw ve;return Ae()}for(he.method=ue,he.arg=ve;;){var Ee=he.delegate;if(Ee){var Oe=X(Ee,he);if(Oe){if(Oe===V)continue;return Oe}}if(he.method==="next")he.sent=he._sent=he.arg;else if(he.method==="throw"){if(be===I)throw be=k,he.arg;he.dispatchException(he.arg)}else he.method==="return"&&he.abrupt("return",he.arg);be=E;var De=S(Z,fe,he);if(De.type==="normal"){if(be=he.done?k:C,De.arg===V)continue;return{value:De.arg,done:he.done}}else De.type==="throw"&&(be=k,he.method="throw",he.arg=De.arg)}}}function X(Z,fe){var he=Z.iterator[fe.method];if(he===g){if(fe.delegate=null,fe.method==="throw"){if(Z.iterator.return&&(fe.method="return",fe.arg=g,X(Z,fe),fe.method==="throw"))return V;fe.method="throw",fe.arg=new TypeError("The iterator does not provide a 'throw' method")}return V}var be=S(he,Z.iterator,fe.arg);if(be.type==="throw")return fe.method="throw",fe.arg=be.arg,fe.delegate=null,V;var le=be.arg;if(!le)return fe.method="throw",fe.arg=new TypeError("iterator result is not an object"),fe.delegate=null,V;if(le.done)fe[Z.resultName]=le.value,fe.next=Z.nextLoc,fe.method!=="return"&&(fe.method="next",fe.arg=g);else return le;return fe.delegate=null,V}z($),y($,m,"Generator"),y($,c,function(){return this}),y($,"toString",function(){return"[object Generator]"});function re(Z){var fe={tryLoc:Z[0]};1 in Z&&(fe.catchLoc=Z[1]),2 in Z&&(fe.finallyLoc=Z[2],fe.afterLoc=Z[3]),this.tryEntries.push(fe)}function ne(Z){var fe=Z.completion||{};fe.type="normal",delete fe.arg,Z.completion=fe}function pe(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(re,this),this.reset(!0)}f.keys=function(Z){var fe=[];for(var he in Z)fe.push(he);return fe.reverse(),function be(){for(;fe.length;){var le=fe.pop();if(le in Z)return be.value=le,be.done=!1,be}return be.done=!0,be}};function ie(Z){if(Z){var fe=Z[c];if(fe)return fe.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var he=-1,be=function le(){for(;++he<Z.length;)if(b.call(Z,he))return le.value=Z[he],le.done=!1,le;return le.value=g,le.done=!0,le};return be.next=be}}return{next:Ae}}f.values=ie;function Ae(){return{value:g,done:!0}}return pe.prototype={constructor:pe,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(ne),!Z)for(var fe in this)fe.charAt(0)==="t"&&b.call(this,fe)&&!isNaN(+fe.slice(1))&&(this[fe]=g)},stop:function(){this.done=!0;var Z=this.tryEntries[0],fe=Z.completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(Z){if(this.done)throw Z;var fe=this;function he(Oe,De){return ue.type="throw",ue.arg=Z,fe.next=Oe,De&&(fe.method="next",fe.arg=g),!!De}for(var be=this.tryEntries.length-1;be>=0;--be){var le=this.tryEntries[be],ue=le.completion;if(le.tryLoc==="root")return he("end");if(le.tryLoc<=this.prev){var ve=b.call(le,"catchLoc"),Ee=b.call(le,"finallyLoc");if(ve&&Ee){if(this.prev<le.catchLoc)return he(le.catchLoc,!0);if(this.prev<le.finallyLoc)return he(le.finallyLoc)}else if(ve){if(this.prev<le.catchLoc)return he(le.catchLoc,!0)}else if(Ee){if(this.prev<le.finallyLoc)return he(le.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Z,fe){for(var he=this.tryEntries.length-1;he>=0;--he){var be=this.tryEntries[he];if(be.tryLoc<=this.prev&&b.call(be,"finallyLoc")&&this.prev<be.finallyLoc){var le=be;break}}le&&(Z==="break"||Z==="continue")&&le.tryLoc<=fe&&fe<=le.finallyLoc&&(le=null);var ue=le?le.completion:{};return ue.type=Z,ue.arg=fe,le?(this.method="next",this.next=le.finallyLoc,V):this.complete(ue)},complete:function(Z,fe){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&fe&&(this.next=fe),V},finish:function(Z){for(var fe=this.tryEntries.length-1;fe>=0;--fe){var he=this.tryEntries[fe];if(he.finallyLoc===Z)return this.complete(he.completion,he.afterLoc),ne(he),V}},catch:function(Z){for(var fe=this.tryEntries.length-1;fe>=0;--fe){var he=this.tryEntries[fe];if(he.tryLoc===Z){var be=he.completion;if(be.type==="throw"){var le=be.arg;ne(he)}return le}}throw new Error("illegal catch attempt")},delegateYield:function(Z,fe,he){return this.delegate={iterator:ie(Z),resultName:fe,nextLoc:he},this.method==="next"&&(this.arg=g),V}},f}(typeof _=="object"?_.exports:{});try{regeneratorRuntime=p}catch(f){typeof globalThis=="object"?globalThis.regeneratorRuntime=p:Function("r","regeneratorRuntime = r")(p)}},{}],396:[function(o,_,O){var p=o("buffer"),f=p.Buffer;function h(g,w){for(var c in g)w[c]=g[c]}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?_.exports=p:(h(p,O),O.Buffer=b);function b(g,w,c){return f(g,w,c)}h(f,b),b.from=function(g,w,c){if(typeof g=="number")throw new TypeError("Argument must not be a number");return f(g,w,c)},b.alloc=function(g,w,c){if(typeof g!="number")throw new TypeError("Argument must be a number");var v=f(g);return w!==void 0?typeof c=="string"?v.fill(w,c):v.fill(w):v.fill(0),v},b.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return f(g)},b.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return p.SlowBuffer(g)}},{buffer:90}],397:[function(o,_,O){(function(p){(function(){(function(f){f.parser=function(ce,G){return new b(ce,G)},f.SAXParser=b,f.SAXStream=x,f.createStream=y,f.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];f.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function b(ce,G){if(!(this instanceof b))return new b(ce,G);var ye=this;w(ye),ye.q=ye.c="",ye.bufferCheckPosition=f.MAX_BUFFER_LENGTH,ye.opt=G||{},ye.opt.lowercase=ye.opt.lowercase||ye.opt.lowercasetags,ye.looseCase=ye.opt.lowercase?"toLowerCase":"toUpperCase",ye.tags=[],ye.closed=ye.closedRoot=ye.sawRoot=!1,ye.tag=ye.error=null,ye.strict=!!ce,ye.noscript=!!(ce||ye.opt.noscript),ye.state=F.BEGIN,ye.strictEntities=ye.opt.strictEntities,ye.ENTITIES=ye.strictEntities?Object.create(f.XML_ENTITIES):Object.create(f.ENTITIES),ye.attribList=[],ye.opt.xmlns&&(ye.ns=Object.create(k)),ye.trackPosition=ye.opt.position!==!1,ye.trackPosition&&(ye.position=ye.line=ye.column=0),X(ye,"onready")}Object.create||(Object.create=function(ce){function G(){}G.prototype=ce;var ye=new G;return ye}),Object.keys||(Object.keys=function(ce){var G=[];for(var ye in ce)ce.hasOwnProperty(ye)&&G.push(ye);return G});function g(ce){for(var G=Math.max(f.MAX_BUFFER_LENGTH,10),ye=0,Y=0,H=h.length;Y<H;Y++){var Q=ce[h[Y]].length;if(Q>G)switch(h[Y]){case"textNode":ne(ce);break;case"cdata":re(ce,"oncdata",ce.cdata),ce.cdata="";break;case"script":re(ce,"onscript",ce.script),ce.script="";break;default:ie(ce,"Max buffer length exceeded: "+h[Y])}ye=Math.max(ye,Q)}var J=f.MAX_BUFFER_LENGTH-ye;ce.bufferCheckPosition=J+ce.position}function w(ce){for(var G=0,ye=h.length;G<ye;G++)ce[h[G]]=""}function c(ce){ne(ce),ce.cdata!==""&&(re(ce,"oncdata",ce.cdata),ce.cdata=""),ce.script!==""&&(re(ce,"onscript",ce.script),ce.script="")}b.prototype={end:function(){Ae(this)},write:De,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var v;try{v=o("stream").Stream}catch(ce){v=function(){}}var m=f.EVENTS.filter(function(ce){return ce!=="error"&&ce!=="end"});function y(ce,G){return new x(ce,G)}function x(ce,G){if(!(this instanceof x))return new x(ce,G);v.apply(this),this._parser=new b(ce,G),this.writable=!0,this.readable=!0;var ye=this;this._parser.onend=function(){ye.emit("end")},this._parser.onerror=function(Y){ye.emit("error",Y),ye._parser.error=null},this._decoder=null,m.forEach(function(Y){Object.defineProperty(ye,"on"+Y,{get:function(){return ye._parser["on"+Y]},set:function(H){if(!H)return ye.removeAllListeners(Y),ye._parser["on"+Y]=H,H;ye.on(Y,H)},enumerable:!0,configurable:!1})})}x.prototype=Object.create(v.prototype,{constructor:{value:x}}),x.prototype.write=function(ce){if(typeof p=="function"&&typeof p.isBuffer=="function"&&p.isBuffer(ce)){if(!this._decoder){var G=o("string_decoder").StringDecoder;this._decoder=new G("utf8")}ce=this._decoder.write(ce)}return this._parser.write(ce.toString()),this.emit("data",ce),!0},x.prototype.end=function(ce){return ce&&ce.length&&this.write(ce),this._parser.end(),!0},x.prototype.on=function(ce,G){var ye=this;return!ye._parser["on"+ce]&&m.indexOf(ce)!==-1&&(ye._parser["on"+ce]=function(){var Y=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Y.splice(0,0,ce),ye.emit.apply(ye,Y)}),v.prototype.on.call(ye,ce,G)};var S="[CDATA[",I="DOCTYPE",C="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",k={xml:C,xmlns:E},V=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,P=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,K=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function R(ce){return ce===" "||ce===`
|
|
`||ce==="\r"||ce===" "}function j(ce){return ce==='"'||ce==="'"}function N(ce){return ce===">"||R(ce)}function $(ce,G){return ce.test(G)}function z(ce,G){return!$(ce,G)}var F=0;f.STATE={BEGIN:F++,BEGIN_WHITESPACE:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_CLOSED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},f.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},f.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(f.ENTITIES).forEach(function(ce){var G=f.ENTITIES[ce],ye=typeof G=="number"?String.fromCharCode(G):G;f.ENTITIES[ce]=ye});for(var M in f.STATE)f.STATE[f.STATE[M]]=M;F=f.STATE;function X(ce,G,ye){ce[G]&&ce[G](ye)}function re(ce,G,ye){ce.textNode&&ne(ce),X(ce,G,ye)}function ne(ce){ce.textNode=pe(ce.opt,ce.textNode),ce.textNode&&X(ce,"ontext",ce.textNode),ce.textNode=""}function pe(ce,G){return ce.trim&&(G=G.trim()),ce.normalize&&(G=G.replace(/\s+/g," ")),G}function ie(ce,G){return ne(ce),ce.trackPosition&&(G+=`
|
|
Line: `+ce.line+`
|
|
Column: `+ce.column+`
|
|
Char: `+ce.c),G=new Error(G),ce.error=G,X(ce,"onerror",G),ce}function Ae(ce){return ce.sawRoot&&!ce.closedRoot&&Z(ce,"Unclosed root tag"),ce.state!==F.BEGIN&&ce.state!==F.BEGIN_WHITESPACE&&ce.state!==F.TEXT&&ie(ce,"Unexpected end"),ne(ce),ce.c="",ce.closed=!0,X(ce,"onend"),b.call(ce,ce.strict,ce.opt),ce}function Z(ce,G){if(typeof ce!="object"||!(ce instanceof b))throw new Error("bad call to strictFail");ce.strict&&ie(ce,G)}function fe(ce){ce.strict||(ce.tagName=ce.tagName[ce.looseCase]());var G=ce.tags[ce.tags.length-1]||ce,ye=ce.tag={name:ce.tagName,attributes:{}};ce.opt.xmlns&&(ye.ns=G.ns),ce.attribList.length=0,re(ce,"onopentagstart",ye)}function he(ce,G){var ye=ce.indexOf(":"),Y=ye<0?["",ce]:ce.split(":"),H=Y[0],Q=Y[1];return G&&ce==="xmlns"&&(H="xmlns",Q=""),{prefix:H,local:Q}}function be(ce){if(ce.strict||(ce.attribName=ce.attribName[ce.looseCase]()),ce.attribList.indexOf(ce.attribName)!==-1||ce.tag.attributes.hasOwnProperty(ce.attribName)){ce.attribName=ce.attribValue="";return}if(ce.opt.xmlns){var G=he(ce.attribName,!0),ye=G.prefix,Y=G.local;if(ye==="xmlns")if(Y==="xml"&&ce.attribValue!==C)Z(ce,"xml: prefix must be bound to "+C+`
|
|
Actual: `+ce.attribValue);else if(Y==="xmlns"&&ce.attribValue!==E)Z(ce,"xmlns: prefix must be bound to "+E+`
|
|
Actual: `+ce.attribValue);else{var H=ce.tag,Q=ce.tags[ce.tags.length-1]||ce;H.ns===Q.ns&&(H.ns=Object.create(Q.ns)),H.ns[Y]=ce.attribValue}ce.attribList.push([ce.attribName,ce.attribValue])}else ce.tag.attributes[ce.attribName]=ce.attribValue,re(ce,"onattribute",{name:ce.attribName,value:ce.attribValue});ce.attribName=ce.attribValue=""}function le(ce,G){if(ce.opt.xmlns){var ye=ce.tag,Y=he(ce.tagName);ye.prefix=Y.prefix,ye.local=Y.local,ye.uri=ye.ns[Y.prefix]||"",ye.prefix&&!ye.uri&&(Z(ce,"Unbound namespace prefix: "+JSON.stringify(ce.tagName)),ye.uri=Y.prefix);var H=ce.tags[ce.tags.length-1]||ce;ye.ns&&H.ns!==ye.ns&&Object.keys(ye.ns).forEach(function(Je){re(ce,"onopennamespace",{prefix:Je,uri:ye.ns[Je]})});for(var Q=0,J=ce.attribList.length;Q<J;Q++){var ee=ce.attribList[Q],W=ee[0],L=ee[1],q=he(W,!0),de=q.prefix,Ie=q.local,He=de===""?"":ye.ns[de]||"",ze={name:W,value:L,prefix:de,local:Ie,uri:He};de&&de!=="xmlns"&&!He&&(Z(ce,"Unbound namespace prefix: "+JSON.stringify(de)),ze.uri=de),ce.tag.attributes[W]=ze,re(ce,"onattribute",ze)}ce.attribList.length=0}ce.tag.isSelfClosing=!!G,ce.sawRoot=!0,ce.tags.push(ce.tag),re(ce,"onopentag",ce.tag),G||(!ce.noscript&&ce.tagName.toLowerCase()==="script"?ce.state=F.SCRIPT:ce.state=F.TEXT,ce.tag=null,ce.tagName=""),ce.attribName=ce.attribValue="",ce.attribList.length=0}function ue(ce){if(!ce.tagName){Z(ce,"Weird empty close tag."),ce.textNode+="</>",ce.state=F.TEXT;return}if(ce.script){if(ce.tagName!=="script"){ce.script+="</"+ce.tagName+">",ce.tagName="",ce.state=F.SCRIPT;return}re(ce,"onscript",ce.script),ce.script=""}var G=ce.tags.length,ye=ce.tagName;ce.strict||(ye=ye[ce.looseCase]());for(var Y=ye;G--;){var H=ce.tags[G];if(H.name!==Y)Z(ce,"Unexpected close tag");else break}if(G<0){Z(ce,"Unmatched closing tag: "+ce.tagName),ce.textNode+="</"+ce.tagName+">",ce.state=F.TEXT;return}ce.tagName=ye;for(var Q=ce.tags.length;Q-- >G;){var J=ce.tag=ce.tags.pop();ce.tagName=ce.tag.name,re(ce,"onclosetag",ce.tagName);var ee={};for(var W in J.ns)ee[W]=J.ns[W];var L=ce.tags[ce.tags.length-1]||ce;ce.opt.xmlns&&J.ns!==L.ns&&Object.keys(J.ns).forEach(function(q){var de=J.ns[q];re(ce,"onclosenamespace",{prefix:q,uri:de})})}G===0&&(ce.closedRoot=!0),ce.tagName=ce.attribValue=ce.attribName="",ce.attribList.length=0,ce.state=F.TEXT}function ve(ce){var G=ce.entity,ye=G.toLowerCase(),Y,H="";return ce.ENTITIES[G]?ce.ENTITIES[G]:ce.ENTITIES[ye]?ce.ENTITIES[ye]:(G=ye,G.charAt(0)==="#"&&(G.charAt(1)==="x"?(G=G.slice(2),Y=parseInt(G,16),H=Y.toString(16)):(G=G.slice(1),Y=parseInt(G,10),H=Y.toString(10))),G=G.replace(/^0+/,""),isNaN(Y)||H.toLowerCase()!==G?(Z(ce,"Invalid character entity"),"&"+ce.entity+";"):String.fromCodePoint(Y))}function Ee(ce,G){G==="<"?(ce.state=F.OPEN_WAKA,ce.startTagPosition=ce.position):R(G)||(Z(ce,"Non-whitespace before first tag."),ce.textNode=G,ce.state=F.TEXT)}function Oe(ce,G){var ye="";return G<ce.length&&(ye=ce.charAt(G)),ye}function De(ce){var G=this;if(this.error)throw this.error;if(G.closed)return ie(G,"Cannot write after close. Assign an onready handler.");if(ce===null)return Ae(G);typeof ce=="object"&&(ce=ce.toString());for(var ye=0,Y="";Y=Oe(ce,ye++),G.c=Y,!!Y;)switch(G.trackPosition&&(G.position++,Y===`
|
|
`?(G.line++,G.column=0):G.column++),G.state){case F.BEGIN:if(G.state=F.BEGIN_WHITESPACE,Y==="\uFEFF")continue;Ee(G,Y);continue;case F.BEGIN_WHITESPACE:Ee(G,Y);continue;case F.TEXT:if(G.sawRoot&&!G.closedRoot){for(var H=ye-1;Y&&Y!=="<"&&Y!=="&";)Y=Oe(ce,ye++),Y&&G.trackPosition&&(G.position++,Y===`
|
|
`?(G.line++,G.column=0):G.column++);G.textNode+=ce.substring(H,ye-1)}Y==="<"&&!(G.sawRoot&&G.closedRoot&&!G.strict)?(G.state=F.OPEN_WAKA,G.startTagPosition=G.position):(!R(Y)&&(!G.sawRoot||G.closedRoot)&&Z(G,"Text data outside of root node."),Y==="&"?G.state=F.TEXT_ENTITY:G.textNode+=Y);continue;case F.SCRIPT:Y==="<"?G.state=F.SCRIPT_ENDING:G.script+=Y;continue;case F.SCRIPT_ENDING:Y==="/"?G.state=F.CLOSE_TAG:(G.script+="<"+Y,G.state=F.SCRIPT);continue;case F.OPEN_WAKA:if(Y==="!")G.state=F.SGML_DECL,G.sgmlDecl="";else if(!R(Y))if($(V,Y))G.state=F.OPEN_TAG,G.tagName=Y;else if(Y==="/")G.state=F.CLOSE_TAG,G.tagName="";else if(Y==="?")G.state=F.PROC_INST,G.procInstName=G.procInstBody="";else{if(Z(G,"Unencoded <"),G.startTagPosition+1<G.position){var Q=G.position-G.startTagPosition;Y=new Array(Q).join(" ")+Y}G.textNode+="<"+Y,G.state=F.TEXT}continue;case F.SGML_DECL:(G.sgmlDecl+Y).toUpperCase()===S?(re(G,"onopencdata"),G.state=F.CDATA,G.sgmlDecl="",G.cdata=""):G.sgmlDecl+Y==="--"?(G.state=F.COMMENT,G.comment="",G.sgmlDecl=""):(G.sgmlDecl+Y).toUpperCase()===I?(G.state=F.DOCTYPE,(G.doctype||G.sawRoot)&&Z(G,"Inappropriately located doctype declaration"),G.doctype="",G.sgmlDecl=""):Y===">"?(re(G,"onsgmldeclaration",G.sgmlDecl),G.sgmlDecl="",G.state=F.TEXT):(j(Y)&&(G.state=F.SGML_DECL_QUOTED),G.sgmlDecl+=Y);continue;case F.SGML_DECL_QUOTED:Y===G.q&&(G.state=F.SGML_DECL,G.q=""),G.sgmlDecl+=Y;continue;case F.DOCTYPE:Y===">"?(G.state=F.TEXT,re(G,"ondoctype",G.doctype),G.doctype=!0):(G.doctype+=Y,Y==="["?G.state=F.DOCTYPE_DTD:j(Y)&&(G.state=F.DOCTYPE_QUOTED,G.q=Y));continue;case F.DOCTYPE_QUOTED:G.doctype+=Y,Y===G.q&&(G.q="",G.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:G.doctype+=Y,Y==="]"?G.state=F.DOCTYPE:j(Y)&&(G.state=F.DOCTYPE_DTD_QUOTED,G.q=Y);continue;case F.DOCTYPE_DTD_QUOTED:G.doctype+=Y,Y===G.q&&(G.state=F.DOCTYPE_DTD,G.q="");continue;case F.COMMENT:Y==="-"?G.state=F.COMMENT_ENDING:G.comment+=Y;continue;case F.COMMENT_ENDING:Y==="-"?(G.state=F.COMMENT_ENDED,G.comment=pe(G.opt,G.comment),G.comment&&re(G,"oncomment",G.comment),G.comment=""):(G.comment+="-"+Y,G.state=F.COMMENT);continue;case F.COMMENT_ENDED:Y!==">"?(Z(G,"Malformed comment"),G.comment+="--"+Y,G.state=F.COMMENT):G.state=F.TEXT;continue;case F.CDATA:Y==="]"?G.state=F.CDATA_ENDING:G.cdata+=Y;continue;case F.CDATA_ENDING:Y==="]"?G.state=F.CDATA_ENDING_2:(G.cdata+="]"+Y,G.state=F.CDATA);continue;case F.CDATA_ENDING_2:Y===">"?(G.cdata&&re(G,"oncdata",G.cdata),re(G,"onclosecdata"),G.cdata="",G.state=F.TEXT):Y==="]"?G.cdata+="]":(G.cdata+="]]"+Y,G.state=F.CDATA);continue;case F.PROC_INST:Y==="?"?G.state=F.PROC_INST_ENDING:R(Y)?G.state=F.PROC_INST_BODY:G.procInstName+=Y;continue;case F.PROC_INST_BODY:if(!G.procInstBody&&R(Y))continue;Y==="?"?G.state=F.PROC_INST_ENDING:G.procInstBody+=Y;continue;case F.PROC_INST_ENDING:Y===">"?(re(G,"onprocessinginstruction",{name:G.procInstName,body:G.procInstBody}),G.procInstName=G.procInstBody="",G.state=F.TEXT):(G.procInstBody+="?"+Y,G.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:$(P,Y)?G.tagName+=Y:(fe(G),Y===">"?le(G):Y==="/"?G.state=F.OPEN_TAG_SLASH:(R(Y)||Z(G,"Invalid character in tag name"),G.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:Y===">"?(le(G,!0),ue(G)):(Z(G,"Forward-slash in opening tag not followed by >"),G.state=F.ATTRIB);continue;case F.ATTRIB:if(R(Y))continue;Y===">"?le(G):Y==="/"?G.state=F.OPEN_TAG_SLASH:$(V,Y)?(G.attribName=Y,G.attribValue="",G.state=F.ATTRIB_NAME):Z(G,"Invalid attribute name");continue;case F.ATTRIB_NAME:Y==="="?G.state=F.ATTRIB_VALUE:Y===">"?(Z(G,"Attribute without value"),G.attribValue=G.attribName,be(G),le(G)):R(Y)?G.state=F.ATTRIB_NAME_SAW_WHITE:$(P,Y)?G.attribName+=Y:Z(G,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if(Y==="=")G.state=F.ATTRIB_VALUE;else{if(R(Y))continue;Z(G,"Attribute without value"),G.tag.attributes[G.attribName]="",G.attribValue="",re(G,"onattribute",{name:G.attribName,value:""}),G.attribName="",Y===">"?le(G):$(V,Y)?(G.attribName=Y,G.state=F.ATTRIB_NAME):(Z(G,"Invalid attribute name"),G.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(R(Y))continue;j(Y)?(G.q=Y,G.state=F.ATTRIB_VALUE_QUOTED):(Z(G,"Unquoted attribute value"),G.state=F.ATTRIB_VALUE_UNQUOTED,G.attribValue=Y);continue;case F.ATTRIB_VALUE_QUOTED:if(Y!==G.q){Y==="&"?G.state=F.ATTRIB_VALUE_ENTITY_Q:G.attribValue+=Y;continue}be(G),G.q="",G.state=F.ATTRIB_VALUE_CLOSED;continue;case F.ATTRIB_VALUE_CLOSED:R(Y)?G.state=F.ATTRIB:Y===">"?le(G):Y==="/"?G.state=F.OPEN_TAG_SLASH:$(V,Y)?(Z(G,"No whitespace between attributes"),G.attribName=Y,G.attribValue="",G.state=F.ATTRIB_NAME):Z(G,"Invalid attribute name");continue;case F.ATTRIB_VALUE_UNQUOTED:if(!N(Y)){Y==="&"?G.state=F.ATTRIB_VALUE_ENTITY_U:G.attribValue+=Y;continue}be(G),Y===">"?le(G):G.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(G.tagName)Y===">"?ue(G):$(P,Y)?G.tagName+=Y:G.script?(G.script+="</"+G.tagName,G.tagName="",G.state=F.SCRIPT):(R(Y)||Z(G,"Invalid tagname in closing tag"),G.state=F.CLOSE_TAG_SAW_WHITE);else{if(R(Y))continue;z(V,Y)?G.script?(G.script+="</"+Y,G.state=F.SCRIPT):Z(G,"Invalid tagname in closing tag."):G.tagName=Y}continue;case F.CLOSE_TAG_SAW_WHITE:if(R(Y))continue;Y===">"?ue(G):Z(G,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:var J,ee;switch(G.state){case F.TEXT_ENTITY:J=F.TEXT,ee="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:J=F.ATTRIB_VALUE_QUOTED,ee="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:J=F.ATTRIB_VALUE_UNQUOTED,ee="attribValue";break}Y===";"?(G[ee]+=ve(G),G.entity="",G.state=J):$(G.entity.length?B:K,Y)?G.entity+=Y:(Z(G,"Invalid character in entity name"),G[ee]+="&"+G.entity+Y,G.entity="",G.state=J);continue;default:throw new Error(G,"Unknown state: "+G.state)}return G.position>=G.bufferCheckPosition&&g(G),G}String.fromCodePoint||function(){var ce=String.fromCharCode,G=Math.floor,ye=function(){var Y=16384,H=[],Q,J,ee=-1,W=arguments.length;if(!W)return"";for(var L="";++ee<W;){var q=Number(arguments[ee]);if(!isFinite(q)||q<0||q>1114111||G(q)!==q)throw RangeError("Invalid code point: "+q);q<=65535?H.push(q):(q-=65536,Q=(q>>10)+55296,J=q%1024+56320,H.push(Q,J)),(ee+1===W||H.length>Y)&&(L+=ce.apply(null,H),H.length=0)}return L};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:ye,configurable:!0,writable:!0}):String.fromCodePoint=ye}()})(typeof O=="undefined"?this.sax={}:O)}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(o,_,O){_.exports=h;var p=o("events").EventEmitter,f=o("inherits");f(h,p),h.Readable=o("readable-stream/lib/_stream_readable.js"),h.Writable=o("readable-stream/lib/_stream_writable.js"),h.Duplex=o("readable-stream/lib/_stream_duplex.js"),h.Transform=o("readable-stream/lib/_stream_transform.js"),h.PassThrough=o("readable-stream/lib/_stream_passthrough.js"),h.finished=o("readable-stream/lib/internal/streams/end-of-stream.js"),h.pipeline=o("readable-stream/lib/internal/streams/pipeline.js"),h.Stream=h;function h(){p.call(this)}h.prototype.pipe=function(b,g){var w=this;function c(C){b.writable&&b.write(C)===!1&&w.pause&&w.pause()}w.on("data",c);function v(){w.readable&&w.resume&&w.resume()}b.on("drain",v),!b._isStdio&&(!g||g.end!==!1)&&(w.on("end",y),w.on("close",x));var m=!1;function y(){m||(m=!0,b.end())}function x(){m||(m=!0,typeof b.destroy=="function"&&b.destroy())}function S(C){if(I(),p.listenerCount(this,"error")===0)throw C}w.on("error",S),b.on("error",S);function I(){w.removeListener("data",c),b.removeListener("drain",v),w.removeListener("end",y),w.removeListener("close",x),w.removeListener("error",S),b.removeListener("error",S),w.removeListener("end",I),w.removeListener("close",I),b.removeListener("close",I)}return w.on("end",I),w.on("close",I),b.on("close",I),b.emit("pipe",w),b}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(o,_,O){"use strict";function p(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,v.__proto__=m}var f={};function h(v,m,y){y||(y=Error);function x(I,C,E){return typeof m=="string"?m:m(I,C,E)}var S=function(I){p(C,I);function C(E,k,V){return I.call(this,x(E,k,V))||this}return C}(y);S.prototype.name=y.name,S.prototype.code=v,f[v]=S}function b(v,m){if(Array.isArray(v)){var y=v.length;return v=v.map(function(x){return String(x)}),y>2?"one of ".concat(m," ").concat(v.slice(0,y-1).join(", "),", or ")+v[y-1]:y===2?"one of ".concat(m," ").concat(v[0]," or ").concat(v[1]):"of ".concat(m," ").concat(v[0])}else return"of ".concat(m," ").concat(String(v))}function g(v,m,y){return v.substr(!y||y<0?0:+y,m.length)===m}function w(v,m,y){return(y===void 0||y>v.length)&&(y=v.length),v.substring(y-m.length,y)===m}function c(v,m,y){return typeof y!="number"&&(y=0),y+m.length>v.length?!1:v.indexOf(m,y)!==-1}h("ERR_INVALID_OPT_VALUE",function(v,m){return'The value "'+m+'" is invalid for option "'+v+'"'},TypeError),h("ERR_INVALID_ARG_TYPE",function(v,m,y){var x;typeof m=="string"&&g(m,"not ")?(x="must not be",m=m.replace(/^not /,"")):x="must be";var S;if(w(v," argument"))S="The ".concat(v," ").concat(x," ").concat(b(m,"type"));else{var I=c(v,".")?"property":"argument";S='The "'.concat(v,'" ').concat(I," ").concat(x," ").concat(b(m,"type"))}return S+=". Received type ".concat(typeof y),S},TypeError),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),h("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),h("ERR_STREAM_PREMATURE_CLOSE","Premature close"),h("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),h("ERR_STREAM_WRITE_AFTER_END","write after end"),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_.exports.codes=f},{}],400:[function(o,_,O){(function(p){(function(){"use strict";var f=Object.keys||function(x){var S=[];for(var I in x)S.push(I);return S};_.exports=v;var h=o("./_stream_readable"),b=o("./_stream_writable");o("inherits")(v,h);for(var g=f(b.prototype),w=0;w<g.length;w++){var c=g[w];v.prototype[c]||(v.prototype[c]=b.prototype[c])}function v(x){if(!(this instanceof v))return new v(x);h.call(this,x),b.call(this,x),this.allowHalfOpen=!0,x&&(x.readable===!1&&(this.readable=!1),x.writable===!1&&(this.writable=!1),x.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",m)))}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(v.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(v.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function m(){this._writableState.ended||p.nextTick(y,this)}function y(x){x.end()}Object.defineProperty(v.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(S){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=S,this._writableState.destroyed=S)}})}).call(this)}).call(this,o("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(o,_,O){"use strict";_.exports=f;var p=o("./_stream_transform");o("inherits")(f,p);function f(h){if(!(this instanceof f))return new f(h);p.call(this,h)}f.prototype._transform=function(h,b,g){g(null,h)}},{"./_stream_transform":403,inherits:364}],402:[function(o,_,O){(function(p,f){(function(){"use strict";_.exports=re;var h;re.ReadableState=X;var b=o("events").EventEmitter,g=function(W,L){return W.listeners(L).length},w=o("./internal/streams/stream"),c=o("buffer").Buffer,v=(typeof f!="undefined"?f:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function m(ee){return c.from(ee)}function y(ee){return c.isBuffer(ee)||ee instanceof v}var x=o("util"),S;x&&x.debuglog?S=x.debuglog("stream"):S=function(){};var I=o("./internal/streams/buffer_list"),C=o("./internal/streams/destroy"),E=o("./internal/streams/state"),k=E.getHighWaterMark,V=o("../errors").codes,P=V.ERR_INVALID_ARG_TYPE,K=V.ERR_STREAM_PUSH_AFTER_EOF,B=V.ERR_METHOD_NOT_IMPLEMENTED,R=V.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,j,N,$;o("inherits")(re,w);var z=C.errorOrDestroy,F=["error","close","destroy","pause","resume"];function M(ee,W,L){if(typeof ee.prependListener=="function")return ee.prependListener(W,L);!ee._events||!ee._events[W]?ee.on(W,L):Array.isArray(ee._events[W])?ee._events[W].unshift(L):ee._events[W]=[L,ee._events[W]]}function X(ee,W,L){h=h||o("./_stream_duplex"),ee=ee||{},typeof L!="boolean"&&(L=W instanceof h),this.objectMode=!!ee.objectMode,L&&(this.objectMode=this.objectMode||!!ee.readableObjectMode),this.highWaterMark=k(this,ee,"readableHighWaterMark",L),this.buffer=new I,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=ee.emitClose!==!1,this.autoDestroy=!!ee.autoDestroy,this.destroyed=!1,this.defaultEncoding=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(j||(j=o("string_decoder/").StringDecoder),this.decoder=new j(ee.encoding),this.encoding=ee.encoding)}function re(ee){if(h=h||o("./_stream_duplex"),!(this instanceof re))return new re(ee);var W=this instanceof h;this._readableState=new X(ee,this,W),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),w.call(this)}Object.defineProperty(re.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(W){this._readableState&&(this._readableState.destroyed=W)}}),re.prototype.destroy=C.destroy,re.prototype._undestroy=C.undestroy,re.prototype._destroy=function(ee,W){W(ee)},re.prototype.push=function(ee,W){var L=this._readableState,q;return L.objectMode?q=!0:typeof ee=="string"&&(W=W||L.defaultEncoding,W!==L.encoding&&(ee=c.from(ee,W),W=""),q=!0),ne(this,ee,W,!1,q)},re.prototype.unshift=function(ee){return ne(this,ee,null,!0,!1)};function ne(ee,W,L,q,de){S("readableAddChunk",W);var Ie=ee._readableState;if(W===null)Ie.reading=!1,he(ee,Ie);else{var He;if(de||(He=ie(Ie,W)),He)z(ee,He);else if(Ie.objectMode||W&&W.length>0)if(typeof W!="string"&&!Ie.objectMode&&Object.getPrototypeOf(W)!==c.prototype&&(W=m(W)),q)Ie.endEmitted?z(ee,new R):pe(ee,Ie,W,!0);else if(Ie.ended)z(ee,new K);else{if(Ie.destroyed)return!1;Ie.reading=!1,Ie.decoder&&!L?(W=Ie.decoder.write(W),Ie.objectMode||W.length!==0?pe(ee,Ie,W,!1):ue(ee,Ie)):pe(ee,Ie,W,!1)}else q||(Ie.reading=!1,ue(ee,Ie))}return!Ie.ended&&(Ie.length<Ie.highWaterMark||Ie.length===0)}function pe(ee,W,L,q){W.flowing&&W.length===0&&!W.sync?(W.awaitDrain=0,ee.emit("data",L)):(W.length+=W.objectMode?1:L.length,q?W.buffer.unshift(L):W.buffer.push(L),W.needReadable&&be(ee)),ue(ee,W)}function ie(ee,W){var L;return!y(W)&&typeof W!="string"&&W!==void 0&&!ee.objectMode&&(L=new P("chunk",["string","Buffer","Uint8Array"],W)),L}re.prototype.isPaused=function(){return this._readableState.flowing===!1},re.prototype.setEncoding=function(ee){j||(j=o("string_decoder/").StringDecoder);var W=new j(ee);this._readableState.decoder=W,this._readableState.encoding=this._readableState.decoder.encoding;for(var L=this._readableState.buffer.head,q="";L!==null;)q+=W.write(L.data),L=L.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var Ae=1073741824;function Z(ee){return ee>=Ae?ee=Ae:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function fe(ee,W){return ee<=0||W.length===0&&W.ended?0:W.objectMode?1:ee!==ee?W.flowing&&W.length?W.buffer.head.data.length:W.length:(ee>W.highWaterMark&&(W.highWaterMark=Z(ee)),ee<=W.length?ee:W.ended?W.length:(W.needReadable=!0,0))}re.prototype.read=function(ee){S("read",ee),ee=parseInt(ee,10);var W=this._readableState,L=ee;if(ee!==0&&(W.emittedReadable=!1),ee===0&&W.needReadable&&((W.highWaterMark!==0?W.length>=W.highWaterMark:W.length>0)||W.ended))return S("read: emitReadable",W.length,W.ended),W.length===0&&W.ended?H(this):be(this),null;if(ee=fe(ee,W),ee===0&&W.ended)return W.length===0&&H(this),null;var q=W.needReadable;S("need readable",q),(W.length===0||W.length-ee<W.highWaterMark)&&(q=!0,S("length less than watermark",q)),W.ended||W.reading?(q=!1,S("reading or ended",q)):q&&(S("do read"),W.reading=!0,W.sync=!0,W.length===0&&(W.needReadable=!0),this._read(W.highWaterMark),W.sync=!1,W.reading||(ee=fe(L,W)));var de;return ee>0?de=Y(ee,W):de=null,de===null?(W.needReadable=W.length<=W.highWaterMark,ee=0):(W.length-=ee,W.awaitDrain=0),W.length===0&&(W.ended||(W.needReadable=!0),L!==ee&&W.ended&&H(this)),de!==null&&this.emit("data",de),de};function he(ee,W){if(S("onEofChunk"),!W.ended){if(W.decoder){var L=W.decoder.end();L&&L.length&&(W.buffer.push(L),W.length+=W.objectMode?1:L.length)}W.ended=!0,W.sync?be(ee):(W.needReadable=!1,W.emittedReadable||(W.emittedReadable=!0,le(ee)))}}function be(ee){var W=ee._readableState;S("emitReadable",W.needReadable,W.emittedReadable),W.needReadable=!1,W.emittedReadable||(S("emitReadable",W.flowing),W.emittedReadable=!0,p.nextTick(le,ee))}function le(ee){var W=ee._readableState;S("emitReadable_",W.destroyed,W.length,W.ended),!W.destroyed&&(W.length||W.ended)&&(ee.emit("readable"),W.emittedReadable=!1),W.needReadable=!W.flowing&&!W.ended&&W.length<=W.highWaterMark,ye(ee)}function ue(ee,W){W.readingMore||(W.readingMore=!0,p.nextTick(ve,ee,W))}function ve(ee,W){for(;!W.reading&&!W.ended&&(W.length<W.highWaterMark||W.flowing&&W.length===0);){var L=W.length;if(S("maybeReadMore read 0"),ee.read(0),L===W.length)break}W.readingMore=!1}re.prototype._read=function(ee){z(this,new B("_read()"))},re.prototype.pipe=function(ee,W){var L=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=ee;break;case 1:q.pipes=[q.pipes,ee];break;default:q.pipes.push(ee);break}q.pipesCount+=1,S("pipe count=%d opts=%j",q.pipesCount,W);var de=(!W||W.end!==!1)&&ee!==p.stdout&&ee!==p.stderr,Ie=de?ze:Xe;q.endEmitted?p.nextTick(Ie):L.once("end",Ie),ee.on("unpipe",He);function He(Ye,it){S("onunpipe"),Ye===L&&it&&it.hasUnpiped===!1&&(it.hasUnpiped=!0,ge())}function ze(){S("onend"),ee.end()}var Je=Ee(L);ee.on("drain",Je);var dt=!1;function ge(){S("cleanup"),ee.removeListener("close",Fe),ee.removeListener("finish",Ve),ee.removeListener("drain",Je),ee.removeListener("error",_e),ee.removeListener("unpipe",He),L.removeListener("end",ze),L.removeListener("end",Xe),L.removeListener("data",Be),dt=!0,q.awaitDrain&&(!ee._writableState||ee._writableState.needDrain)&&Je()}L.on("data",Be);function Be(Ye){S("ondata");var it=ee.write(Ye);S("dest.write",it),it===!1&&((q.pipesCount===1&&q.pipes===ee||q.pipesCount>1&&J(q.pipes,ee)!==-1)&&!dt&&(S("false write response, pause",q.awaitDrain),q.awaitDrain++),L.pause())}function _e(Ye){S("onerror",Ye),Xe(),ee.removeListener("error",_e),g(ee,"error")===0&&z(ee,Ye)}M(ee,"error",_e);function Fe(){ee.removeListener("finish",Ve),Xe()}ee.once("close",Fe);function Ve(){S("onfinish"),ee.removeListener("close",Fe),Xe()}ee.once("finish",Ve);function Xe(){S("unpipe"),L.unpipe(ee)}return ee.emit("pipe",L),q.flowing||(S("pipe resume"),L.resume()),ee};function Ee(ee){return function(){var L=ee._readableState;S("pipeOnDrain",L.awaitDrain),L.awaitDrain&&L.awaitDrain--,L.awaitDrain===0&&g(ee,"data")&&(L.flowing=!0,ye(ee))}}re.prototype.unpipe=function(ee){var W=this._readableState,L={hasUnpiped:!1};if(W.pipesCount===0)return this;if(W.pipesCount===1)return ee&&ee!==W.pipes?this:(ee||(ee=W.pipes),W.pipes=null,W.pipesCount=0,W.flowing=!1,ee&&ee.emit("unpipe",this,L),this);if(!ee){var q=W.pipes,de=W.pipesCount;W.pipes=null,W.pipesCount=0,W.flowing=!1;for(var Ie=0;Ie<de;Ie++)q[Ie].emit("unpipe",this,{hasUnpiped:!1});return this}var He=J(W.pipes,ee);return He===-1?this:(W.pipes.splice(He,1),W.pipesCount-=1,W.pipesCount===1&&(W.pipes=W.pipes[0]),ee.emit("unpipe",this,L),this)},re.prototype.on=function(ee,W){var L=w.prototype.on.call(this,ee,W),q=this._readableState;return ee==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):ee==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,S("on readable",q.length,q.reading),q.length?be(this):q.reading||p.nextTick(De,this)),L},re.prototype.addListener=re.prototype.on,re.prototype.removeListener=function(ee,W){var L=w.prototype.removeListener.call(this,ee,W);return ee==="readable"&&p.nextTick(Oe,this),L},re.prototype.removeAllListeners=function(ee){var W=w.prototype.removeAllListeners.apply(this,arguments);return(ee==="readable"||ee===void 0)&&p.nextTick(Oe,this),W};function Oe(ee){var W=ee._readableState;W.readableListening=ee.listenerCount("readable")>0,W.resumeScheduled&&!W.paused?W.flowing=!0:ee.listenerCount("data")>0&&ee.resume()}function De(ee){S("readable nexttick read 0"),ee.read(0)}re.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(S("resume"),ee.flowing=!ee.readableListening,ce(this,ee)),ee.paused=!1,this};function ce(ee,W){W.resumeScheduled||(W.resumeScheduled=!0,p.nextTick(G,ee,W))}function G(ee,W){S("resume",W.reading),W.reading||ee.read(0),W.resumeScheduled=!1,ee.emit("resume"),ye(ee),W.flowing&&!W.reading&&ee.read(0)}re.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ye(ee){var W=ee._readableState;for(S("flow",W.flowing);W.flowing&&ee.read()!==null;);}re.prototype.wrap=function(ee){var W=this,L=this._readableState,q=!1;ee.on("end",function(){if(S("wrapped end"),L.decoder&&!L.ended){var He=L.decoder.end();He&&He.length&&W.push(He)}W.push(null)}),ee.on("data",function(He){if(S("wrapped data"),L.decoder&&(He=L.decoder.write(He)),!(L.objectMode&&He==null)&&!(!L.objectMode&&(!He||!He.length))){var ze=W.push(He);ze||(q=!0,ee.pause())}});for(var de in ee)this[de]===void 0&&typeof ee[de]=="function"&&(this[de]=function(ze){return function(){return ee[ze].apply(ee,arguments)}}(de));for(var Ie=0;Ie<F.length;Ie++)ee.on(F[Ie],this.emit.bind(this,F[Ie]));return this._read=function(He){S("wrapped _read",He),q&&(q=!1,ee.resume())},this},typeof Symbol=="function"&&(re.prototype[Symbol.asyncIterator]=function(){return N===void 0&&(N=o("./internal/streams/async_iterator")),N(this)}),Object.defineProperty(re.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(re.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(re.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(W){this._readableState&&(this._readableState.flowing=W)}}),re._fromList=Y,Object.defineProperty(re.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Y(ee,W){if(W.length===0)return null;var L;return W.objectMode?L=W.buffer.shift():!ee||ee>=W.length?(W.decoder?L=W.buffer.join(""):W.buffer.length===1?L=W.buffer.first():L=W.buffer.concat(W.length),W.buffer.clear()):L=W.buffer.consume(ee,W.decoder),L}function H(ee){var W=ee._readableState;S("endReadable",W.endEmitted),W.endEmitted||(W.ended=!0,p.nextTick(Q,W,ee))}function Q(ee,W){if(S("endReadableNT",ee.endEmitted,ee.length),!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,W.readable=!1,W.emit("end"),ee.autoDestroy)){var L=W._writableState;(!L||L.autoDestroy&&L.finished)&&W.destroy()}}typeof Symbol=="function"&&(re.from=function(ee,W){return $===void 0&&($=o("./internal/streams/from")),$(re,ee,W)});function J(ee,W){for(var L=0,q=ee.length;L<q;L++)if(ee[L]===W)return L;return-1}}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(o,_,O){"use strict";_.exports=v;var p=o("../errors").codes,f=p.ERR_METHOD_NOT_IMPLEMENTED,h=p.ERR_MULTIPLE_CALLBACK,b=p.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=p.ERR_TRANSFORM_WITH_LENGTH_0,w=o("./_stream_duplex");o("inherits")(v,w);function c(x,S){var I=this._transformState;I.transforming=!1;var C=I.writecb;if(C===null)return this.emit("error",new h);I.writechunk=null,I.writecb=null,S!=null&&this.push(S),C(x);var E=this._readableState;E.reading=!1,(E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}function v(x){if(!(this instanceof v))return new v(x);w.call(this,x),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,x&&(typeof x.transform=="function"&&(this._transform=x.transform),typeof x.flush=="function"&&(this._flush=x.flush)),this.on("prefinish",m)}function m(){var x=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(S,I){y(x,S,I)}):y(this,null,null)}v.prototype.push=function(x,S){return this._transformState.needTransform=!1,w.prototype.push.call(this,x,S)},v.prototype._transform=function(x,S,I){I(new f("_transform()"))},v.prototype._write=function(x,S,I){var C=this._transformState;if(C.writecb=I,C.writechunk=x,C.writeencoding=S,!C.transforming){var E=this._readableState;(C.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},v.prototype._read=function(x){var S=this._transformState;S.writechunk!==null&&!S.transforming?(S.transforming=!0,this._transform(S.writechunk,S.writeencoding,S.afterTransform)):S.needTransform=!0},v.prototype._destroy=function(x,S){w.prototype._destroy.call(this,x,function(I){S(I)})};function y(x,S,I){if(S)return x.emit("error",S);if(I!=null&&x.push(I),x._writableState.length)throw new g;if(x._transformState.transforming)throw new b;return x.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(o,_,O){(function(p,f){(function(){"use strict";_.exports=X;function h(ye,Y,H){this.chunk=ye,this.encoding=Y,this.callback=H,this.next=null}function b(ye){var Y=this;this.next=null,this.entry=null,this.finish=function(){G(Y,ye)}}var g;X.WritableState=F;var w={deprecate:o("util-deprecate")},c=o("./internal/streams/stream"),v=o("buffer").Buffer,m=(typeof f!="undefined"?f:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function y(ye){return v.from(ye)}function x(ye){return v.isBuffer(ye)||ye instanceof m}var S=o("./internal/streams/destroy"),I=o("./internal/streams/state"),C=I.getHighWaterMark,E=o("../errors").codes,k=E.ERR_INVALID_ARG_TYPE,V=E.ERR_METHOD_NOT_IMPLEMENTED,P=E.ERR_MULTIPLE_CALLBACK,K=E.ERR_STREAM_CANNOT_PIPE,B=E.ERR_STREAM_DESTROYED,R=E.ERR_STREAM_NULL_VALUES,j=E.ERR_STREAM_WRITE_AFTER_END,N=E.ERR_UNKNOWN_ENCODING,$=S.errorOrDestroy;o("inherits")(X,c);function z(){}function F(ye,Y,H){g=g||o("./_stream_duplex"),ye=ye||{},typeof H!="boolean"&&(H=Y instanceof g),this.objectMode=!!ye.objectMode,H&&(this.objectMode=this.objectMode||!!ye.writableObjectMode),this.highWaterMark=C(this,ye,"writableHighWaterMark",H),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Q=ye.decodeStrings===!1;this.decodeStrings=!Q,this.defaultEncoding=ye.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){he(Y,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ye.emitClose!==!1,this.autoDestroy=!!ye.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new b(this)}F.prototype.getBuffer=function(){for(var Y=this.bufferedRequest,H=[];Y;)H.push(Y),Y=Y.next;return H},function(){try{Object.defineProperty(F.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ye){}}();var M;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(Y){return M.call(this,Y)?!0:this!==X?!1:Y&&Y._writableState instanceof F}})):M=function(Y){return Y instanceof this};function X(ye){g=g||o("./_stream_duplex");var Y=this instanceof g;if(!Y&&!M.call(X,this))return new X(ye);this._writableState=new F(ye,this,Y),this.writable=!0,ye&&(typeof ye.write=="function"&&(this._write=ye.write),typeof ye.writev=="function"&&(this._writev=ye.writev),typeof ye.destroy=="function"&&(this._destroy=ye.destroy),typeof ye.final=="function"&&(this._final=ye.final)),c.call(this)}X.prototype.pipe=function(){$(this,new K)};function re(ye,Y){var H=new j;$(ye,H),p.nextTick(Y,H)}function ne(ye,Y,H,Q){var J;return H===null?J=new R:typeof H!="string"&&!Y.objectMode&&(J=new k("chunk",["string","Buffer"],H)),J?($(ye,J),p.nextTick(Q,J),!1):!0}X.prototype.write=function(ye,Y,H){var Q=this._writableState,J=!1,ee=!Q.objectMode&&x(ye);return ee&&!v.isBuffer(ye)&&(ye=y(ye)),typeof Y=="function"&&(H=Y,Y=null),ee?Y="buffer":Y||(Y=Q.defaultEncoding),typeof H!="function"&&(H=z),Q.ending?re(this,H):(ee||ne(this,Q,ye,H))&&(Q.pendingcb++,J=ie(this,Q,ee,ye,Y,H)),J},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var ye=this._writableState;ye.corked&&(ye.corked--,!ye.writing&&!ye.corked&&!ye.bufferProcessing&&ye.bufferedRequest&&ue(this,ye))},X.prototype.setDefaultEncoding=function(Y){if(typeof Y=="string"&&(Y=Y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Y+"").toLowerCase())>-1))throw new N(Y);return this._writableState.defaultEncoding=Y,this},Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function pe(ye,Y,H){return!ye.objectMode&&ye.decodeStrings!==!1&&typeof Y=="string"&&(Y=v.from(Y,H)),Y}Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ie(ye,Y,H,Q,J,ee){if(!H){var W=pe(Y,Q,J);Q!==W&&(H=!0,J="buffer",Q=W)}var L=Y.objectMode?1:Q.length;Y.length+=L;var q=Y.length<Y.highWaterMark;if(q||(Y.needDrain=!0),Y.writing||Y.corked){var de=Y.lastBufferedRequest;Y.lastBufferedRequest={chunk:Q,encoding:J,isBuf:H,callback:ee,next:null},de?de.next=Y.lastBufferedRequest:Y.bufferedRequest=Y.lastBufferedRequest,Y.bufferedRequestCount+=1}else Ae(ye,Y,!1,L,Q,J,ee);return q}function Ae(ye,Y,H,Q,J,ee,W){Y.writelen=Q,Y.writecb=W,Y.writing=!0,Y.sync=!0,Y.destroyed?Y.onwrite(new B("write")):H?ye._writev(J,Y.onwrite):ye._write(J,ee,Y.onwrite),Y.sync=!1}function Z(ye,Y,H,Q,J){--Y.pendingcb,H?(p.nextTick(J,Q),p.nextTick(De,ye,Y),ye._writableState.errorEmitted=!0,$(ye,Q)):(J(Q),ye._writableState.errorEmitted=!0,$(ye,Q),De(ye,Y))}function fe(ye){ye.writing=!1,ye.writecb=null,ye.length-=ye.writelen,ye.writelen=0}function he(ye,Y){var H=ye._writableState,Q=H.sync,J=H.writecb;if(typeof J!="function")throw new P;if(fe(H),Y)Z(ye,H,Q,Y,J);else{var ee=ve(H)||ye.destroyed;!ee&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&ue(ye,H),Q?p.nextTick(be,ye,H,ee,J):be(ye,H,ee,J)}}function be(ye,Y,H,Q){H||le(ye,Y),Y.pendingcb--,Q(),De(ye,Y)}function le(ye,Y){Y.length===0&&Y.needDrain&&(Y.needDrain=!1,ye.emit("drain"))}function ue(ye,Y){Y.bufferProcessing=!0;var H=Y.bufferedRequest;if(ye._writev&&H&&H.next){var Q=Y.bufferedRequestCount,J=new Array(Q),ee=Y.corkedRequestsFree;ee.entry=H;for(var W=0,L=!0;H;)J[W]=H,H.isBuf||(L=!1),H=H.next,W+=1;J.allBuffers=L,Ae(ye,Y,!0,Y.length,J,"",ee.finish),Y.pendingcb++,Y.lastBufferedRequest=null,ee.next?(Y.corkedRequestsFree=ee.next,ee.next=null):Y.corkedRequestsFree=new b(Y),Y.bufferedRequestCount=0}else{for(;H;){var q=H.chunk,de=H.encoding,Ie=H.callback,He=Y.objectMode?1:q.length;if(Ae(ye,Y,!1,He,q,de,Ie),H=H.next,Y.bufferedRequestCount--,Y.writing)break}H===null&&(Y.lastBufferedRequest=null)}Y.bufferedRequest=H,Y.bufferProcessing=!1}X.prototype._write=function(ye,Y,H){H(new V("_write()"))},X.prototype._writev=null,X.prototype.end=function(ye,Y,H){var Q=this._writableState;return typeof ye=="function"?(H=ye,ye=null,Y=null):typeof Y=="function"&&(H=Y,Y=null),ye!=null&&this.write(ye,Y),Q.corked&&(Q.corked=1,this.uncork()),Q.ending||ce(this,Q,H),this},Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ve(ye){return ye.ending&&ye.length===0&&ye.bufferedRequest===null&&!ye.finished&&!ye.writing}function Ee(ye,Y){ye._final(function(H){Y.pendingcb--,H&&$(ye,H),Y.prefinished=!0,ye.emit("prefinish"),De(ye,Y)})}function Oe(ye,Y){!Y.prefinished&&!Y.finalCalled&&(typeof ye._final=="function"&&!Y.destroyed?(Y.pendingcb++,Y.finalCalled=!0,p.nextTick(Ee,ye,Y)):(Y.prefinished=!0,ye.emit("prefinish")))}function De(ye,Y){var H=ve(Y);if(H&&(Oe(ye,Y),Y.pendingcb===0&&(Y.finished=!0,ye.emit("finish"),Y.autoDestroy))){var Q=ye._readableState;(!Q||Q.autoDestroy&&Q.endEmitted)&&ye.destroy()}return H}function ce(ye,Y,H){Y.ending=!0,De(ye,Y),H&&(Y.finished?p.nextTick(H):ye.once("finish",H)),Y.ended=!0,ye.writable=!1}function G(ye,Y,H){var Q=ye.entry;for(ye.entry=null;Q;){var J=Q.callback;Y.pendingcb--,J(H),Q=Q.next}Y.corkedRequestsFree.next=ye}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Y){this._writableState&&(this._writableState.destroyed=Y)}}),X.prototype.destroy=S.destroy,X.prototype._undestroy=S.undestroy,X.prototype._destroy=function(ye,Y){Y(ye)}}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(o,_,O){(function(p){(function(){"use strict";var f;function h(R,j,N){return j=b(j),j in R?Object.defineProperty(R,j,{value:N,enumerable:!0,configurable:!0,writable:!0}):R[j]=N,R}function b(R){var j=g(R,"string");return typeof j=="symbol"?j:String(j)}function g(R,j){if(typeof R!="object"||R===null)return R;var N=R[Symbol.toPrimitive];if(N!==void 0){var $=N.call(R,j||"default");if(typeof $!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(R)}var w=o("./end-of-stream"),c=Symbol("lastResolve"),v=Symbol("lastReject"),m=Symbol("error"),y=Symbol("ended"),x=Symbol("lastPromise"),S=Symbol("handlePromise"),I=Symbol("stream");function C(R,j){return{value:R,done:j}}function E(R){var j=R[c];if(j!==null){var N=R[I].read();N!==null&&(R[x]=null,R[c]=null,R[v]=null,j(C(N,!1)))}}function k(R){p.nextTick(E,R)}function V(R,j){return function(N,$){R.then(function(){if(j[y]){N(C(void 0,!0));return}j[S](N,$)},$)}}var P=Object.getPrototypeOf(function(){}),K=Object.setPrototypeOf((f={get stream(){return this[I]},next:function(){var j=this,N=this[m];if(N!==null)return Promise.reject(N);if(this[y])return Promise.resolve(C(void 0,!0));if(this[I].destroyed)return new Promise(function(M,X){p.nextTick(function(){j[m]?X(j[m]):M(C(void 0,!0))})});var $=this[x],z;if($)z=new Promise(V($,this));else{var F=this[I].read();if(F!==null)return Promise.resolve(C(F,!1));z=new Promise(this[S])}return this[x]=z,z}},h(f,Symbol.asyncIterator,function(){return this}),h(f,"return",function(){var j=this;return new Promise(function(N,$){j[I].destroy(null,function(z){if(z){$(z);return}N(C(void 0,!0))})})}),f),P),B=function(j){var N,$=Object.create(K,(N={},h(N,I,{value:j,writable:!0}),h(N,c,{value:null,writable:!0}),h(N,v,{value:null,writable:!0}),h(N,m,{value:null,writable:!0}),h(N,y,{value:j._readableState.endEmitted,writable:!0}),h(N,S,{value:function(F,M){var X=$[I].read();X?($[x]=null,$[c]=null,$[v]=null,F(C(X,!1))):($[c]=F,$[v]=M)},writable:!0}),N));return $[x]=null,w(j,function(z){if(z&&z.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=$[v];F!==null&&($[x]=null,$[c]=null,$[v]=null,F(z)),$[m]=z;return}var M=$[c];M!==null&&($[x]=null,$[c]=null,$[v]=null,M(C(void 0,!0))),$[y]=!0}),j.on("readable",k.bind(null,$)),$};_.exports=B}).call(this)}).call(this,o("_process"))},{"./end-of-stream":408,_process:467}],406:[function(o,_,O){"use strict";function p(E,k){var V=Object.keys(E);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(E);k&&(P=P.filter(function(K){return Object.getOwnPropertyDescriptor(E,K).enumerable})),V.push.apply(V,P)}return V}function f(E){for(var k=1;k<arguments.length;k++){var V=arguments[k]!=null?arguments[k]:{};k%2?p(Object(V),!0).forEach(function(P){h(E,P,V[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(V)):p(Object(V)).forEach(function(P){Object.defineProperty(E,P,Object.getOwnPropertyDescriptor(V,P))})}return E}function h(E,k,V){return k=c(k),k in E?Object.defineProperty(E,k,{value:V,enumerable:!0,configurable:!0,writable:!0}):E[k]=V,E}function b(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function g(E,k){for(var V=0;V<k.length;V++){var P=k[V];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(E,c(P.key),P)}}function w(E,k,V){return k&&g(E.prototype,k),V&&g(E,V),Object.defineProperty(E,"prototype",{writable:!1}),E}function c(E){var k=v(E,"string");return typeof k=="symbol"?k:String(k)}function v(E,k){if(typeof E!="object"||E===null)return E;var V=E[Symbol.toPrimitive];if(V!==void 0){var P=V.call(E,k||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(k==="string"?String:Number)(E)}var m=o("buffer"),y=m.Buffer,x=o("util"),S=x.inspect,I=S&&S.custom||"inspect";function C(E,k,V){y.prototype.copy.call(E,k,V)}_.exports=function(){function E(){b(this,E),this.head=null,this.tail=null,this.length=0}return w(E,[{key:"push",value:function(V){var P={data:V,next:null};this.length>0?this.tail.next=P:this.head=P,this.tail=P,++this.length}},{key:"unshift",value:function(V){var P={data:V,next:this.head};this.length===0&&(this.tail=P),this.head=P,++this.length}},{key:"shift",value:function(){if(this.length!==0){var V=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,V}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(V){if(this.length===0)return"";for(var P=this.head,K=""+P.data;P=P.next;)K+=V+P.data;return K}},{key:"concat",value:function(V){if(this.length===0)return y.alloc(0);for(var P=y.allocUnsafe(V>>>0),K=this.head,B=0;K;)C(K.data,P,B),B+=K.data.length,K=K.next;return P}},{key:"consume",value:function(V,P){var K;return V<this.head.data.length?(K=this.head.data.slice(0,V),this.head.data=this.head.data.slice(V)):V===this.head.data.length?K=this.shift():K=P?this._getString(V):this._getBuffer(V),K}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(V){var P=this.head,K=1,B=P.data;for(V-=B.length;P=P.next;){var R=P.data,j=V>R.length?R.length:V;if(j===R.length?B+=R:B+=R.slice(0,V),V-=j,V===0){j===R.length?(++K,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=R.slice(j));break}++K}return this.length-=K,B}},{key:"_getBuffer",value:function(V){var P=y.allocUnsafe(V),K=this.head,B=1;for(K.data.copy(P),V-=K.data.length;K=K.next;){var R=K.data,j=V>R.length?R.length:V;if(R.copy(P,P.length-V,0,j),V-=j,V===0){j===R.length?(++B,K.next?this.head=K.next:this.head=this.tail=null):(this.head=K,K.data=R.slice(j));break}++B}return this.length-=B,P}},{key:I,value:function(V,P){return S(this,f(f({},P),{},{depth:0,customInspect:!1}))}}]),E}()},{buffer:90,util:89}],407:[function(o,_,O){(function(p){(function(){"use strict";function f(v,m){var y=this,x=this._readableState&&this._readableState.destroyed,S=this._writableState&&this._writableState.destroyed;return x||S?(m?m(v):v&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(w,this,v)):p.nextTick(w,this,v)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(v||null,function(I){!m&&I?y._writableState?y._writableState.errorEmitted?p.nextTick(b,y):(y._writableState.errorEmitted=!0,p.nextTick(h,y,I)):p.nextTick(h,y,I):m?(p.nextTick(b,y),m(I)):p.nextTick(b,y)}),this)}function h(v,m){w(v,m),b(v)}function b(v){v._writableState&&!v._writableState.emitClose||v._readableState&&!v._readableState.emitClose||v.emit("close")}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function w(v,m){v.emit("error",m)}function c(v,m){var y=v._readableState,x=v._writableState;y&&y.autoDestroy||x&&x.autoDestroy?v.destroy(m):v.emit("error",m)}_.exports={destroy:f,undestroy:g,errorOrDestroy:c}}).call(this)}).call(this,o("_process"))},{_process:467}],408:[function(o,_,O){"use strict";var p=o("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function f(w){var c=!1;return function(){if(!c){c=!0;for(var v=arguments.length,m=new Array(v),y=0;y<v;y++)m[y]=arguments[y];w.apply(this,m)}}}function h(){}function b(w){return w.setHeader&&typeof w.abort=="function"}function g(w,c,v){if(typeof c=="function")return g(w,null,c);c||(c={}),v=f(v||h);var m=c.readable||c.readable!==!1&&w.readable,y=c.writable||c.writable!==!1&&w.writable,x=function(){w.writable||I()},S=w._writableState&&w._writableState.finished,I=function(){y=!1,S=!0,m||v.call(w)},C=w._readableState&&w._readableState.endEmitted,E=function(){m=!1,C=!0,y||v.call(w)},k=function(B){v.call(w,B)},V=function(){var B;if(m&&!C)return(!w._readableState||!w._readableState.ended)&&(B=new p),v.call(w,B);if(y&&!S)return(!w._writableState||!w._writableState.ended)&&(B=new p),v.call(w,B)},P=function(){w.req.on("finish",I)};return b(w)?(w.on("complete",I),w.on("abort",V),w.req?P():w.on("request",P)):y&&!w._writableState&&(w.on("end",x),w.on("close",x)),w.on("end",E),w.on("finish",I),c.error!==!1&&w.on("error",k),w.on("close",V),function(){w.removeListener("complete",I),w.removeListener("abort",V),w.removeListener("request",P),w.req&&w.req.removeListener("finish",I),w.removeListener("end",x),w.removeListener("close",x),w.removeListener("finish",I),w.removeListener("end",E),w.removeListener("error",k),w.removeListener("close",V)}}_.exports=g},{"../../../errors":399}],409:[function(o,_,O){_.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(o,_,O){"use strict";var p;function f(I){var C=!1;return function(){C||(C=!0,I.apply(void 0,arguments))}}var h=o("../../../errors").codes,b=h.ERR_MISSING_ARGS,g=h.ERR_STREAM_DESTROYED;function w(I){if(I)throw I}function c(I){return I.setHeader&&typeof I.abort=="function"}function v(I,C,E,k){k=f(k);var V=!1;I.on("close",function(){V=!0}),p===void 0&&(p=o("./end-of-stream")),p(I,{readable:C,writable:E},function(K){if(K)return k(K);V=!0,k()});var P=!1;return function(K){if(!V&&!P){if(P=!0,c(I))return I.abort();if(typeof I.destroy=="function")return I.destroy();k(K||new g("pipe"))}}}function m(I){I()}function y(I,C){return I.pipe(C)}function x(I){return!I.length||typeof I[I.length-1]!="function"?w:I.pop()}function S(){for(var I=arguments.length,C=new Array(I),E=0;E<I;E++)C[E]=arguments[E];var k=x(C);if(Array.isArray(C[0])&&(C=C[0]),C.length<2)throw new b("streams");var V,P=C.map(function(K,B){var R=B<C.length-1,j=B>0;return v(K,R,j,function(N){V||(V=N),N&&P.forEach(m),!R&&(P.forEach(m),k(V))})});return C.reduce(y)}_.exports=S},{"../../../errors":399,"./end-of-stream":408}],411:[function(o,_,O){"use strict";var p=o("../../../errors").codes.ERR_INVALID_OPT_VALUE;function f(b,g,w){return b.highWaterMark!=null?b.highWaterMark:g?b[w]:null}function h(b,g,w,c){var v=f(g,c,w);if(v!=null){if(!(isFinite(v)&&Math.floor(v)===v)||v<0){var m=c?w:"highWaterMark";throw new p(m,v)}return Math.floor(v)}return b.objectMode?16:16*1024}_.exports={getHighWaterMark:h}},{"../../../errors":399}],412:[function(o,_,O){arguments[4][393][0].apply(O,arguments)},{dup:393,events:344}],413:[function(o,_,O){"use strict";var p=o("safe-buffer").Buffer,f=p.isEncoding||function(P){switch(P=""+P,P&&P.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(P){if(!P)return"utf8";for(var K;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(K)return;P=(""+P).toLowerCase(),K=!0}}function b(P){var K=h(P);if(typeof K!="string"&&(p.isEncoding===f||!f(P)))throw new Error("Unknown encoding: "+P);return K||P}O.StringDecoder=g;function g(P){this.encoding=b(P);var K;switch(this.encoding){case"utf16le":this.text=S,this.end=I,K=4;break;case"utf8":this.fillLast=m,K=4;break;case"base64":this.text=C,this.end=E,K=3;break;default:this.write=k,this.end=V;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(K)}g.prototype.write=function(P){if(P.length===0)return"";var K,B;if(this.lastNeed){if(K=this.fillLast(P),K===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;return B<P.length?K?K+this.text(P,B):this.text(P,B):K||""},g.prototype.end=x,g.prototype.text=y,g.prototype.fillLast=function(P){if(this.lastNeed<=P.length)return P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,P.length),this.lastNeed-=P.length};function w(P){return P<=127?0:P>>5===6?2:P>>4===14?3:P>>3===30?4:P>>6===2?-1:-2}function c(P,K,B){var R=K.length-1;if(R<B)return 0;var j=w(K[R]);return j>=0?(j>0&&(P.lastNeed=j-1),j):--R<B||j===-2?0:(j=w(K[R]),j>=0?(j>0&&(P.lastNeed=j-2),j):--R<B||j===-2?0:(j=w(K[R]),j>=0?(j>0&&(j===2?j=0:P.lastNeed=j-3),j):0))}function v(P,K,B){if((K[0]&192)!==128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&K.length>1){if((K[1]&192)!==128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&K.length>2&&(K[2]&192)!==128)return P.lastNeed=2,"\uFFFD"}}function m(P){var K=this.lastTotal-this.lastNeed,B=v(this,P,K);if(B!==void 0)return B;if(this.lastNeed<=P.length)return P.copy(this.lastChar,K,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,K,0,P.length),this.lastNeed-=P.length}function y(P,K){var B=c(this,P,K);if(!this.lastNeed)return P.toString("utf8",K);this.lastTotal=B;var R=P.length-(B-this.lastNeed);return P.copy(this.lastChar,0,R),P.toString("utf8",K,R)}function x(P){var K=P&&P.length?this.write(P):"";return this.lastNeed?K+"\uFFFD":K}function S(P,K){if((P.length-K)%2===0){var B=P.toString("utf16le",K);if(B){var R=B.charCodeAt(B.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",K,P.length-1)}function I(P){var K=P&&P.length?this.write(P):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return K+this.lastChar.toString("utf16le",0,B)}return K}function C(P,K){var B=(P.length-K)%3;return B===0?P.toString("base64",K):(this.lastNeed=3-B,this.lastTotal=3,B===1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",K,P.length-B))}function E(P){var K=P&&P.length?this.write(P):"";return this.lastNeed?K+this.lastChar.toString("base64",0,3-this.lastNeed):K}function k(P){return P.toString(this.encoding)}function V(P){return P&&P.length?this.write(P):""}},{"safe-buffer":396}],414:[function(o,_,O){(function(p,f){(function(){var h=o("process/browser.js").nextTick,b=Function.prototype.apply,g=Array.prototype.slice,w={},c=0;O.setTimeout=function(){return new v(b.call(setTimeout,window,arguments),clearTimeout)},O.setInterval=function(){return new v(b.call(setInterval,window,arguments),clearInterval)},O.clearTimeout=O.clearInterval=function(m){m.close()};function v(m,y){this._id=m,this._clearFn=y}v.prototype.unref=v.prototype.ref=function(){},v.prototype.close=function(){this._clearFn.call(window,this._id)},O.enroll=function(m,y){clearTimeout(m._idleTimeoutId),m._idleTimeout=y},O.unenroll=function(m){clearTimeout(m._idleTimeoutId),m._idleTimeout=-1},O._unrefActive=O.active=function(m){clearTimeout(m._idleTimeoutId);var y=m._idleTimeout;y>=0&&(m._idleTimeoutId=setTimeout(function(){m._onTimeout&&m._onTimeout()},y))},O.setImmediate=typeof p=="function"?p:function(m){var y=c++,x=arguments.length<2?!1:g.call(arguments,1);return w[y]=!0,h(function(){w[y]&&(x?m.apply(null,x):m.call(null),O.clearImmediate(y))}),y},O.clearImmediate=typeof f=="function"?f:function(m){delete w[m]}}).call(this)}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(o,_,O){var p=o("buffer").Buffer;_.exports=function(f){if(f instanceof Uint8Array){if(f.byteOffset===0&&f.byteLength===f.buffer.byteLength)return f.buffer;if(typeof f.buffer.slice=="function")return f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength)}if(p.isBuffer(f)){for(var h=new Uint8Array(f.length),b=f.length,g=0;g<b;g++)h[g]=f[g];return h.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(o,_,O){(function(p){(function(){_.exports=f;function f(b,g){if(h("noDeprecation"))return b;var w=!1;function c(){if(!w){if(h("throwDeprecation"))throw new Error(g);h("traceDeprecation")?console.trace(g):console.warn(g),w=!0}return b.apply(this,arguments)}return c}function h(b){try{if(!p.localStorage)return!1}catch(w){return!1}var g=p.localStorage[b];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(o,_,O){arguments[4][84][0].apply(O,arguments)},{dup:84}],418:[function(o,_,O){"use strict";var p=o("is-arguments"),f=o("is-generator-function"),h=o("which-typed-array"),b=o("is-typed-array");function g(de){return de.call.bind(de)}var w=typeof BigInt!="undefined",c=typeof Symbol!="undefined",v=g(Object.prototype.toString),m=g(Number.prototype.valueOf),y=g(String.prototype.valueOf),x=g(Boolean.prototype.valueOf);if(w)var S=g(BigInt.prototype.valueOf);if(c)var I=g(Symbol.prototype.valueOf);function C(de,Ie){if(typeof de!="object")return!1;try{return Ie(de),!0}catch(He){return!1}}O.isArgumentsObject=p,O.isGeneratorFunction=f,O.isTypedArray=b;function E(de){return typeof Promise!="undefined"&&de instanceof Promise||de!==null&&typeof de=="object"&&typeof de.then=="function"&&typeof de.catch=="function"}O.isPromise=E;function k(de){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(de):b(de)||ue(de)}O.isArrayBufferView=k;function V(de){return h(de)==="Uint8Array"}O.isUint8Array=V;function P(de){return h(de)==="Uint8ClampedArray"}O.isUint8ClampedArray=P;function K(de){return h(de)==="Uint16Array"}O.isUint16Array=K;function B(de){return h(de)==="Uint32Array"}O.isUint32Array=B;function R(de){return h(de)==="Int8Array"}O.isInt8Array=R;function j(de){return h(de)==="Int16Array"}O.isInt16Array=j;function N(de){return h(de)==="Int32Array"}O.isInt32Array=N;function $(de){return h(de)==="Float32Array"}O.isFloat32Array=$;function z(de){return h(de)==="Float64Array"}O.isFloat64Array=z;function F(de){return h(de)==="BigInt64Array"}O.isBigInt64Array=F;function M(de){return h(de)==="BigUint64Array"}O.isBigUint64Array=M;function X(de){return v(de)==="[object Map]"}X.working=typeof Map!="undefined"&&X(new Map);function re(de){return typeof Map=="undefined"?!1:X.working?X(de):de instanceof Map}O.isMap=re;function ne(de){return v(de)==="[object Set]"}ne.working=typeof Set!="undefined"&&ne(new Set);function pe(de){return typeof Set=="undefined"?!1:ne.working?ne(de):de instanceof Set}O.isSet=pe;function ie(de){return v(de)==="[object WeakMap]"}ie.working=typeof WeakMap!="undefined"&&ie(new WeakMap);function Ae(de){return typeof WeakMap=="undefined"?!1:ie.working?ie(de):de instanceof WeakMap}O.isWeakMap=Ae;function Z(de){return v(de)==="[object WeakSet]"}Z.working=typeof WeakSet!="undefined"&&Z(new WeakSet);function fe(de){return Z(de)}O.isWeakSet=fe;function he(de){return v(de)==="[object ArrayBuffer]"}he.working=typeof ArrayBuffer!="undefined"&&he(new ArrayBuffer);function be(de){return typeof ArrayBuffer=="undefined"?!1:he.working?he(de):de instanceof ArrayBuffer}O.isArrayBuffer=be;function le(de){return v(de)==="[object DataView]"}le.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&le(new DataView(new ArrayBuffer(1),0,1));function ue(de){return typeof DataView=="undefined"?!1:le.working?le(de):de instanceof DataView}O.isDataView=ue;var ve=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function Ee(de){return v(de)==="[object SharedArrayBuffer]"}function Oe(de){return typeof ve=="undefined"?!1:(typeof Ee.working=="undefined"&&(Ee.working=Ee(new ve)),Ee.working?Ee(de):de instanceof ve)}O.isSharedArrayBuffer=Oe;function De(de){return v(de)==="[object AsyncFunction]"}O.isAsyncFunction=De;function ce(de){return v(de)==="[object Map Iterator]"}O.isMapIterator=ce;function G(de){return v(de)==="[object Set Iterator]"}O.isSetIterator=G;function ye(de){return v(de)==="[object Generator]"}O.isGeneratorObject=ye;function Y(de){return v(de)==="[object WebAssembly.Module]"}O.isWebAssemblyCompiledModule=Y;function H(de){return C(de,m)}O.isNumberObject=H;function Q(de){return C(de,y)}O.isStringObject=Q;function J(de){return C(de,x)}O.isBooleanObject=J;function ee(de){return w&&C(de,S)}O.isBigIntObject=ee;function W(de){return c&&C(de,I)}O.isSymbolObject=W;function L(de){return H(de)||Q(de)||J(de)||ee(de)||W(de)}O.isBoxedPrimitive=L;function q(de){return typeof Uint8Array!="undefined"&&(be(de)||Oe(de))}O.isAnyArrayBuffer=q,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(de){Object.defineProperty(O,de,{enumerable:!1,value:function(){throw new Error(de+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(o,_,O){(function(p){(function(){var f=Object.getOwnPropertyDescriptors||function(ve){for(var Ee=Object.keys(ve),Oe={},De=0;De<Ee.length;De++)Oe[Ee[De]]=Object.getOwnPropertyDescriptor(ve,Ee[De]);return Oe},h=/%[sdj%]/g;O.format=function(ue){if(!j(ue)){for(var ve=[],Ee=0;Ee<arguments.length;Ee++)ve.push(c(arguments[Ee]));return ve.join(" ")}for(var Ee=1,Oe=arguments,De=Oe.length,ce=String(ue).replace(h,function(ye){if(ye==="%%")return"%";if(Ee>=De)return ye;switch(ye){case"%s":return String(Oe[Ee++]);case"%d":return Number(Oe[Ee++]);case"%j":try{return JSON.stringify(Oe[Ee++])}catch(Y){return"[Circular]"}default:return ye}}),G=Oe[Ee];Ee<De;G=Oe[++Ee])K(G)||!F(G)?ce+=" "+G:ce+=" "+c(G);return ce},O.deprecate=function(ue,ve){if(typeof p!="undefined"&&p.noDeprecation===!0)return ue;if(typeof p=="undefined")return function(){return O.deprecate(ue,ve).apply(this,arguments)};var Ee=!1;function Oe(){if(!Ee){if(p.throwDeprecation)throw new Error(ve);p.traceDeprecation?console.trace(ve):console.error(ve),Ee=!0}return ue.apply(this,arguments)}return Oe};var b={},g=/^$/;if(p.env.NODE_DEBUG){var w=p.env.NODE_DEBUG;w=w.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+w+"$","i")}O.debuglog=function(ue){if(ue=ue.toUpperCase(),!b[ue])if(g.test(ue)){var ve=p.pid;b[ue]=function(){var Ee=O.format.apply(O,arguments);console.error("%s %d: %s",ue,ve,Ee)}}else b[ue]=function(){};return b[ue]};function c(ue,ve){var Ee={seen:[],stylize:m};return arguments.length>=3&&(Ee.depth=arguments[2]),arguments.length>=4&&(Ee.colors=arguments[3]),P(ve)?Ee.showHidden=ve:ve&&O._extend(Ee,ve),$(Ee.showHidden)&&(Ee.showHidden=!1),$(Ee.depth)&&(Ee.depth=2),$(Ee.colors)&&(Ee.colors=!1),$(Ee.customInspect)&&(Ee.customInspect=!0),Ee.colors&&(Ee.stylize=v),x(Ee,ue,Ee.depth)}O.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function v(ue,ve){var Ee=c.styles[ve];return Ee?"\x1B["+c.colors[Ee][0]+"m"+ue+"\x1B["+c.colors[Ee][1]+"m":ue}function m(ue,ve){return ue}function y(ue){var ve={};return ue.forEach(function(Ee,Oe){ve[Ee]=!0}),ve}function x(ue,ve,Ee){if(ue.customInspect&&ve&&re(ve.inspect)&&ve.inspect!==O.inspect&&!(ve.constructor&&ve.constructor.prototype===ve)){var Oe=ve.inspect(Ee,ue);return j(Oe)||(Oe=x(ue,Oe,Ee)),Oe}var De=S(ue,ve);if(De)return De;var ce=Object.keys(ve),G=y(ce);if(ue.showHidden&&(ce=Object.getOwnPropertyNames(ve)),X(ve)&&(ce.indexOf("message")>=0||ce.indexOf("description")>=0))return I(ve);if(ce.length===0){if(re(ve)){var ye=ve.name?": "+ve.name:"";return ue.stylize("[Function"+ye+"]","special")}if(z(ve))return ue.stylize(RegExp.prototype.toString.call(ve),"regexp");if(M(ve))return ue.stylize(Date.prototype.toString.call(ve),"date");if(X(ve))return I(ve)}var Y="",H=!1,Q=["{","}"];if(V(ve)&&(H=!0,Q=["[","]"]),re(ve)){var J=ve.name?": "+ve.name:"";Y=" [Function"+J+"]"}if(z(ve)&&(Y=" "+RegExp.prototype.toString.call(ve)),M(ve)&&(Y=" "+Date.prototype.toUTCString.call(ve)),X(ve)&&(Y=" "+I(ve)),ce.length===0&&(!H||ve.length==0))return Q[0]+Y+Q[1];if(Ee<0)return z(ve)?ue.stylize(RegExp.prototype.toString.call(ve),"regexp"):ue.stylize("[Object]","special");ue.seen.push(ve);var ee;return H?ee=C(ue,ve,Ee,G,ce):ee=ce.map(function(W){return E(ue,ve,Ee,G,W,H)}),ue.seen.pop(),k(ee,Y,Q)}function S(ue,ve){if($(ve))return ue.stylize("undefined","undefined");if(j(ve)){var Ee="'"+JSON.stringify(ve).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ue.stylize(Ee,"string")}if(R(ve))return ue.stylize(""+ve,"number");if(P(ve))return ue.stylize(""+ve,"boolean");if(K(ve))return ue.stylize("null","null")}function I(ue){return"["+Error.prototype.toString.call(ue)+"]"}function C(ue,ve,Ee,Oe,De){for(var ce=[],G=0,ye=ve.length;G<ye;++G)fe(ve,String(G))?ce.push(E(ue,ve,Ee,Oe,String(G),!0)):ce.push("");return De.forEach(function(Y){Y.match(/^\d+$/)||ce.push(E(ue,ve,Ee,Oe,Y,!0))}),ce}function E(ue,ve,Ee,Oe,De,ce){var G,ye,Y;if(Y=Object.getOwnPropertyDescriptor(ve,De)||{value:ve[De]},Y.get?Y.set?ye=ue.stylize("[Getter/Setter]","special"):ye=ue.stylize("[Getter]","special"):Y.set&&(ye=ue.stylize("[Setter]","special")),fe(Oe,De)||(G="["+De+"]"),ye||(ue.seen.indexOf(Y.value)<0?(K(Ee)?ye=x(ue,Y.value,null):ye=x(ue,Y.value,Ee-1),ye.indexOf(`
|
|
`)>-1&&(ce?ye=ye.split(`
|
|
`).map(function(H){return" "+H}).join(`
|
|
`).slice(2):ye=`
|
|
`+ye.split(`
|
|
`).map(function(H){return" "+H}).join(`
|
|
`))):ye=ue.stylize("[Circular]","special")),$(G)){if(ce&&De.match(/^\d+$/))return ye;G=JSON.stringify(""+De),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=ue.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=ue.stylize(G,"string"))}return G+": "+ye}function k(ue,ve,Ee){var Oe=0,De=ue.reduce(function(ce,G){return Oe++,G.indexOf(`
|
|
`)>=0&&Oe++,ce+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return De>60?Ee[0]+(ve===""?"":ve+`
|
|
`)+" "+ue.join(`,
|
|
`)+" "+Ee[1]:Ee[0]+ve+" "+ue.join(", ")+" "+Ee[1]}O.types=o("./support/types");function V(ue){return Array.isArray(ue)}O.isArray=V;function P(ue){return typeof ue=="boolean"}O.isBoolean=P;function K(ue){return ue===null}O.isNull=K;function B(ue){return ue==null}O.isNullOrUndefined=B;function R(ue){return typeof ue=="number"}O.isNumber=R;function j(ue){return typeof ue=="string"}O.isString=j;function N(ue){return typeof ue=="symbol"}O.isSymbol=N;function $(ue){return ue===void 0}O.isUndefined=$;function z(ue){return F(ue)&&pe(ue)==="[object RegExp]"}O.isRegExp=z,O.types.isRegExp=z;function F(ue){return typeof ue=="object"&&ue!==null}O.isObject=F;function M(ue){return F(ue)&&pe(ue)==="[object Date]"}O.isDate=M,O.types.isDate=M;function X(ue){return F(ue)&&(pe(ue)==="[object Error]"||ue instanceof Error)}O.isError=X,O.types.isNativeError=X;function re(ue){return typeof ue=="function"}O.isFunction=re;function ne(ue){return ue===null||typeof ue=="boolean"||typeof ue=="number"||typeof ue=="string"||typeof ue=="symbol"||typeof ue=="undefined"}O.isPrimitive=ne,O.isBuffer=o("./support/isBuffer");function pe(ue){return Object.prototype.toString.call(ue)}function ie(ue){return ue<10?"0"+ue.toString(10):ue.toString(10)}var Ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(){var ue=new Date,ve=[ie(ue.getHours()),ie(ue.getMinutes()),ie(ue.getSeconds())].join(":");return[ue.getDate(),Ae[ue.getMonth()],ve].join(" ")}O.log=function(){console.log("%s - %s",Z(),O.format.apply(O,arguments))},O.inherits=o("inherits"),O._extend=function(ue,ve){if(!ve||!F(ve))return ue;for(var Ee=Object.keys(ve),Oe=Ee.length;Oe--;)ue[Ee[Oe]]=ve[Ee[Oe]];return ue};function fe(ue,ve){return Object.prototype.hasOwnProperty.call(ue,ve)}var he=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;O.promisify=function(ve){if(typeof ve!="function")throw new TypeError('The "original" argument must be of type Function');if(he&&ve[he]){var Ee=ve[he];if(typeof Ee!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Ee,he,{value:Ee,enumerable:!1,writable:!1,configurable:!0}),Ee}function Ee(){for(var Oe,De,ce=new Promise(function(Y,H){Oe=Y,De=H}),G=[],ye=0;ye<arguments.length;ye++)G.push(arguments[ye]);G.push(function(Y,H){Y?De(Y):Oe(H)});try{ve.apply(this,G)}catch(Y){De(Y)}return ce}return Object.setPrototypeOf(Ee,Object.getPrototypeOf(ve)),he&&Object.defineProperty(Ee,he,{value:Ee,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Ee,f(ve))},O.promisify.custom=he;function be(ue,ve){if(!ue){var Ee=new Error("Promise was rejected with a falsy value");Ee.reason=ue,ue=Ee}return ve(ue)}function le(ue){if(typeof ue!="function")throw new TypeError('The "original" argument must be of type Function');function ve(){for(var Ee=[],Oe=0;Oe<arguments.length;Oe++)Ee.push(arguments[Oe]);var De=Ee.pop();if(typeof De!="function")throw new TypeError("The last argument must be of type Function");var ce=this,G=function(){return De.apply(ce,arguments)};ue.apply(this,Ee).then(function(ye){p.nextTick(G.bind(null,null,ye))},function(ye){p.nextTick(be.bind(null,ye,G))})}return Object.setPrototypeOf(ve,Object.getPrototypeOf(ue)),Object.defineProperties(ve,f(ue)),ve}O.callbackify=le}).call(this)}).call(this,o("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(o,_,O){(function(p){(function(){"use strict";var f=o("for-each"),h=o("available-typed-arrays"),b=o("call-bind"),g=o("call-bind/callBound"),w=o("gopd"),c=g("Object.prototype.toString"),v=o("has-tostringtag/shams")(),m=typeof globalThis=="undefined"?p:globalThis,y=h(),x=g("String.prototype.slice"),S=Object.getPrototypeOf,I=g("Array.prototype.indexOf",!0)||function(P,K){for(var B=0;B<P.length;B+=1)if(P[B]===K)return B;return-1},C={__proto__:null};v&&w&&S?f(y,function(V){var P=new m[V];if(Symbol.toStringTag in P){var K=S(P),B=w(K,Symbol.toStringTag);if(!B){var R=S(K);B=w(R,Symbol.toStringTag)}C["$"+V]=b(B.get)}}):f(y,function(V){var P=new m[V];C["$"+V]=b(P.slice)});var E=function(P){var K=!1;return f(C,function(B,R){if(!K)try{"$"+B(P)===R&&(K=x(R,1))}catch(j){}}),K},k=function(P){var K=!1;return f(C,function(B,R){if(!K)try{B(P),K=x(R,1)}catch(j){}}),K};_.exports=function(P){if(!P||typeof P!="object")return!1;if(!v){var K=x(c(P),8,-1);return I(y,K)>-1?K:K!=="Object"?!1:k(P)}return w?E(P):null}}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(o,_,O){(function(){"use strict";O.stripBOM=function(p){return p[0]==="\uFEFF"?p.substring(1):p}}).call(this)},{}],422:[function(o,_,O){(function(){"use strict";var p,f,h,b,g,w={}.hasOwnProperty;p=o("xmlbuilder"),f=o("./defaults").defaults,b=function(c){return typeof c=="string"&&(c.indexOf("&")>=0||c.indexOf(">")>=0||c.indexOf("<")>=0)},g=function(c){return"<![CDATA["+h(c)+"]]>"},h=function(c){return c.replace("]]>","]]]]><![CDATA[>")},O.Builder=function(){function c(v){var m,y,x;this.options={},y=f["0.2"];for(m in y)w.call(y,m)&&(x=y[m],this.options[m]=x);for(m in v)w.call(v,m)&&(x=v[m],this.options[m]=x)}return c.prototype.buildObject=function(v){var m,y,x,S,I;return m=this.options.attrkey,y=this.options.charkey,Object.keys(v).length===1&&this.options.rootName===f["0.2"].rootName?(I=Object.keys(v)[0],v=v[I]):I=this.options.rootName,x=function(C){return function(E,k){var V,P,K,B,R,j;if(typeof k!="object")C.options.cdata&&b(k)?E.raw(g(k)):E.txt(k);else if(Array.isArray(k)){for(B in k)if(w.call(k,B)){P=k[B];for(R in P)K=P[R],E=x(E.ele(R),K).up()}}else for(R in k)if(w.call(k,R))if(P=k[R],R===m){if(typeof P=="object")for(V in P)j=P[V],E=E.att(V,j)}else if(R===y)C.options.cdata&&b(P)?E=E.raw(g(P)):E=E.txt(P);else if(Array.isArray(P))for(B in P)w.call(P,B)&&(K=P[B],typeof K=="string"?C.options.cdata&&b(K)?E=E.ele(R).raw(g(K)).up():E=E.ele(R,K).up():E=x(E.ele(R),K).up());else typeof P=="object"?E=x(E.ele(R),P).up():typeof P=="string"&&C.options.cdata&&b(P)?E=E.ele(R).raw(g(P)).up():(P==null&&(P=""),E=E.ele(R,P.toString()).up());return E}}(this),S=p.create(I,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),x(S,v).end(this.options.renderOpts)},c}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(o,_,O){(function(){O.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(o,_,O){(function(){"use strict";var p,f,h,b,g,w,c,v,m,y=function(I,C){return function(){return I.apply(C,arguments)}},x=function(I,C){for(var E in C)S.call(C,E)&&(I[E]=C[E]);function k(){this.constructor=I}return k.prototype=C.prototype,I.prototype=new k,I.__super__=C.prototype,I},S={}.hasOwnProperty;v=o("sax"),b=o("events"),p=o("./bom"),c=o("./processors"),m=o("timers").setImmediate,f=o("./defaults").defaults,g=function(I){return typeof I=="object"&&I!=null&&Object.keys(I).length===0},w=function(I,C,E){var k,V,P;for(k=0,V=I.length;k<V;k++)P=I[k],C=P(C,E);return C},h=function(I,C,E){var k;return k=Object.create(null),k.value=E,k.writable=!0,k.enumerable=!0,k.configurable=!0,Object.defineProperty(I,C,k)},O.Parser=function(I){x(C,I);function C(E){this.parseStringPromise=y(this.parseStringPromise,this),this.parseString=y(this.parseString,this),this.reset=y(this.reset,this),this.assignOrPush=y(this.assignOrPush,this),this.processAsync=y(this.processAsync,this);var k,V,P;if(!(this instanceof O.Parser))return new O.Parser(E);this.options={},V=f["0.2"];for(k in V)S.call(V,k)&&(P=V[k],this.options[k]=P);for(k in E)S.call(E,k)&&(P=E[k],this.options[k]=P);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(c.normalize)),this.reset()}return C.prototype.processAsync=function(){var E,k;try{return this.remaining.length<=this.options.chunkSize?(E=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(E),this.saxParser.close()):(E=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(E),m(this.processAsync))}catch(V){if(k=V,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(k)}},C.prototype.assignOrPush=function(E,k,V){return k in E?(E[k]instanceof Array||h(E,k,[E[k]]),E[k].push(V)):this.options.explicitArray?h(E,k,[V]):h(E,k,V)},C.prototype.reset=function(){var E,k,V,P;return this.removeAllListeners(),this.saxParser=v.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(K){return function(B){if(K.saxParser.resume(),!K.saxParser.errThrown)return K.saxParser.errThrown=!0,K.emit("error",B)}}(this),this.saxParser.onend=function(K){return function(){if(!K.saxParser.ended)return K.saxParser.ended=!0,K.emit("end",K.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,P=[],E=this.options.attrkey,k=this.options.charkey,this.saxParser.onopentag=function(K){return function(B){var R,j,N,$,z;if(N={},N[k]="",!K.options.ignoreAttrs){z=B.attributes;for(R in z)S.call(z,R)&&(!(E in N)&&!K.options.mergeAttrs&&(N[E]={}),j=K.options.attrValueProcessors?w(K.options.attrValueProcessors,B.attributes[R],R):B.attributes[R],$=K.options.attrNameProcessors?w(K.options.attrNameProcessors,R):R,K.options.mergeAttrs?K.assignOrPush(N,$,j):h(N[E],$,j))}return N["#name"]=K.options.tagNameProcessors?w(K.options.tagNameProcessors,B.name):B.name,K.options.xmlns&&(N[K.options.xmlnskey]={uri:B.uri,local:B.local}),P.push(N)}}(this),this.saxParser.onclosetag=function(K){return function(){var B,R,j,N,$,z,F,M,X,re;if(z=P.pop(),$=z["#name"],(!K.options.explicitChildren||!K.options.preserveChildrenOrder)&&delete z["#name"],z.cdata===!0&&(B=z.cdata,delete z.cdata),X=P[P.length-1],z[k].match(/^\s*$/)&&!B?(R=z[k],delete z[k]):(K.options.trim&&(z[k]=z[k].trim()),K.options.normalize&&(z[k]=z[k].replace(/\s{2,}/g," ").trim()),z[k]=K.options.valueProcessors?w(K.options.valueProcessors,z[k],$):z[k],Object.keys(z).length===1&&k in z&&!K.EXPLICIT_CHARKEY&&(z=z[k])),g(z)&&(typeof K.options.emptyTag=="function"?z=K.options.emptyTag():z=K.options.emptyTag!==""?K.options.emptyTag:R),K.options.validator!=null&&(re="/"+function(){var ne,pe,ie;for(ie=[],ne=0,pe=P.length;ne<pe;ne++)N=P[ne],ie.push(N["#name"]);return ie}().concat($).join("/"),function(){var ne;try{return z=K.options.validator(re,X&&X[$],z)}catch(pe){return ne=pe,K.emit("error",ne)}}()),K.options.explicitChildren&&!K.options.mergeAttrs&&typeof z=="object"){if(!K.options.preserveChildrenOrder)N={},K.options.attrkey in z&&(N[K.options.attrkey]=z[K.options.attrkey],delete z[K.options.attrkey]),!K.options.charsAsChildren&&K.options.charkey in z&&(N[K.options.charkey]=z[K.options.charkey],delete z[K.options.charkey]),Object.getOwnPropertyNames(z).length>0&&(N[K.options.childkey]=z),z=N;else if(X){X[K.options.childkey]=X[K.options.childkey]||[],F={};for(j in z)S.call(z,j)&&h(F,j,z[j]);X[K.options.childkey].push(F),delete z["#name"],Object.keys(z).length===1&&k in z&&!K.EXPLICIT_CHARKEY&&(z=z[k])}}return P.length>0?K.assignOrPush(X,$,z):(K.options.explicitRoot&&(M=z,z={},h(z,$,M)),K.resultObject=z,K.saxParser.ended=!0,K.emit("end",K.resultObject))}}(this),V=function(K){return function(B){var R,j;if(j=P[P.length-1],j)return j[k]+=B,K.options.explicitChildren&&K.options.preserveChildrenOrder&&K.options.charsAsChildren&&(K.options.includeWhiteChars||B.replace(/\\n/g,"").trim()!=="")&&(j[K.options.childkey]=j[K.options.childkey]||[],R={"#name":"__text__"},R[k]=B,K.options.normalize&&(R[k]=R[k].replace(/\s{2,}/g," ").trim()),j[K.options.childkey].push(R)),j}}(this),this.saxParser.ontext=V,this.saxParser.oncdata=function(K){return function(B){var R;if(R=V(B),R)return R.cdata=!0}}(this)},C.prototype.parseString=function(E,k){var V;k!=null&&typeof k=="function"&&(this.on("end",function(P){return this.reset(),k(null,P)}),this.on("error",function(P){return this.reset(),k(P)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=p.stripBOM(E),this.options.async?(this.remaining=E,m(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(P){if(V=P,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw V}else return this.emit("error",V),this.saxParser.errThrown=!0}},C.prototype.parseStringPromise=function(E){return new Promise(function(k){return function(V,P){return k.parseString(E,function(K,B){return K?P(K):V(B)})}}(this))},C}(b),O.parseString=function(I,C,E){var k,V,P;return E!=null?(typeof E=="function"&&(k=E),typeof C=="object"&&(V=C)):(typeof C=="function"&&(k=C),V={}),P=new O.Parser(V),P.parseString(I,k)},O.parseStringPromise=function(I,C){var E,k;return typeof C=="object"&&(E=C),k=new O.Parser(E),k.parseStringPromise(I)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(o,_,O){(function(){"use strict";var p;p=new RegExp(/(?!xmlns)^.*:/),O.normalize=function(f){return f.toLowerCase()},O.firstCharLowerCase=function(f){return f.charAt(0).toLowerCase()+f.slice(1)},O.stripPrefix=function(f){return f.replace(p,"")},O.parseNumbers=function(f){return isNaN(f)||(f=f%1===0?parseInt(f,10):parseFloat(f)),f},O.parseBooleans=function(f){return/^(?:true|false)$/i.test(f)&&(f=f.toLowerCase()==="true"),f}}).call(this)},{}],426:[function(o,_,O){(function(){"use strict";var p,f,h,b,g=function(c,v){for(var m in v)w.call(v,m)&&(c[m]=v[m]);function y(){this.constructor=c}return y.prototype=v.prototype,c.prototype=new y,c.__super__=v.prototype,c},w={}.hasOwnProperty;f=o("./defaults"),p=o("./builder"),h=o("./parser"),b=o("./processors"),O.defaults=f.defaults,O.processors=b,O.ValidationError=function(c){g(v,c);function v(m){this.message=m}return v}(Error),O.Builder=p.Builder,O.Parser=h.Parser,O.parseString=h.parseString,O.parseStringPromise=h.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(o,_,O){(function(){_.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(o,_,O){(function(){_.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v=[].slice,m={}.hasOwnProperty;p=function(){var y,x,S,I,C,E;if(E=arguments[0],C=2<=arguments.length?v.call(arguments,1):[],g(Object.assign))Object.assign.apply(null,arguments);else for(y=0,S=C.length;y<S;y++)if(I=C[y],I!=null)for(x in I)m.call(I,x)&&(E[x]=I[x]);return E},g=function(y){return!!y&&Object.prototype.toString.call(y)==="[object Function]"},w=function(y){var x;return!!y&&((x=typeof y)=="function"||x==="object")},h=function(y){return g(Array.isArray)?Array.isArray(y):Object.prototype.toString.call(y)==="[object Array]"},b=function(y){var x;if(h(y))return!y.length;for(x in y)if(m.call(y,x))return!1;return!0},c=function(y){var x,S;return w(y)&&(S=Object.getPrototypeOf(y))&&(x=S.constructor)&&typeof x=="function"&&x instanceof x&&Function.prototype.toString.call(x)===Function.prototype.toString.call(Object)},f=function(y){return g(y.valueOf)?y.valueOf():y},_.exports.assign=p,_.exports.isFunction=g,_.exports.isObject=w,_.exports.isArray=h,_.exports.isEmpty=b,_.exports.isPlainObject=c,_.exports.getValue=f}).call(this)},{}],430:[function(o,_,O){(function(){_.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(o,_,O){(function(){var p,f,h;p=o("./NodeType"),h=o("./XMLNode"),_.exports=f=function(){function b(g,w,c){if(this.parent=g,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),w==null)throw new Error("Missing attribute name. "+this.debugInfo(w));this.name=this.stringify.name(w),this.value=this.stringify.attValue(c),this.type=p.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(b.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(b.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(b.prototype,"textContent",{get:function(){return this.value},set:function(g){return this.value=g||""}}),Object.defineProperty(b.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(b.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(b.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(b.prototype,"specified",{get:function(){return!0}}),b.prototype.clone=function(){return Object.create(this)},b.prototype.toString=function(g){return this.options.writer.attribute(this,this.options.writer.filterOptions(g))},b.prototype.debugInfo=function(g){return g=g||this.name,g==null?"parent: <"+this.parent.name+">":"attribute: {"+g+"}, parent: <"+this.parent.name+">"},b.prototype.isEqualNode=function(g){return!(g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.value!==this.value)},b}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),h=o("./XMLCharacterData"),_.exports=f=function(w){b(c,w);function c(v,m){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=p.CData,this.value=this.stringify.cdata(m)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(v){return this.options.writer.cdata(this,this.options.writer.filterOptions(v))},c}(h)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(o,_,O){(function(){var p,f,h=function(g,w){for(var c in w)b.call(w,c)&&(g[c]=w[c]);function v(){this.constructor=g}return v.prototype=w.prototype,g.prototype=new v,g.__super__=w.prototype,g},b={}.hasOwnProperty;f=o("./XMLNode"),_.exports=p=function(g){h(w,g);function w(c){w.__super__.constructor.call(this,c),this.value=""}return Object.defineProperty(w.prototype,"data",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(w.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),w.prototype.clone=function(){return Object.create(this)},w.prototype.substringData=function(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendData=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.insertData=function(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.deleteData=function(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.replaceData=function(c,v,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(c){return!(!w.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)||c.data!==this.data)},w}(f)}).call(this)},{"./XMLNode":450}],434:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLCharacterData"),_.exports=h=function(w){b(c,w);function c(v,m){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=p.Comment,this.value=this.stringify.comment(m)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(v){return this.options.writer.comment(this,this.options.writer.filterOptions(v))},c}(f)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(o,_,O){(function(){var p,f,h;f=o("./XMLDOMErrorHandler"),h=o("./XMLDOMStringList"),_.exports=p=function(){function b(){var g;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new f,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=g=Object.create(this.defaultParams)}return Object.defineProperty(b.prototype,"parameterNames",{get:function(){return new h(Object.keys(this.defaultParams))}}),b.prototype.getParameter=function(g){return this.params.hasOwnProperty(g)?this.params[g]:null},b.prototype.canSetParameter=function(g,w){return!0},b.prototype.setParameter=function(g,w){return w!=null?this.params[g]=w:delete this.params[g]},b}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(o,_,O){(function(){var p;_.exports=p=function(){function f(){}return f.prototype.handleError=function(h){throw new Error(h)},f}()}).call(this)},{}],437:[function(o,_,O){(function(){var p;_.exports=p=function(){function f(){}return f.prototype.hasFeature=function(h,b){return!0},f.prototype.createDocumentType=function(h,b,g){throw new Error("This DOM method is not implemented.")},f.prototype.createDocument=function(h,b,g){throw new Error("This DOM method is not implemented.")},f.prototype.createHTMLDocument=function(h){throw new Error("This DOM method is not implemented.")},f.prototype.getFeature=function(h,b){throw new Error("This DOM method is not implemented.")},f}()}).call(this)},{}],438:[function(o,_,O){(function(){var p;_.exports=p=function(){function f(h){this.arr=h||[]}return Object.defineProperty(f.prototype,"length",{get:function(){return this.arr.length}}),f.prototype.item=function(h){return this.arr[h]||null},f.prototype.contains=function(h){return this.arr.indexOf(h)!==-1},f}()}).call(this)},{}],439:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),_.exports=f=function(w){b(c,w);function c(v,m,y,x,S,I){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(y==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(m));if(!x)throw new Error("Missing DTD attribute type. "+this.debugInfo(m));if(!S)throw new Error("Missing DTD attribute default. "+this.debugInfo(m));if(S.indexOf("#")!==0&&(S="#"+S),!S.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(m));if(I&&!S.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(m));this.elementName=this.stringify.name(m),this.type=p.AttributeDeclaration,this.attributeName=this.stringify.name(y),this.attributeType=this.stringify.dtdAttType(x),I&&(this.defaultValue=this.stringify.dtdAttDefault(I)),this.defaultValueType=S}return c.prototype.toString=function(v){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(v))},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),_.exports=f=function(w){b(c,w);function c(v,m,y){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing DTD element name. "+this.debugInfo());y||(y="(#PCDATA)"),Array.isArray(y)&&(y="("+y.join(",")+")"),this.name=this.stringify.name(m),this.type=p.ElementDeclaration,this.value=this.stringify.dtdElementValue(y)}return c.prototype.toString=function(v){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(v))},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(o,_,O){(function(){var p,f,h,b,g=function(c,v){for(var m in v)w.call(v,m)&&(c[m]=v[m]);function y(){this.constructor=c}return y.prototype=v.prototype,c.prototype=new y,c.__super__=v.prototype,c},w={}.hasOwnProperty;b=o("./Utility").isObject,h=o("./XMLNode"),p=o("./NodeType"),_.exports=f=function(c){g(v,c);function v(m,y,x,S){if(v.__super__.constructor.call(this,m),x==null)throw new Error("Missing DTD entity name. "+this.debugInfo(x));if(S==null)throw new Error("Missing DTD entity value. "+this.debugInfo(x));if(this.pe=!!y,this.name=this.stringify.name(x),this.type=p.EntityDeclaration,!b(S))this.value=this.stringify.dtdEntityValue(S),this.internal=!0;else{if(!S.pubID&&!S.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(x));if(S.pubID&&!S.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(x));if(this.internal=!1,S.pubID!=null&&(this.pubID=this.stringify.dtdPubID(S.pubID)),S.sysID!=null&&(this.sysID=this.stringify.dtdSysID(S.sysID)),S.nData!=null&&(this.nData=this.stringify.dtdNData(S.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(x))}}return Object.defineProperty(v.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(v.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(v.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(v.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(v.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(v.prototype,"xmlVersion",{get:function(){return null}}),v.prototype.toString=function(m){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(m))},v}(h)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),_.exports=f=function(w){b(c,w);function c(v,m,y){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing DTD notation name. "+this.debugInfo(m));if(!y.pubID&&!y.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(m));this.name=this.stringify.name(m),this.type=p.NotationDeclaration,y.pubID!=null&&(this.pubID=this.stringify.dtdPubID(y.pubID)),y.sysID!=null&&(this.sysID=this.stringify.dtdSysID(y.sysID))}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),c.prototype.toString=function(v){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(v))},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(o,_,O){(function(){var p,f,h,b,g=function(c,v){for(var m in v)w.call(v,m)&&(c[m]=v[m]);function y(){this.constructor=c}return y.prototype=v.prototype,c.prototype=new y,c.__super__=v.prototype,c},w={}.hasOwnProperty;b=o("./Utility").isObject,h=o("./XMLNode"),p=o("./NodeType"),_.exports=f=function(c){g(v,c);function v(m,y,x,S){var I;v.__super__.constructor.call(this,m),b(y)&&(I=y,y=I.version,x=I.encoding,S=I.standalone),y||(y="1.0"),this.type=p.Declaration,this.version=this.stringify.xmlVersion(y),x!=null&&(this.encoding=this.stringify.xmlEncoding(x)),S!=null&&(this.standalone=this.stringify.xmlStandalone(S))}return v.prototype.toString=function(m){return this.options.writer.declaration(this,this.options.writer.filterOptions(m))},v}(h)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m,y=function(S,I){for(var C in I)x.call(I,C)&&(S[C]=I[C]);function E(){this.constructor=S}return E.prototype=I.prototype,S.prototype=new E,S.__super__=I.prototype,S},x={}.hasOwnProperty;m=o("./Utility").isObject,v=o("./XMLNode"),p=o("./NodeType"),f=o("./XMLDTDAttList"),b=o("./XMLDTDEntity"),h=o("./XMLDTDElement"),g=o("./XMLDTDNotation"),c=o("./XMLNamedNodeMap"),_.exports=w=function(S){y(I,S);function I(C,E,k){var V,P,K,B,R,j;if(I.__super__.constructor.call(this,C),this.type=p.DocType,C.children){for(B=C.children,P=0,K=B.length;P<K;P++)if(V=B[P],V.type===p.Element){this.name=V.name;break}}this.documentObject=C,m(E)&&(R=E,E=R.pubID,k=R.sysID),k==null&&(j=[E,k],k=j[0],E=j[1]),E!=null&&(this.pubID=this.stringify.dtdPubID(E)),k!=null&&(this.sysID=this.stringify.dtdSysID(k))}return Object.defineProperty(I.prototype,"entities",{get:function(){var C,E,k,V,P;for(V={},P=this.children,E=0,k=P.length;E<k;E++)C=P[E],C.type===p.EntityDeclaration&&!C.pe&&(V[C.name]=C);return new c(V)}}),Object.defineProperty(I.prototype,"notations",{get:function(){var C,E,k,V,P;for(V={},P=this.children,E=0,k=P.length;E<k;E++)C=P[E],C.type===p.NotationDeclaration&&(V[C.name]=C);return new c(V)}}),Object.defineProperty(I.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(I.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(I.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),I.prototype.element=function(C,E){var k;return k=new h(this,C,E),this.children.push(k),this},I.prototype.attList=function(C,E,k,V,P){var K;return K=new f(this,C,E,k,V,P),this.children.push(K),this},I.prototype.entity=function(C,E){var k;return k=new b(this,!1,C,E),this.children.push(k),this},I.prototype.pEntity=function(C,E){var k;return k=new b(this,!0,C,E),this.children.push(k),this},I.prototype.notation=function(C,E){var k;return k=new g(this,C,E),this.children.push(k),this},I.prototype.toString=function(C){return this.options.writer.docType(this,this.options.writer.filterOptions(C))},I.prototype.ele=function(C,E){return this.element(C,E)},I.prototype.att=function(C,E,k,V,P){return this.attList(C,E,k,V,P)},I.prototype.ent=function(C,E){return this.entity(C,E)},I.prototype.pent=function(C,E){return this.pEntity(C,E)},I.prototype.not=function(C,E){return this.notation(C,E)},I.prototype.up=function(){return this.root()||this.documentObject},I.prototype.isEqualNode=function(C){return!(!I.__super__.isEqualNode.apply(this,arguments).isEqualNode(C)||C.name!==this.name||C.publicId!==this.publicId||C.systemId!==this.systemId)},I}(v)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m=function(x,S){for(var I in S)y.call(S,I)&&(x[I]=S[I]);function C(){this.constructor=x}return C.prototype=S.prototype,x.prototype=new C,x.__super__=S.prototype,x},y={}.hasOwnProperty;v=o("./Utility").isPlainObject,h=o("./XMLDOMImplementation"),f=o("./XMLDOMConfiguration"),g=o("./XMLNode"),p=o("./NodeType"),c=o("./XMLStringifier"),w=o("./XMLStringWriter"),_.exports=b=function(x){m(S,x);function S(I){S.__super__.constructor.call(this,null),this.name="#document",this.type=p.Document,this.documentURI=null,this.domConfig=new f,I||(I={}),I.writer||(I.writer=new w),this.options=I,this.stringify=new c(I)}return Object.defineProperty(S.prototype,"implementation",{value:new h}),Object.defineProperty(S.prototype,"doctype",{get:function(){var I,C,E,k;for(k=this.children,C=0,E=k.length;C<E;C++)if(I=k[C],I.type===p.DocType)return I;return null}}),Object.defineProperty(S.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(S.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(S.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(S.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].encoding:null}}),Object.defineProperty(S.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(S.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===p.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(S.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(S.prototype,"origin",{get:function(){return null}}),Object.defineProperty(S.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(S.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(S.prototype,"contentType",{get:function(){return null}}),S.prototype.end=function(I){var C;return C={},I?v(I)&&(C=I,I=this.options.writer):I=this.options.writer,I.document(this,I.filterOptions(C))},S.prototype.toString=function(I){return this.options.writer.document(this,this.options.writer.filterOptions(I))},S.prototype.createElement=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createTextNode=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createComment=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createCDATASection=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createProcessingInstruction=function(I,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createAttribute=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createEntityReference=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.importNode=function(I,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createElementNS=function(I,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createAttributeNS=function(I,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(I,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementById=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.adoptNode=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.renameNode=function(I,C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByClassName=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createEvent=function(I){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createNodeIterator=function(I,C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.createTreeWalker=function(I,C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},S}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m,y,x,S,I,C,E,k,V,P,K,B,R,j,N,$,z={}.hasOwnProperty;$=o("./Utility"),j=$.isObject,R=$.isFunction,N=$.isPlainObject,B=$.getValue,p=o("./NodeType"),S=o("./XMLDocument"),C=o("./XMLElement"),b=o("./XMLCData"),g=o("./XMLComment"),k=o("./XMLRaw"),K=o("./XMLText"),E=o("./XMLProcessingInstruction"),y=o("./XMLDeclaration"),x=o("./XMLDocType"),w=o("./XMLDTDAttList"),v=o("./XMLDTDEntity"),c=o("./XMLDTDElement"),m=o("./XMLDTDNotation"),h=o("./XMLAttribute"),P=o("./XMLStringifier"),V=o("./XMLStringWriter"),f=o("./WriterState"),_.exports=I=function(){function F(M,X,re){var ne;this.name="?xml",this.type=p.Document,M||(M={}),ne={},M.writer?N(M.writer)&&(ne=M.writer,M.writer=new V):M.writer=new V,this.options=M,this.writer=M.writer,this.writerOptions=this.writer.filterOptions(ne),this.stringify=new P(M),this.onDataCallback=X||function(){},this.onEndCallback=re||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return F.prototype.createChildNode=function(M){var X,re,ne,pe,ie,Ae,Z,fe;switch(M.type){case p.CData:this.cdata(M.value);break;case p.Comment:this.comment(M.value);break;case p.Element:ne={},Z=M.attribs;for(re in Z)z.call(Z,re)&&(X=Z[re],ne[re]=X.value);this.node(M.name,ne);break;case p.Dummy:this.dummy();break;case p.Raw:this.raw(M.value);break;case p.Text:this.text(M.value);break;case p.ProcessingInstruction:this.instruction(M.target,M.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+M.constructor.name)}for(fe=M.children,ie=0,Ae=fe.length;ie<Ae;ie++)pe=fe[ie],this.createChildNode(pe),pe.type===p.Element&&this.up();return this},F.prototype.dummy=function(){return this},F.prototype.node=function(M,X,re){var ne;if(M==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(M));return this.openCurrent(),M=B(M),X==null&&(X={}),X=B(X),j(X)||(ne=[X,re],re=ne[0],X=ne[1]),this.currentNode=new C(this,M,X),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,re!=null&&this.text(re),this},F.prototype.element=function(M,X,re){var ne,pe,ie,Ae,Z,fe;if(this.currentNode&&this.currentNode.type===p.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(M)||j(M)||R(M))for(Ae=this.options.noValidation,this.options.noValidation=!0,fe=new S(this.options).element("TEMP_ROOT"),fe.element(M),this.options.noValidation=Ae,Z=fe.children,pe=0,ie=Z.length;pe<ie;pe++)ne=Z[pe],this.createChildNode(ne),ne.type===p.Element&&this.up();else this.node(M,X,re);return this},F.prototype.attribute=function(M,X){var re,ne;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(M));if(M!=null&&(M=B(M)),j(M))for(re in M)z.call(M,re)&&(ne=M[re],this.attribute(re,ne));else R(X)&&(X=X.apply()),this.options.keepNullAttributes&&X==null?this.currentNode.attribs[M]=new h(this,M,""):X!=null&&(this.currentNode.attribs[M]=new h(this,M,X));return this},F.prototype.text=function(M){var X;return this.openCurrent(),X=new K(this,M),this.onData(this.writer.text(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.cdata=function(M){var X;return this.openCurrent(),X=new b(this,M),this.onData(this.writer.cdata(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.comment=function(M){var X;return this.openCurrent(),X=new g(this,M),this.onData(this.writer.comment(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.raw=function(M){var X;return this.openCurrent(),X=new k(this,M),this.onData(this.writer.raw(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.instruction=function(M,X){var re,ne,pe,ie,Ae;if(this.openCurrent(),M!=null&&(M=B(M)),X!=null&&(X=B(X)),Array.isArray(M))for(re=0,ie=M.length;re<ie;re++)ne=M[re],this.instruction(ne);else if(j(M))for(ne in M)z.call(M,ne)&&(pe=M[ne],this.instruction(ne,pe));else R(X)&&(X=X.apply()),Ae=new E(this,M,X),this.onData(this.writer.processingInstruction(Ae,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},F.prototype.declaration=function(M,X,re){var ne;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ne=new y(this,M,X,re),this.onData(this.writer.declaration(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.doctype=function(M,X,re){if(this.openCurrent(),M==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new x(this,X,re),this.currentNode.rootNodeName=M,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},F.prototype.dtdElement=function(M,X){var re;return this.openCurrent(),re=new c(this,M,X),this.onData(this.writer.dtdElement(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.attList=function(M,X,re,ne,pe){var ie;return this.openCurrent(),ie=new w(this,M,X,re,ne,pe),this.onData(this.writer.dtdAttList(ie,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.entity=function(M,X){var re;return this.openCurrent(),re=new v(this,!1,M,X),this.onData(this.writer.dtdEntity(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.pEntity=function(M,X){var re;return this.openCurrent(),re=new v(this,!0,M,X),this.onData(this.writer.dtdEntity(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.notation=function(M,X){var re;return this.openCurrent(),re=new m(this,M,X),this.onData(this.writer.dtdNotation(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},F.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},F.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},F.prototype.openNode=function(M){var X,re,ne,pe;if(!M.isOpen){if(!this.root&&this.currentLevel===0&&M.type===p.Element&&(this.root=M),re="",M.type===p.Element){this.writerOptions.state=f.OpenTag,re=this.writer.indent(M,this.writerOptions,this.currentLevel)+"<"+M.name,pe=M.attribs;for(ne in pe)z.call(pe,ne)&&(X=pe[ne],re+=this.writer.attribute(X,this.writerOptions,this.currentLevel));re+=(M.children?">":"/>")+this.writer.endline(M,this.writerOptions,this.currentLevel),this.writerOptions.state=f.InsideTag}else this.writerOptions.state=f.OpenTag,re=this.writer.indent(M,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+M.rootNodeName,M.pubID&&M.sysID?re+=' PUBLIC "'+M.pubID+'" "'+M.sysID+'"':M.sysID&&(re+=' SYSTEM "'+M.sysID+'"'),M.children?(re+=" [",this.writerOptions.state=f.InsideTag):(this.writerOptions.state=f.CloseTag,re+=">"),re+=this.writer.endline(M,this.writerOptions,this.currentLevel);return this.onData(re,this.currentLevel),M.isOpen=!0}},F.prototype.closeNode=function(M){var X;if(!M.isClosed)return X="",this.writerOptions.state=f.CloseTag,M.type===p.Element?X=this.writer.indent(M,this.writerOptions,this.currentLevel)+"</"+M.name+">"+this.writer.endline(M,this.writerOptions,this.currentLevel):X=this.writer.indent(M,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(M,this.writerOptions,this.currentLevel),this.writerOptions.state=f.None,this.onData(X,this.currentLevel),M.isClosed=!0},F.prototype.onData=function(M,X){return this.documentStarted=!0,this.onDataCallback(M,X+1)},F.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},F.prototype.debugInfo=function(M){return M==null?"":"node: <"+M+">"},F.prototype.ele=function(){return this.element.apply(this,arguments)},F.prototype.nod=function(M,X,re){return this.node(M,X,re)},F.prototype.txt=function(M){return this.text(M)},F.prototype.dat=function(M){return this.cdata(M)},F.prototype.com=function(M){return this.comment(M)},F.prototype.ins=function(M,X){return this.instruction(M,X)},F.prototype.dec=function(M,X,re){return this.declaration(M,X,re)},F.prototype.dtd=function(M,X,re){return this.doctype(M,X,re)},F.prototype.e=function(M,X,re){return this.element(M,X,re)},F.prototype.n=function(M,X,re){return this.node(M,X,re)},F.prototype.t=function(M){return this.text(M)},F.prototype.d=function(M){return this.cdata(M)},F.prototype.c=function(M){return this.comment(M)},F.prototype.r=function(M){return this.raw(M)},F.prototype.i=function(M,X){return this.instruction(M,X)},F.prototype.att=function(){return this.currentNode&&this.currentNode.type===p.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},F.prototype.a=function(){return this.currentNode&&this.currentNode.type===p.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},F.prototype.ent=function(M,X){return this.entity(M,X)},F.prototype.pent=function(M,X){return this.pEntity(M,X)},F.prototype.not=function(M,X){return this.notation(M,X)},F}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./XMLNode"),p=o("./NodeType"),_.exports=f=function(w){b(c,w);function c(v){c.__super__.constructor.call(this,v),this.type=p.Dummy}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(v){return""},c}(h)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m,y=function(S,I){for(var C in I)x.call(I,C)&&(S[C]=I[C]);function E(){this.constructor=S}return E.prototype=I.prototype,S.prototype=new E,S.__super__=I.prototype,S},x={}.hasOwnProperty;m=o("./Utility"),v=m.isObject,c=m.isFunction,w=m.getValue,g=o("./XMLNode"),p=o("./NodeType"),f=o("./XMLAttribute"),b=o("./XMLNamedNodeMap"),_.exports=h=function(S){y(I,S);function I(C,E,k){var V,P,K,B;if(I.__super__.constructor.call(this,C),E==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(E),this.type=p.Element,this.attribs={},this.schemaTypeInfo=null,k!=null&&this.attribute(k),C.type===p.Document&&(this.isRoot=!0,this.documentObject=C,C.rootObject=this,C.children)){for(B=C.children,P=0,K=B.length;P<K;P++)if(V=B[P],V.type===p.DocType){V.name=this.name;break}}}return Object.defineProperty(I.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(I.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(I.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(I.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(I.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(I.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(I.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(I.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new b(this.attribs)),this.attributeMap}}),I.prototype.clone=function(){var C,E,k,V;k=Object.create(this),k.isRoot&&(k.documentObject=null),k.attribs={},V=this.attribs;for(E in V)x.call(V,E)&&(C=V[E],k.attribs[E]=C.clone());return k.children=[],this.children.forEach(function(P){var K;return K=P.clone(),K.parent=k,k.children.push(K)}),k},I.prototype.attribute=function(C,E){var k,V;if(C!=null&&(C=w(C)),v(C))for(k in C)x.call(C,k)&&(V=C[k],this.attribute(k,V));else c(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.attribs[C]=new f(this,C,""):E!=null&&(this.attribs[C]=new f(this,C,E));return this},I.prototype.removeAttribute=function(C){var E,k,V;if(C==null)throw new Error("Missing attribute name. "+this.debugInfo());if(C=w(C),Array.isArray(C))for(k=0,V=C.length;k<V;k++)E=C[k],delete this.attribs[E];else delete this.attribs[C];return this},I.prototype.toString=function(C){return this.options.writer.element(this,this.options.writer.filterOptions(C))},I.prototype.att=function(C,E){return this.attribute(C,E)},I.prototype.a=function(C,E){return this.attribute(C,E)},I.prototype.getAttribute=function(C){return this.attribs.hasOwnProperty(C)?this.attribs[C].value:null},I.prototype.setAttribute=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getAttributeNode=function(C){return this.attribs.hasOwnProperty(C)?this.attribs[C]:null},I.prototype.setAttributeNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.removeAttributeNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getAttributeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setAttributeNS=function(C,E,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.removeAttributeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getAttributeNodeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setAttributeNodeNS=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagNameNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.hasAttribute=function(C){return this.attribs.hasOwnProperty(C)},I.prototype.hasAttributeNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setIdAttribute=function(C,E){return this.attribs.hasOwnProperty(C)?this.attribs[C].isId:E},I.prototype.setIdAttributeNS=function(C,E,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.setIdAttributeNode=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByTagNameNS=function(C,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.getElementsByClassName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},I.prototype.isEqualNode=function(C){var E,k,V;if(!I.__super__.isEqualNode.apply(this,arguments).isEqualNode(C)||C.namespaceURI!==this.namespaceURI||C.prefix!==this.prefix||C.localName!==this.localName||C.attribs.length!==this.attribs.length)return!1;for(E=k=0,V=this.attribs.length-1;0<=V?k<=V:k>=V;E=0<=V?++k:--k)if(!this.attribs[E].isEqualNode(C.attribs[E]))return!1;return!0},I}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(o,_,O){(function(){var p;_.exports=p=function(){function f(h){this.nodes=h}return Object.defineProperty(f.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.getNamedItem=function(h){return this.nodes[h]},f.prototype.setNamedItem=function(h){var b;return b=this.nodes[h.nodeName],this.nodes[h.nodeName]=h,b||null},f.prototype.removeNamedItem=function(h){var b;return b=this.nodes[h],delete this.nodes[h],b||null},f.prototype.item=function(h){return this.nodes[Object.keys(this.nodes)[h]]||null},f.prototype.getNamedItemNS=function(h,b){throw new Error("This DOM method is not implemented.")},f.prototype.setNamedItemNS=function(h){throw new Error("This DOM method is not implemented.")},f.prototype.removeNamedItemNS=function(h,b){throw new Error("This DOM method is not implemented.")},f}()}).call(this)},{}],450:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m,y,x,S,I,C,E,k,V,P,K,B={}.hasOwnProperty;K=o("./Utility"),P=K.isObject,V=K.isFunction,k=K.isEmpty,E=K.getValue,v=null,h=null,b=null,g=null,w=null,I=null,C=null,S=null,c=null,f=null,x=null,m=null,p=null,_.exports=y=function(){function R(j){this.parent=j,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,v||(v=o("./XMLElement"),h=o("./XMLCData"),b=o("./XMLComment"),g=o("./XMLDeclaration"),w=o("./XMLDocType"),I=o("./XMLRaw"),C=o("./XMLText"),S=o("./XMLProcessingInstruction"),c=o("./XMLDummy"),f=o("./NodeType"),x=o("./XMLNodeList"),m=o("./XMLNamedNodeMap"),p=o("./DocumentPosition"))}return Object.defineProperty(R.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(R.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(R.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(R.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(R.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new x(this.children)),this.childNodeList}}),Object.defineProperty(R.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(R.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(R.prototype,"previousSibling",{get:function(){var j;return j=this.parent.children.indexOf(this),this.parent.children[j-1]||null}}),Object.defineProperty(R.prototype,"nextSibling",{get:function(){var j;return j=this.parent.children.indexOf(this),this.parent.children[j+1]||null}}),Object.defineProperty(R.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(R.prototype,"textContent",{get:function(){var j,N,$,z,F;if(this.nodeType===f.Element||this.nodeType===f.DocumentFragment){for(F="",z=this.children,N=0,$=z.length;N<$;N++)j=z[N],j.textContent&&(F+=j.textContent);return F}else return null},set:function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),R.prototype.setParent=function(j){var N,$,z,F,M;for(this.parent=j,j&&(this.options=j.options,this.stringify=j.stringify),F=this.children,M=[],$=0,z=F.length;$<z;$++)N=F[$],M.push(N.setParent(this));return M},R.prototype.element=function(j,N,$){var z,F,M,X,re,ne,pe,ie,Ae,Z,fe;if(ne=null,N===null&&$==null&&(Ae=[{},null],N=Ae[0],$=Ae[1]),N==null&&(N={}),N=E(N),P(N)||(Z=[N,$],$=Z[0],N=Z[1]),j!=null&&(j=E(j)),Array.isArray(j))for(M=0,pe=j.length;M<pe;M++)F=j[M],ne=this.element(F);else if(V(j))ne=this.element(j.apply());else if(P(j)){for(re in j)if(B.call(j,re))if(fe=j[re],V(fe)&&(fe=fe.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&re.indexOf(this.stringify.convertAttKey)===0)ne=this.attribute(re.substr(this.stringify.convertAttKey.length),fe);else if(!this.options.separateArrayItems&&Array.isArray(fe)&&k(fe))ne=this.dummy();else if(P(fe)&&k(fe))ne=this.element(re);else if(!this.options.keepNullNodes&&fe==null)ne=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(fe))for(X=0,ie=fe.length;X<ie;X++)F=fe[X],z={},z[re]=F,ne=this.element(z);else P(fe)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&re.indexOf(this.stringify.convertTextKey)===0?ne=this.element(fe):(ne=this.element(re),ne.element(fe)):ne=this.element(re,fe)}else!this.options.keepNullNodes&&$===null?ne=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&j.indexOf(this.stringify.convertTextKey)===0?ne=this.text($):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&j.indexOf(this.stringify.convertCDataKey)===0?ne=this.cdata($):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&j.indexOf(this.stringify.convertCommentKey)===0?ne=this.comment($):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&j.indexOf(this.stringify.convertRawKey)===0?ne=this.raw($):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&j.indexOf(this.stringify.convertPIKey)===0?ne=this.instruction(j.substr(this.stringify.convertPIKey.length),$):ne=this.node(j,N,$);if(ne==null)throw new Error("Could not create any elements with: "+j+". "+this.debugInfo());return ne},R.prototype.insertBefore=function(j,N,$){var z,F,M,X,re;if(j!=null&&j.type)return M=j,X=N,M.setParent(this),X?(F=children.indexOf(X),re=children.splice(F),children.push(M),Array.prototype.push.apply(children,re)):children.push(M),M;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(j));return F=this.parent.children.indexOf(this),re=this.parent.children.splice(F),z=this.parent.element(j,N,$),Array.prototype.push.apply(this.parent.children,re),z},R.prototype.insertAfter=function(j,N,$){var z,F,M;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(j));return F=this.parent.children.indexOf(this),M=this.parent.children.splice(F+1),z=this.parent.element(j,N,$),Array.prototype.push.apply(this.parent.children,M),z},R.prototype.remove=function(){var j,N;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return j=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[j,j-j+1].concat(N=[])),this.parent},R.prototype.node=function(j,N,$){var z,F;return j!=null&&(j=E(j)),N||(N={}),N=E(N),P(N)||(F=[N,$],$=F[0],N=F[1]),z=new v(this,j,N),$!=null&&z.text($),this.children.push(z),z},R.prototype.text=function(j){var N;return P(j)&&this.element(j),N=new C(this,j),this.children.push(N),this},R.prototype.cdata=function(j){var N;return N=new h(this,j),this.children.push(N),this},R.prototype.comment=function(j){var N;return N=new b(this,j),this.children.push(N),this},R.prototype.commentBefore=function(j){var N,$,z;return $=this.parent.children.indexOf(this),z=this.parent.children.splice($),N=this.parent.comment(j),Array.prototype.push.apply(this.parent.children,z),this},R.prototype.commentAfter=function(j){var N,$,z;return $=this.parent.children.indexOf(this),z=this.parent.children.splice($+1),N=this.parent.comment(j),Array.prototype.push.apply(this.parent.children,z),this},R.prototype.raw=function(j){var N;return N=new I(this,j),this.children.push(N),this},R.prototype.dummy=function(){var j;return j=new c(this),j},R.prototype.instruction=function(j,N){var $,z,F,M,X;if(j!=null&&(j=E(j)),N!=null&&(N=E(N)),Array.isArray(j))for(M=0,X=j.length;M<X;M++)$=j[M],this.instruction($);else if(P(j))for($ in j)B.call(j,$)&&(z=j[$],this.instruction($,z));else V(N)&&(N=N.apply()),F=new S(this,j,N),this.children.push(F);return this},R.prototype.instructionBefore=function(j,N){var $,z,F;return z=this.parent.children.indexOf(this),F=this.parent.children.splice(z),$=this.parent.instruction(j,N),Array.prototype.push.apply(this.parent.children,F),this},R.prototype.instructionAfter=function(j,N){var $,z,F;return z=this.parent.children.indexOf(this),F=this.parent.children.splice(z+1),$=this.parent.instruction(j,N),Array.prototype.push.apply(this.parent.children,F),this},R.prototype.declaration=function(j,N,$){var z,F;return z=this.document(),F=new g(z,j,N,$),z.children.length===0?z.children.unshift(F):z.children[0].type===f.Declaration?z.children[0]=F:z.children.unshift(F),z.root()||z},R.prototype.dtd=function(j,N){var $,z,F,M,X,re,ne,pe,ie,Ae;for(z=this.document(),F=new w(z,j,N),ie=z.children,M=X=0,ne=ie.length;X<ne;M=++X)if($=ie[M],$.type===f.DocType)return z.children[M]=F,F;for(Ae=z.children,M=re=0,pe=Ae.length;re<pe;M=++re)if($=Ae[M],$.isRoot)return z.children.splice(M,0,F),F;return z.children.push(F),F},R.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},R.prototype.root=function(){var j;for(j=this;j;){if(j.type===f.Document)return j.rootObject;if(j.isRoot)return j;j=j.parent}},R.prototype.document=function(){var j;for(j=this;j;){if(j.type===f.Document)return j;j=j.parent}},R.prototype.end=function(j){return this.document().end(j)},R.prototype.prev=function(){var j;if(j=this.parent.children.indexOf(this),j<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[j-1]},R.prototype.next=function(){var j;if(j=this.parent.children.indexOf(this),j===-1||j===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[j+1]},R.prototype.importDocument=function(j){var N;return N=j.root().clone(),N.parent=this,N.isRoot=!1,this.children.push(N),this},R.prototype.debugInfo=function(j){var N,$;return j=j||this.name,j==null&&!((N=this.parent)!=null&&N.name)?"":j==null?"parent: <"+this.parent.name+">":($=this.parent)!=null&&$.name?"node: <"+j+">, parent: <"+this.parent.name+">":"node: <"+j+">"},R.prototype.ele=function(j,N,$){return this.element(j,N,$)},R.prototype.nod=function(j,N,$){return this.node(j,N,$)},R.prototype.txt=function(j){return this.text(j)},R.prototype.dat=function(j){return this.cdata(j)},R.prototype.com=function(j){return this.comment(j)},R.prototype.ins=function(j,N){return this.instruction(j,N)},R.prototype.doc=function(){return this.document()},R.prototype.dec=function(j,N,$){return this.declaration(j,N,$)},R.prototype.e=function(j,N,$){return this.element(j,N,$)},R.prototype.n=function(j,N,$){return this.node(j,N,$)},R.prototype.t=function(j){return this.text(j)},R.prototype.d=function(j){return this.cdata(j)},R.prototype.c=function(j){return this.comment(j)},R.prototype.r=function(j){return this.raw(j)},R.prototype.i=function(j,N){return this.instruction(j,N)},R.prototype.u=function(){return this.up()},R.prototype.importXMLBuilder=function(j){return this.importDocument(j)},R.prototype.replaceChild=function(j,N){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.removeChild=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.appendChild=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.hasChildNodes=function(){return this.children.length!==0},R.prototype.cloneNode=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.isSupported=function(j,N){return!0},R.prototype.hasAttributes=function(){return this.attribs.length!==0},R.prototype.compareDocumentPosition=function(j){var N,$;return N=this,N===j?0:this.document()!==j.document()?($=p.Disconnected|p.ImplementationSpecific,Math.random()<.5?$|=p.Preceding:$|=p.Following,$):N.isAncestor(j)?p.Contains|p.Preceding:N.isDescendant(j)?p.Contains|p.Following:N.isPreceding(j)?p.Preceding:p.Following},R.prototype.isSameNode=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.lookupPrefix=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.isDefaultNamespace=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.lookupNamespaceURI=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.isEqualNode=function(j){var N,$,z;if(j.nodeType!==this.nodeType||j.children.length!==this.children.length)return!1;for(N=$=0,z=this.children.length-1;0<=z?$<=z:$>=z;N=0<=z?++$:--$)if(!this.children[N].isEqualNode(j.children[N]))return!1;return!0},R.prototype.getFeature=function(j,N){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.setUserData=function(j,N,$){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.getUserData=function(j){throw new Error("This DOM method is not implemented."+this.debugInfo())},R.prototype.contains=function(j){return j?j===this||this.isDescendant(j):!1},R.prototype.isDescendant=function(j){var N,$,z,F,M;for(M=this.children,z=0,F=M.length;z<F;z++)if(N=M[z],j===N||($=N.isDescendant(j),$))return!0;return!1},R.prototype.isAncestor=function(j){return j.isDescendant(this)},R.prototype.isPreceding=function(j){var N,$;return N=this.treePosition(j),$=this.treePosition(this),N===-1||$===-1?!1:N<$},R.prototype.isFollowing=function(j){var N,$;return N=this.treePosition(j),$=this.treePosition(this),N===-1||$===-1?!1:N>$},R.prototype.treePosition=function(j){var N,$;return $=0,N=!1,this.foreachTreeNode(this.document(),function(z){if($++,!N&&z===j)return N=!0}),N?$:-1},R.prototype.foreachTreeNode=function(j,N){var $,z,F,M,X;for(j||(j=this.document()),M=j.children,z=0,F=M.length;z<F;z++){if($=M[z],X=N($))return X;if(X=this.foreachTreeNode($,N),X)return X}},R}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(o,_,O){(function(){var p;_.exports=p=function(){function f(h){this.nodes=h}return Object.defineProperty(f.prototype,"length",{get:function(){return this.nodes.length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.item=function(h){return this.nodes[h]||null},f}()}).call(this)},{}],452:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLCharacterData"),_.exports=h=function(w){b(c,w);function c(v,m,y){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=p.ProcessingInstruction,this.target=this.stringify.insTarget(m),this.name=this.target,y&&(this.value=this.stringify.insValue(y))}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(v){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(v))},c.prototype.isEqualNode=function(v){return!(!c.__super__.isEqualNode.apply(this,arguments).isEqualNode(v)||v.target!==this.target)},c}(f)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLNode"),_.exports=h=function(w){b(c,w);function c(v,m){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=p.Raw,this.value=this.stringify.raw(m)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(v){return this.options.writer.raw(this,this.options.writer.filterOptions(v))},c}(f)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(o,_,O){(function(){var p,f,h,b,g=function(c,v){for(var m in v)w.call(v,m)&&(c[m]=v[m]);function y(){this.constructor=c}return y.prototype=v.prototype,c.prototype=new y,c.__super__=v.prototype,c},w={}.hasOwnProperty;p=o("./NodeType"),b=o("./XMLWriterBase"),f=o("./WriterState"),_.exports=h=function(c){g(v,c);function v(m,y){this.stream=m,v.__super__.constructor.call(this,y)}return v.prototype.endline=function(m,y,x){return m.isLastRootNode&&y.state===f.CloseTag?"":v.__super__.endline.call(this,m,y,x)},v.prototype.document=function(m,y){var x,S,I,C,E,k,V,P,K;for(V=m.children,S=I=0,E=V.length;I<E;S=++I)x=V[S],x.isLastRootNode=S===m.children.length-1;for(y=this.filterOptions(y),P=m.children,K=[],C=0,k=P.length;C<k;C++)x=P[C],K.push(this.writeChildNode(x,y,0));return K},v.prototype.attribute=function(m,y,x){return this.stream.write(v.__super__.attribute.call(this,m,y,x))},v.prototype.cdata=function(m,y,x){return this.stream.write(v.__super__.cdata.call(this,m,y,x))},v.prototype.comment=function(m,y,x){return this.stream.write(v.__super__.comment.call(this,m,y,x))},v.prototype.declaration=function(m,y,x){return this.stream.write(v.__super__.declaration.call(this,m,y,x))},v.prototype.docType=function(m,y,x){var S,I,C,E;if(x||(x=0),this.openNode(m,y,x),y.state=f.OpenTag,this.stream.write(this.indent(m,y,x)),this.stream.write("<!DOCTYPE "+m.root().name),m.pubID&&m.sysID?this.stream.write(' PUBLIC "'+m.pubID+'" "'+m.sysID+'"'):m.sysID&&this.stream.write(' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(m,y,x)),y.state=f.InsideTag,E=m.children,I=0,C=E.length;I<C;I++)S=E[I],this.writeChildNode(S,y,x+1);y.state=f.CloseTag,this.stream.write("]")}return y.state=f.CloseTag,this.stream.write(y.spaceBeforeSlash+">"),this.stream.write(this.endline(m,y,x)),y.state=f.None,this.closeNode(m,y,x)},v.prototype.element=function(m,y,x){var S,I,C,E,k,V,P,K,B,R;x||(x=0),this.openNode(m,y,x),y.state=f.OpenTag,this.stream.write(this.indent(m,y,x)+"<"+m.name),B=m.attribs;for(P in B)w.call(B,P)&&(S=B[P],this.attribute(S,y,x));if(C=m.children.length,E=C===0?null:m.children[0],C===0||m.children.every(function(j){return(j.type===p.Text||j.type===p.Raw)&&j.value===""}))y.allowEmpty?(this.stream.write(">"),y.state=f.CloseTag,this.stream.write("</"+m.name+">")):(y.state=f.CloseTag,this.stream.write(y.spaceBeforeSlash+"/>"));else if(y.pretty&&C===1&&(E.type===p.Text||E.type===p.Raw)&&E.value!=null)this.stream.write(">"),y.state=f.InsideTag,y.suppressPrettyCount++,K=!0,this.writeChildNode(E,y,x+1),y.suppressPrettyCount--,K=!1,y.state=f.CloseTag,this.stream.write("</"+m.name+">");else{for(this.stream.write(">"+this.endline(m,y,x)),y.state=f.InsideTag,R=m.children,k=0,V=R.length;k<V;k++)I=R[k],this.writeChildNode(I,y,x+1);y.state=f.CloseTag,this.stream.write(this.indent(m,y,x)+"</"+m.name+">")}return this.stream.write(this.endline(m,y,x)),y.state=f.None,this.closeNode(m,y,x)},v.prototype.processingInstruction=function(m,y,x){return this.stream.write(v.__super__.processingInstruction.call(this,m,y,x))},v.prototype.raw=function(m,y,x){return this.stream.write(v.__super__.raw.call(this,m,y,x))},v.prototype.text=function(m,y,x){return this.stream.write(v.__super__.text.call(this,m,y,x))},v.prototype.dtdAttList=function(m,y,x){return this.stream.write(v.__super__.dtdAttList.call(this,m,y,x))},v.prototype.dtdElement=function(m,y,x){return this.stream.write(v.__super__.dtdElement.call(this,m,y,x))},v.prototype.dtdEntity=function(m,y,x){return this.stream.write(v.__super__.dtdEntity.call(this,m,y,x))},v.prototype.dtdNotation=function(m,y,x){return this.stream.write(v.__super__.dtdNotation.call(this,m,y,x))},v}(b)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(o,_,O){(function(){var p,f,h=function(g,w){for(var c in w)b.call(w,c)&&(g[c]=w[c]);function v(){this.constructor=g}return v.prototype=w.prototype,g.prototype=new v,g.__super__=w.prototype,g},b={}.hasOwnProperty;f=o("./XMLWriterBase"),_.exports=p=function(g){h(w,g);function w(c){w.__super__.constructor.call(this,c)}return w.prototype.document=function(c,v){var m,y,x,S,I;for(v=this.filterOptions(v),S="",I=c.children,y=0,x=I.length;y<x;y++)m=I[y],S+=this.writeChildNode(m,v,0);return v.pretty&&S.slice(-v.newline.length)===v.newline&&(S=S.slice(0,-v.newline.length)),S},w}(f)}).call(this)},{"./XMLWriterBase":458}],456:[function(o,_,O){(function(){var p,f=function(b,g){return function(){return b.apply(g,arguments)}},h={}.hasOwnProperty;_.exports=p=function(){function b(g){this.assertLegalName=f(this.assertLegalName,this),this.assertLegalChar=f(this.assertLegalChar,this);var w,c,v;g||(g={}),this.options=g,this.options.version||(this.options.version="1.0"),c=g.stringify||{};for(w in c)h.call(c,w)&&(v=c[w],this[w]=v)}return b.prototype.name=function(g){return this.options.noValidation?g:this.assertLegalName(""+g||"")},b.prototype.text=function(g){return this.options.noValidation?g:this.assertLegalChar(this.textEscape(""+g||""))},b.prototype.cdata=function(g){return this.options.noValidation?g:(g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g))},b.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},b.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},b.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},b.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},b.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},b.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},b.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},b.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.convertAttKey="@",b.prototype.convertPIKey="?",b.prototype.convertTextKey="#text",b.prototype.convertCDataKey="#cdata",b.prototype.convertCommentKey="#comment",b.prototype.convertRawKey="#raw",b.prototype.assertLegalChar=function(g){var w,c;if(this.options.noValidation)return g;if(w="",this.options.version==="1.0"){if(w=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=g.match(w))throw new Error("Invalid character in string: "+g+" at index "+c.index)}else if(this.options.version==="1.1"&&(w=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=g.match(w)))throw new Error("Invalid character in string: "+g+" at index "+c.index);return g},b.prototype.assertLegalName=function(g){var w;if(this.options.noValidation)return g;if(this.assertLegalChar(g),w=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!g.match(w))throw new Error("Invalid character in name");return g},b.prototype.textEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},b.prototype.attEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},b}()}).call(this)},{}],457:[function(o,_,O){(function(){var p,f,h,b=function(w,c){for(var v in c)g.call(c,v)&&(w[v]=c[v]);function m(){this.constructor=w}return m.prototype=c.prototype,w.prototype=new m,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./NodeType"),f=o("./XMLCharacterData"),_.exports=h=function(w){b(c,w);function c(v,m){if(c.__super__.constructor.call(this,v),m==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=p.Text,this.value=this.stringify.text(m)}return Object.defineProperty(c.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"wholeText",{get:function(){var v,m,y;for(y="",m=this.previousSibling;m;)y=m.data+y,m=m.previousSibling;for(y+=this.data,v=this.nextSibling;v;)y=y+v.data,v=v.nextSibling;return y}}),c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(v){return this.options.writer.text(this,this.options.writer.filterOptions(v))},c.prototype.splitText=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.replaceWholeText=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(f)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m,y,x,S,I,C,E,k,V,P={}.hasOwnProperty;V=o("./Utility").assign,p=o("./NodeType"),m=o("./XMLDeclaration"),y=o("./XMLDocType"),h=o("./XMLCData"),b=o("./XMLComment"),S=o("./XMLElement"),C=o("./XMLRaw"),E=o("./XMLText"),I=o("./XMLProcessingInstruction"),x=o("./XMLDummy"),g=o("./XMLDTDAttList"),w=o("./XMLDTDElement"),c=o("./XMLDTDEntity"),v=o("./XMLDTDNotation"),f=o("./WriterState"),_.exports=k=function(){function K(B){var R,j,N;B||(B={}),this.options=B,j=B.writer||{};for(R in j)P.call(j,R)&&(N=j[R],this["_"+R]=this[R],this[R]=N)}return K.prototype.filterOptions=function(B){var R,j,N,$,z,F,M,X;return B||(B={}),B=V({},this.options,B),R={writer:this},R.pretty=B.pretty||!1,R.allowEmpty=B.allowEmpty||!1,R.indent=(j=B.indent)!=null?j:" ",R.newline=(N=B.newline)!=null?N:`
|
|
`,R.offset=($=B.offset)!=null?$:0,R.dontPrettyTextNodes=(z=(F=B.dontPrettyTextNodes)!=null?F:B.dontprettytextnodes)!=null?z:0,R.spaceBeforeSlash=(M=(X=B.spaceBeforeSlash)!=null?X:B.spacebeforeslash)!=null?M:"",R.spaceBeforeSlash===!0&&(R.spaceBeforeSlash=" "),R.suppressPrettyCount=0,R.user={},R.state=f.None,R},K.prototype.indent=function(B,R,j){var N;return!R.pretty||R.suppressPrettyCount?"":R.pretty&&(N=(j||0)+R.offset+1,N>0)?new Array(N).join(R.indent):""},K.prototype.endline=function(B,R,j){return!R.pretty||R.suppressPrettyCount?"":R.newline},K.prototype.attribute=function(B,R,j){var N;return this.openAttribute(B,R,j),N=" "+B.name+'="'+B.value+'"',this.closeAttribute(B,R,j),N},K.prototype.cdata=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<![CDATA[",R.state=f.InsideTag,N+=B.value,R.state=f.CloseTag,N+="]]>"+this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.comment=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<!-- ",R.state=f.InsideTag,N+=B.value,R.state=f.CloseTag,N+=" -->"+this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.declaration=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<?xml",R.state=f.InsideTag,N+=' version="'+B.version+'"',B.encoding!=null&&(N+=' encoding="'+B.encoding+'"'),B.standalone!=null&&(N+=' standalone="'+B.standalone+'"'),R.state=f.CloseTag,N+=R.spaceBeforeSlash+"?>",N+=this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.docType=function(B,R,j){var N,$,z,F,M;if(j||(j=0),this.openNode(B,R,j),R.state=f.OpenTag,F=this.indent(B,R,j),F+="<!DOCTYPE "+B.root().name,B.pubID&&B.sysID?F+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.sysID&&(F+=' SYSTEM "'+B.sysID+'"'),B.children.length>0){for(F+=" [",F+=this.endline(B,R,j),R.state=f.InsideTag,M=B.children,$=0,z=M.length;$<z;$++)N=M[$],F+=this.writeChildNode(N,R,j+1);R.state=f.CloseTag,F+="]"}return R.state=f.CloseTag,F+=R.spaceBeforeSlash+">",F+=this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),F},K.prototype.element=function(B,R,j){var N,$,z,F,M,X,re,ne,pe,ie,Ae,Z,fe,he;j||(j=0),ie=!1,Ae="",this.openNode(B,R,j),R.state=f.OpenTag,Ae+=this.indent(B,R,j)+"<"+B.name,Z=B.attribs;for(pe in Z)P.call(Z,pe)&&(N=Z[pe],Ae+=this.attribute(N,R,j));if(z=B.children.length,F=z===0?null:B.children[0],z===0||B.children.every(function(be){return(be.type===p.Text||be.type===p.Raw)&&be.value===""}))R.allowEmpty?(Ae+=">",R.state=f.CloseTag,Ae+="</"+B.name+">"+this.endline(B,R,j)):(R.state=f.CloseTag,Ae+=R.spaceBeforeSlash+"/>"+this.endline(B,R,j));else if(R.pretty&&z===1&&(F.type===p.Text||F.type===p.Raw)&&F.value!=null)Ae+=">",R.state=f.InsideTag,R.suppressPrettyCount++,ie=!0,Ae+=this.writeChildNode(F,R,j+1),R.suppressPrettyCount--,ie=!1,R.state=f.CloseTag,Ae+="</"+B.name+">"+this.endline(B,R,j);else{if(R.dontPrettyTextNodes){for(fe=B.children,M=0,re=fe.length;M<re;M++)if($=fe[M],($.type===p.Text||$.type===p.Raw)&&$.value!=null){R.suppressPrettyCount++,ie=!0;break}}for(Ae+=">"+this.endline(B,R,j),R.state=f.InsideTag,he=B.children,X=0,ne=he.length;X<ne;X++)$=he[X],Ae+=this.writeChildNode($,R,j+1);R.state=f.CloseTag,Ae+=this.indent(B,R,j)+"</"+B.name+">",ie&&R.suppressPrettyCount--,Ae+=this.endline(B,R,j),R.state=f.None}return this.closeNode(B,R,j),Ae},K.prototype.writeChildNode=function(B,R,j){switch(B.type){case p.CData:return this.cdata(B,R,j);case p.Comment:return this.comment(B,R,j);case p.Element:return this.element(B,R,j);case p.Raw:return this.raw(B,R,j);case p.Text:return this.text(B,R,j);case p.ProcessingInstruction:return this.processingInstruction(B,R,j);case p.Dummy:return"";case p.Declaration:return this.declaration(B,R,j);case p.DocType:return this.docType(B,R,j);case p.AttributeDeclaration:return this.dtdAttList(B,R,j);case p.ElementDeclaration:return this.dtdElement(B,R,j);case p.EntityDeclaration:return this.dtdEntity(B,R,j);case p.NotationDeclaration:return this.dtdNotation(B,R,j);default:throw new Error("Unknown XML node type: "+B.constructor.name)}},K.prototype.processingInstruction=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<?",R.state=f.InsideTag,N+=B.target,B.value&&(N+=" "+B.value),R.state=f.CloseTag,N+=R.spaceBeforeSlash+"?>",N+=this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.raw=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j),R.state=f.InsideTag,N+=B.value,R.state=f.CloseTag,N+=this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.text=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j),R.state=f.InsideTag,N+=B.value,R.state=f.CloseTag,N+=this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.dtdAttList=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<!ATTLIST",R.state=f.InsideTag,N+=" "+B.elementName+" "+B.attributeName+" "+B.attributeType,B.defaultValueType!=="#DEFAULT"&&(N+=" "+B.defaultValueType),B.defaultValue&&(N+=' "'+B.defaultValue+'"'),R.state=f.CloseTag,N+=R.spaceBeforeSlash+">"+this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.dtdElement=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<!ELEMENT",R.state=f.InsideTag,N+=" "+B.name+" "+B.value,R.state=f.CloseTag,N+=R.spaceBeforeSlash+">"+this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.dtdEntity=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<!ENTITY",R.state=f.InsideTag,B.pe&&(N+=" %"),N+=" "+B.name,B.value?N+=' "'+B.value+'"':(B.pubID&&B.sysID?N+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.sysID&&(N+=' SYSTEM "'+B.sysID+'"'),B.nData&&(N+=" NDATA "+B.nData)),R.state=f.CloseTag,N+=R.spaceBeforeSlash+">"+this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.dtdNotation=function(B,R,j){var N;return this.openNode(B,R,j),R.state=f.OpenTag,N=this.indent(B,R,j)+"<!NOTATION",R.state=f.InsideTag,N+=" "+B.name,B.pubID&&B.sysID?N+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.pubID?N+=' PUBLIC "'+B.pubID+'"':B.sysID&&(N+=' SYSTEM "'+B.sysID+'"'),R.state=f.CloseTag,N+=R.spaceBeforeSlash+">"+this.endline(B,R,j),R.state=f.None,this.closeNode(B,R,j),N},K.prototype.openNode=function(B,R,j){},K.prototype.closeNode=function(B,R,j){},K.prototype.openAttribute=function(B,R,j){},K.prototype.closeAttribute=function(B,R,j){},K}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(o,_,O){(function(){var p,f,h,b,g,w,c,v,m,y;y=o("./Utility"),v=y.assign,m=y.isFunction,h=o("./XMLDOMImplementation"),b=o("./XMLDocument"),g=o("./XMLDocumentCB"),c=o("./XMLStringWriter"),w=o("./XMLStreamWriter"),p=o("./NodeType"),f=o("./WriterState"),_.exports.create=function(x,S,I,C){var E,k;if(x==null)throw new Error("Root element needs a name.");return C=v({},S,I,C),E=new b(C),k=E.element(x),C.headless||(E.declaration(C),(C.pubID!=null||C.sysID!=null)&&E.dtd(C)),k},_.exports.begin=function(x,S,I){var C;return m(x)&&(C=[x,S],S=C[0],I=C[1],x={}),S?new g(x,S,I):new b(x)},_.exports.stringWriter=function(x){return new c(x)},_.exports.streamWriter=function(x,S){return new w(x,S)},_.exports.implementation=new h,_.exports.nodeType=p,_.exports.writerState=f}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(o,_,O){_.exports=f;var p=Object.prototype.hasOwnProperty;function f(){for(var h={},b=0;b<arguments.length;b++){var g=arguments[b];for(var w in g)p.call(g,w)&&(h[w]=g[w])}return h}},{}],461:[function(o,_,O){"use strict";o("core-js/modules/es.array.fill.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.array.slice.js");var p=o("buffer").Buffer,f=o("./sha"),h=o("./md5"),b={sha1:f,md5:h},g=64,w=p.alloc(g);w.fill(0);function c(y,x,S){p.isBuffer(x)||(x=p.from(x)),p.isBuffer(S)||(S=p.from(S)),x.length>g?x=y(x):x.length<g&&(x=p.concat([x,w],g));for(var I=p.alloc(g),C=p.alloc(g),E=0;E<g;E++)I[E]=x[E]^54,C[E]=x[E]^92;var k=y(p.concat([I,S]));return y(p.concat([C,k]))}function v(y,x){y=y||"sha1";var S=b[y],I=[],C=0;return S||m("algorithm:",y,"is not yet supported"),{update:function(k){return p.isBuffer(k)||(k=p.from(k)),I.push(k),C+=k.length,this},digest:function(k){var V=p.concat(I),P=x?c(S,x,V):S(V);return I=null,k?P.toString(k):P}}}function m(){var y=[].slice.call(arguments).join(" ");throw new Error([y,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}O.createHash=function(y){return v(y)},O.createHmac=function(y,x){return v(y,x)},O.createCredentials=function(){m("sorry,createCredentials is not implemented yet")},O.createCipher=function(){m("sorry,createCipher is not implemented yet")},O.createCipheriv=function(){m("sorry,createCipheriv is not implemented yet")},O.createDecipher=function(){m("sorry,createDecipher is not implemented yet")},O.createDecipheriv=function(){m("sorry,createDecipheriv is not implemented yet")},O.createSign=function(){m("sorry,createSign is not implemented yet")},O.createVerify=function(){m("sorry,createVerify is not implemented yet")},O.createDiffieHellman=function(){m("sorry,createDiffieHellman is not implemented yet")},O.pbkdf2=function(){m("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(o,_,O){"use strict";o("core-js/modules/es.array.fill.js"),o("core-js/modules/es.array.concat.js");var p=o("buffer").Buffer,f=4,h=p.alloc(f);h.fill(0);var b=8;function g(v,m){if(v.length%f!==0){var y=v.length+(f-v.length%f);v=p.concat([v,h],y)}for(var x=[],S=m?v.readInt32BE:v.readInt32LE,I=0;I<v.length;I+=f)x.push(S.call(v,I));return x}function w(v,m,y){for(var x=p.alloc(m),S=y?x.writeInt32BE:x.writeInt32LE,I=0;I<v.length;I++)S.call(x,v[I],I*4,!0);return x}function c(v,m,y,x){p.isBuffer(v)||(v=p.from(v));var S=m(g(v,x),v.length*b);return w(S,y,x)}_.exports={hash:c}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(o,_,O){"use strict";var p=o("./helpers");function f(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function h(x,S){x[S>>5]|=128<<S%32,x[(S+64>>>9<<4)+14]=S;for(var I=1732584193,C=-271733879,E=-1732584194,k=271733878,V=0;V<x.length;V+=16){var P=I,K=C,B=E,R=k;I=g(I,C,E,k,x[V+0],7,-680876936),k=g(k,I,C,E,x[V+1],12,-389564586),E=g(E,k,I,C,x[V+2],17,606105819),C=g(C,E,k,I,x[V+3],22,-1044525330),I=g(I,C,E,k,x[V+4],7,-176418897),k=g(k,I,C,E,x[V+5],12,1200080426),E=g(E,k,I,C,x[V+6],17,-1473231341),C=g(C,E,k,I,x[V+7],22,-45705983),I=g(I,C,E,k,x[V+8],7,1770035416),k=g(k,I,C,E,x[V+9],12,-1958414417),E=g(E,k,I,C,x[V+10],17,-42063),C=g(C,E,k,I,x[V+11],22,-1990404162),I=g(I,C,E,k,x[V+12],7,1804603682),k=g(k,I,C,E,x[V+13],12,-40341101),E=g(E,k,I,C,x[V+14],17,-1502002290),C=g(C,E,k,I,x[V+15],22,1236535329),I=w(I,C,E,k,x[V+1],5,-165796510),k=w(k,I,C,E,x[V+6],9,-1069501632),E=w(E,k,I,C,x[V+11],14,643717713),C=w(C,E,k,I,x[V+0],20,-373897302),I=w(I,C,E,k,x[V+5],5,-701558691),k=w(k,I,C,E,x[V+10],9,38016083),E=w(E,k,I,C,x[V+15],14,-660478335),C=w(C,E,k,I,x[V+4],20,-405537848),I=w(I,C,E,k,x[V+9],5,568446438),k=w(k,I,C,E,x[V+14],9,-1019803690),E=w(E,k,I,C,x[V+3],14,-187363961),C=w(C,E,k,I,x[V+8],20,1163531501),I=w(I,C,E,k,x[V+13],5,-1444681467),k=w(k,I,C,E,x[V+2],9,-51403784),E=w(E,k,I,C,x[V+7],14,1735328473),C=w(C,E,k,I,x[V+12],20,-1926607734),I=c(I,C,E,k,x[V+5],4,-378558),k=c(k,I,C,E,x[V+8],11,-2022574463),E=c(E,k,I,C,x[V+11],16,1839030562),C=c(C,E,k,I,x[V+14],23,-35309556),I=c(I,C,E,k,x[V+1],4,-1530992060),k=c(k,I,C,E,x[V+4],11,1272893353),E=c(E,k,I,C,x[V+7],16,-155497632),C=c(C,E,k,I,x[V+10],23,-1094730640),I=c(I,C,E,k,x[V+13],4,681279174),k=c(k,I,C,E,x[V+0],11,-358537222),E=c(E,k,I,C,x[V+3],16,-722521979),C=c(C,E,k,I,x[V+6],23,76029189),I=c(I,C,E,k,x[V+9],4,-640364487),k=c(k,I,C,E,x[V+12],11,-421815835),E=c(E,k,I,C,x[V+15],16,530742520),C=c(C,E,k,I,x[V+2],23,-995338651),I=v(I,C,E,k,x[V+0],6,-198630844),k=v(k,I,C,E,x[V+7],10,1126891415),E=v(E,k,I,C,x[V+14],15,-1416354905),C=v(C,E,k,I,x[V+5],21,-57434055),I=v(I,C,E,k,x[V+12],6,1700485571),k=v(k,I,C,E,x[V+3],10,-1894986606),E=v(E,k,I,C,x[V+10],15,-1051523),C=v(C,E,k,I,x[V+1],21,-2054922799),I=v(I,C,E,k,x[V+8],6,1873313359),k=v(k,I,C,E,x[V+15],10,-30611744),E=v(E,k,I,C,x[V+6],15,-1560198380),C=v(C,E,k,I,x[V+13],21,1309151649),I=v(I,C,E,k,x[V+4],6,-145523070),k=v(k,I,C,E,x[V+11],10,-1120210379),E=v(E,k,I,C,x[V+2],15,718787259),C=v(C,E,k,I,x[V+9],21,-343485551),I=m(I,P),C=m(C,K),E=m(E,B),k=m(k,R)}return Array(I,C,E,k)}function b(x,S,I,C,E,k){return m(y(m(m(S,x),m(C,k)),E),I)}function g(x,S,I,C,E,k,V){return b(S&I|~S&C,x,S,E,k,V)}function w(x,S,I,C,E,k,V){return b(S&C|I&~C,x,S,E,k,V)}function c(x,S,I,C,E,k,V){return b(S^I^C,x,S,E,k,V)}function v(x,S,I,C,E,k,V){return b(I^(S|~C),x,S,E,k,V)}function m(x,S){var I=(x&65535)+(S&65535),C=(x>>16)+(S>>16)+(I>>16);return C<<16|I&65535}function y(x,S){return x<<S|x>>>32-S}_.exports=function(S){return p.hash(S,h,16)}},{"./helpers":462}],464:[function(o,_,O){"use strict";var p=o("./helpers");function f(c,v){c[v>>5]|=128<<24-v%32,c[(v+64>>9<<4)+15]=v;for(var m=Array(80),y=1732584193,x=-271733879,S=-1732584194,I=271733878,C=-1009589776,E=0;E<c.length;E+=16){for(var k=y,V=x,P=S,K=I,B=C,R=0;R<80;R++){R<16?m[R]=c[E+R]:m[R]=w(m[R-3]^m[R-8]^m[R-14]^m[R-16],1);var j=g(g(w(y,5),h(R,x,S,I)),g(g(C,m[R]),b(R)));C=I,I=S,S=w(x,30),x=y,y=j}y=g(y,k),x=g(x,V),S=g(S,P),I=g(I,K),C=g(C,B)}return Array(y,x,S,I,C)}function h(c,v,m,y){return c<20?v&m|~v&y:c<40?v^m^y:c<60?v&m|v&y|m&y:v^m^y}function b(c){return c<20?1518500249:c<40?1859775393:c<60?-1894007588:-899497514}function g(c,v){var m=(c&65535)+(v&65535),y=(c>>16)+(v>>16)+(m>>16);return y<<16|m&65535}function w(c,v){return c<<v|c>>>32-v}_.exports=function(v){return p.hash(v,f,20,!0)}},{"./helpers":462}],465:[function(o,_,O){"use strict";_.exports=function(){return function(){}}},{}],466:[function(o,_,O){(function(p){(function(){"use strict";var f=o("@babel/runtime/helpers/interopRequireDefault"),h=f(o("@babel/runtime/helpers/typeof")),b=o("stream"),g=b.Stream,w=o("../lib/common/utils/isArray"),c=w.isArray;_.exports.string=function(y){return typeof y=="string"},_.exports.array=c,_.exports.buffer=p.isBuffer;function v(m){return m instanceof g}_.exports.writableStream=function(y){return v(y)&&typeof y._write=="function"&&(0,h.default)(y._writableState)==="object"}}).call(this)}).call(this,{isBuffer:o("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(o,_,O){"use strict";var p=o("immediate"),f=_.exports={};f.nextTick=p,f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={};function h(){}f.on=h,f.addListener=h,f.once=h,f.off=h,f.removeListener=h,f.removeAllListeners=h,f.emit=h,f.prependListener=h,f.prependOnceListener=h,f.listeners=function(b){return[]},f.binding=function(b){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(b){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{immediate:358}],468:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.search.js");var f=o("./lib/request"),h=o("./lib/response"),b=o("xtend"),g=o("builtin-status-codes"),w=o("url"),c=O;c.request=function(v,m){typeof v=="string"?v=w.parse(v):v=b(v);var y=p.location.protocol.search(/^https?:$/)===-1?"http:":"",x=v.protocol||y,S=v.hostname||v.host,I=v.port,C=v.path||"/";S&&S.indexOf(":")!==-1&&(S="["+S+"]"),v.url=(S?x+"//"+S:"")+(I?":"+I:"")+C,v.method=(v.method||"GET").toUpperCase(),v.headers=v.headers||{};var E=new f(v);return m&&E.on("response",m),E},c.get=function(m,y){var x=c.request(m,y);return x.end(),x},c.ClientRequest=f,c.IncomingMessage=h.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=g,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(o,_,O){(function(p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array-buffer.constructor.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.array.slice.js"),O.fetch=c(p.fetch)&&c(p.ReadableStream),O.writableStream=c(p.WritableStream),O.abortController=c(p.AbortController),O.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),O.blobConstructor=!0}catch(v){}var f;function h(){if(f!==void 0)return f;if(p.XMLHttpRequest){f=new p.XMLHttpRequest;try{f.open("GET",p.XDomainRequest?"/":"https://example.com")}catch(v){f=null}}else f=null;return f}function b(v){var m=h();if(!m)return!1;try{return m.responseType=v,m.responseType===v}catch(y){}return!1}var g=typeof p.ArrayBuffer!="undefined",w=g&&c(p.ArrayBuffer.prototype.slice);O.arraybuffer=O.fetch||g&&b("arraybuffer"),O.msstream=!O.fetch&&w&&b("ms-stream"),O.mozchunkedarraybuffer=!O.fetch&&g&&b("moz-chunked-arraybuffer"),O.overrideMimeType=O.fetch||(h()?c(h().overrideMimeType):!1),O.vbArray=c(p.VBArray);function c(v){return typeof v=="function"}f=null}).call(this)}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(o,_,O){(function(p,f,h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js");var b=o("./capability"),g=o("inherits"),w=o("./response"),c=o("readable-stream"),v=o("to-arraybuffer"),m=w.IncomingMessage,y=w.readyStates;function x(E,k){return b.fetch&&k?"fetch":b.mozchunkedarraybuffer?"moz-chunked-arraybuffer":b.msstream?"ms-stream":b.arraybuffer&&E?"arraybuffer":b.vbArray&&E?"text:vbarray":"text"}var S=_.exports=function(E){var k=this;c.Writable.call(k),k._opts=E,k._body=[],k._headers={},E.auth&&k.setHeader("Authorization","Basic "+new h(E.auth).toString("base64")),Object.keys(E.headers).forEach(function(K){k.setHeader(K,E.headers[K])});var V,P=!0;if(E.mode==="disable-fetch"||"requestTimeout"in E&&!b.abortController)P=!1,V=!0;else if(E.mode==="prefer-streaming")V=!1;else if(E.mode==="allow-wrong-content-type")V=!b.overrideMimeType;else if(!E.mode||E.mode==="default"||E.mode==="prefer-fast")V=!0;else throw new Error("Invalid value for opts.mode");k._mode=x(V,P),k._fetchTimer=null,k.on("finish",function(){k._onFinish()})};g(S,c.Writable),S.prototype.setHeader=function(E,k){var V=this,P=E.toLowerCase();C.indexOf(P)===-1&&(V._headers[P]={name:E,value:k})},S.prototype.getHeader=function(E){var k=this._headers[E.toLowerCase()];return k?k.value:null},S.prototype.removeHeader=function(E){var k=this;delete k._headers[E.toLowerCase()]},S.prototype._onFinish=function(){var E=this;if(!E._destroyed){var k=E._opts,V=E._headers,P=null;k.method!=="GET"&&k.method!=="HEAD"&&(b.arraybuffer?P=v(h.concat(E._body)):b.blobConstructor?P=new f.Blob(E._body.map(function($){return v($)}),{type:(V["content-type"]||{}).value||""}):P=h.concat(E._body).toString());var K=[];if(Object.keys(V).forEach(function($){var z=V[$].name,F=V[$].value;Array.isArray(F)?F.forEach(function(M){K.push([z,M])}):K.push([z,F])}),E._mode==="fetch"){var B=null,R=null;if(b.abortController){var j=new AbortController;B=j.signal,E._fetchAbortController=j,"requestTimeout"in k&&k.requestTimeout!==0&&(E._fetchTimer=f.setTimeout(function(){E.emit("requestTimeout"),E._fetchAbortController&&E._fetchAbortController.abort()},k.requestTimeout))}f.fetch(E._opts.url,{method:E._opts.method,headers:K,body:P||void 0,mode:"cors",credentials:k.withCredentials?"include":"same-origin",signal:B}).then(function($){E._fetchResponse=$,E._connect()},function($){f.clearTimeout(E._fetchTimer),E._destroyed||E.emit("error",$)})}else{var N=E._xhr=new f.XMLHttpRequest;try{N.open(E._opts.method,E._opts.url,!0)}catch($){p.nextTick(function(){E.emit("error",$)});return}"responseType"in N&&(N.responseType=E._mode.split(":")[0]),"withCredentials"in N&&(N.withCredentials=!!k.withCredentials),E._mode==="text"&&"overrideMimeType"in N&&N.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in k&&(N.timeout=k.requestTimeout,N.ontimeout=function(){E.emit("requestTimeout")}),K.forEach(function($){N.setRequestHeader($[0],$[1])}),E._response=null,N.onreadystatechange=function(){switch(N.readyState){case y.LOADING:case y.DONE:E._onXHRProgress();break}},E._mode==="moz-chunked-arraybuffer"&&(N.onprogress=function(){E._onXHRProgress()}),N.onerror=function(){E._destroyed||E.emit("error",new Error("XHR error"))};try{N.send(P)}catch($){p.nextTick(function(){E.emit("error",$)});return}}}};function I(E){try{var k=E.status;return k!==null&&k!==0}catch(V){return!1}}S.prototype._onXHRProgress=function(){var E=this;!I(E._xhr)||E._destroyed||(E._response||E._connect(),E._response._onXHRProgress())},S.prototype._connect=function(){var E=this;E._destroyed||(E._response=new m(E._xhr,E._fetchResponse,E._mode,E._fetchTimer),E._response.on("error",function(k){E.emit("error",k)}),E.emit("response",E._response))},S.prototype._write=function(E,k,V){var P=this;P._body.push(E),V()},S.prototype.abort=S.prototype.destroy=function(){var E=this;E._destroyed=!0,f.clearTimeout(E._fetchTimer),E._response&&(E._response._destroyed=!0),E._xhr?E._xhr.abort():E._fetchAbortController&&E._fetchAbortController.abort()},S.prototype.end=function(E,k,V){var P=this;typeof E=="function"&&(V=E,E=void 0),c.Writable.prototype.end.call(P,E,k,V)},S.prototype.flushHeaders=function(){},S.prototype.setTimeout=function(){},S.prototype.setNoDelay=function(){},S.prototype.setSocketKeepAlive=function(){};var C=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(o,_,O){(function(p,f,h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.string.match.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.typed-array.uint8-array.js"),o("core-js/modules/es.typed-array.copy-within.js"),o("core-js/modules/es.typed-array.every.js"),o("core-js/modules/es.typed-array.fill.js"),o("core-js/modules/es.typed-array.filter.js"),o("core-js/modules/es.typed-array.find.js"),o("core-js/modules/es.typed-array.find-index.js"),o("core-js/modules/es.typed-array.for-each.js"),o("core-js/modules/es.typed-array.includes.js"),o("core-js/modules/es.typed-array.index-of.js"),o("core-js/modules/es.typed-array.iterator.js"),o("core-js/modules/es.typed-array.join.js"),o("core-js/modules/es.typed-array.last-index-of.js"),o("core-js/modules/es.typed-array.map.js"),o("core-js/modules/es.typed-array.reduce.js"),o("core-js/modules/es.typed-array.reduce-right.js"),o("core-js/modules/es.typed-array.reverse.js"),o("core-js/modules/es.typed-array.set.js"),o("core-js/modules/es.typed-array.slice.js"),o("core-js/modules/es.typed-array.some.js"),o("core-js/modules/es.typed-array.sort.js"),o("core-js/modules/es.typed-array.subarray.js"),o("core-js/modules/es.typed-array.to-locale-string.js"),o("core-js/modules/es.typed-array.to-string.js"),o("core-js/modules/es.array.slice.js");var b=o("./capability"),g=o("inherits"),w=o("readable-stream"),c=O.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},v=O.IncomingMessage=function(m,y,x,S){var I=this;if(w.Readable.call(I),I._mode=x,I.headers={},I.rawHeaders=[],I.trailers={},I.rawTrailers=[],I.on("end",function(){p.nextTick(function(){I.emit("close")})}),x==="fetch"){var C=function B(){k.read().then(function(R){if(!I._destroyed){if(R.done){f.clearTimeout(S),I.push(null);return}I.push(new h(R.value)),B()}}).catch(function(R){f.clearTimeout(S),I._destroyed||I.emit("error",R)})};if(I._fetchResponse=y,I.url=y.url,I.statusCode=y.status,I.statusMessage=y.statusText,y.headers.forEach(function(B,R){I.headers[R.toLowerCase()]=B,I.rawHeaders.push(R,B)}),b.writableStream){var E=new WritableStream({write:function(R){return new Promise(function(j,N){I._destroyed?N():I.push(new h(R))?j():I._resumeFetch=j})},close:function(){f.clearTimeout(S),I._destroyed||I.push(null)},abort:function(R){I._destroyed||I.emit("error",R)}});try{y.body.pipeTo(E).catch(function(B){f.clearTimeout(S),I._destroyed||I.emit("error",B)});return}catch(B){}}var k=y.body.getReader();C()}else{I._xhr=m,I._pos=0,I.url=m.responseURL,I.statusCode=m.status,I.statusMessage=m.statusText;var V=m.getAllResponseHeaders().split(/\r?\n/);if(V.forEach(function(B){var R=B.match(/^([^:]+):\s*(.*)/);if(R){var j=R[1].toLowerCase();j==="set-cookie"?(I.headers[j]===void 0&&(I.headers[j]=[]),I.headers[j].push(R[2])):I.headers[j]!==void 0?I.headers[j]+=", "+R[2]:I.headers[j]=R[2],I.rawHeaders.push(R[1],R[2])}}),I._charset="x-user-defined",!b.overrideMimeType){var P=I.rawHeaders["mime-type"];if(P){var K=P.match(/;\s*charset=([^;])(;|$)/);K&&(I._charset=K[1].toLowerCase())}I._charset||(I._charset="utf-8")}}};g(v,w.Readable),v.prototype._read=function(){var m=this,y=m._resumeFetch;y&&(m._resumeFetch=null,y())},v.prototype._onXHRProgress=function(){var m=this,y=m._xhr,x=null;switch(m._mode){case"text:vbarray":if(y.readyState!==c.DONE)break;try{x=new f.VBArray(y.responseBody).toArray()}catch(k){}if(x!==null){m.push(new h(x));break}case"text":try{x=y.responseText}catch(k){m._mode="text:vbarray";break}if(x.length>m._pos){var S=x.substr(m._pos);if(m._charset==="x-user-defined"){for(var I=new h(S.length),C=0;C<S.length;C++)I[C]=S.charCodeAt(C)&255;m.push(I)}else m.push(S,m._charset);m._pos=x.length}break;case"arraybuffer":if(y.readyState!==c.DONE||!y.response)break;x=y.response,m.push(new h(new Uint8Array(x)));break;case"moz-chunked-arraybuffer":if(x=y.response,y.readyState!==c.LOADING||!x)break;m.push(new h(new Uint8Array(x)));break;case"ms-stream":if(x=y.response,y.readyState!==c.LOADING)break;var E=new f.MSStreamReader;E.onprogress=function(){E.result.byteLength>m._pos&&(m.push(new h(new Uint8Array(E.result.slice(m._pos)))),m._pos=E.result.byteLength)},E.onload=function(){m.push(null)},E.readAsArrayBuffer(x);break}m._xhr.readyState===c.DONE&&m._mode!=="ms-stream"&&m.push(null)}}).call(this)}).call(this,o("_process"),typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/helpers/typeof"));o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.search.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.string.match.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.splice.js");var h=o("punycode"),b=o("./util");O.parse=R,O.resolve=N,O.resolveObject=$,O.format=j,O.Url=g;function g(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var w=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,m=["<",">",'"',"`"," ","\r",`
|
|
`," "],y=["{","}","|","\\","^","`"].concat(m),x=["'"].concat(y),S=["%","/","?",";","#"].concat(x),I=["/","?","#"],C=255,E=/^[+a-z0-9A-Z_-]{0,63}$/,k=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,V={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},K={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},B=o("querystring");function R(z,F,M){if(z&&b.isObject(z)&&z instanceof g)return z;var X=new g;return X.parse(z,F,M),X}g.prototype.parse=function(z,F,M){if(!b.isString(z))throw new TypeError("Parameter 'url' must be a string, not "+(0,f.default)(z));var X=z.indexOf("?"),re=X!==-1&&X<z.indexOf("#")?"?":"#",ne=z.split(re),pe=/\\/g;ne[0]=ne[0].replace(pe,"/"),z=ne.join(re);var ie=z;if(ie=ie.trim(),!M&&z.split("#").length===1){var Ae=v.exec(ie);if(Ae)return this.path=ie,this.href=ie,this.pathname=Ae[1],Ae[2]?(this.search=Ae[2],F?this.query=B.parse(this.search.substr(1)):this.query=this.search.substr(1)):F&&(this.search="",this.query={}),this}var Z=w.exec(ie);if(Z){Z=Z[0];var fe=Z.toLowerCase();this.protocol=fe,ie=ie.substr(Z.length)}if(M||Z||ie.match(/^\/\/[^@\/]+@[^@\/]+/)){var he=ie.substr(0,2)==="//";he&&!(Z&&P[Z])&&(ie=ie.substr(2),this.slashes=!0)}if(!P[Z]&&(he||Z&&!K[Z])){for(var be=-1,le=0;le<I.length;le++){var ue=ie.indexOf(I[le]);ue!==-1&&(be===-1||ue<be)&&(be=ue)}var ve,Ee;be===-1?Ee=ie.lastIndexOf("@"):Ee=ie.lastIndexOf("@",be),Ee!==-1&&(ve=ie.slice(0,Ee),ie=ie.slice(Ee+1),this.auth=decodeURIComponent(ve)),be=-1;for(var le=0;le<S.length;le++){var ue=ie.indexOf(S[le]);ue!==-1&&(be===-1||ue<be)&&(be=ue)}be===-1&&(be=ie.length),this.host=ie.slice(0,be),ie=ie.slice(be),this.parseHost(),this.hostname=this.hostname||"";var Oe=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Oe)for(var De=this.hostname.split("."),le=0,ce=De.length;le<ce;le++){var G=De[le];if(G&&!G.match(E)){for(var ye="",Y=0,H=G.length;Y<H;Y++)G.charCodeAt(Y)>127?ye+="x":ye+=G[Y];if(!ye.match(E)){var Q=De.slice(0,le),J=De.slice(le+1),ee=G.match(k);ee&&(Q.push(ee[1]),J.unshift(ee[2])),J.length&&(ie="/"+J.join(".")+ie),this.hostname=Q.join(".");break}}}this.hostname.length>C?this.hostname="":this.hostname=this.hostname.toLowerCase(),Oe||(this.hostname=h.toASCII(this.hostname));var W=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+W,this.href+=this.host,Oe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ie[0]!=="/"&&(ie="/"+ie))}if(!V[fe])for(var le=0,ce=x.length;le<ce;le++){var q=x[le];if(ie.indexOf(q)!==-1){var de=encodeURIComponent(q);de===q&&(de=escape(q)),ie=ie.split(q).join(de)}}var Ie=ie.indexOf("#");Ie!==-1&&(this.hash=ie.substr(Ie),ie=ie.slice(0,Ie));var He=ie.indexOf("?");if(He!==-1?(this.search=ie.substr(He),this.query=ie.substr(He+1),F&&(this.query=B.parse(this.query)),ie=ie.slice(0,He)):F&&(this.search="",this.query={}),ie&&(this.pathname=ie),K[fe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",ze=this.search||"";this.path=W+ze}return this.href=this.format(),this};function j(z){return b.isString(z)&&(z=R(z)),z instanceof g?z.format():g.prototype.format.call(z)}g.prototype.format=function(){var z=this.auth||"";z&&(z=encodeURIComponent(z),z=z.replace(/%3A/i,":"),z+="@");var F=this.protocol||"",M=this.pathname||"",X=this.hash||"",re=!1,ne="";this.host?re=z+this.host:this.hostname&&(re=z+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(re+=":"+this.port)),this.query&&b.isObject(this.query)&&Object.keys(this.query).length&&(ne=B.stringify(this.query));var pe=this.search||ne&&"?"+ne||"";return F&&F.substr(-1)!==":"&&(F+=":"),this.slashes||(!F||K[F])&&re!==!1?(re="//"+(re||""),M&&M.charAt(0)!=="/"&&(M="/"+M)):re||(re=""),X&&X.charAt(0)!=="#"&&(X="#"+X),pe&&pe.charAt(0)!=="?"&&(pe="?"+pe),M=M.replace(/[?#]/g,function(ie){return encodeURIComponent(ie)}),pe=pe.replace("#","%23"),F+re+M+pe+X};function N(z,F){return R(z,!1,!0).resolve(F)}g.prototype.resolve=function(z){return this.resolveObject(R(z,!1,!0)).format()};function $(z,F){return z?R(z,!1,!0).resolveObject(F):F}g.prototype.resolveObject=function(z){if(b.isString(z)){var F=new g;F.parse(z,!1,!0),z=F}for(var M=new g,X=Object.keys(this),re=0;re<X.length;re++){var ne=X[re];M[ne]=this[ne]}if(M.hash=z.hash,z.href==="")return M.href=M.format(),M;if(z.slashes&&!z.protocol){for(var pe=Object.keys(z),ie=0;ie<pe.length;ie++){var Ae=pe[ie];Ae!=="protocol"&&(M[Ae]=z[Ae])}return K[M.protocol]&&M.hostname&&!M.pathname&&(M.path=M.pathname="/"),M.href=M.format(),M}if(z.protocol&&z.protocol!==M.protocol){if(!K[z.protocol]){for(var Z=Object.keys(z),fe=0;fe<Z.length;fe++){var he=Z[fe];M[he]=z[he]}return M.href=M.format(),M}if(M.protocol=z.protocol,!z.host&&!P[z.protocol]){for(var ce=(z.pathname||"").split("/");ce.length&&!(z.host=ce.shift()););z.host||(z.host=""),z.hostname||(z.hostname=""),ce[0]!==""&&ce.unshift(""),ce.length<2&&ce.unshift(""),M.pathname=ce.join("/")}else M.pathname=z.pathname;if(M.search=z.search,M.query=z.query,M.host=z.host||"",M.auth=z.auth,M.hostname=z.hostname||z.host,M.port=z.port,M.pathname||M.search){var be=M.pathname||"",le=M.search||"";M.path=be+le}return M.slashes=M.slashes||z.slashes,M.href=M.format(),M}var ue=M.pathname&&M.pathname.charAt(0)==="/",ve=z.host||z.pathname&&z.pathname.charAt(0)==="/",Ee=ve||ue||M.host&&z.pathname,Oe=Ee,De=M.pathname&&M.pathname.split("/")||[],ce=z.pathname&&z.pathname.split("/")||[],G=M.protocol&&!K[M.protocol];if(G&&(M.hostname="",M.port=null,M.host&&(De[0]===""?De[0]=M.host:De.unshift(M.host)),M.host="",z.protocol&&(z.hostname=null,z.port=null,z.host&&(ce[0]===""?ce[0]=z.host:ce.unshift(z.host)),z.host=null),Ee=Ee&&(ce[0]===""||De[0]==="")),ve)M.host=z.host||z.host===""?z.host:M.host,M.hostname=z.hostname||z.hostname===""?z.hostname:M.hostname,M.search=z.search,M.query=z.query,De=ce;else if(ce.length)De||(De=[]),De.pop(),De=De.concat(ce),M.search=z.search,M.query=z.query;else if(!b.isNullOrUndefined(z.search)){if(G){M.hostname=M.host=De.shift();var ye=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;ye&&(M.auth=ye.shift(),M.host=M.hostname=ye.shift())}return M.search=z.search,M.query=z.query,(!b.isNull(M.pathname)||!b.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.href=M.format(),M}if(!De.length)return M.pathname=null,M.search?M.path="/"+M.search:M.path=null,M.href=M.format(),M;for(var Y=De.slice(-1)[0],H=(M.host||z.host||De.length>1)&&(Y==="."||Y==="..")||Y==="",Q=0,J=De.length;J>=0;J--)Y=De[J],Y==="."?De.splice(J,1):Y===".."?(De.splice(J,1),Q++):Q&&(De.splice(J,1),Q--);if(!Ee&&!Oe)for(;Q--;Q)De.unshift("..");Ee&&De[0]!==""&&(!De[0]||De[0].charAt(0)!=="/")&&De.unshift(""),H&&De.join("/").substr(-1)!=="/"&&De.push("");var ee=De[0]===""||De[0]&&De[0].charAt(0)==="/";if(G){M.hostname=M.host=ee?"":De.length?De.shift():"";var ye=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;ye&&(M.auth=ye.shift(),M.host=M.hostname=ye.shift())}return Ee=Ee||M.host&&De.length,Ee&&!ee&&De.unshift(""),De.length?M.pathname=De.join("/"):(M.pathname=null,M.path=null),(!b.isNull(M.pathname)||!b.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.auth=z.auth||M.auth,M.slashes=M.slashes||z.slashes,M.href=M.format(),M},g.prototype.parseHost=function(){var z=this.host,F=c.exec(z);F&&(F=F[0],F!==":"&&(this.port=F.substr(1)),z=z.substr(0,z.length-F.length)),z&&(this.hostname=z)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(o,_,O){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),f=p(o("@babel/runtime/helpers/typeof"));_.exports={isString:function(b){return typeof b=="string"},isObject:function(b){return(0,f.default)(b)==="object"&&b!==null},isNull:function(b){return b===null},isNullOrUndefined:function(b){return b==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(o,_,O){"use strict";o("core-js/modules/es.number.constructor.js"),O.encodeURIComponent=function(p){try{return encodeURIComponent(p)}catch(f){return p}},O.escape=o("escape-html"),O.timestamp=function(f){if(f){var h=f;return typeof h=="string"&&(h=Number(h)),String(f).length===10&&(h*=1e3),new Date(h)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(o,_,O){(function(p,f){(function(){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),b=h(o("@babel/runtime/helpers/typeof"));o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.array.concat.js");var g=o("util"),w=o("url"),c=o("http"),v=o("https"),m=o("debug")("urllib"),y=o("humanize-ms"),x=0,S=Math.pow(2,31)-10,I=/^https?:\/\//i;function C(P,K){return P===void 0?K:P}function E(P){return P?P.split(";")[0].trim().toLowerCase():""}function k(P,K){return function(B,R,j){if(B)return K(B);P({data:R,status:j.statusCode,headers:j.headers,res:j})}}O.TIMEOUTS=[y("300s"),y("300s")];var V=["json","text"];O.request=function(K,B,R){return arguments.length===2&&typeof B=="function"&&(R=B,B=null),typeof R=="function"?O.requestWithCallback(K,B,R):new Promise(function(j,N){O.requestWithCallback(K,B,k(j,N))})},O.requestWithCallback=function(K,B,R){if(!K||typeof K!="string"&&(0,b.default)(K)!=="object"){var j=g.format("expect request url to be a string or a http request options, but got %j",K);throw new Error(j)}arguments.length===2&&typeof B=="function"&&(R=B,B=null),B=B||{},x>=S&&(x=0);var N=++x;B.requestUrls=B.requestUrls||[];var $={requestId:N,url:K,args:B,ctx:B.ctx};B.emitter&&B.emitter.emit("request",$),B.timeout=B.timeout||O.TIMEOUTS,B.maxRedirects=B.maxRedirects||10,B.streaming=B.streaming||B.customResponse;var z=Date.now(),F;typeof K=="string"?(I.test(K)||(K="https://"+K),F=w.parse(K)):F=K;var M=(B.type||B.method||F.method||"GET").toUpperCase(),X=F.port||80,re=c,ne=C(B.agent,O.agent),pe=B.fixJSONCtlChars;F.protocol==="https:"&&(re=v,ne=C(B.httpsAgent,O.httpsAgent),F.port||(X=443));var ie={host:F.hostname||F.host||"localhost",path:F.path||"/",method:M,port:X,agent:ne,headers:B.headers||{},lookup:B.lookup};Array.isArray(B.timeout)?ie.requestTimeout=B.timeout[B.timeout.length-1]:typeof B.timeout!="undefined"&&(ie.requestTimeout=B.timeout);var Ae=B.auth||F.auth;Ae&&(ie.auth=Ae);var Z=B.content||B.data,fe=M==="GET"||M==="HEAD"||B.dataAsQueryString;if(!B.content&&Z&&!(typeof Z=="string"||f.isBuffer(Z)))if(fe)Z=B.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z);else{var he=ie.headers["Content-Type"]||ie.headers["content-type"];he||(B.contentType==="json"?he="application/json":he="application/x-www-form-urlencoded",ie.headers["Content-Type"]=he),E(he)==="application/json"?Z=JSON.stringify(Z):Z=B.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z)}fe&&Z&&(ie.path+=(F.query?"&":"?")+Z,Z=null);var be=0;if(Z){var le=Z.length;f.isBuffer(Z)||(le=f.byteLength(Z)),be=ie.headers["Content-Length"]=le}B.dataType==="json"&&(ie.headers.Accept="application/json"),typeof B.beforeRequest=="function"&&B.beforeRequest(ie);var ue=null,ve=null,Ee=null,Oe=!1,De=!1,ce=0,G=-1,ye=!1,Y="",H="",Q=null;B.timing&&(Q={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function J(){ue&&(clearTimeout(ue),ue=null)}function ee(){ve&&(clearTimeout(ve),ve=null)}function W(_e,Fe,Ve){if(ee(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),N,p.pid,ie.method,K),_e&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),N,p.pid,_e.name,_e.message,_e.stack);return}var Xe=R;R=null;var Ye={};Ve&&(G=Ve.statusCode,Ye=Ve.headers);var it=Date.now()-z;Q&&(Q.contentDownload=it),m("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",it,ce,G,ie.method,ie.host,ie.path,De,Q);var ot={status:G,statusCode:G,headers:Ye,size:ce,aborted:ye,rt:it,keepAliveSocket:De,data:Fe,requestUrls:B.requestUrls,timing:Q,remoteAddress:Y,remotePort:H};if(_e){var ft="";ne&&typeof ne.getCurrentStatus=="function"&&(ft=", agent status: "+JSON.stringify(ne.getCurrentStatus())),_e.message+=", "+ie.method+" "+K+" "+G+" (connected: "+Oe+", keepalive socket: "+De+ft+`)
|
|
headers: `+JSON.stringify(Ye),_e.data=Fe,_e.path=ie.path,_e.status=G,_e.headers=Ye,_e.res=ot}Xe(_e,Fe,B.streaming?Ve:ot),B.emitter&&($.url=K,$.socket=ge&&ge.connection,$.options=ie,$.size=be,B.emitter.emit("response",{requestId:N,error:_e,ctx:B.ctx,req:$,res:ot}))}function L(_e){var Fe=null;if(B.followRedirect&&statuses.redirect[_e.statusCode]){B._followRedirectCount=(B._followRedirectCount||0)+1;var Ve=_e.headers.location;if(!Ve)Fe=new Error("Got statusCode "+_e.statusCode+" but cannot resolve next location from headers"),Fe.name="FollowRedirectError";else if(B._followRedirectCount>B.maxRedirects)Fe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+K),Fe.name="MaxRedirectError";else{var Xe=B.formatRedirectUrl?B.formatRedirectUrl(K,Ve):w.resolve(K,Ve);m("Request#%d %s: `redirected` from %s to %s",N,ie.path,K,Xe),ee(),B.headers&&B.headers.Host&&I.test(Ve)&&(B.headers.Host=null);var Ye=R;return R=null,O.requestWithCallback(Xe,B,Ye),{redirect:!0,error:null}}}return{redirect:!1,error:Fe}}B.gzip&&!ie.headers["Accept-Encoding"]&&!ie.headers["accept-encoding"]&&(ie.headers["Accept-Encoding"]="gzip");function q(_e,Fe,Ve){var Xe=_e.headers["content-encoding"];return Ve(null,Fe,Xe)}var de=B.writeStream;m("Request#%d %s %s with headers %j, options.path: %s",N,M,K,ie.headers,ie.path),B.requestUrls.push(K);function Ie(_e){if(Q&&(Q.waiting=Date.now()-z),m("Request#%d %s `req response` event emit: status %d, headers: %j",N,K,_e.statusCode,_e.headers),B.streaming){var Fe=L(_e);if(Fe.redirect){_e.resume();return}return Fe.error?(_e.resume(),W(Fe.error,null,_e)):W(null,null,_e)}if(_e.on("close",function(){m("Request#%d %s: `res close` event emit, total size %d",N,K,ce)}),_e.on("error",function(){m("Request#%d %s: `res error` event emit, total size %d",N,K,ce)}),_e.on("aborted",function(){ye=!0,m("Request#%d %s: `res aborted` event emit, total size %d",N,K,ce)}),de){var Ve=L(_e);if(Ve.redirect){_e.resume();return}return Ve.error?(_e.resume(),de.end(),W(Ve.error,null,_e)):(B.consumeWriteStream===!1?_e.on("end",W.bind(null,null,null,_e)):de.on("close",function(){m("Request#%d %s: writeStream close event emitted",N,K),W(Ee||null,null,_e)}),_e.pipe(de))}var Xe=[];_e.on("data",function(Ye){m("Request#%d %s: `res data` event emit, size %d",N,K,Ye.length),ce+=Ye.length,Xe.push(Ye)}),_e.on("end",function(){var Ye=f.concat(Xe,ce);if(m("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",N,K,ce,_e._dumped),Ee)return W(Ee,Ye,_e);var it=L(_e);if(it.error)return W(it.error,Ye,_e);it.redirect||q(_e,Ye,function(ot,ft,Ct){if(ot)return W(ot,Ye,_e);if(!Ct&&V.indexOf(B.dataType)>=0){try{ft=decodeBodyByCharset(ft,_e)}catch(Ot){return m("decodeBodyByCharset error: %s",Ot),W(null,ft,_e)}if(B.dataType==="json")if(ce===0)ft=null;else{var jt=parseJSON(ft,pe);jt.error?ot=jt.error:ft=jt.data}}ye&&m("Request#%d %s: Remote socket was terminated before `response.end()` was called",N,K),W(ot,ft,_e)})})}var He,ze;Array.isArray(B.timeout)?(He=y(B.timeout[0]),ze=y(B.timeout[1])):He=ze=y(B.timeout),m("ConnectTimeout: %d, ResponseTimeout: %d",He,ze);function Je(){m("Connect timer ticking, timeout: %d",He),ue=setTimeout(function(){ue=null,G===-1&&(G=-2);var _e="Connect timeout for "+He+"ms",Fe="ConnectionTimeoutError";ge.socket||(Fe="SocketAssignTimeoutError",_e+=", working sockets is full"),Ee=new Error(_e),Ee.name=Fe,Ee.requestId=N,m("ConnectTimeout: Request#%d %s %s: %s, connected: %s",N,K,Ee.name,_e,Oe),Be()},He)}function dt(){m("Response timer ticking, timeout: %d",ze),ve=setTimeout(function(){ve=null;var _e="Response timeout for "+ze+"ms",Fe="ResponseTimeoutError";Ee=new Error(_e),Ee.name=Fe,Ee.requestId=N,m("ResponseTimeout: Request#%d %s %s: %s, connected: %s",N,K,Ee.name,_e,Oe),Be()},ze)}var ge;ie.mode=B.mode?B.mode:"";try{ge=re.request(ie,Ie)}catch(_e){return W(_e)}typeof window=="undefined"?Je():ge.on("requestTimeout",function(){G===-1&&(G=-2);var _e="Connect timeout for "+He+"ms",Fe="ConnectionTimeoutError";Ee=new Error(_e),Ee.name=Fe,Ee.requestId=N,Be()});function Be(){m("Request#%d %s abort, connected: %s",N,K,Oe),ge.socket||(Ee.noSocket=!0,W(Ee)),ge.abort()}return Q&&ge.on("finish",function(){Q.requestSent=Date.now()-z}),ge.once("socket",function(_e){Q&&(Q.queuing=Date.now()-z);var Fe=_e.readyState;if(Fe==="opening"){_e.once("lookup",function(Ve,Xe,Ye){m("Request#%d %s lookup: %s, %s, %s",N,K,Ve,Xe,Ye),Q&&(Q.dnslookup=Date.now()-z),Xe&&(Y=Xe)}),_e.once("connect",function(){Q&&(Q.connected=Date.now()-z),J(),dt(),m("Request#%d %s new socket connected",N,K),Oe=!0,Y||(Y=_e.remoteAddress),H=_e.remotePort});return}m("Request#%d %s reuse socket connected, readyState: %s",N,K,Fe),Oe=!0,De=!0,Y||(Y=_e.remoteAddress),H=_e.remotePort,J(),dt()}),ge.on("error",function(_e){(_e.name==="Error"||_e.name==="TypeError")&&(_e.name=Oe?"ResponseError":"RequestError"),_e.message+=' (req "error")',m("Request#%d %s `req error` event emit, %s: %s",N,K,_e.name,_e.message),W(Ee||_e)}),de&&de.once("error",function(_e){_e.message+=' (writeStream "error")',Ee=_e,m("Request#%d %s `writeStream error` event emit, %s: %s",N,K,_e.name,_e.message),Be()}),B.stream?(B.stream.pipe(ge),B.stream.once("error",function(_e){_e.message+=' (stream "error")',Ee=_e,m("Request#%d %s `readStream error` event emit, %s: %s",N,K,_e.name,_e.message),Be()})):ge.end(Z),ge.requestId=N,ge}}).call(this)}).call(this,o("_process"),o("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},42119:function(Xt,vt,je){"use strict";je.d(vt,{default:function(){return dt}});var Me=je(67294),at=je(60068),o=je(85846),_=je(13144),O=je.n(_),p=je(87462),f=je(1413),h=je(4942),b=je(45987),g=je(94184),w=je.n(g),c=je(15105),v=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function m(ge){return typeof ge=="string"}function y(ge){var Be,_e=ge.className,Fe=ge.prefixCls,Ve=ge.style,Xe=ge.active,Ye=ge.status,it=ge.iconPrefix,ot=ge.icon,ft=ge.wrapperStyle,Ct=ge.stepNumber,jt=ge.disabled,Ot=ge.description,Gt=ge.title,Bt=ge.subTitle,Lt=ge.progressDot,Pt=ge.stepIcon,mr=ge.tailContent,yr=ge.icons,dr=ge.stepIndex,Rr=ge.onStepClick,zr=ge.onClick,Cr=ge.render,kr=(0,b.Z)(ge,v),rt=!!Rr&&!jt,Vr={};rt&&(Vr.role="button",Vr.tabIndex=0,Vr.onClick=function(cn){zr==null||zr(cn),Rr(dr)},Vr.onKeyDown=function(cn){var br=cn.which;(br===c.Z.ENTER||br===c.Z.SPACE)&&Rr(dr)});var Wt=function(){var br,or,Vt=w()("".concat(Fe,"-icon"),"".concat(it,"icon"),(br={},(0,h.Z)(br,"".concat(it,"icon-").concat(ot),ot&&m(ot)),(0,h.Z)(br,"".concat(it,"icon-check"),!ot&&Ye==="finish"&&(yr&&!yr.finish||!yr)),(0,h.Z)(br,"".concat(it,"icon-cross"),!ot&&Ye==="error"&&(yr&&!yr.error||!yr)),br)),mn=Me.createElement("span",{className:"".concat(Fe,"-icon-dot")});return Lt?typeof Lt=="function"?or=Me.createElement("span",{className:"".concat(Fe,"-icon")},Lt(mn,{index:Ct-1,status:Ye,title:Gt,description:Ot})):or=Me.createElement("span",{className:"".concat(Fe,"-icon")},mn):ot&&!m(ot)?or=Me.createElement("span",{className:"".concat(Fe,"-icon")},ot):yr&&yr.finish&&Ye==="finish"?or=Me.createElement("span",{className:"".concat(Fe,"-icon")},yr.finish):yr&&yr.error&&Ye==="error"?or=Me.createElement("span",{className:"".concat(Fe,"-icon")},yr.error):ot||Ye==="finish"||Ye==="error"?or=Me.createElement("span",{className:Vt}):or=Me.createElement("span",{className:"".concat(Fe,"-icon")},Ct),Pt&&(or=Pt({index:Ct-1,status:Ye,title:Gt,description:Ot,node:or})),or},dn=Ye||"wait",kn=w()("".concat(Fe,"-item"),"".concat(Fe,"-item-").concat(dn),_e,(Be={},(0,h.Z)(Be,"".concat(Fe,"-item-custom"),ot),(0,h.Z)(Be,"".concat(Fe,"-item-active"),Xe),(0,h.Z)(Be,"".concat(Fe,"-item-disabled"),jt===!0),Be)),_r=(0,f.Z)({},Ve),ur=Me.createElement("div",(0,p.Z)({},kr,{className:kn,style:_r}),Me.createElement("div",(0,p.Z)({onClick:zr},Vr,{className:"".concat(Fe,"-item-container")}),Me.createElement("div",{className:"".concat(Fe,"-item-tail")},mr),Me.createElement("div",{className:"".concat(Fe,"-item-icon")},Wt()),Me.createElement("div",{className:"".concat(Fe,"-item-content")},Me.createElement("div",{className:"".concat(Fe,"-item-title")},Gt,Bt&&Me.createElement("div",{title:typeof Bt=="string"?Bt:void 0,className:"".concat(Fe,"-item-subtitle")},Bt)),Ot&&Me.createElement("div",{className:"".concat(Fe,"-item-description")},Ot))));return Cr&&(ur=Cr(ur)||null),ur}var x=y,S=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function I(ge){var Be,_e=ge.prefixCls,Fe=_e===void 0?"rc-steps":_e,Ve=ge.style,Xe=Ve===void 0?{}:Ve,Ye=ge.className,it=ge.children,ot=ge.direction,ft=ot===void 0?"horizontal":ot,Ct=ge.type,jt=Ct===void 0?"default":Ct,Ot=ge.labelPlacement,Gt=Ot===void 0?"horizontal":Ot,Bt=ge.iconPrefix,Lt=Bt===void 0?"rc":Bt,Pt=ge.status,mr=Pt===void 0?"process":Pt,yr=ge.size,dr=ge.current,Rr=dr===void 0?0:dr,zr=ge.progressDot,Cr=zr===void 0?!1:zr,kr=ge.stepIcon,rt=ge.initial,Vr=rt===void 0?0:rt,Wt=ge.icons,dn=ge.onChange,kn=ge.itemRender,_r=ge.items,ur=_r===void 0?[]:_r,cn=(0,b.Z)(ge,S),br=jt==="navigation",or=jt==="inline",Vt=or||Cr,mn=or?"horizontal":ft,sr=or?void 0:yr,Sa=Vt?"vertical":Gt,Qi=w()(Fe,"".concat(Fe,"-").concat(mn),Ye,(Be={},(0,h.Z)(Be,"".concat(Fe,"-").concat(sr),sr),(0,h.Z)(Be,"".concat(Fe,"-label-").concat(Sa),mn==="horizontal"),(0,h.Z)(Be,"".concat(Fe,"-dot"),!!Vt),(0,h.Z)(Be,"".concat(Fe,"-navigation"),br),(0,h.Z)(Be,"".concat(Fe,"-inline"),or),Be)),Hi=function($n){dn&&Rr!==$n&&dn($n)},Ia=function($n,Ge){var Or=(0,f.Z)({},$n),pn=Vr+Ge;return mr==="error"&&Ge===Rr-1&&(Or.className="".concat(Fe,"-next-error")),Or.status||(pn===Rr?Or.status=mr:pn<Rr?Or.status="finish":Or.status="wait"),or&&(Or.icon=void 0,Or.subTitle=void 0),!Or.render&&kn&&(Or.render=function(qn){return kn(Or,qn)}),Me.createElement(x,(0,p.Z)({},Or,{active:pn===Rr,stepNumber:pn+1,stepIndex:pn,key:pn,prefixCls:Fe,iconPrefix:Lt,wrapperStyle:Xe,progressDot:Vt,stepIcon:kr,icons:Wt,onStepClick:dn&&Hi}))};return Me.createElement("div",(0,p.Z)({className:Qi,style:Xe},cn),ur.filter(function(ci){return ci}).map(Ia))}I.Step=x;var C=I,E=C,k=je(53124),V=je(98675),P=je(25378),K=je(26410),B=je(83062),R=je(16777),j=je(14747),N=je(83559),$=je(43259),F=ge=>{const{componentCls:Be,customIconTop:_e,customIconSize:Fe,customIconFontSize:Ve}=ge;return{[`${Be}-item-custom`]:{[`> ${Be}-item-container > ${Be}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${Be}-icon`]:{top:_e,width:Fe,height:Fe,fontSize:Ve,lineHeight:(0,R.unit)(Fe)}}},[`&:not(${Be}-vertical)`]:{[`${Be}-item-custom`]:{[`${Be}-item-icon`]:{width:"auto",background:"none"}}}}},X=ge=>{const{componentCls:Be}=ge,_e=`${Be}-item`;return{[`${Be}-horizontal`]:{[`${_e}-tail`]:{transform:"translateY(-50%)"}}}},ne=ge=>{const{componentCls:Be,inlineDotSize:_e,inlineTitleColor:Fe,inlineTailColor:Ve}=ge,Xe=ge.calc(ge.paddingXS).add(ge.lineWidth).equal(),Ye={[`${Be}-item-container ${Be}-item-content ${Be}-item-title`]:{color:Fe}};return{[`&${Be}-inline`]:{width:"auto",display:"inline-flex",[`${Be}-item`]:{flex:"none","&-container":{padding:`${(0,R.unit)(Xe)} ${(0,R.unit)(ge.paddingXXS)} 0`,margin:`0 ${(0,R.unit)(ge.calc(ge.marginXXS).div(2).equal())}`,borderRadius:ge.borderRadiusSM,cursor:"pointer",transition:`background-color ${ge.motionDurationMid}`,"&:hover":{background:ge.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:_e,height:_e,marginInlineStart:`calc(50% - ${(0,R.unit)(ge.calc(_e).div(2).equal())})`,[`> ${Be}-icon`]:{top:0},[`${Be}-icon-dot`]:{borderRadius:ge.calc(ge.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:ge.calc(ge.marginXS).sub(ge.lineWidth).equal()},"&-title":{color:Fe,fontSize:ge.fontSizeSM,lineHeight:ge.lineHeightSM,fontWeight:"normal",marginBottom:ge.calc(ge.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:ge.calc(_e).div(2).add(Xe).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:ge.lineWidth,borderRadius:0,marginInlineStart:0,background:Ve}},[`&:first-child ${Be}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${Be}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${Be}-item-icon ${Be}-icon ${Be}-icon-dot`]:{backgroundColor:ge.colorBorderBg,border:`${(0,R.unit)(ge.lineWidth)} ${ge.lineType} ${Ve}`}},Ye),"&-finish":Object.assign({[`${Be}-item-tail::after`]:{backgroundColor:Ve},[`${Be}-item-icon ${Be}-icon ${Be}-icon-dot`]:{backgroundColor:Ve,border:`${(0,R.unit)(ge.lineWidth)} ${ge.lineType} ${Ve}`}},Ye),"&-error":Ye,"&-active, &-process":Object.assign({[`${Be}-item-icon`]:{width:_e,height:_e,marginInlineStart:`calc(50% - ${(0,R.unit)(ge.calc(_e).div(2).equal())})`,top:0}},Ye),[`&:not(${Be}-item-active) > ${Be}-item-container[role='button']:hover`]:{[`${Be}-item-title`]:{color:Fe}}}}}},ie=ge=>{const{componentCls:Be,iconSize:_e,lineHeight:Fe,iconSizeSM:Ve}=ge;return{[`&${Be}-label-vertical`]:{[`${Be}-item`]:{overflow:"visible","&-tail":{marginInlineStart:ge.calc(_e).div(2).add(ge.controlHeightLG).equal(),padding:`0 ${(0,R.unit)(ge.paddingLG)}`},"&-content":{display:"block",width:ge.calc(_e).div(2).add(ge.controlHeightLG).mul(2).equal(),marginTop:ge.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:ge.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:ge.marginXXS,marginInlineStart:0,lineHeight:Fe}},[`&${Be}-small:not(${Be}-dot)`]:{[`${Be}-item`]:{"&-icon":{marginInlineStart:ge.calc(_e).sub(Ve).div(2).add(ge.controlHeightLG).equal()}}}}}},Z=ge=>{const{componentCls:Be,navContentMaxWidth:_e,navArrowColor:Fe,stepsNavActiveColor:Ve,motionDurationSlow:Xe}=ge;return{[`&${Be}-navigation`]:{paddingTop:ge.paddingSM,[`&${Be}-small`]:{[`${Be}-item`]:{"&-container":{marginInlineStart:ge.calc(ge.marginSM).mul(-1).equal()}}},[`${Be}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:ge.calc(ge.margin).mul(-1).equal(),paddingBottom:ge.paddingSM,textAlign:"start",transition:`opacity ${Xe}`,[`${Be}-item-content`]:{maxWidth:_e},[`${Be}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},j.vS),{"&::after":{display:"none"}})},[`&:not(${Be}-item-active)`]:{[`${Be}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,R.unit)(ge.calc(ge.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:ge.fontSizeIcon,height:ge.fontSizeIcon,borderTop:`${(0,R.unit)(ge.lineWidth)} ${ge.lineType} ${Fe}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,R.unit)(ge.lineWidth)} ${ge.lineType} ${Fe}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:ge.lineWidthBold,backgroundColor:Ve,transition:`width ${Xe}, inset-inline-start ${Xe}`,transitionTimingFunction:"ease-out",content:'""'}},[`${Be}-item${Be}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${Be}-navigation${Be}-vertical`]:{[`> ${Be}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${Be}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:ge.calc(ge.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,R.unit)(ge.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:ge.calc(ge.controlHeight).mul(.25).equal(),height:ge.calc(ge.controlHeight).mul(.25).equal(),marginBottom:ge.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${Be}-item-container > ${Be}-item-tail`]:{visibility:"hidden"}}},[`&${Be}-navigation${Be}-horizontal`]:{[`> ${Be}-item > ${Be}-item-container > ${Be}-item-tail`]:{visibility:"hidden"}}}},he=ge=>{const{antCls:Be,componentCls:_e,iconSize:Fe,iconSizeSM:Ve,processIconColor:Xe,marginXXS:Ye,lineWidthBold:it,lineWidth:ot,paddingXXS:ft}=ge,Ct=ge.calc(Fe).add(ge.calc(it).mul(4).equal()).equal(),jt=ge.calc(Ve).add(ge.calc(ge.lineWidth).mul(4).equal()).equal();return{[`&${_e}-with-progress`]:{[`${_e}-item`]:{paddingTop:ft,[`&-process ${_e}-item-container ${_e}-item-icon ${_e}-icon`]:{color:Xe}},[`&${_e}-vertical > ${_e}-item `]:{paddingInlineStart:ft,[`> ${_e}-item-container > ${_e}-item-tail`]:{top:Ye,insetInlineStart:ge.calc(Fe).div(2).sub(ot).add(ft).equal()}},[`&, &${_e}-small`]:{[`&${_e}-horizontal ${_e}-item:first-child`]:{paddingBottom:ft,paddingInlineStart:ft}},[`&${_e}-small${_e}-vertical > ${_e}-item > ${_e}-item-container > ${_e}-item-tail`]:{insetInlineStart:ge.calc(Ve).div(2).sub(ot).add(ft).equal()},[`&${_e}-label-vertical ${_e}-item ${_e}-item-tail`]:{top:ge.calc(Fe).div(2).add(ft).equal()},[`${_e}-item-icon`]:{position:"relative",[`${Be}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,R.unit)(Ct)} !important`,height:`${(0,R.unit)(Ct)} !important`}}},[`&${_e}-small`]:{[`&${_e}-label-vertical ${_e}-item ${_e}-item-tail`]:{top:ge.calc(Ve).div(2).add(ft).equal()},[`${_e}-item-icon ${Be}-progress-inner`]:{width:`${(0,R.unit)(jt)} !important`,height:`${(0,R.unit)(jt)} !important`}}}}},le=ge=>{const{componentCls:Be,descriptionMaxWidth:_e,lineHeight:Fe,dotCurrentSize:Ve,dotSize:Xe,motionDurationSlow:Ye}=ge;return{[`&${Be}-dot, &${Be}-dot${Be}-small`]:{[`${Be}-item`]:{"&-title":{lineHeight:Fe},"&-tail":{top:ge.calc(ge.dotSize).sub(ge.calc(ge.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,R.unit)(ge.calc(_e).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,R.unit)(ge.calc(ge.marginSM).mul(2).equal())})`,height:ge.calc(ge.lineWidth).mul(3).equal(),marginInlineStart:ge.marginSM}},"&-icon":{width:Xe,height:Xe,marginInlineStart:ge.calc(ge.descriptionMaxWidth).sub(Xe).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,R.unit)(Xe),background:"transparent",border:0,[`${Be}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${Ye}`,"&::after":{position:"absolute",top:ge.calc(ge.marginSM).mul(-1).equal(),insetInlineStart:ge.calc(Xe).sub(ge.calc(ge.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:ge.calc(ge.controlHeightLG).mul(1.5).equal(),height:ge.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:_e},[`&-process ${Be}-item-icon`]:{position:"relative",top:ge.calc(Xe).sub(Ve).div(2).equal(),width:Ve,height:Ve,lineHeight:(0,R.unit)(Ve),background:"none",marginInlineStart:ge.calc(ge.descriptionMaxWidth).sub(Ve).div(2).equal()},[`&-process ${Be}-icon`]:{[`&:first-child ${Be}-icon-dot`]:{insetInlineStart:0}}}},[`&${Be}-vertical${Be}-dot`]:{[`${Be}-item-icon`]:{marginTop:ge.calc(ge.controlHeight).sub(Xe).div(2).equal(),marginInlineStart:0,background:"none"},[`${Be}-item-process ${Be}-item-icon`]:{marginTop:ge.calc(ge.controlHeight).sub(Ve).div(2).equal(),top:0,insetInlineStart:ge.calc(Xe).sub(Ve).div(2).equal(),marginInlineStart:0},[`${Be}-item > ${Be}-item-container > ${Be}-item-tail`]:{top:ge.calc(ge.controlHeight).sub(Xe).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,R.unit)(ge.calc(Xe).add(ge.paddingXS).equal())} 0 ${(0,R.unit)(ge.paddingXS)}`,"&::after":{marginInlineStart:ge.calc(Xe).sub(ge.lineWidth).div(2).equal()}},[`&${Be}-small`]:{[`${Be}-item-icon`]:{marginTop:ge.calc(ge.controlHeightSM).sub(Xe).div(2).equal()},[`${Be}-item-process ${Be}-item-icon`]:{marginTop:ge.calc(ge.controlHeightSM).sub(Ve).div(2).equal()},[`${Be}-item > ${Be}-item-container > ${Be}-item-tail`]:{top:ge.calc(ge.controlHeightSM).sub(Xe).div(2).equal()}},[`${Be}-item:first-child ${Be}-icon-dot`]:{insetInlineStart:0},[`${Be}-item-content`]:{width:"inherit"}}}},ve=ge=>{const{componentCls:Be}=ge;return{[`&${Be}-rtl`]:{direction:"rtl",[`${Be}-item`]:{"&-subtitle":{float:"left"}},[`&${Be}-navigation`]:{[`${Be}-item::after`]:{transform:"rotate(-45deg)"}},[`&${Be}-vertical`]:{[`> ${Be}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${Be}-item-icon`]:{float:"right"}}},[`&${Be}-dot`]:{[`${Be}-item-icon ${Be}-icon-dot, &${Be}-small ${Be}-item-icon ${Be}-icon-dot`]:{float:"right"}}}}},Oe=ge=>{const{componentCls:Be,iconSizeSM:_e,fontSizeSM:Fe,fontSize:Ve,colorTextDescription:Xe}=ge;return{[`&${Be}-small`]:{[`&${Be}-horizontal:not(${Be}-label-vertical) ${Be}-item`]:{paddingInlineStart:ge.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${Be}-item-icon`]:{width:_e,height:_e,marginTop:0,marginBottom:0,marginInline:`0 ${(0,R.unit)(ge.marginXS)}`,fontSize:Fe,lineHeight:(0,R.unit)(_e),textAlign:"center",borderRadius:_e},[`${Be}-item-title`]:{paddingInlineEnd:ge.paddingSM,fontSize:Ve,lineHeight:(0,R.unit)(_e),"&::after":{top:ge.calc(_e).div(2).equal()}},[`${Be}-item-description`]:{color:Xe,fontSize:Ve},[`${Be}-item-tail`]:{top:ge.calc(_e).div(2).sub(ge.paddingXXS).equal()},[`${Be}-item-custom ${Be}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${Be}-icon`]:{fontSize:_e,lineHeight:(0,R.unit)(_e),transform:"none"}}}}},ce=ge=>{const{componentCls:Be,iconSizeSM:_e,iconSize:Fe}=ge;return{[`&${Be}-vertical`]:{display:"flex",flexDirection:"column",[`> ${Be}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${Be}-item-icon`]:{float:"left",marginInlineEnd:ge.margin},[`${Be}-item-content`]:{display:"block",minHeight:ge.calc(ge.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${Be}-item-title`]:{lineHeight:(0,R.unit)(Fe)},[`${Be}-item-description`]:{paddingBottom:ge.paddingSM}},[`> ${Be}-item > ${Be}-item-container > ${Be}-item-tail`]:{position:"absolute",top:0,insetInlineStart:ge.calc(Fe).div(2).sub(ge.lineWidth).equal(),width:ge.lineWidth,height:"100%",padding:`${(0,R.unit)(ge.calc(ge.marginXXS).mul(1.5).add(Fe).equal())} 0 ${(0,R.unit)(ge.calc(ge.marginXXS).mul(1.5).equal())}`,"&::after":{width:ge.lineWidth,height:"100%"}},[`> ${Be}-item:not(:last-child) > ${Be}-item-container > ${Be}-item-tail`]:{display:"block"},[` > ${Be}-item > ${Be}-item-container > ${Be}-item-content > ${Be}-item-title`]:{"&::after":{display:"none"}},[`&${Be}-small ${Be}-item-container`]:{[`${Be}-item-tail`]:{position:"absolute",top:0,insetInlineStart:ge.calc(_e).div(2).sub(ge.lineWidth).equal(),padding:`${(0,R.unit)(ge.calc(ge.marginXXS).mul(1.5).add(_e).equal())} 0 ${(0,R.unit)(ge.calc(ge.marginXXS).mul(1.5).equal())}`},[`${Be}-item-title`]:{lineHeight:(0,R.unit)(_e)}}}}};const G="wait",ye="process",Y="finish",H="error",Q=(ge,Be)=>{const _e=`${Be.componentCls}-item`,Fe=`${ge}IconColor`,Ve=`${ge}TitleColor`,Xe=`${ge}DescriptionColor`,Ye=`${ge}TailColor`,it=`${ge}IconBgColor`,ot=`${ge}IconBorderColor`,ft=`${ge}DotColor`;return{[`${_e}-${ge} ${_e}-icon`]:{backgroundColor:Be[it],borderColor:Be[ot],[`> ${Be.componentCls}-icon`]:{color:Be[Fe],[`${Be.componentCls}-icon-dot`]:{background:Be[ft]}}},[`${_e}-${ge}${_e}-custom ${_e}-icon`]:{[`> ${Be.componentCls}-icon`]:{color:Be[ft]}},[`${_e}-${ge} > ${_e}-container > ${_e}-content > ${_e}-title`]:{color:Be[Ve],"&::after":{backgroundColor:Be[Ye]}},[`${_e}-${ge} > ${_e}-container > ${_e}-content > ${_e}-description`]:{color:Be[Xe]},[`${_e}-${ge} > ${_e}-container > ${_e}-tail::after`]:{backgroundColor:Be[Ye]}}},J=ge=>{const{componentCls:Be,motionDurationSlow:_e}=ge,Fe=`${Be}-item`,Ve=`${Fe}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[Fe]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${Fe}-container > ${Fe}-tail, > ${Fe}-container > ${Fe}-content > ${Fe}-title::after`]:{display:"none"}}},[`${Fe}-container`]:{outline:"none","&:focus-visible":{[Ve]:Object.assign({},(0,j.oN)(ge))}},[`${Ve}, ${Fe}-content`]:{display:"inline-block",verticalAlign:"top"},[Ve]:{width:ge.iconSize,height:ge.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:ge.marginXS,fontSize:ge.iconFontSize,fontFamily:ge.fontFamily,lineHeight:(0,R.unit)(ge.iconSize),textAlign:"center",borderRadius:ge.iconSize,border:`${(0,R.unit)(ge.lineWidth)} ${ge.lineType} transparent`,transition:`background-color ${_e}, border-color ${_e}`,[`${Be}-icon`]:{position:"relative",top:ge.iconTop,color:ge.colorPrimary,lineHeight:1}},[`${Fe}-tail`]:{position:"absolute",top:ge.calc(ge.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:ge.lineWidth,background:ge.colorSplit,borderRadius:ge.lineWidth,transition:`background ${_e}`,content:'""'}},[`${Fe}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:ge.padding,color:ge.colorText,fontSize:ge.fontSizeLG,lineHeight:(0,R.unit)(ge.titleLineHeight),"&::after":{position:"absolute",top:ge.calc(ge.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:ge.lineWidth,background:ge.processTailColor,content:'""'}},[`${Fe}-subtitle`]:{display:"inline",marginInlineStart:ge.marginXS,color:ge.colorTextDescription,fontWeight:"normal",fontSize:ge.fontSize},[`${Fe}-description`]:{color:ge.colorTextDescription,fontSize:ge.fontSize}},Q(G,ge)),Q(ye,ge)),{[`${Fe}-process > ${Fe}-container > ${Fe}-title`]:{fontWeight:ge.fontWeightStrong}}),Q(Y,ge)),Q(H,ge)),{[`${Fe}${Be}-next-error > ${Be}-item-title::after`]:{background:ge.colorError},[`${Fe}-disabled`]:{cursor:"not-allowed"}})},ee=ge=>{const{componentCls:Be,motionDurationSlow:_e}=ge;return{[`& ${Be}-item`]:{[`&:not(${Be}-item-active)`]:{[`& > ${Be}-item-container[role='button']`]:{cursor:"pointer",[`${Be}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${Be}-icon`]:{transition:`color ${_e}`}},"&:hover":{[`${Be}-item`]:{"&-title, &-subtitle, &-description":{color:ge.colorPrimary}}}},[`&:not(${Be}-item-process)`]:{[`& > ${Be}-item-container[role='button']:hover`]:{[`${Be}-item`]:{"&-icon":{borderColor:ge.colorPrimary,[`${Be}-icon`]:{color:ge.colorPrimary}}}}}}},[`&${Be}-horizontal:not(${Be}-label-vertical)`]:{[`${Be}-item`]:{paddingInlineStart:ge.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${Be}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:ge.descriptionMaxWidth,whiteSpace:"normal"}}}}},W=ge=>{const{componentCls:Be}=ge;return{[Be]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,j.Wf)(ge)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),J(ge)),ee(ge)),F(ge)),Oe(ge)),ce(ge)),X(ge)),ie(ge)),le(ge)),Z(ge)),ve(ge)),he(ge)),ne(ge))}},L=ge=>({titleLineHeight:ge.controlHeight,customIconSize:ge.controlHeight,customIconTop:0,customIconFontSize:ge.controlHeightSM,iconSize:ge.controlHeight,iconTop:-.5,iconFontSize:ge.fontSize,iconSizeSM:ge.fontSizeHeading3,dotSize:ge.controlHeight/4,dotCurrentSize:ge.controlHeightLG/4,navArrowColor:ge.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:ge.wireframe?ge.colorTextDisabled:ge.colorTextLabel,waitIconBgColor:ge.wireframe?ge.colorBgContainer:ge.colorFillContent,waitIconBorderColor:ge.wireframe?ge.colorTextDisabled:"transparent",finishIconBgColor:ge.wireframe?ge.colorBgContainer:ge.controlItemBgActive,finishIconBorderColor:ge.wireframe?ge.colorPrimary:ge.controlItemBgActive});var q=(0,N.I$)("Steps",ge=>{const{colorTextDisabled:Be,controlHeightLG:_e,colorTextLightSolid:Fe,colorText:Ve,colorPrimary:Xe,colorTextDescription:Ye,colorTextQuaternary:it,colorError:ot,colorBorderSecondary:ft,colorSplit:Ct}=ge,jt=(0,$.mergeToken)(ge,{processIconColor:Fe,processTitleColor:Ve,processDescriptionColor:Ve,processIconBgColor:Xe,processIconBorderColor:Xe,processDotColor:Xe,processTailColor:Ct,waitTitleColor:Ye,waitDescriptionColor:Ye,waitTailColor:Ct,waitDotColor:Be,finishIconColor:Xe,finishTitleColor:Ve,finishDescriptionColor:Ye,finishTailColor:Xe,finishDotColor:Xe,errorIconColor:Fe,errorTitleColor:ot,errorDescriptionColor:ot,errorTailColor:Ct,errorIconBgColor:ot,errorIconBorderColor:ot,errorDotColor:ot,stepsNavActiveColor:Xe,stepsProgressSize:_e,inlineDotSize:6,inlineTitleColor:it,inlineTailColor:ft});return[W(jt)]},L),de=je(37419);function Ie(ge){return ge.filter(Be=>Be)}function He(ge,Be){if(ge)return ge;const _e=(0,de.Z)(Be).map(Fe=>{if(Me.isValidElement(Fe)){const{props:Ve}=Fe;return Object.assign({},Ve)}return null});return Ie(_e)}var ze=function(ge,Be){var _e={};for(var Fe in ge)Object.prototype.hasOwnProperty.call(ge,Fe)&&Be.indexOf(Fe)<0&&(_e[Fe]=ge[Fe]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Fe=Object.getOwnPropertySymbols(ge);Ve<Fe.length;Ve++)Be.indexOf(Fe[Ve])<0&&Object.prototype.propertyIsEnumerable.call(ge,Fe[Ve])&&(_e[Fe[Ve]]=ge[Fe[Ve]]);return _e};const Je=ge=>{const{percent:Be,size:_e,className:Fe,rootClassName:Ve,direction:Xe,items:Ye,responsive:it=!0,current:ot=0,children:ft,style:Ct}=ge,jt=ze(ge,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:Ot}=(0,P.Z)(it),{getPrefixCls:Gt,direction:Bt,className:Lt,style:Pt}=(0,k.dj)("steps"),mr=Me.useMemo(()=>it&&Ot?"vertical":Xe,[Ot,Xe]),yr=(0,V.Z)(_e),dr=Gt("steps",ge.prefixCls),[Rr,zr,Cr]=q(dr),kr=ge.type==="inline",rt=Gt("",ge.iconPrefix),Vr=He(Ye,ft),Wt=kr?void 0:Be,dn=Object.assign(Object.assign({},Pt),Ct),kn=O()(Lt,{[`${dr}-rtl`]:Bt==="rtl",[`${dr}-with-progress`]:Wt!==void 0},Fe,Ve,zr,Cr),_r={finish:Me.createElement(at.Z,{className:`${dr}-finish-icon`}),error:Me.createElement(o.Z,{className:`${dr}-error-icon`})},ur=br=>{let{node:or,status:Vt}=br;if(Vt==="process"&&Wt!==void 0){const mn=yr==="small"?32:40;return Me.createElement("div",{className:`${dr}-progress-icon`},Me.createElement(K.Z,{type:"circle",percent:Wt,size:mn,strokeWidth:4,format:()=>null}),or)}return or},cn=(br,or)=>br.description?Me.createElement(B.Z,{title:br.description},or):or;return Rr(Me.createElement(E,Object.assign({icons:_r},jt,{style:dn,current:ot,size:yr,items:Vr,itemRender:kr?cn:void 0,stepIcon:ur,direction:mr,prefixCls:dr,iconPrefix:rt,className:kn})))};Je.Step=E.Step;var dt=Je},80258:function(Xt,vt){"use strict";vt.byteLength=f,vt.toByteArray=b,vt.fromByteArray=c;for(var je=[],Me=[],at=typeof Uint8Array!="undefined"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,O=o.length;_<O;++_)je[_]=o[_],Me[o.charCodeAt(_)]=_;Me[45]=62,Me[95]=63;function p(v){var m=v.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=v.indexOf("=");y===-1&&(y=m);var x=y===m?0:4-y%4;return[y,x]}function f(v){var m=p(v),y=m[0],x=m[1];return(y+x)*3/4-x}function h(v,m,y){return(m+y)*3/4-y}function b(v){var m,y=p(v),x=y[0],S=y[1],I=new at(h(v,x,S)),C=0,E=S>0?x-4:x,k;for(k=0;k<E;k+=4)m=Me[v.charCodeAt(k)]<<18|Me[v.charCodeAt(k+1)]<<12|Me[v.charCodeAt(k+2)]<<6|Me[v.charCodeAt(k+3)],I[C++]=m>>16&255,I[C++]=m>>8&255,I[C++]=m&255;return S===2&&(m=Me[v.charCodeAt(k)]<<2|Me[v.charCodeAt(k+1)]>>4,I[C++]=m&255),S===1&&(m=Me[v.charCodeAt(k)]<<10|Me[v.charCodeAt(k+1)]<<4|Me[v.charCodeAt(k+2)]>>2,I[C++]=m>>8&255,I[C++]=m&255),I}function g(v){return je[v>>18&63]+je[v>>12&63]+je[v>>6&63]+je[v&63]}function w(v,m,y){for(var x,S=[],I=m;I<y;I+=3)x=(v[I]<<16&16711680)+(v[I+1]<<8&65280)+(v[I+2]&255),S.push(g(x));return S.join("")}function c(v){for(var m,y=v.length,x=y%3,S=[],I=16383,C=0,E=y-x;C<E;C+=I)S.push(w(v,C,C+I>E?E:C+I));return x===1?(m=v[y-1],S.push(je[m>>2]+je[m<<4&63]+"==")):x===2&&(m=(v[y-2]<<8)+v[y-1],S.push(je[m>>10]+je[m>>4&63]+je[m<<2&63]+"=")),S.join("")}},48764:function(Xt,vt,je){"use strict";var Me;var at=je(80258),o=je(80645),_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;vt.lW=h,Me=C,vt.h2=50;var O=2147483647;Me=O,h.TYPED_ARRAY_SUPPORT=p(),!h.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function p(){try{var H=new Uint8Array(1),Q={foo:function(){return 42}};return Object.setPrototypeOf(Q,Uint8Array.prototype),Object.setPrototypeOf(H,Q),H.foo()===42}catch(J){return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function f(H){if(H>O)throw new RangeError('The value "'+H+'" is invalid for option "size"');var Q=new Uint8Array(H);return Object.setPrototypeOf(Q,h.prototype),Q}function h(H,Q,J){if(typeof H=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(H)}return b(H,Q,J)}h.poolSize=8192;function b(H,Q,J){if(typeof H=="string")return v(H,Q);if(ArrayBuffer.isView(H))return y(H);if(H==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(G(H,ArrayBuffer)||H&&G(H.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(G(H,SharedArrayBuffer)||H&&G(H.buffer,SharedArrayBuffer)))return x(H,Q,J);if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ee=H.valueOf&&H.valueOf();if(ee!=null&&ee!==H)return h.from(ee,Q,J);var W=S(H);if(W)return W;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof H[Symbol.toPrimitive]=="function")return h.from(H[Symbol.toPrimitive]("string"),Q,J);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}h.from=function(H,Q,J){return b(H,Q,J)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(H){if(typeof H!="number")throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function w(H,Q,J){return g(H),H<=0?f(H):Q!==void 0?typeof J=="string"?f(H).fill(Q,J):f(H).fill(Q):f(H)}h.alloc=function(H,Q,J){return w(H,Q,J)};function c(H){return g(H),f(H<0?0:I(H)|0)}h.allocUnsafe=function(H){return c(H)},h.allocUnsafeSlow=function(H){return c(H)};function v(H,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!h.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);var J=E(H,Q)|0,ee=f(J),W=ee.write(H,Q);return W!==J&&(ee=ee.slice(0,W)),ee}function m(H){for(var Q=H.length<0?0:I(H.length)|0,J=f(Q),ee=0;ee<Q;ee+=1)J[ee]=H[ee]&255;return J}function y(H){if(G(H,Uint8Array)){var Q=new Uint8Array(H);return x(Q.buffer,Q.byteOffset,Q.byteLength)}return m(H)}function x(H,Q,J){if(Q<0||H.byteLength<Q)throw new RangeError('"offset" is outside of buffer bounds');if(H.byteLength<Q+(J||0))throw new RangeError('"length" is outside of buffer bounds');var ee;return Q===void 0&&J===void 0?ee=new Uint8Array(H):J===void 0?ee=new Uint8Array(H,Q):ee=new Uint8Array(H,Q,J),Object.setPrototypeOf(ee,h.prototype),ee}function S(H){if(h.isBuffer(H)){var Q=I(H.length)|0,J=f(Q);return J.length===0||H.copy(J,0,0,Q),J}if(H.length!==void 0)return typeof H.length!="number"||ye(H.length)?f(0):m(H);if(H.type==="Buffer"&&Array.isArray(H.data))return m(H.data)}function I(H){if(H>=O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");return H|0}function C(H){return+H!=H&&(H=0),h.alloc(+H)}h.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==h.prototype},h.compare=function(Q,J){if(G(Q,Uint8Array)&&(Q=h.from(Q,Q.offset,Q.byteLength)),G(J,Uint8Array)&&(J=h.from(J,J.offset,J.byteLength)),!h.isBuffer(Q)||!h.isBuffer(J))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===J)return 0;for(var ee=Q.length,W=J.length,L=0,q=Math.min(ee,W);L<q;++L)if(Q[L]!==J[L]){ee=Q[L],W=J[L];break}return ee<W?-1:W<ee?1:0},h.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(Q,J){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return h.alloc(0);var ee;if(J===void 0)for(J=0,ee=0;ee<Q.length;++ee)J+=Q[ee].length;var W=h.allocUnsafe(J),L=0;for(ee=0;ee<Q.length;++ee){var q=Q[ee];if(G(q,Uint8Array))L+q.length>W.length?h.from(q).copy(W,L):Uint8Array.prototype.set.call(W,q,L);else if(h.isBuffer(q))q.copy(W,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=q.length}return W};function E(H,Q){if(h.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||G(H,ArrayBuffer))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);var J=H.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&J===0)return 0;for(var W=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return ve(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return De(H).length;default:if(W)return ee?-1:ve(H).length;Q=(""+Q).toLowerCase(),W=!0}}h.byteLength=E;function k(H,Q,J){var ee=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0,Q>>>=0,J<=Q))return"";for(H||(H="utf8");;)switch(H){case"hex":return pe(this,Q,J);case"utf8":case"utf-8":return F(this,Q,J);case"ascii":return re(this,Q,J);case"latin1":case"binary":return ne(this,Q,J);case"base64":return z(this,Q,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,Q,J);default:if(ee)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),ee=!0}}h.prototype._isBuffer=!0;function V(H,Q,J){var ee=H[Q];H[Q]=H[J],H[J]=ee}h.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J<Q;J+=2)V(this,J,J+1);return this},h.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var J=0;J<Q;J+=4)V(this,J,J+3),V(this,J+1,J+2);return this},h.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var J=0;J<Q;J+=8)V(this,J,J+7),V(this,J+1,J+6),V(this,J+2,J+5),V(this,J+3,J+4);return this},h.prototype.toString=function(){var Q=this.length;return Q===0?"":arguments.length===0?F(this,0,Q):k.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(Q){if(!h.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:h.compare(this,Q)===0},h.prototype.inspect=function(){var Q="",J=vt.h2;return Q=this.toString("hex",0,J).replace(/(.{2})/g,"$1 ").trim(),this.length>J&&(Q+=" ... "),"<Buffer "+Q+">"},_&&(h.prototype[_]=h.prototype.inspect),h.prototype.compare=function(Q,J,ee,W,L){if(G(Q,Uint8Array)&&(Q=h.from(Q,Q.offset,Q.byteLength)),!h.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(J===void 0&&(J=0),ee===void 0&&(ee=Q?Q.length:0),W===void 0&&(W=0),L===void 0&&(L=this.length),J<0||ee>Q.length||W<0||L>this.length)throw new RangeError("out of range index");if(W>=L&&J>=ee)return 0;if(W>=L)return-1;if(J>=ee)return 1;if(J>>>=0,ee>>>=0,W>>>=0,L>>>=0,this===Q)return 0;for(var q=L-W,de=ee-J,Ie=Math.min(q,de),He=this.slice(W,L),ze=Q.slice(J,ee),Je=0;Je<Ie;++Je)if(He[Je]!==ze[Je]){q=He[Je],de=ze[Je];break}return q<de?-1:de<q?1:0};function P(H,Q,J,ee,W){if(H.length===0)return-1;if(typeof J=="string"?(ee=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,ye(J)&&(J=W?0:H.length-1),J<0&&(J=H.length+J),J>=H.length){if(W)return-1;J=H.length-1}else if(J<0)if(W)J=0;else return-1;if(typeof Q=="string"&&(Q=h.from(Q,ee)),h.isBuffer(Q))return Q.length===0?-1:K(H,Q,J,ee,W);if(typeof Q=="number")return Q=Q&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(H,Q,J):Uint8Array.prototype.lastIndexOf.call(H,Q,J):K(H,[Q],J,ee,W);throw new TypeError("val must be string, number or Buffer")}function K(H,Q,J,ee,W){var L=1,q=H.length,de=Q.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(H.length<2||Q.length<2)return-1;L=2,q/=2,de/=2,J/=2}function Ie(ge,Be){return L===1?ge[Be]:ge.readUInt16BE(Be*L)}var He;if(W){var ze=-1;for(He=J;He<q;He++)if(Ie(H,He)===Ie(Q,ze===-1?0:He-ze)){if(ze===-1&&(ze=He),He-ze+1===de)return ze*L}else ze!==-1&&(He-=He-ze),ze=-1}else for(J+de>q&&(J=q-de),He=J;He>=0;He--){for(var Je=!0,dt=0;dt<de;dt++)if(Ie(H,He+dt)!==Ie(Q,dt)){Je=!1;break}if(Je)return He}return-1}h.prototype.includes=function(Q,J,ee){return this.indexOf(Q,J,ee)!==-1},h.prototype.indexOf=function(Q,J,ee){return P(this,Q,J,ee,!0)},h.prototype.lastIndexOf=function(Q,J,ee){return P(this,Q,J,ee,!1)};function B(H,Q,J,ee){J=Number(J)||0;var W=H.length-J;ee?(ee=Number(ee),ee>W&&(ee=W)):ee=W;var L=Q.length;ee>L/2&&(ee=L/2);for(var q=0;q<ee;++q){var de=parseInt(Q.substr(q*2,2),16);if(ye(de))return q;H[J+q]=de}return q}function R(H,Q,J,ee){return ce(ve(Q,H.length-J),H,J,ee)}function j(H,Q,J,ee){return ce(Ee(Q),H,J,ee)}function N(H,Q,J,ee){return ce(De(Q),H,J,ee)}function $(H,Q,J,ee){return ce(Oe(Q,H.length-J),H,J,ee)}h.prototype.write=function(Q,J,ee,W){if(J===void 0)W="utf8",ee=this.length,J=0;else if(ee===void 0&&typeof J=="string")W=J,ee=this.length,J=0;else if(isFinite(J))J=J>>>0,isFinite(ee)?(ee=ee>>>0,W===void 0&&(W="utf8")):(W=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-J;if((ee===void 0||ee>L)&&(ee=L),Q.length>0&&(ee<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var q=!1;;)switch(W){case"hex":return B(this,Q,J,ee);case"utf8":case"utf-8":return R(this,Q,J,ee);case"ascii":case"latin1":case"binary":return j(this,Q,J,ee);case"base64":return N(this,Q,J,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,Q,J,ee);default:if(q)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),q=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(H,Q,J){return Q===0&&J===H.length?at.fromByteArray(H):at.fromByteArray(H.slice(Q,J))}function F(H,Q,J){J=Math.min(H.length,J);for(var ee=[],W=Q;W<J;){var L=H[W],q=null,de=L>239?4:L>223?3:L>191?2:1;if(W+de<=J){var Ie,He,ze,Je;switch(de){case 1:L<128&&(q=L);break;case 2:Ie=H[W+1],(Ie&192)===128&&(Je=(L&31)<<6|Ie&63,Je>127&&(q=Je));break;case 3:Ie=H[W+1],He=H[W+2],(Ie&192)===128&&(He&192)===128&&(Je=(L&15)<<12|(Ie&63)<<6|He&63,Je>2047&&(Je<55296||Je>57343)&&(q=Je));break;case 4:Ie=H[W+1],He=H[W+2],ze=H[W+3],(Ie&192)===128&&(He&192)===128&&(ze&192)===128&&(Je=(L&15)<<18|(Ie&63)<<12|(He&63)<<6|ze&63,Je>65535&&Je<1114112&&(q=Je))}}q===null?(q=65533,de=1):q>65535&&(q-=65536,ee.push(q>>>10&1023|55296),q=56320|q&1023),ee.push(q),W+=de}return X(ee)}var M=4096;function X(H){var Q=H.length;if(Q<=M)return String.fromCharCode.apply(String,H);for(var J="",ee=0;ee<Q;)J+=String.fromCharCode.apply(String,H.slice(ee,ee+=M));return J}function re(H,Q,J){var ee="";J=Math.min(H.length,J);for(var W=Q;W<J;++W)ee+=String.fromCharCode(H[W]&127);return ee}function ne(H,Q,J){var ee="";J=Math.min(H.length,J);for(var W=Q;W<J;++W)ee+=String.fromCharCode(H[W]);return ee}function pe(H,Q,J){var ee=H.length;(!Q||Q<0)&&(Q=0),(!J||J<0||J>ee)&&(J=ee);for(var W="",L=Q;L<J;++L)W+=Y[H[L]];return W}function ie(H,Q,J){for(var ee=H.slice(Q,J),W="",L=0;L<ee.length-1;L+=2)W+=String.fromCharCode(ee[L]+ee[L+1]*256);return W}h.prototype.slice=function(Q,J){var ee=this.length;Q=~~Q,J=J===void 0?ee:~~J,Q<0?(Q+=ee,Q<0&&(Q=0)):Q>ee&&(Q=ee),J<0?(J+=ee,J<0&&(J=0)):J>ee&&(J=ee),J<Q&&(J=Q);var W=this.subarray(Q,J);return Object.setPrototypeOf(W,h.prototype),W};function Ae(H,Q,J){if(H%1!==0||H<0)throw new RangeError("offset is not uint");if(H+Q>J)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(Q,J,ee){Q=Q>>>0,J=J>>>0,ee||Ae(Q,J,this.length);for(var W=this[Q],L=1,q=0;++q<J&&(L*=256);)W+=this[Q+q]*L;return W},h.prototype.readUintBE=h.prototype.readUIntBE=function(Q,J,ee){Q=Q>>>0,J=J>>>0,ee||Ae(Q,J,this.length);for(var W=this[Q+--J],L=1;J>0&&(L*=256);)W+=this[Q+--J]*L;return W},h.prototype.readUint8=h.prototype.readUInt8=function(Q,J){return Q=Q>>>0,J||Ae(Q,1,this.length),this[Q]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(Q,J){return Q=Q>>>0,J||Ae(Q,2,this.length),this[Q]|this[Q+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(Q,J){return Q=Q>>>0,J||Ae(Q,2,this.length),this[Q]<<8|this[Q+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(Q,J){return Q=Q>>>0,J||Ae(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(Q,J){return Q=Q>>>0,J||Ae(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},h.prototype.readIntLE=function(Q,J,ee){Q=Q>>>0,J=J>>>0,ee||Ae(Q,J,this.length);for(var W=this[Q],L=1,q=0;++q<J&&(L*=256);)W+=this[Q+q]*L;return L*=128,W>=L&&(W-=Math.pow(2,8*J)),W},h.prototype.readIntBE=function(Q,J,ee){Q=Q>>>0,J=J>>>0,ee||Ae(Q,J,this.length);for(var W=J,L=1,q=this[Q+--W];W>0&&(L*=256);)q+=this[Q+--W]*L;return L*=128,q>=L&&(q-=Math.pow(2,8*J)),q},h.prototype.readInt8=function(Q,J){return Q=Q>>>0,J||Ae(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},h.prototype.readInt16LE=function(Q,J){Q=Q>>>0,J||Ae(Q,2,this.length);var ee=this[Q]|this[Q+1]<<8;return ee&32768?ee|4294901760:ee},h.prototype.readInt16BE=function(Q,J){Q=Q>>>0,J||Ae(Q,2,this.length);var ee=this[Q+1]|this[Q]<<8;return ee&32768?ee|4294901760:ee},h.prototype.readInt32LE=function(Q,J){return Q=Q>>>0,J||Ae(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},h.prototype.readInt32BE=function(Q,J){return Q=Q>>>0,J||Ae(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},h.prototype.readFloatLE=function(Q,J){return Q=Q>>>0,J||Ae(Q,4,this.length),o.read(this,Q,!0,23,4)},h.prototype.readFloatBE=function(Q,J){return Q=Q>>>0,J||Ae(Q,4,this.length),o.read(this,Q,!1,23,4)},h.prototype.readDoubleLE=function(Q,J){return Q=Q>>>0,J||Ae(Q,8,this.length),o.read(this,Q,!0,52,8)},h.prototype.readDoubleBE=function(Q,J){return Q=Q>>>0,J||Ae(Q,8,this.length),o.read(this,Q,!1,52,8)};function Z(H,Q,J,ee,W,L){if(!h.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>W||Q<L)throw new RangeError('"value" argument is out of bounds');if(J+ee>H.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(Q,J,ee,W){if(Q=+Q,J=J>>>0,ee=ee>>>0,!W){var L=Math.pow(2,8*ee)-1;Z(this,Q,J,ee,L,0)}var q=1,de=0;for(this[J]=Q&255;++de<ee&&(q*=256);)this[J+de]=Q/q&255;return J+ee},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(Q,J,ee,W){if(Q=+Q,J=J>>>0,ee=ee>>>0,!W){var L=Math.pow(2,8*ee)-1;Z(this,Q,J,ee,L,0)}var q=ee-1,de=1;for(this[J+q]=Q&255;--q>=0&&(de*=256);)this[J+q]=Q/de&255;return J+ee},h.prototype.writeUint8=h.prototype.writeUInt8=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,1,255,0),this[J]=Q&255,J+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,2,65535,0),this[J]=Q&255,this[J+1]=Q>>>8,J+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,2,65535,0),this[J]=Q>>>8,this[J+1]=Q&255,J+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,4,4294967295,0),this[J+3]=Q>>>24,this[J+2]=Q>>>16,this[J+1]=Q>>>8,this[J]=Q&255,J+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,4,4294967295,0),this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255,J+4},h.prototype.writeIntLE=function(Q,J,ee,W){if(Q=+Q,J=J>>>0,!W){var L=Math.pow(2,8*ee-1);Z(this,Q,J,ee,L-1,-L)}var q=0,de=1,Ie=0;for(this[J]=Q&255;++q<ee&&(de*=256);)Q<0&&Ie===0&&this[J+q-1]!==0&&(Ie=1),this[J+q]=(Q/de>>0)-Ie&255;return J+ee},h.prototype.writeIntBE=function(Q,J,ee,W){if(Q=+Q,J=J>>>0,!W){var L=Math.pow(2,8*ee-1);Z(this,Q,J,ee,L-1,-L)}var q=ee-1,de=1,Ie=0;for(this[J+q]=Q&255;--q>=0&&(de*=256);)Q<0&&Ie===0&&this[J+q+1]!==0&&(Ie=1),this[J+q]=(Q/de>>0)-Ie&255;return J+ee},h.prototype.writeInt8=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,1,127,-128),Q<0&&(Q=255+Q+1),this[J]=Q&255,J+1},h.prototype.writeInt16LE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,2,32767,-32768),this[J]=Q&255,this[J+1]=Q>>>8,J+2},h.prototype.writeInt16BE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,2,32767,-32768),this[J]=Q>>>8,this[J+1]=Q&255,J+2},h.prototype.writeInt32LE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,4,2147483647,-2147483648),this[J]=Q&255,this[J+1]=Q>>>8,this[J+2]=Q>>>16,this[J+3]=Q>>>24,J+4},h.prototype.writeInt32BE=function(Q,J,ee){return Q=+Q,J=J>>>0,ee||Z(this,Q,J,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255,J+4};function fe(H,Q,J,ee,W,L){if(J+ee>H.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function he(H,Q,J,ee,W){return Q=+Q,J=J>>>0,W||fe(H,Q,J,4,34028234663852886e22,-34028234663852886e22),o.write(H,Q,J,ee,23,4),J+4}h.prototype.writeFloatLE=function(Q,J,ee){return he(this,Q,J,!0,ee)},h.prototype.writeFloatBE=function(Q,J,ee){return he(this,Q,J,!1,ee)};function be(H,Q,J,ee,W){return Q=+Q,J=J>>>0,W||fe(H,Q,J,8,17976931348623157e292,-17976931348623157e292),o.write(H,Q,J,ee,52,8),J+8}h.prototype.writeDoubleLE=function(Q,J,ee){return be(this,Q,J,!0,ee)},h.prototype.writeDoubleBE=function(Q,J,ee){return be(this,Q,J,!1,ee)},h.prototype.copy=function(Q,J,ee,W){if(!h.isBuffer(Q))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),!W&&W!==0&&(W=this.length),J>=Q.length&&(J=Q.length),J||(J=0),W>0&&W<ee&&(W=ee),W===ee||Q.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),Q.length-J<W-ee&&(W=Q.length-J+ee);var L=W-ee;return this===Q&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(J,ee,W):Uint8Array.prototype.set.call(Q,this.subarray(ee,W),J),L},h.prototype.fill=function(Q,J,ee,W){if(typeof Q=="string"){if(typeof J=="string"?(W=J,J=0,ee=this.length):typeof ee=="string"&&(W=ee,ee=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!h.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(Q.length===1){var L=Q.charCodeAt(0);(W==="utf8"&&L<128||W==="latin1")&&(Q=L)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(J<0||this.length<J||this.length<ee)throw new RangeError("Out of range index");if(ee<=J)return this;J=J>>>0,ee=ee===void 0?this.length:ee>>>0,Q||(Q=0);var q;if(typeof Q=="number")for(q=J;q<ee;++q)this[q]=Q;else{var de=h.isBuffer(Q)?Q:h.from(Q,W),Ie=de.length;if(Ie===0)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for(q=0;q<ee-J;++q)this[q+J]=de[q%Ie]}return this};var le=/[^+/0-9A-Za-z-_]/g;function ue(H){if(H=H.split("=")[0],H=H.trim().replace(le,""),H.length<2)return"";for(;H.length%4!==0;)H=H+"=";return H}function ve(H,Q){Q=Q||1/0;for(var J,ee=H.length,W=null,L=[],q=0;q<ee;++q){if(J=H.charCodeAt(q),J>55295&&J<57344){if(!W){if(J>56319){(Q-=3)>-1&&L.push(239,191,189);continue}else if(q+1===ee){(Q-=3)>-1&&L.push(239,191,189);continue}W=J;continue}if(J<56320){(Q-=3)>-1&&L.push(239,191,189),W=J;continue}J=(W-55296<<10|J-56320)+65536}else W&&(Q-=3)>-1&&L.push(239,191,189);if(W=null,J<128){if((Q-=1)<0)break;L.push(J)}else if(J<2048){if((Q-=2)<0)break;L.push(J>>6|192,J&63|128)}else if(J<65536){if((Q-=3)<0)break;L.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((Q-=4)<0)break;L.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return L}function Ee(H){for(var Q=[],J=0;J<H.length;++J)Q.push(H.charCodeAt(J)&255);return Q}function Oe(H,Q){for(var J,ee,W,L=[],q=0;q<H.length&&!((Q-=2)<0);++q)J=H.charCodeAt(q),ee=J>>8,W=J%256,L.push(W),L.push(ee);return L}function De(H){return at.toByteArray(ue(H))}function ce(H,Q,J,ee){for(var W=0;W<ee&&!(W+J>=Q.length||W>=H.length);++W)Q[W+J]=H[W];return W}function G(H,Q){return H instanceof Q||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===Q.name}function ye(H){return H!==H}var Y=function(){for(var H="0123456789abcdef",Q=new Array(256),J=0;J<16;++J)for(var ee=J*16,W=0;W<16;++W)Q[ee+W]=H[J]+H[W];return Q}()},80645:function(Xt,vt){vt.read=function(je,Me,at,o,_){var O,p,f=_*8-o-1,h=(1<<f)-1,b=h>>1,g=-7,w=at?_-1:0,c=at?-1:1,v=je[Me+w];for(w+=c,O=v&(1<<-g)-1,v>>=-g,g+=f;g>0;O=O*256+je[Me+w],w+=c,g-=8);for(p=O&(1<<-g)-1,O>>=-g,g+=o;g>0;p=p*256+je[Me+w],w+=c,g-=8);if(O===0)O=1-b;else{if(O===h)return p?NaN:(v?-1:1)*(1/0);p=p+Math.pow(2,o),O=O-b}return(v?-1:1)*p*Math.pow(2,O-o)},vt.write=function(je,Me,at,o,_,O){var p,f,h,b=O*8-_-1,g=(1<<b)-1,w=g>>1,c=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=o?0:O-1,m=o?1:-1,y=Me<0||Me===0&&1/Me<0?1:0;for(Me=Math.abs(Me),isNaN(Me)||Me===1/0?(f=isNaN(Me)?1:0,p=g):(p=Math.floor(Math.log(Me)/Math.LN2),Me*(h=Math.pow(2,-p))<1&&(p--,h*=2),p+w>=1?Me+=c/h:Me+=c*Math.pow(2,1-w),Me*h>=2&&(p++,h/=2),p+w>=g?(f=0,p=g):p+w>=1?(f=(Me*h-1)*Math.pow(2,_),p=p+w):(f=Me*Math.pow(2,w-1)*Math.pow(2,_),p=0));_>=8;je[at+v]=f&255,v+=m,f/=256,_-=8);for(p=p<<_|f,b+=_;b>0;je[at+v]=p&255,v+=m,p/=256,b-=8);je[at+v-m]|=y*128}},3655:function(Xt,vt,je){var Me=je(32792);function at(o){this.mode=Me.MODE_8BIT_BYTE,this.data=o}at.prototype={getLength:function(o){return this.data.length},write:function(o){for(var _=0;_<this.data.length;_++)o.put(this.data.charCodeAt(_),8)}},Xt.exports=at},27321:function(Xt){function vt(){this.buffer=new Array,this.length=0}vt.prototype={get:function(je){var Me=Math.floor(je/8);return(this.buffer[Me]>>>7-je%8&1)==1},put:function(je,Me){for(var at=0;at<Me;at++)this.putBit((je>>>Me-at-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(je){var Me=Math.floor(this.length/8);this.buffer.length<=Me&&this.buffer.push(0),je&&(this.buffer[Me]|=128>>>this.length%8),this.length++}},Xt.exports=vt},49381:function(Xt){Xt.exports={L:1,M:0,Q:3,H:2}},32832:function(Xt,vt,je){var Me=je(11518);function at(o,_){if(o.length==null)throw new Error(o.length+"/"+_);for(var O=0;O<o.length&&o[O]==0;)O++;this.num=new Array(o.length-O+_);for(var p=0;p<o.length-O;p++)this.num[p]=o[p+O]}at.prototype={get:function(o){return this.num[o]},getLength:function(){return this.num.length},multiply:function(o){for(var _=new Array(this.getLength()+o.getLength()-1),O=0;O<this.getLength();O++)for(var p=0;p<o.getLength();p++)_[O+p]^=Me.gexp(Me.glog(this.get(O))+Me.glog(o.get(p)));return new at(_,0)},mod:function(o){if(this.getLength()-o.getLength()<0)return this;for(var _=Me.glog(this.get(0))-Me.glog(o.get(0)),O=new Array(this.getLength()),p=0;p<this.getLength();p++)O[p]=this.get(p);for(var p=0;p<o.getLength();p++)O[p]^=Me.gexp(Me.glog(o.get(p))+_);return new at(O,0).mod(o)}},Xt.exports=at},14450:function(Xt,vt,je){var Me=je(3655),at=je(17611),o=je(27321),_=je(93160),O=je(32832);function p(h,b){this.typeNumber=h,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var f=p.prototype;f.addData=function(h){var b=new Me(h);this.dataList.push(b),this.dataCache=null},f.isDark=function(h,b){if(h<0||this.moduleCount<=h||b<0||this.moduleCount<=b)throw new Error(h+","+b);return this.modules[h][b]},f.getModuleCount=function(){return this.moduleCount},f.make=function(){if(this.typeNumber<1){var h=1;for(h=1;h<40;h++){for(var b=at.getRSBlocks(h,this.errorCorrectLevel),g=new o,w=0,c=0;c<b.length;c++)w+=b[c].dataCount;for(var c=0;c<this.dataList.length;c++){var v=this.dataList[c];g.put(v.mode,4),g.put(v.getLength(),_.getLengthInBits(v.mode,h)),v.write(g)}if(g.getLengthInBits()<=w*8)break}this.typeNumber=h}this.makeImpl(!1,this.getBestMaskPattern())},f.makeImpl=function(h,b){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++){this.modules[g]=new Array(this.moduleCount);for(var w=0;w<this.moduleCount;w++)this.modules[g][w]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(h,b),this.typeNumber>=7&&this.setupTypeNumber(h),this.dataCache==null&&(this.dataCache=p.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,b)},f.setupPositionProbePattern=function(h,b){for(var g=-1;g<=7;g++)if(!(h+g<=-1||this.moduleCount<=h+g))for(var w=-1;w<=7;w++)b+w<=-1||this.moduleCount<=b+w||(0<=g&&g<=6&&(w==0||w==6)||0<=w&&w<=6&&(g==0||g==6)||2<=g&&g<=4&&2<=w&&w<=4?this.modules[h+g][b+w]=!0:this.modules[h+g][b+w]=!1)},f.getBestMaskPattern=function(){for(var h=0,b=0,g=0;g<8;g++){this.makeImpl(!0,g);var w=_.getLostPoint(this);(g==0||h>w)&&(h=w,b=g)}return b},f.createMovieClip=function(h,b,g){var w=h.createEmptyMovieClip(b,g),c=1;this.make();for(var v=0;v<this.modules.length;v++)for(var m=v*c,y=0;y<this.modules[v].length;y++){var x=y*c,S=this.modules[v][y];S&&(w.beginFill(0,100),w.moveTo(x,m),w.lineTo(x+c,m),w.lineTo(x+c,m+c),w.lineTo(x,m+c),w.endFill())}return w},f.setupTimingPattern=function(){for(var h=8;h<this.moduleCount-8;h++)this.modules[h][6]==null&&(this.modules[h][6]=h%2==0);for(var b=8;b<this.moduleCount-8;b++)this.modules[6][b]==null&&(this.modules[6][b]=b%2==0)},f.setupPositionAdjustPattern=function(){for(var h=_.getPatternPosition(this.typeNumber),b=0;b<h.length;b++)for(var g=0;g<h.length;g++){var w=h[b],c=h[g];if(this.modules[w][c]==null)for(var v=-2;v<=2;v++)for(var m=-2;m<=2;m++)v==-2||v==2||m==-2||m==2||v==0&&m==0?this.modules[w+v][c+m]=!0:this.modules[w+v][c+m]=!1}},f.setupTypeNumber=function(h){for(var b=_.getBCHTypeNumber(this.typeNumber),g=0;g<18;g++){var w=!h&&(b>>g&1)==1;this.modules[Math.floor(g/3)][g%3+this.moduleCount-8-3]=w}for(var g=0;g<18;g++){var w=!h&&(b>>g&1)==1;this.modules[g%3+this.moduleCount-8-3][Math.floor(g/3)]=w}},f.setupTypeInfo=function(h,b){for(var g=this.errorCorrectLevel<<3|b,w=_.getBCHTypeInfo(g),c=0;c<15;c++){var v=!h&&(w>>c&1)==1;c<6?this.modules[c][8]=v:c<8?this.modules[c+1][8]=v:this.modules[this.moduleCount-15+c][8]=v}for(var c=0;c<15;c++){var v=!h&&(w>>c&1)==1;c<8?this.modules[8][this.moduleCount-c-1]=v:c<9?this.modules[8][15-c-1+1]=v:this.modules[8][15-c-1]=v}this.modules[this.moduleCount-8][8]=!h},f.mapData=function(h,b){for(var g=-1,w=this.moduleCount-1,c=7,v=0,m=this.moduleCount-1;m>0;m-=2)for(m==6&&m--;;){for(var y=0;y<2;y++)if(this.modules[w][m-y]==null){var x=!1;v<h.length&&(x=(h[v]>>>c&1)==1);var S=_.getMask(b,w,m-y);S&&(x=!x),this.modules[w][m-y]=x,c--,c==-1&&(v++,c=7)}if(w+=g,w<0||this.moduleCount<=w){w-=g,g=-g;break}}},p.PAD0=236,p.PAD1=17,p.createData=function(h,b,g){for(var w=at.getRSBlocks(h,b),c=new o,v=0;v<g.length;v++){var m=g[v];c.put(m.mode,4),c.put(m.getLength(),_.getLengthInBits(m.mode,h)),m.write(c)}for(var y=0,v=0;v<w.length;v++)y+=w[v].dataCount;if(c.getLengthInBits()>y*8)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+y*8+")");for(c.getLengthInBits()+4<=y*8&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=y*8||(c.put(p.PAD0,8),c.getLengthInBits()>=y*8));)c.put(p.PAD1,8);return p.createBytes(c,w)},p.createBytes=function(h,b){for(var g=0,w=0,c=0,v=new Array(b.length),m=new Array(b.length),y=0;y<b.length;y++){var x=b[y].dataCount,S=b[y].totalCount-x;w=Math.max(w,x),c=Math.max(c,S),v[y]=new Array(x);for(var I=0;I<v[y].length;I++)v[y][I]=255&h.buffer[I+g];g+=x;var C=_.getErrorCorrectPolynomial(S),E=new O(v[y],C.getLength()-1),k=E.mod(C);m[y]=new Array(C.getLength()-1);for(var I=0;I<m[y].length;I++){var V=I+k.getLength()-m[y].length;m[y][I]=V>=0?k.get(V):0}}for(var P=0,I=0;I<b.length;I++)P+=b[I].totalCount;for(var K=new Array(P),B=0,I=0;I<w;I++)for(var y=0;y<b.length;y++)I<v[y].length&&(K[B++]=v[y][I]);for(var I=0;I<c;I++)for(var y=0;y<b.length;y++)I<m[y].length&&(K[B++]=m[y][I]);return K},Xt.exports=p},17611:function(Xt,vt,je){var Me=je(49381);function at(o,_){this.totalCount=o,this.dataCount=_}at.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],at.getRSBlocks=function(o,_){var O=at.getRsBlockTable(o,_);if(O==null)throw new Error("bad rs block @ typeNumber:"+o+"/errorCorrectLevel:"+_);for(var p=O.length/3,f=new Array,h=0;h<p;h++)for(var b=O[h*3+0],g=O[h*3+1],w=O[h*3+2],c=0;c<b;c++)f.push(new at(g,w));return f},at.getRsBlockTable=function(o,_){switch(_){case Me.L:return at.RS_BLOCK_TABLE[(o-1)*4+0];case Me.M:return at.RS_BLOCK_TABLE[(o-1)*4+1];case Me.Q:return at.RS_BLOCK_TABLE[(o-1)*4+2];case Me.H:return at.RS_BLOCK_TABLE[(o-1)*4+3];default:return}},Xt.exports=at},11518:function(Xt){for(var vt={glog:function(Me){if(Me<1)throw new Error("glog("+Me+")");return vt.LOG_TABLE[Me]},gexp:function(Me){for(;Me<0;)Me+=255;for(;Me>=256;)Me-=255;return vt.EXP_TABLE[Me]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},je=0;je<8;je++)vt.EXP_TABLE[je]=1<<je;for(var je=8;je<256;je++)vt.EXP_TABLE[je]=vt.EXP_TABLE[je-4]^vt.EXP_TABLE[je-5]^vt.EXP_TABLE[je-6]^vt.EXP_TABLE[je-8];for(var je=0;je<255;je++)vt.LOG_TABLE[vt.EXP_TABLE[je]]=je;Xt.exports=vt},32792:function(Xt){Xt.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},93160:function(Xt,vt,je){var Me=je(32792),at=je(32832),o=je(11518),_={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},O={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(p){for(var f=p<<10;O.getBCHDigit(f)-O.getBCHDigit(O.G15)>=0;)f^=O.G15<<O.getBCHDigit(f)-O.getBCHDigit(O.G15);return(p<<10|f)^O.G15_MASK},getBCHTypeNumber:function(p){for(var f=p<<12;O.getBCHDigit(f)-O.getBCHDigit(O.G18)>=0;)f^=O.G18<<O.getBCHDigit(f)-O.getBCHDigit(O.G18);return p<<12|f},getBCHDigit:function(p){for(var f=0;p!=0;)f++,p>>>=1;return f},getPatternPosition:function(p){return O.PATTERN_POSITION_TABLE[p-1]},getMask:function(p,f,h){switch(p){case _.PATTERN000:return(f+h)%2==0;case _.PATTERN001:return f%2==0;case _.PATTERN010:return h%3==0;case _.PATTERN011:return(f+h)%3==0;case _.PATTERN100:return(Math.floor(f/2)+Math.floor(h/3))%2==0;case _.PATTERN101:return f*h%2+f*h%3==0;case _.PATTERN110:return(f*h%2+f*h%3)%2==0;case _.PATTERN111:return(f*h%3+(f+h)%2)%2==0;default:throw new Error("bad maskPattern:"+p)}},getErrorCorrectPolynomial:function(p){for(var f=new at([1],0),h=0;h<p;h++)f=f.multiply(new at([1,o.gexp(h)],0));return f},getLengthInBits:function(p,f){if(1<=f&&f<10)switch(p){case Me.MODE_NUMBER:return 10;case Me.MODE_ALPHA_NUM:return 9;case Me.MODE_8BIT_BYTE:return 8;case Me.MODE_KANJI:return 8;default:throw new Error("mode:"+p)}else if(f<27)switch(p){case Me.MODE_NUMBER:return 12;case Me.MODE_ALPHA_NUM:return 11;case Me.MODE_8BIT_BYTE:return 16;case Me.MODE_KANJI:return 10;default:throw new Error("mode:"+p)}else if(f<41)switch(p){case Me.MODE_NUMBER:return 14;case Me.MODE_ALPHA_NUM:return 13;case Me.MODE_8BIT_BYTE:return 16;case Me.MODE_KANJI:return 12;default:throw new Error("mode:"+p)}else throw new Error("type:"+f)},getLostPoint:function(p){for(var f=p.getModuleCount(),h=0,b=0;b<f;b++)for(var g=0;g<f;g++){for(var w=0,c=p.isDark(b,g),v=-1;v<=1;v++)if(!(b+v<0||f<=b+v))for(var m=-1;m<=1;m++)g+m<0||f<=g+m||v==0&&m==0||c==p.isDark(b+v,g+m)&&w++;w>5&&(h+=3+w-5)}for(var b=0;b<f-1;b++)for(var g=0;g<f-1;g++){var y=0;p.isDark(b,g)&&y++,p.isDark(b+1,g)&&y++,p.isDark(b,g+1)&&y++,p.isDark(b+1,g+1)&&y++,(y==0||y==4)&&(h+=3)}for(var b=0;b<f;b++)for(var g=0;g<f-6;g++)p.isDark(b,g)&&!p.isDark(b,g+1)&&p.isDark(b,g+2)&&p.isDark(b,g+3)&&p.isDark(b,g+4)&&!p.isDark(b,g+5)&&p.isDark(b,g+6)&&(h+=40);for(var g=0;g<f;g++)for(var b=0;b<f-6;b++)p.isDark(b,g)&&!p.isDark(b+1,g)&&p.isDark(b+2,g)&&p.isDark(b+3,g)&&p.isDark(b+4,g)&&!p.isDark(b+5,g)&&p.isDark(b+6,g)&&(h+=40);for(var x=0,g=0;g<f;g++)for(var b=0;b<f;b++)p.isDark(b,g)&&x++;var S=Math.abs(100*x/f/f-50)/5;return h+=S*10,h}};Xt.exports=O},79361:function(Xt,vt,je){"use strict";function Me(M){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Me=function(re){return typeof re}:Me=function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},Me(M)}function at(){return at=Object.assign||function(M){for(var X=1;X<arguments.length;X++){var re=arguments[X];for(var ne in re)Object.prototype.hasOwnProperty.call(re,ne)&&(M[ne]=re[ne])}return M},at.apply(this,arguments)}function o(M,X){var re=Object.keys(M);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(M);X&&(ne=ne.filter(function(pe){return Object.getOwnPropertyDescriptor(M,pe).enumerable})),re.push.apply(re,ne)}return re}function _(M){for(var X=1;X<arguments.length;X++){var re=arguments[X]!=null?arguments[X]:{};X%2?o(re,!0).forEach(function(ne){y(M,ne,re[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(re)):o(re).forEach(function(ne){Object.defineProperty(M,ne,Object.getOwnPropertyDescriptor(re,ne))})}return M}function O(M,X){if(M==null)return{};var re=p(M,X),ne,pe;if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(M);for(pe=0;pe<ie.length;pe++)ne=ie[pe],!(X.indexOf(ne)>=0)&&Object.prototype.propertyIsEnumerable.call(M,ne)&&(re[ne]=M[ne])}return re}function p(M,X){if(M==null)return{};var re={},ne=Object.keys(M),pe,ie;for(ie=0;ie<ne.length;ie++)pe=ne[ie],!(X.indexOf(pe)>=0)&&(re[pe]=M[pe]);return re}function f(M,X){if(!(M instanceof X))throw new TypeError("Cannot call a class as a function")}function h(M,X){for(var re=0;re<X.length;re++){var ne=X[re];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(M,ne.key,ne)}}function b(M,X,re){return X&&h(M.prototype,X),re&&h(M,re),M}function g(M,X){return X&&(Me(X)==="object"||typeof X=="function")?X:c(M)}function w(M){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},w(M)}function c(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function v(M,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(X&&X.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),X&&m(M,X)}function m(M,X){return m=Object.setPrototypeOf||function(ne,pe){return ne.__proto__=pe,ne},m(M,X)}function y(M,X,re){return X in M?Object.defineProperty(M,X,{value:re,enumerable:!0,configurable:!0,writable:!0}):M[X]=re,M}var x=je(67294),S=je(45697),I=je(14450),C=je(49381);function E(M){for(var X="",re=0;re<M.length;re++){var ne=M.charCodeAt(re);ne<128?X+=String.fromCharCode(ne):ne<2048?(X+=String.fromCharCode(192|ne>>6),X+=String.fromCharCode(128|ne&63)):ne<55296||ne>=57344?(X+=String.fromCharCode(224|ne>>12),X+=String.fromCharCode(128|ne>>6&63),X+=String.fromCharCode(128|ne&63)):(re++,ne=65536+((ne&1023)<<10|M.charCodeAt(re)&1023),X+=String.fromCharCode(240|ne>>18),X+=String.fromCharCode(128|ne>>12&63),X+=String.fromCharCode(128|ne>>6&63),X+=String.fromCharCode(128|ne&63))}return X}var k={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},V={},P=4,K=.1;function B(M){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=[];return M.forEach(function(ne,pe){var ie=null;ne.forEach(function(Ae,Z){if(!Ae&&ie!==null){re.push("M".concat(ie+X," ").concat(pe+X,"h").concat(Z-ie,"v1H").concat(ie+X,"z")),ie=null;return}if(Z===ne.length-1){if(!Ae)return;ie===null?re.push("M".concat(Z+X,",").concat(pe+X," h1v1H").concat(Z+X,"z")):re.push("M".concat(ie+X,",").concat(pe+X," h").concat(Z+1-ie,"v1H").concat(ie+X,"z"));return}Ae&&ie===null&&(ie=Z)})}),re.join("")}function R(M,X){return M.slice().map(function(re,ne){return ne<X.y||ne>=X.y+X.h?re:re.map(function(pe,ie){return ie<X.x||ie>=X.x+X.w?pe:!1})})}function j(M,X){var re=M.imageSettings,ne=M.size,pe=M.includeMargin;if(re==null)return null;var ie=pe?P:0,Ae=X.length+ie*2,Z=Math.floor(ne*K),fe=Ae/ne,he=(re.width||Z)*fe,be=(re.height||Z)*fe,le=re.x==null?X.length/2-he/2:re.x*fe,ue=re.y==null?X.length/2-be/2:re.y*fe,ve=null;if(re.excavate){var Ee=Math.floor(le),Oe=Math.floor(ue),De=Math.ceil(he+le-Ee),ce=Math.ceil(be+ue-Oe);ve={x:Ee,y:Oe,w:De,h:ce}}return{x:le,y:ue,h:be,w:he,excavation:ve}}var N=function(){try{new Path2D().addPath(new Path2D)}catch(M){return!1}return!0}(),$=function(M){v(X,M);function X(){var re,ne;f(this,X);for(var pe=arguments.length,ie=new Array(pe),Ae=0;Ae<pe;Ae++)ie[Ae]=arguments[Ae];return ne=g(this,(re=w(X)).call.apply(re,[this].concat(ie))),y(c(ne),"_canvas",void 0),y(c(ne),"_image",void 0),y(c(ne),"state",{imgLoaded:!1}),y(c(ne),"handleImageLoad",function(){ne.setState({imgLoaded:!0})}),ne}return b(X,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var ne=this.props,pe=ne.value,ie=ne.size,Ae=ne.level,Z=ne.bgColor,fe=ne.fgColor,he=ne.includeMargin,be=ne.imageSettings,le=new I(-1,C[Ae]);if(le.addData(E(pe)),le.make(),this._canvas!=null){var ue=this._canvas,ve=ue.getContext("2d");if(!ve)return;var Ee=le.modules;if(Ee===null)return;var Oe=he?P:0,De=Ee.length+Oe*2,ce=j(this.props,Ee);be!=null&&ce!=null&&ce.excavation!=null&&(Ee=R(Ee,ce.excavation));var G=window.devicePixelRatio||1;ue.height=ue.width=ie*G;var ye=ie/De*G;ve.scale(ye,ye),ve.fillStyle=Z,ve.fillRect(0,0,De,De),ve.fillStyle=fe,N?ve.fill(new Path2D(B(Ee,Oe))):Ee.forEach(function(Y,H){Y.forEach(function(Q,J){Q&&ve.fillRect(J+Oe,H+Oe,1,1)})}),this.state.imgLoaded&&this._image&&ce!=null&&ve.drawImage(this._image,ce.x+Oe,ce.y+Oe,ce.w,ce.h)}}},{key:"render",value:function(){var ne=this,pe=this.props,ie=pe.value,Ae=pe.size,Z=pe.level,fe=pe.bgColor,he=pe.fgColor,be=pe.style,le=pe.includeMargin,ue=pe.imageSettings,ve=O(pe,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Ee=_({height:Ae,width:Ae},be),Oe=null,De=ue&&ue.src;return ue!=null&&De!=null&&(Oe=x.createElement("img",{src:De,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(G){return ne._image=G}})),x.createElement(x.Fragment,null,x.createElement("canvas",at({style:Ee,height:Ae,width:Ae,ref:function(G){return ne._canvas=G}},ve)),Oe)}}]),X}(x.PureComponent);y($,"defaultProps",k);var z=function(M){v(X,M);function X(){return f(this,X),g(this,w(X).apply(this,arguments))}return b(X,[{key:"render",value:function(){var ne=this.props,pe=ne.value,ie=ne.size,Ae=ne.level,Z=ne.bgColor,fe=ne.fgColor,he=ne.includeMargin,be=ne.imageSettings,le=O(ne,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),ue=new I(-1,C[Ae]);ue.addData(E(pe)),ue.make();var ve=ue.modules;if(ve===null)return null;var Ee=he?P:0,Oe=ve.length+Ee*2,De=j(this.props,ve),ce=null;be!=null&&De!=null&&(De.excavation!=null&&(ve=R(ve,De.excavation)),ce=x.createElement("image",{xlinkHref:be.src,height:De.h,width:De.w,x:De.x+Ee,y:De.y+Ee,preserveAspectRatio:"none"}));var G=B(ve,Ee);return x.createElement("svg",at({shapeRendering:"crispEdges",height:ie,width:ie,viewBox:"0 0 ".concat(Oe," ").concat(Oe)},le),x.createElement("path",{fill:Z,d:"M0,0 h".concat(Oe,"v").concat(Oe,"H0z")}),x.createElement("path",{fill:fe,d:G}),ce)}}]),X}(x.PureComponent);y(z,"defaultProps",k);var F=function(X){var re=X.renderAs,ne=O(X,["renderAs"]),pe=re==="svg"?z:$;return x.createElement(pe,ne)};F.defaultProps=_({renderAs:"canvas"},k),Xt.exports=F},62874:function(Xt,vt,je){"use strict";je.d(vt,{Z:function(){return _e}});var Me=je(4942),at=je(1413),o=je(97685),_=je(71002),O=je(67294),p=je(34203),f=je(42550),h=je(94184),b=je.n(h),g=je(98924);function w(Fe,Ve){var Xe={};return Xe[Fe.toLowerCase()]=Ve.toLowerCase(),Xe["Webkit".concat(Fe)]="webkit".concat(Ve),Xe["Moz".concat(Fe)]="moz".concat(Ve),Xe["ms".concat(Fe)]="MS".concat(Ve),Xe["O".concat(Fe)]="o".concat(Ve.toLowerCase()),Xe}function c(Fe,Ve){var Xe={animationend:w("Animation","AnimationEnd"),transitionend:w("Transition","TransitionEnd")};return Fe&&("AnimationEvent"in Ve||delete Xe.animationend.animation,"TransitionEvent"in Ve||delete Xe.transitionend.transition),Xe}var v=c((0,g.Z)(),typeof window!="undefined"?window:{}),m={};if((0,g.Z)()){var y=document.createElement("div");m=y.style}var x={};function S(Fe){if(x[Fe])return x[Fe];var Ve=v[Fe];if(Ve)for(var Xe=Object.keys(Ve),Ye=Xe.length,it=0;it<Ye;it+=1){var ot=Xe[it];if(Object.prototype.hasOwnProperty.call(Ve,ot)&&ot in m)return x[Fe]=Ve[ot],x[Fe]}return""}var I=S("animationend"),C=S("transitionend"),E=!!(I&&C),k=I||"animationend",V=C||"transitionend";function P(Fe,Ve){if(!Fe)return null;if((0,_.Z)(Fe)==="object"){var Xe=Ve.replace(/-\w/g,function(Ye){return Ye[1].toUpperCase()});return Fe[Xe]}return"".concat(Fe,"-").concat(Ve)}var K="none",B="appear",R="enter",j="leave",N="none",$="prepare",z="start",F="active",M="end",X=je(63896),re=je(75164),ne=function(){var Fe=O.useRef(null);function Ve(){re.Z.cancel(Fe.current)}function Xe(Ye){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ve();var ot=(0,re.Z)(function(){it<=1?Ye({isCanceled:function(){return ot!==Fe.current}}):Xe(Ye,it-1)});Fe.current=ot}return O.useEffect(function(){return function(){Ve()}},[]),[Xe,Ve]},pe=(0,g.Z)()?O.useLayoutEffect:O.useEffect,ie=pe,Ae=[$,z,F,M],Z=!1,fe=!0;function he(Fe){return Fe===F||Fe===M}var be=function(Fe,Ve){var Xe=(0,X.Z)(N),Ye=(0,o.Z)(Xe,2),it=Ye[0],ot=Ye[1],ft=ne(),Ct=(0,o.Z)(ft,2),jt=Ct[0],Ot=Ct[1];function Gt(){ot($,!0)}return ie(function(){if(it!==N&&it!==M){var Bt=Ae.indexOf(it),Lt=Ae[Bt+1],Pt=Ve(it);Pt===Z?ot(Lt,!0):jt(function(mr){function yr(){mr.isCanceled()||ot(Lt,!0)}Pt===!0?yr():Promise.resolve(Pt).then(yr)})}},[Fe,it]),O.useEffect(function(){return function(){Ot()}},[]),[Gt,it]},le=function(Fe){var Ve=(0,O.useRef)(),Xe=(0,O.useRef)(Fe);Xe.current=Fe;var Ye=O.useCallback(function(ft){Xe.current(ft)},[]);function it(ft){ft&&(ft.removeEventListener(V,Ye),ft.removeEventListener(k,Ye))}function ot(ft){Ve.current&&Ve.current!==ft&&it(Ve.current),ft&&ft!==Ve.current&&(ft.addEventListener(V,Ye),ft.addEventListener(k,Ye),Ve.current=ft)}return O.useEffect(function(){return function(){it(Ve.current)}},[]),[ot,it]};function ue(Fe,Ve,Xe,Ye){var it=Ye.motionEnter,ot=it===void 0?!0:it,ft=Ye.motionAppear,Ct=ft===void 0?!0:ft,jt=Ye.motionLeave,Ot=jt===void 0?!0:jt,Gt=Ye.motionDeadline,Bt=Ye.motionLeaveImmediately,Lt=Ye.onAppearPrepare,Pt=Ye.onEnterPrepare,mr=Ye.onLeavePrepare,yr=Ye.onAppearStart,dr=Ye.onEnterStart,Rr=Ye.onLeaveStart,zr=Ye.onAppearActive,Cr=Ye.onEnterActive,kr=Ye.onLeaveActive,rt=Ye.onAppearEnd,Vr=Ye.onEnterEnd,Wt=Ye.onLeaveEnd,dn=Ye.onVisibleChanged,kn=(0,X.Z)(),_r=(0,o.Z)(kn,2),ur=_r[0],cn=_r[1],br=(0,X.Z)(K),or=(0,o.Z)(br,2),Vt=or[0],mn=or[1],sr=(0,X.Z)(null),Sa=(0,o.Z)(sr,2),Qi=Sa[0],Hi=Sa[1],Ia=(0,O.useRef)(!1),ci=(0,O.useRef)(null);function $n(){return Xe()}var Ge=(0,O.useRef)(!1);function Or(Qr){var bt=$n();if(!(Qr&&!Qr.deadline&&Qr.target!==bt)){var yn=Ge.current,Gi;Vt===B&&yn?Gi=rt==null?void 0:rt(bt,Qr):Vt===R&&yn?Gi=Vr==null?void 0:Vr(bt,Qr):Vt===j&&yn&&(Gi=Wt==null?void 0:Wt(bt,Qr)),Vt!==K&&yn&&Gi!==!1&&(mn(K,!0),Hi(null,!0))}}var pn=le(Or),qn=(0,o.Z)(pn,1),Cn=qn[0],Yr=O.useMemo(function(){var Qr,bt,yn;switch(Vt){case B:return Qr={},(0,Me.Z)(Qr,$,Lt),(0,Me.Z)(Qr,z,yr),(0,Me.Z)(Qr,F,zr),Qr;case R:return bt={},(0,Me.Z)(bt,$,Pt),(0,Me.Z)(bt,z,dr),(0,Me.Z)(bt,F,Cr),bt;case j:return yn={},(0,Me.Z)(yn,$,mr),(0,Me.Z)(yn,z,Rr),(0,Me.Z)(yn,F,kr),yn;default:return{}}},[Vt]),Di=be(Vt,function(Qr){if(Qr===$){var bt=Yr[$];return bt?bt($n()):Z}if(gn in Yr){var yn;Hi(((yn=Yr[gn])===null||yn===void 0?void 0:yn.call(Yr,$n(),null))||null)}return gn===F&&(Cn($n()),Gt>0&&(clearTimeout(ci.current),ci.current=setTimeout(function(){Or({deadline:!0})},Gt))),fe}),Ta=(0,o.Z)(Di,2),Eo=Ta[0],gn=Ta[1],Ra=he(gn);Ge.current=Ra,ie(function(){cn(Ve);var Qr=Ia.current;if(Ia.current=!0,!!Fe){var bt;!Qr&&Ve&&Ct&&(bt=B),Qr&&Ve&&ot&&(bt=R),(Qr&&!Ve&&Ot||!Qr&&Bt&&!Ve&&Ot)&&(bt=j),bt&&(mn(bt),Eo())}},[Ve]),(0,O.useEffect)(function(){(Vt===B&&!Ct||Vt===R&&!ot||Vt===j&&!Ot)&&mn(K)},[Ct,ot,Ot]),(0,O.useEffect)(function(){return function(){Ia.current=!1,clearTimeout(ci.current)}},[]);var ji=O.useRef(!1);(0,O.useEffect)(function(){ur&&(ji.current=!0),ur!==void 0&&Vt===K&&((ji.current||ur)&&(dn==null||dn(ur)),ji.current=!0)},[ur,Vt]);var wi=Qi;return Yr[$]&&gn===z&&(wi=(0,at.Z)({transition:"none"},wi)),[Vt,gn,wi,ur!=null?ur:Ve]}var ve=je(15671),Ee=je(43144),Oe=je(60136),De=je(29388),ce=function(Fe){(0,Oe.Z)(Xe,Fe);var Ve=(0,De.Z)(Xe);function Xe(){return(0,ve.Z)(this,Xe),Ve.apply(this,arguments)}return(0,Ee.Z)(Xe,[{key:"render",value:function(){return this.props.children}}]),Xe}(O.Component),G=ce;function ye(Fe){var Ve=Fe;(0,_.Z)(Fe)==="object"&&(Ve=Fe.transitionSupport);function Xe(it){return!!(it.motionName&&Ve)}var Ye=O.forwardRef(function(it,ot){var ft=it.visible,Ct=ft===void 0?!0:ft,jt=it.removeOnLeave,Ot=jt===void 0?!0:jt,Gt=it.forceRender,Bt=it.children,Lt=it.motionName,Pt=it.leavedClassName,mr=it.eventProps,yr=Xe(it),dr=(0,O.useRef)(),Rr=(0,O.useRef)();function zr(){try{return dr.current instanceof HTMLElement?dr.current:(0,p.Z)(Rr.current)}catch(sr){return null}}var Cr=ue(yr,Ct,zr,it),kr=(0,o.Z)(Cr,4),rt=kr[0],Vr=kr[1],Wt=kr[2],dn=kr[3],kn=O.useRef(dn);dn&&(kn.current=!0);var _r=O.useCallback(function(sr){dr.current=sr,(0,f.mH)(ot,sr)},[ot]),ur,cn=(0,at.Z)((0,at.Z)({},mr),{},{visible:Ct});if(!Bt)ur=null;else if(rt===K||!Xe(it))dn?ur=Bt((0,at.Z)({},cn),_r):!Ot&&kn.current&&Pt?ur=Bt((0,at.Z)((0,at.Z)({},cn),{},{className:Pt}),_r):Gt||!Ot&&!Pt?ur=Bt((0,at.Z)((0,at.Z)({},cn),{},{style:{display:"none"}}),_r):ur=null;else{var br,or;Vr===$?or="prepare":he(Vr)?or="active":Vr===z&&(or="start"),ur=Bt((0,at.Z)((0,at.Z)({},cn),{},{className:b()(P(Lt,rt),(br={},(0,Me.Z)(br,P(Lt,"".concat(rt,"-").concat(or)),or),(0,Me.Z)(br,Lt,typeof Lt=="string"),br)),style:Wt}),_r)}if(O.isValidElement(ur)&&(0,f.Yr)(ur)){var Vt=ur,mn=Vt.ref;mn||(ur=O.cloneElement(ur,{ref:_r}))}return O.createElement(G,{ref:Rr},ur)});return Ye.displayName="CSSMotion",Ye}var Y=ye(E),H=je(87462),Q=je(45987),J=je(97326),ee="add",W="keep",L="remove",q="removed";function de(Fe){var Ve;return Fe&&(0,_.Z)(Fe)==="object"&&"key"in Fe?Ve=Fe:Ve={key:Fe},(0,at.Z)((0,at.Z)({},Ve),{},{key:String(Ve.key)})}function Ie(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Fe.map(de)}function He(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Xe=[],Ye=0,it=Ve.length,ot=Ie(Fe),ft=Ie(Ve);ot.forEach(function(Ot){for(var Gt=!1,Bt=Ye;Bt<it;Bt+=1){var Lt=ft[Bt];if(Lt.key===Ot.key){Ye<Bt&&(Xe=Xe.concat(ft.slice(Ye,Bt).map(function(Pt){return(0,at.Z)((0,at.Z)({},Pt),{},{status:ee})})),Ye=Bt),Xe.push((0,at.Z)((0,at.Z)({},Lt),{},{status:W})),Ye+=1,Gt=!0;break}}Gt||Xe.push((0,at.Z)((0,at.Z)({},Ot),{},{status:L}))}),Ye<it&&(Xe=Xe.concat(ft.slice(Ye).map(function(Ot){return(0,at.Z)((0,at.Z)({},Ot),{},{status:ee})})));var Ct={};Xe.forEach(function(Ot){var Gt=Ot.key;Ct[Gt]=(Ct[Gt]||0)+1});var jt=Object.keys(Ct).filter(function(Ot){return Ct[Ot]>1});return jt.forEach(function(Ot){Xe=Xe.filter(function(Gt){var Bt=Gt.key,Lt=Gt.status;return Bt!==Ot||Lt!==L}),Xe.forEach(function(Gt){Gt.key===Ot&&(Gt.status=W)})}),Xe}var ze=["component","children","onVisibleChanged","onAllRemoved"],Je=["status"],dt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ge(Fe){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y,Xe=function(Ye){(0,Oe.Z)(ot,Ye);var it=(0,De.Z)(ot);function ot(){var ft;(0,ve.Z)(this,ot);for(var Ct=arguments.length,jt=new Array(Ct),Ot=0;Ot<Ct;Ot++)jt[Ot]=arguments[Ot];return ft=it.call.apply(it,[this].concat(jt)),(0,Me.Z)((0,J.Z)(ft),"state",{keyEntities:[]}),(0,Me.Z)((0,J.Z)(ft),"removeKey",function(Gt){var Bt=ft.state.keyEntities,Lt=Bt.map(function(Pt){return Pt.key!==Gt?Pt:(0,at.Z)((0,at.Z)({},Pt),{},{status:q})});return ft.setState({keyEntities:Lt}),Lt.filter(function(Pt){var mr=Pt.status;return mr!==q}).length}),ft}return(0,Ee.Z)(ot,[{key:"render",value:function(){var Ct=this,jt=this.state.keyEntities,Ot=this.props,Gt=Ot.component,Bt=Ot.children,Lt=Ot.onVisibleChanged,Pt=Ot.onAllRemoved,mr=(0,Q.Z)(Ot,ze),yr=Gt||O.Fragment,dr={};return dt.forEach(function(Rr){dr[Rr]=mr[Rr],delete mr[Rr]}),delete mr.keys,O.createElement(yr,mr,jt.map(function(Rr){var zr=Rr.status,Cr=(0,Q.Z)(Rr,Je),kr=zr===ee||zr===W;return O.createElement(Ve,(0,H.Z)({},dr,{key:Cr.key,visible:kr,eventProps:Cr,onVisibleChanged:function(Vr){if(Lt==null||Lt(Vr,{key:Cr.key}),!Vr){var Wt=Ct.removeKey(Cr.key);Wt===0&&Pt&&Pt()}}}),Bt)}))}}],[{key:"getDerivedStateFromProps",value:function(Ct,jt){var Ot=Ct.keys,Gt=jt.keyEntities,Bt=Ie(Ot),Lt=He(Gt,Bt);return{keyEntities:Lt.filter(function(Pt){var mr=Gt.find(function(yr){var dr=yr.key;return Pt.key===dr});return!(mr&&mr.status===q&&Pt.status===L)})}}}]),ot}(O.Component);return(0,Me.Z)(Xe,"defaultProps",{component:"div"}),Xe}var Be=ge(E),_e=Y},43579:function(Xt,vt,je){"use strict";je.d(vt,{Cd:function(){return N}});var Me=je(87462),at=je(1413),o=je(45987),_=je(67294),O=je(94184),p=je.n(O),f={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},h=function(){var F=(0,_.useRef)([]),M=(0,_.useRef)(null);return(0,_.useEffect)(function(){var X=Date.now(),re=!1;F.current.forEach(function(ne){if(ne){re=!0;var pe=ne.style;pe.transitionDuration=".3s, .3s, .3s, .06s",M.current&&X-M.current<100&&(pe.transitionDuration="0s, 0s")}}),re&&(M.current=Date.now())}),F.current},b=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],g=function(F){var M=(0,at.Z)((0,at.Z)({},f),F),X=M.className,re=M.percent,ne=M.prefixCls,pe=M.strokeColor,ie=M.strokeLinecap,Ae=M.strokeWidth,Z=M.style,fe=M.trailColor,he=M.trailWidth,be=M.transition,le=(0,o.Z)(M,b);delete le.gapPosition;var ue=Array.isArray(re)?re:[re],ve=Array.isArray(pe)?pe:[pe],Ee=h(),Oe=Ae/2,De=100-Ae/2,ce="M ".concat(ie==="round"?Oe:0,",").concat(Oe,`
|
|
L `).concat(ie==="round"?De:100,",").concat(Oe),G="0 0 100 ".concat(Ae),ye=0;return _.createElement("svg",(0,Me.Z)({className:p()("".concat(ne,"-line"),X),viewBox:G,preserveAspectRatio:"none",style:Z},le),_.createElement("path",{className:"".concat(ne,"-line-trail"),d:ce,strokeLinecap:ie,stroke:fe,strokeWidth:he||Ae,fillOpacity:"0"}),ue.map(function(Y,H){var Q=1;switch(ie){case"round":Q=1-Ae/100;break;case"square":Q=1-Ae/2/100;break;default:Q=1;break}var J={strokeDasharray:"".concat(Y*Q,"px, 100px"),strokeDashoffset:"-".concat(ye,"px"),transition:be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ee=ve[H]||ve[ve.length-1];return ye+=Y,_.createElement("path",{key:H,className:"".concat(ne,"-line-path"),d:ce,strokeLinecap:ie,stroke:ee,strokeWidth:Ae,fillOpacity:"0",ref:function(L){Ee[H]=L},style:J})}))},w=g,c=je(71002),v=je(97685),m=je(98924),y=0,x=(0,m.Z)();function S(){var z;return x?(z=y,y+=1):z="TEST_OR_SSR",z}var I=function(z){var F=_.useState(),M=(0,v.Z)(F,2),X=M[0],re=M[1];return _.useEffect(function(){re("rc_progress_".concat(S()))},[]),z||X},C=function(F){var M=F.bg,X=F.children;return _.createElement("div",{style:{width:"100%",height:"100%",background:M}},X)};function E(z,F){return Object.keys(z).map(function(M){var X=parseFloat(M),re="".concat(Math.floor(X*F),"%");return"".concat(z[M]," ").concat(re)})}var k=_.forwardRef(function(z,F){var M=z.prefixCls,X=z.color,re=z.gradientId,ne=z.radius,pe=z.style,ie=z.ptg,Ae=z.strokeLinecap,Z=z.strokeWidth,fe=z.size,he=z.gapDegree,be=X&&(0,c.Z)(X)==="object",le=be?"#FFF":void 0,ue=fe/2,ve=_.createElement("circle",{className:"".concat(M,"-circle-path"),r:ne,cx:ue,cy:ue,stroke:le,strokeLinecap:Ae,strokeWidth:Z,opacity:ie===0?0:1,style:pe,ref:F});if(!be)return ve;var Ee="".concat(re,"-conic"),Oe=he?"".concat(180+he/2,"deg"):"0deg",De=E(X,(360-he)/360),ce=E(X,1),G="conic-gradient(from ".concat(Oe,", ").concat(De.join(", "),")"),ye="linear-gradient(to ".concat(he?"bottom":"top",", ").concat(ce.join(", "),")");return _.createElement(_.Fragment,null,_.createElement("mask",{id:Ee},ve),_.createElement("foreignObject",{x:0,y:0,width:fe,height:fe,mask:"url(#".concat(Ee,")")},_.createElement(C,{bg:ye},_.createElement(C,{bg:G}))))}),V=k,P=100,K=function(F,M,X,re,ne,pe,ie,Ae,Z,fe){var he=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,be=X/100*360*((360-pe)/360),le=pe===0?0:{bottom:0,top:180,left:90,right:-90}[ie],ue=(100-re)/100*M;Z==="round"&&re!==100&&(ue+=fe/2,ue>=M&&(ue=M-.01));var ve=P/2;return{stroke:typeof Ae=="string"?Ae:void 0,strokeDasharray:"".concat(M,"px ").concat(F),strokeDashoffset:ue+he,transform:"rotate(".concat(ne+be+le,"deg)"),transformOrigin:"".concat(ve,"px ").concat(ve,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},B=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function R(z){var F=z!=null?z:[];return Array.isArray(F)?F:[F]}var j=function(F){var M=(0,at.Z)((0,at.Z)({},f),F),X=M.id,re=M.prefixCls,ne=M.steps,pe=M.strokeWidth,ie=M.trailWidth,Ae=M.gapDegree,Z=Ae===void 0?0:Ae,fe=M.gapPosition,he=M.trailColor,be=M.strokeLinecap,le=M.style,ue=M.className,ve=M.strokeColor,Ee=M.percent,Oe=(0,o.Z)(M,B),De=P/2,ce=I(X),G="".concat(ce,"-gradient"),ye=De-pe/2,Y=Math.PI*2*ye,H=Z>0?90+Z/2:-90,Q=Y*((360-Z)/360),J=(0,c.Z)(ne)==="object"?ne:{count:ne,gap:2},ee=J.count,W=J.gap,L=R(Ee),q=R(ve),de=q.find(function(Be){return Be&&(0,c.Z)(Be)==="object"}),Ie=de&&(0,c.Z)(de)==="object",He=Ie?"butt":be,ze=K(Y,Q,0,100,H,Z,fe,he,He,pe),Je=h(),dt=function(){var _e=0;return L.map(function(Fe,Ve){var Xe=q[Ve]||q[q.length-1],Ye=K(Y,Q,_e,Fe,H,Z,fe,Xe,He,pe);return _e+=Fe,_.createElement(V,{key:Ve,color:Xe,ptg:Fe,radius:ye,prefixCls:re,gradientId:G,style:Ye,strokeLinecap:He,strokeWidth:pe,gapDegree:Z,ref:function(ot){Je[Ve]=ot},size:P})}).reverse()},ge=function(){var _e=Math.round(ee*(L[0]/100)),Fe=100/ee,Ve=0;return new Array(ee).fill(null).map(function(Xe,Ye){var it=Ye<=_e-1?q[0]:he,ot=it&&(0,c.Z)(it)==="object"?"url(#".concat(G,")"):void 0,ft=K(Y,Q,Ve,Fe,H,Z,fe,it,"butt",pe,W);return Ve+=(Q-ft.strokeDashoffset+W)*100/Q,_.createElement("circle",{key:Ye,className:"".concat(re,"-circle-path"),r:ye,cx:De,cy:De,stroke:ot,strokeWidth:pe,opacity:1,style:ft,ref:function(jt){Je[Ye]=jt}})})};return _.createElement("svg",(0,Me.Z)({className:p()("".concat(re,"-circle"),ue),viewBox:"0 0 ".concat(P," ").concat(P),style:le,id:X,role:"presentation"},Oe),!ee&&_.createElement("circle",{className:"".concat(re,"-circle-trail"),r:ye,cx:De,cy:De,stroke:he,strokeLinecap:He,strokeWidth:ie||pe,style:ze}),ee?ge():dt())},N=j,$={Line:w,Circle:N}},48555:function(Xt,vt,je){"use strict";je.d(vt,{Z:function(){return $}});var Me=je(87462),at=je(67294),o=je(50344),_=je(80334),O=je(1413),p=je(42550),f=je(34203),h=je(91033),b=new Map;function g(z){z.forEach(function(F){var M,X=F.target;(M=b.get(X))===null||M===void 0||M.forEach(function(re){return re(X)})})}var w=new h.Z(g),c=null,v=null;function m(z,F){b.has(z)||(b.set(z,new Set),w.observe(z)),b.get(z).add(F)}function y(z,F){b.has(z)&&(b.get(z).delete(F),b.get(z).size||(w.unobserve(z),b.delete(z)))}var x=je(15671),S=je(43144),I=je(60136),C=je(29388),E=function(z){(0,I.Z)(M,z);var F=(0,C.Z)(M);function M(){return(0,x.Z)(this,M),F.apply(this,arguments)}return(0,S.Z)(M,[{key:"render",value:function(){return this.props.children}}]),M}(at.Component),k=at.createContext(null);function V(z){var F=z.children,M=z.onBatchResize,X=at.useRef(0),re=at.useRef([]),ne=at.useContext(k),pe=at.useCallback(function(ie,Ae,Z){X.current+=1;var fe=X.current;re.current.push({size:ie,element:Ae,data:Z}),Promise.resolve().then(function(){fe===X.current&&(M==null||M(re.current),re.current=[])}),ne==null||ne(ie,Ae,Z)},[M,ne]);return at.createElement(k.Provider,{value:pe},F)}function P(z,F){var M=z.children,X=z.disabled,re=at.useRef(null),ne=at.useRef(null),pe=at.useContext(k),ie=typeof M=="function",Ae=ie?M(re):M,Z=at.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),fe=!ie&&at.isValidElement(Ae)&&(0,p.Yr)(Ae),he=fe?Ae.ref:null,be=at.useMemo(function(){return(0,p.sQ)(he,re)},[he,re]),le=function(){return(0,f.Z)(re.current)||(0,f.Z)(ne.current)};at.useImperativeHandle(F,function(){return le()});var ue=at.useRef(z);ue.current=z;var ve=at.useCallback(function(Ee){var Oe=ue.current,De=Oe.onResize,ce=Oe.data,G=Ee.getBoundingClientRect(),ye=G.width,Y=G.height,H=Ee.offsetWidth,Q=Ee.offsetHeight,J=Math.floor(ye),ee=Math.floor(Y);if(Z.current.width!==J||Z.current.height!==ee||Z.current.offsetWidth!==H||Z.current.offsetHeight!==Q){var W={width:J,height:ee,offsetWidth:H,offsetHeight:Q};Z.current=W;var L=H===Math.round(ye)?ye:H,q=Q===Math.round(Y)?Y:Q,de=(0,O.Z)((0,O.Z)({},W),{},{offsetWidth:L,offsetHeight:q});pe==null||pe(de,Ee,ce),De&&Promise.resolve().then(function(){De(de,Ee)})}},[]);return at.useEffect(function(){var Ee=le();return Ee&&!X&&m(Ee,ve),function(){return y(Ee,ve)}},[re.current,X]),at.createElement(E,{ref:ne},fe?at.cloneElement(Ae,{ref:be}):Ae)}var K=at.forwardRef(P),B=K,R="rc-observer-key";function j(z,F){var M=z.children,X=typeof M=="function"?[M]:(0,o.Z)(M);return X.map(function(re,ne){var pe=(re==null?void 0:re.key)||"".concat(R,"-").concat(ne);return at.createElement(B,(0,Me.Z)({},z,{key:pe,ref:ne===0?F:void 0}),re)})}var N=at.forwardRef(j);N.Collection=V;var $=N},36697:function(Xt,vt,je){"use strict";je.d(vt,{G:function(){return O},Z:function(){return K}});var Me=je(94184),at=je.n(Me),o=je(67294),_=je.t(o,2);function O(B){var R=B.children,j=B.prefixCls,N=B.id,$=B.overlayInnerStyle,z=B.bodyClassName,F=B.className,M=B.style;return o.createElement("div",{className:at()("".concat(j,"-content"),F),style:M},o.createElement("div",{className:at()("".concat(j,"-inner"),z),id:N,role:"tooltip",style:$},typeof R=="function"?R():R))}var p=je(87462),f=je(1413),h=je(45987),b=je(98280),g={shiftX:64,adjustY:1},w={adjustX:1,shiftY:!0},c=[0,0],v={left:{points:["cr","cl"],overflow:w,offset:[-4,0],targetOffset:c},right:{points:["cl","cr"],overflow:w,offset:[4,0],targetOffset:c},top:{points:["bc","tc"],overflow:g,offset:[0,-4],targetOffset:c},bottom:{points:["tc","bc"],overflow:g,offset:[0,4],targetOffset:c},topLeft:{points:["bl","tl"],overflow:g,offset:[0,-4],targetOffset:c},leftTop:{points:["tr","tl"],overflow:w,offset:[-4,0],targetOffset:c},topRight:{points:["br","tr"],overflow:g,offset:[0,-4],targetOffset:c},rightTop:{points:["tl","tr"],overflow:w,offset:[4,0],targetOffset:c},bottomRight:{points:["tr","br"],overflow:g,offset:[0,4],targetOffset:c},rightBottom:{points:["bl","br"],overflow:w,offset:[4,0],targetOffset:c},bottomLeft:{points:["tl","bl"],overflow:g,offset:[0,4],targetOffset:c},leftBottom:{points:["br","bl"],overflow:w,offset:[-4,0],targetOffset:c}},m=null,y=je(97685);function x(){var B=(0,f.Z)({},_);return B.useId}var S=0;function I(){}var C=x(),E=C?function(R){var j=C();return R||j}:function(R){var j=o.useState("ssr-id"),N=(0,y.Z)(j,2),$=N[0],z=N[1];return o.useEffect(function(){var F=S;S+=1,z("rc_unique_".concat(F))},[]),R||$},k=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],V=function(R,j){var N=R.overlayClassName,$=R.trigger,z=$===void 0?["hover"]:$,F=R.mouseEnterDelay,M=F===void 0?0:F,X=R.mouseLeaveDelay,re=X===void 0?.1:X,ne=R.overlayStyle,pe=R.prefixCls,ie=pe===void 0?"rc-tooltip":pe,Ae=R.children,Z=R.onVisibleChange,fe=R.afterVisibleChange,he=R.transitionName,be=R.animation,le=R.motion,ue=R.placement,ve=ue===void 0?"right":ue,Ee=R.align,Oe=Ee===void 0?{}:Ee,De=R.destroyTooltipOnHide,ce=De===void 0?!1:De,G=R.defaultVisible,ye=R.getTooltipContainer,Y=R.overlayInnerStyle,H=R.arrowContent,Q=R.overlay,J=R.id,ee=R.showArrow,W=ee===void 0?!0:ee,L=R.classNames,q=R.styles,de=(0,h.Z)(R,k),Ie=E(J),He=(0,o.useRef)(null);(0,o.useImperativeHandle)(j,function(){return He.current});var ze=(0,f.Z)({},de);"visible"in R&&(ze.popupVisible=R.visible);var Je=function(){return o.createElement(O,{key:"content",prefixCls:ie,id:Ie,bodyClassName:L==null?void 0:L.body,overlayInnerStyle:(0,f.Z)((0,f.Z)({},Y),q==null?void 0:q.body)},Q)},dt=function(){var Be=o.Children.only(Ae),_e=(Be==null?void 0:Be.props)||{},Fe=(0,f.Z)((0,f.Z)({},_e),{},{"aria-describedby":Q?Ie:null});return o.cloneElement(Ae,Fe)};return o.createElement(b.Z,(0,p.Z)({popupClassName:at()(N,L==null?void 0:L.root),prefixCls:ie,popup:Je,action:z,builtinPlacements:v,popupPlacement:ve,ref:He,popupAlign:Oe,getPopupContainer:ye,onPopupVisibleChange:Z,afterPopupVisibleChange:fe,popupTransitionName:he,popupAnimation:be,popupMotion:le,defaultPopupVisible:G,autoDestroy:ce,mouseLeaveDelay:re,popupStyle:(0,f.Z)((0,f.Z)({},ne),q==null?void 0:q.root),mouseEnterDelay:M,arrow:W},ze),dt())},P=(0,o.forwardRef)(V),K=P},36356:function(Xt,vt,je){"use strict";je.d(vt,{Z:function(){return re}});var Me=je(87462),at=je(15671),o=je(43144),_=je(97326),O=je(60136),p=je(29388),f=je(4942),h=je(67294),b=je(1413),g=je(45987),w=je(71002),c=je(74165),v=je(15861),m=je(74902),y=je(94184),x=je.n(y),S=je(64217),I=je(80334),C=function(ne,pe){if(ne&&pe){var ie=Array.isArray(pe)?pe:pe.split(","),Ae=ne.name||"",Z=ne.type||"",fe=Z.replace(/\/.*$/,"");return ie.some(function(he){var be=he.trim();if(/^\*(\/\*)?$/.test(he))return!0;if(be.charAt(0)==="."){var le=Ae.toLowerCase(),ue=be.toLowerCase(),ve=[ue];return(ue===".jpg"||ue===".jpeg")&&(ve=[".jpg",".jpeg"]),ve.some(function(Ee){return le.endsWith(Ee)})}return/\/\*$/.test(be)?fe===be.replace(/\/.*$/,""):Z===be?!0:/^\w+$/.test(be)?((0,I.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(be,"'.Skip for check.")),!0):!1})}return!0};function E(ne,pe){var ie="cannot ".concat(ne.method," ").concat(ne.action," ").concat(pe.status,"'"),Ae=new Error(ie);return Ae.status=pe.status,Ae.method=ne.method,Ae.url=ne.action,Ae}function k(ne){var pe=ne.responseText||ne.response;if(!pe)return pe;try{return JSON.parse(pe)}catch(ie){return pe}}function V(ne){var pe=new XMLHttpRequest;ne.onProgress&&pe.upload&&(pe.upload.onprogress=function(fe){fe.total>0&&(fe.percent=fe.loaded/fe.total*100),ne.onProgress(fe)});var ie=new FormData;ne.data&&Object.keys(ne.data).forEach(function(Z){var fe=ne.data[Z];if(Array.isArray(fe)){fe.forEach(function(he){ie.append("".concat(Z,"[]"),he)});return}ie.append(Z,fe)}),ne.file instanceof Blob?ie.append(ne.filename,ne.file,ne.file.name):ie.append(ne.filename,ne.file),pe.onerror=function(fe){ne.onError(fe)},pe.onload=function(){return pe.status<200||pe.status>=300?ne.onError(E(ne,pe),k(pe)):ne.onSuccess(k(pe),pe)},pe.open(ne.method,ne.action,!0),ne.withCredentials&&"withCredentials"in pe&&(pe.withCredentials=!0);var Ae=ne.headers||{};return Ae["X-Requested-With"]!==null&&pe.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Ae).forEach(function(Z){Ae[Z]!==null&&pe.setRequestHeader(Z,Ae[Z])}),pe.send(ie),{abort:function(){pe.abort()}}}var P=function(){var ne=(0,v.Z)((0,c.Z)().mark(function pe(ie,Ae){var Z,fe,he,be,le,ue,ve,Ee;return(0,c.Z)().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:ue=function(){return ue=(0,v.Z)((0,c.Z)().mark(function G(ye){return(0,c.Z)().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",new Promise(function(Q){ye.file(function(J){Ae(J)?(ye.fullPath&&!J.webkitRelativePath&&(Object.defineProperties(J,{webkitRelativePath:{writable:!0}}),J.webkitRelativePath=ye.fullPath.replace(/^\//,""),Object.defineProperties(J,{webkitRelativePath:{writable:!1}})),Q(J)):Q(null)})}));case 1:case"end":return H.stop()}},G)})),ue.apply(this,arguments)},le=function(G){return ue.apply(this,arguments)},be=function(){return be=(0,v.Z)((0,c.Z)().mark(function G(ye){var Y,H,Q,J,ee;return(0,c.Z)().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:Y=ye.createReader(),H=[];case 2:return L.next=5,new Promise(function(q){Y.readEntries(q,function(){return q([])})});case 5:if(Q=L.sent,J=Q.length,J){L.next=9;break}return L.abrupt("break",12);case 9:for(ee=0;ee<J;ee++)H.push(Q[ee]);L.next=2;break;case 12:return L.abrupt("return",H);case 13:case"end":return L.stop()}},G)})),be.apply(this,arguments)},he=function(G){return be.apply(this,arguments)},Z=[],fe=[],ie.forEach(function(ce){return fe.push(ce.webkitGetAsEntry())}),ve=function(){var ce=(0,v.Z)((0,c.Z)().mark(function G(ye,Y){var H,Q;return(0,c.Z)().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(ye){ee.next=2;break}return ee.abrupt("return");case 2:if(ye.path=Y||"",!ye.isFile){ee.next=10;break}return ee.next=6,le(ye);case 6:H=ee.sent,H&&Z.push(H),ee.next=15;break;case 10:if(!ye.isDirectory){ee.next=15;break}return ee.next=13,he(ye);case 13:Q=ee.sent,fe.push.apply(fe,(0,m.Z)(Q));case 15:case"end":return ee.stop()}},G)}));return function(ye,Y){return ce.apply(this,arguments)}}(),Ee=0;case 9:if(!(Ee<fe.length)){De.next=15;break}return De.next=12,ve(fe[Ee]);case 12:Ee++,De.next=9;break;case 15:return De.abrupt("return",Z);case 16:case"end":return De.stop()}},pe)}));return function(ie,Ae){return ne.apply(this,arguments)}}(),K=P,B=+new Date,R=0;function j(){return"rc-upload-".concat(B,"-").concat(++R)}var N=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],$=function(ne){(0,O.Z)(ie,ne);var pe=(0,p.Z)(ie);function ie(){var Ae;(0,at.Z)(this,ie);for(var Z=arguments.length,fe=new Array(Z),he=0;he<Z;he++)fe[he]=arguments[he];return Ae=pe.call.apply(pe,[this].concat(fe)),(0,f.Z)((0,_.Z)(Ae),"state",{uid:j()}),(0,f.Z)((0,_.Z)(Ae),"reqs",{}),(0,f.Z)((0,_.Z)(Ae),"fileInput",void 0),(0,f.Z)((0,_.Z)(Ae),"_isMounted",void 0),(0,f.Z)((0,_.Z)(Ae),"onChange",function(be){var le=Ae.props,ue=le.accept,ve=le.directory,Ee=be.target.files,Oe=(0,m.Z)(Ee).filter(function(De){return!ve||C(De,ue)});Ae.uploadFiles(Oe),Ae.reset()}),(0,f.Z)((0,_.Z)(Ae),"onClick",function(be){var le=Ae.fileInput;if(le){var ue=be.target,ve=Ae.props.onClick;if(ue&&ue.tagName==="BUTTON"){var Ee=le.parentNode;Ee.focus(),ue.blur()}le.click(),ve&&ve(be)}}),(0,f.Z)((0,_.Z)(Ae),"onKeyDown",function(be){be.key==="Enter"&&Ae.onClick(be)}),(0,f.Z)((0,_.Z)(Ae),"onFileDrop",function(){var be=(0,v.Z)((0,c.Z)().mark(function le(ue){var ve,Ee,Oe;return(0,c.Z)().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(ve=Ae.props.multiple,ue.preventDefault(),ue.type!=="dragover"){ce.next=4;break}return ce.abrupt("return");case 4:if(!Ae.props.directory){ce.next=11;break}return ce.next=7,K(Array.prototype.slice.call(ue.dataTransfer.items),function(G){return C(G,Ae.props.accept)});case 7:Ee=ce.sent,Ae.uploadFiles(Ee),ce.next=14;break;case 11:Oe=(0,m.Z)(ue.dataTransfer.files).filter(function(G){return C(G,Ae.props.accept)}),ve===!1&&(Oe=Oe.slice(0,1)),Ae.uploadFiles(Oe);case 14:case"end":return ce.stop()}},le)}));return function(le){return be.apply(this,arguments)}}()),(0,f.Z)((0,_.Z)(Ae),"uploadFiles",function(be){var le=(0,m.Z)(be),ue=le.map(function(ve){return ve.uid=j(),Ae.processFile(ve,le)});Promise.all(ue).then(function(ve){var Ee=Ae.props.onBatchStart;Ee==null||Ee(ve.map(function(Oe){var De=Oe.origin,ce=Oe.parsedFile;return{file:De,parsedFile:ce}})),ve.filter(function(Oe){return Oe.parsedFile!==null}).forEach(function(Oe){Ae.post(Oe)})})}),(0,f.Z)((0,_.Z)(Ae),"processFile",function(){var be=(0,v.Z)((0,c.Z)().mark(function le(ue,ve){var Ee,Oe,De,ce,G,ye,Y,H,Q;return(0,c.Z)().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(Ee=Ae.props.beforeUpload,Oe=ue,!Ee){ee.next=14;break}return ee.prev=3,ee.next=6,Ee(ue,ve);case 6:Oe=ee.sent,ee.next=12;break;case 9:ee.prev=9,ee.t0=ee.catch(3),Oe=!1;case 12:if(Oe!==!1){ee.next=14;break}return ee.abrupt("return",{origin:ue,parsedFile:null,action:null,data:null});case 14:if(De=Ae.props.action,typeof De!="function"){ee.next=21;break}return ee.next=18,De(ue);case 18:ce=ee.sent,ee.next=22;break;case 21:ce=De;case 22:if(G=Ae.props.data,typeof G!="function"){ee.next=29;break}return ee.next=26,G(ue);case 26:ye=ee.sent,ee.next=30;break;case 29:ye=G;case 30:return Y=((0,w.Z)(Oe)==="object"||typeof Oe=="string")&&Oe?Oe:ue,Y instanceof File?H=Y:H=new File([Y],ue.name,{type:ue.type}),Q=H,Q.uid=ue.uid,ee.abrupt("return",{origin:ue,data:ye,parsedFile:Q,action:ce});case 35:case"end":return ee.stop()}},le,null,[[3,9]])}));return function(le,ue){return be.apply(this,arguments)}}()),(0,f.Z)((0,_.Z)(Ae),"saveFileInput",function(be){Ae.fileInput=be}),Ae}return(0,o.Z)(ie,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Z){var fe=this,he=Z.data,be=Z.origin,le=Z.action,ue=Z.parsedFile;if(this._isMounted){var ve=this.props,Ee=ve.onStart,Oe=ve.customRequest,De=ve.name,ce=ve.headers,G=ve.withCredentials,ye=ve.method,Y=be.uid,H=Oe||V,Q={action:le,filename:De,data:he,file:ue,headers:ce,withCredentials:G,method:ye||"post",onProgress:function(ee){var W=fe.props.onProgress;W==null||W(ee,ue)},onSuccess:function(ee,W){var L=fe.props.onSuccess;L==null||L(ee,ue,W),delete fe.reqs[Y]},onError:function(ee,W){var L=fe.props.onError;L==null||L(ee,W,ue),delete fe.reqs[Y]}};Ee(be),this.reqs[Y]=H(Q)}}},{key:"reset",value:function(){this.setState({uid:j()})}},{key:"abort",value:function(Z){var fe=this.reqs;if(Z){var he=Z.uid?Z.uid:Z;fe[he]&&fe[he].abort&&fe[he].abort(),delete fe[he]}else Object.keys(fe).forEach(function(be){fe[be]&&fe[be].abort&&fe[be].abort(),delete fe[be]})}},{key:"render",value:function(){var Z=this.props,fe=Z.component,he=Z.prefixCls,be=Z.className,le=Z.classNames,ue=le===void 0?{}:le,ve=Z.disabled,Ee=Z.id,Oe=Z.name,De=Z.style,ce=Z.styles,G=ce===void 0?{}:ce,ye=Z.multiple,Y=Z.accept,H=Z.capture,Q=Z.children,J=Z.directory,ee=Z.openFileDialogOnClick,W=Z.onMouseEnter,L=Z.onMouseLeave,q=Z.hasControlInside,de=(0,g.Z)(Z,N),Ie=x()((0,f.Z)((0,f.Z)((0,f.Z)({},he,!0),"".concat(he,"-disabled"),ve),be,be)),He=J?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},ze=ve?{}:{onClick:ee?this.onClick:function(){},onKeyDown:ee?this.onKeyDown:function(){},onMouseEnter:W,onMouseLeave:L,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:q?void 0:"0"};return h.createElement(fe,(0,Me.Z)({},ze,{className:Ie,role:q?void 0:"button",style:De}),h.createElement("input",(0,Me.Z)({},(0,S.Z)(de,{aria:!0,data:!0}),{id:Ee,name:Oe,disabled:ve,type:"file",ref:this.saveFileInput,onClick:function(dt){return dt.stopPropagation()},key:this.state.uid,style:(0,b.Z)({display:"none"},G.input),className:ue.input,accept:Y},He,{multiple:ye,onChange:this.onChange},H!=null?{capture:H}:{})),Q)}}]),ie}(h.Component),z=$;function F(){}var M=function(ne){(0,O.Z)(ie,ne);var pe=(0,p.Z)(ie);function ie(){var Ae;(0,at.Z)(this,ie);for(var Z=arguments.length,fe=new Array(Z),he=0;he<Z;he++)fe[he]=arguments[he];return Ae=pe.call.apply(pe,[this].concat(fe)),(0,f.Z)((0,_.Z)(Ae),"uploader",void 0),(0,f.Z)((0,_.Z)(Ae),"saveUploader",function(be){Ae.uploader=be}),Ae}return(0,o.Z)(ie,[{key:"abort",value:function(Z){this.uploader.abort(Z)}},{key:"render",value:function(){return h.createElement(z,(0,Me.Z)({},this.props,{ref:this.saveUploader}))}}]),ie}(h.Component);(0,f.Z)(M,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:F,onError:F,onSuccess:F,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var X=M,re=X},50344:function(Xt,vt,je){"use strict";je.d(vt,{Z:function(){return o}});var Me=je(67294),at=je(59864);function o(_){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=[];return Me.Children.forEach(_,function(f){f==null&&!O.keepEmpty||(Array.isArray(f)?p=p.concat(o(f)):(0,at.isFragment)(f)&&f.props?p=p.concat(o(f.props.children,O)):p.push(f))}),p}},80334:function(Xt,vt,je){"use strict";var Me={};function at(h,b){}function o(h,b){}function _(){Me={}}function O(h,b,g){!b&&!Me[g]&&(h(!1,g),Me[g]=!0)}function p(h,b){O(at,h,b)}function f(h,b){O(o,h,b)}vt.ZP=p},91033:function(Xt,vt,je){"use strict";var Me=function(){if(typeof Map!="undefined")return Map;function z(F,M){var X=-1;return F.some(function(re,ne){return re[0]===M?(X=ne,!0):!1}),X}return function(){function F(){this.__entries__=[]}return Object.defineProperty(F.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),F.prototype.get=function(M){var X=z(this.__entries__,M),re=this.__entries__[X];return re&&re[1]},F.prototype.set=function(M,X){var re=z(this.__entries__,M);~re?this.__entries__[re][1]=X:this.__entries__.push([M,X])},F.prototype.delete=function(M){var X=this.__entries__,re=z(X,M);~re&&X.splice(re,1)},F.prototype.has=function(M){return!!~z(this.__entries__,M)},F.prototype.clear=function(){this.__entries__.splice(0)},F.prototype.forEach=function(M,X){X===void 0&&(X=null);for(var re=0,ne=this.__entries__;re<ne.length;re++){var pe=ne[re];M.call(X,pe[1],pe[0])}},F}()}(),at=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,o=function(){return typeof je.g!="undefined"&&je.g.Math===Math?je.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),_=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(o):function(z){return setTimeout(function(){return z(Date.now())},1e3/60)}}(),O=2;function p(z,F){var M=!1,X=!1,re=0;function ne(){M&&(M=!1,z()),X&&ie()}function pe(){_(ne)}function ie(){var Ae=Date.now();if(M){if(Ae-re<O)return;X=!0}else M=!0,X=!1,setTimeout(pe,F);re=Ae}return ie}var f=20,h=["top","right","bottom","left","width","height","size","weight"],b=typeof MutationObserver!="undefined",g=function(){function z(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=p(this.refresh.bind(this),f)}return z.prototype.addObserver=function(F){~this.observers_.indexOf(F)||this.observers_.push(F),this.connected_||this.connect_()},z.prototype.removeObserver=function(F){var M=this.observers_,X=M.indexOf(F);~X&&M.splice(X,1),!M.length&&this.connected_&&this.disconnect_()},z.prototype.refresh=function(){var F=this.updateObservers_();F&&this.refresh()},z.prototype.updateObservers_=function(){var F=this.observers_.filter(function(M){return M.gatherActive(),M.hasActive()});return F.forEach(function(M){return M.broadcastActive()}),F.length>0},z.prototype.connect_=function(){!at||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),b?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},z.prototype.disconnect_=function(){!at||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},z.prototype.onTransitionEnd_=function(F){var M=F.propertyName,X=M===void 0?"":M,re=h.some(function(ne){return!!~X.indexOf(ne)});re&&this.refresh()},z.getInstance=function(){return this.instance_||(this.instance_=new z),this.instance_},z.instance_=null,z}(),w=function(z,F){for(var M=0,X=Object.keys(F);M<X.length;M++){var re=X[M];Object.defineProperty(z,re,{value:F[re],enumerable:!1,writable:!1,configurable:!0})}return z},c=function(z){var F=z&&z.ownerDocument&&z.ownerDocument.defaultView;return F||o},v=P(0,0,0,0);function m(z){return parseFloat(z)||0}function y(z){for(var F=[],M=1;M<arguments.length;M++)F[M-1]=arguments[M];return F.reduce(function(X,re){var ne=z["border-"+re+"-width"];return X+m(ne)},0)}function x(z){for(var F=["top","right","bottom","left"],M={},X=0,re=F;X<re.length;X++){var ne=re[X],pe=z["padding-"+ne];M[ne]=m(pe)}return M}function S(z){var F=z.getBBox();return P(0,0,F.width,F.height)}function I(z){var F=z.clientWidth,M=z.clientHeight;if(!F&&!M)return v;var X=c(z).getComputedStyle(z),re=x(X),ne=re.left+re.right,pe=re.top+re.bottom,ie=m(X.width),Ae=m(X.height);if(X.boxSizing==="border-box"&&(Math.round(ie+ne)!==F&&(ie-=y(X,"left","right")+ne),Math.round(Ae+pe)!==M&&(Ae-=y(X,"top","bottom")+pe)),!E(z)){var Z=Math.round(ie+ne)-F,fe=Math.round(Ae+pe)-M;Math.abs(Z)!==1&&(ie-=Z),Math.abs(fe)!==1&&(Ae-=fe)}return P(re.left,re.top,ie,Ae)}var C=function(){return typeof SVGGraphicsElement!="undefined"?function(z){return z instanceof c(z).SVGGraphicsElement}:function(z){return z instanceof c(z).SVGElement&&typeof z.getBBox=="function"}}();function E(z){return z===c(z).document.documentElement}function k(z){return at?C(z)?S(z):I(z):v}function V(z){var F=z.x,M=z.y,X=z.width,re=z.height,ne=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,pe=Object.create(ne.prototype);return w(pe,{x:F,y:M,width:X,height:re,top:M,right:F+X,bottom:re+M,left:F}),pe}function P(z,F,M,X){return{x:z,y:F,width:M,height:X}}var K=function(){function z(F){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=P(0,0,0,0),this.target=F}return z.prototype.isActive=function(){var F=k(this.target);return this.contentRect_=F,F.width!==this.broadcastWidth||F.height!==this.broadcastHeight},z.prototype.broadcastRect=function(){var F=this.contentRect_;return this.broadcastWidth=F.width,this.broadcastHeight=F.height,F},z}(),B=function(){function z(F,M){var X=V(M);w(this,{target:F,contentRect:X})}return z}(),R=function(){function z(F,M,X){if(this.activeObservations_=[],this.observations_=new Me,typeof F!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=F,this.controller_=M,this.callbackCtx_=X}return z.prototype.observe=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof c(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var M=this.observations_;M.has(F)||(M.set(F,new K(F)),this.controller_.addObserver(this),this.controller_.refresh())}},z.prototype.unobserve=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof c(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var M=this.observations_;M.has(F)&&(M.delete(F),M.size||this.controller_.removeObserver(this))}},z.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},z.prototype.gatherActive=function(){var F=this;this.clearActive(),this.observations_.forEach(function(M){M.isActive()&&F.activeObservations_.push(M)})},z.prototype.broadcastActive=function(){if(this.hasActive()){var F=this.callbackCtx_,M=this.activeObservations_.map(function(X){return new B(X.target,X.broadcastRect())});this.callback_.call(F,M,F),this.clearActive()}},z.prototype.clearActive=function(){this.activeObservations_.splice(0)},z.prototype.hasActive=function(){return this.activeObservations_.length>0},z}(),j=typeof WeakMap!="undefined"?new WeakMap:new Me,N=function(){function z(F){if(!(this instanceof z))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var M=g.getInstance(),X=new R(F,M,this);j.set(this,X)}return z}();["observe","unobserve","disconnect"].forEach(function(z){N.prototype[z]=function(){var F;return(F=j.get(this))[z].apply(F,arguments)}});var $=function(){return typeof o.ResizeObserver!="undefined"?o.ResizeObserver:N}();vt.Z=$},64902:function(){},40522:function(){},90753:function(){},12155:function(){}}]);
|