@cloudbase/js-sdk 3.3.4 → 3.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cloudbase_mysql",[],t):"object"==typeof exports?exports.cloudbase_mysql=t():e.cloudbase_mysql=t()}("undefined"!=typeof window?window:this,(()=>(()=>{var e={504:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(840),t)},840:(e,t,r)=>{"use strict";r.r(t),r.d(t,{registerMySQL:()=>c});var n=r(292),o={};for(const e in n)["default","registerMySQL"].indexOf(e)<0&&(o[e]=()=>n[e]);r.d(t,o);var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r=this,o=e.request.fetch.bind(e.request),a=t||{},s=a.instance,u=void 0===s?"default":s,c=a.database,l=void 0===c?e.config.env:c,h=e.getEndPointWithKey("GATEWAY"),f=h.BASE_URL,d=h.PROTOCOL,p="".concat(d).concat(f,"/rdb/rest"),v=(0,n.generateMySQLClient)(e,{mysqlBaseUrl:p,fetch:function(e,t){return n=r,a=void 0,c=function(){var r,n,a,s;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(c){switch(c.label){case 0:return r={},t.headers instanceof Headers?t.headers.forEach((function(e,t){r[t]=e})):r=t.headers||{},[4,o(i(i({url:e.toString()},t),{headers:i({"Content-Type":"application/json","X-Db-Instance":u,"Accept-Profile":l,"Content-Profile":l},r),shouldThrowOnError:!1}))];case 1:n=c.sent(),a={},c.label=2;case 2:return c.trys.push([2,4,,5]),[4,n.data];case 3:return a=c.sent(),[3,5];case 4:if(!(s=c.sent()).message.includes("Unexpected end of JSON input"))throw s;return[3,5];case 5:return[2,{ok:(null==n?void 0:n.statusCode)>=200&&(null==n?void 0:n.statusCode)<300,status:(null==n?void 0:n.statusCode)||200,statusText:(null==n?void 0:n.statusMessage)||"OK",json:function(){return Promise.resolve(a||{})},text:function(){return Promise.resolve("string"==typeof a?a:JSON.stringify(a||{}))},headers:null==n?void 0:n.header}]}}))},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(r,o)}i((c=c.apply(n,a||[])).next())}));var n,a,s,c}});return v}var s={name:"mysql",entity:{mysql:function(e){return a(this,e)(e)}}},u={name:"rdb",entity:{rdb:function(e){return a(this,e)(e)}}};try{cloudbase.registerComponent(s),cloudbase.registerComponent(u)}catch(e){}function c(e){try{e.registerComponent(s),e.registerComponent(u)}catch(e){console.warn(e)}}try{window.registerMySQL=c}catch(e){}},292:function(e,t,r){!function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function n(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}s((n=n.apply(e,[])).next())}))}function a(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.name="WxCloudSDKError",n.code=null==r?void 0:r.code,n.requestId=null==r?void 0:r.requestId,n.originError=null==r?void 0:r.originError,n}return n(t,e),t}(Error);function u(){return"undefined"!=typeof window&&window||"undefined"!=typeof globalThis&&globalThis}function c(){try{var e=u();if(!e)return;return"undefined"==typeof wx?u().location.href:e.__wxRoute}catch(e){}}var l=function(e){var t=e.dataSourceName,r=e.methodName,n=e.params,o=e.realMethodName,l=e.callFunction,h=e.envType,f=void 0===h?"prod":h,d=e.mode;return i(void 0,0,void 0,(function(){var e,i,h,p,v,y;return a(this,(function(a){switch(a.label){case 0:e={data:{},requestId:""},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,l({name:"lowcode-datasource",data:{dataSourceName:t,methodName:r,params:n,userAgent:(g=u(),(null==g?void 0:g.navigator)?g.navigator.userAgent:"undefined"!=typeof wx&&wx.getSystemInfo?(wx.getSystemInfo({success:function(e){e&&(m=["brand","model","version","system","platform","SDKVersion","language"].map((function(t){return"".concat(t,": ").concat(e[t])})).join(", "))}}),m):void 0),referrer:c(),"x-sdk-version":"1.7.1",envType:f,mode:d}})];case 2:if(i=a.sent(),h=(null===(v=null==i?void 0:i.result)||void 0===v?void 0:v.requestId)||(null==i?void 0:i.requestId)||(null==i?void 0:i.requestID),null==i?void 0:i.result.code)throw new s("【错误】".concat(null==i?void 0:i.result.message,"\n【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(o,"\n【错误码】").concat(null==i?void 0:i.result.code,"\n【请求ID】").concat(h||"N/A"),{code:null==i?void 0:i.result.code,requestId:h});return e.data=(null===(y=null==i?void 0:i.result)||void 0===y?void 0:y.data)||{},e.requestId=h,[3,4];case 3:throw"WxCloudSDKError"===(p=a.sent()).name?p:(console.log(p),new s("【错误】".concat(p.message,"\n 【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(o,"\n 【请求ID】N/A"),{code:"UnknownError",originError:p}));case 4:return[2,e]}var m,g}))}))},h=function(e){var t=e.sql,r=e.params,n=e.config,o=e.callFunction,s=e.unsafe,u=void 0!==s&&s;return i(void 0,0,void 0,(function(){return a(this,(function(e){return[2,l({realMethodName:"$runSQL",methodName:"callWedaApi",params:{action:"RunMysqlCommand",data:{sqlTemplate:t,config:n,parameter:u?"":Object.entries(r||{}).reduce((function(e,t){var r=t[0],n=t[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}e.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return e}),[])||[]}},callFunction:o,mode:"sdk"})]}))}))},f=function(e){return{$runSQL:function(t,r,n){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,h({sql:t,params:r,config:o(o({},n),{preparedStatements:!0}),callFunction:e})];case 1:return[2,i.sent()]}}))}))},$runSQLRaw:function(t,r){return i(this,0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,h({sql:t,params:[],config:o(o({},r),{preparedStatements:!1}),callFunction:e})];case 1:return[2,n.sent()]}}))}))}}},d={filter:{where:{}},select:{$master:!0}};function p(e){return{getUrl:function(t){return"".concat(t,"/").concat(e)},method:"post"}}var v={get:o(o({},p("get")),{defaultParams:o({},d)}),list:o(o({},p("list")),{defaultParams:o({},d)}),create:p("create"),createMany:p("createMany"),update:o(o({},p("update")),{method:"put"}),updateMany:o(o({},p("updateMany")),{method:"put"}),upsert:p("upsert"),delete:p("delete"),deleteMany:p("deleteMany")},y="Unknown error occurred",m="NotSupported",g=function(e,t,r,n){var o=f(e);return new Proxy({},{get:function(e,i){if("string"==typeof i)return Object.prototype.hasOwnProperty.call(o,i)?o[i]:w(r,i,t,n)}})},b=function(e,t,r,n,o){return new s("【错误】".concat(e,"\n【操作】调用 models.").concat(t,".").concat(r,"\n【错误码】").concat(n,"\n【请求ID】").concat(o),{code:n,requestId:o})},w=function(e,t,r,n){return new Proxy({},{get:function(u,c){if("runSQLTemplate"!==c){var l=v[c];if(!l){var h=new Error("不支持的操作: ".concat(c));throw new s(h.message||y,{originError:h,code:m,requestId:"N/A"})}return function(n){return void 0===n&&(n={}),i(void 0,0,void 0,(function(){var o,i,u,h,f,d,p,v,m,g;return a(this,(function(a){switch(a.label){case 0:o=l.getUrl,i=l.method,u=l.defaultParams,h=void 0===u?{}:u,f=Object.assign({},h,n),d="pre"===f.envType?"pre":"prod",p=[e,d,o(t)].join("/"),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:p,body:JSON.stringify(f),method:i})];case 2:if((v=a.sent()).code)throw b(null==v?void 0:v.message,t,c,null==v?void 0:v.code,null==v?void 0:v.requestId);return"get"===c&&Object.assign(v,{data:null!==(g=v.data.record)&&void 0!==g?g:v.data}),[2,v];case 3:throw m=a.sent(),new s((null==m?void 0:m.message)||y,{originError:m});case 4:return[2]}}))}))}}if(!(null==n?void 0:n.sqlBaseUrl))throw h=new Error("不支持的操作: ".concat(c)),new s(h.message||y,{originError:h,code:m,requestId:"N/A"});return function(e){return i(void 0,0,void 0,(function(){var i,u,l,h,f,d,p,v,m,g,w,P,S,O,j,k;return a(this,(function(a){switch(a.label){case 0:i=e.params,u=e.templateName,l=e.envType,h="pre"===l?"pre":"prod",f=[n.sqlBaseUrl,h,u,"run"].join("/"),d=Object.entries(i||{}).reduce((function(e,t){var r=t[0],n=t[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}e.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return e}),[]),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:f,body:JSON.stringify({parameter:d}),method:"POST"})];case 2:if(p=a.sent(),null===(m=null==p?void 0:p.Response)||void 0===m?void 0:m.Error)throw b(null===(w=null===(g=null==p?void 0:p.Response)||void 0===g?void 0:g.Error)||void 0===w?void 0:w.Message,t,c,null===(S=null===(P=null==p?void 0:p.Response)||void 0===P?void 0:P.Error)||void 0===S?void 0:S.Code,null===(O=null==p?void 0:p.Response)||void 0===O?void 0:O.RequestId);return[2,o(o({},null!==(j=null==p?void 0:p.Response)&&void 0!==j?j:{}),{data:null===(k=null==p?void 0:p.Response)||void 0===k?void 0:k.Data})];case 3:throw v=a.sent(),new s((null==v?void 0:v.message)||y,{originError:v});case 4:return[2]}}))}))}}})},P={create:{methodName:"wedaCreateV2"},createMany:{methodName:"wedaBatchCreateV2"},update:{methodName:"wedaUpdateV2"},upsert:{methodName:"wedaUpsertV2"},updateMany:{methodName:"wedaBatchUpdateV2"},delete:{methodName:"wedaDeleteV2"},deleteMany:{methodName:"wedaBatchDeleteV2"},get:{methodName:"wedaGetItemV2",defaultParams:{filter:{where:{}},select:{$master:!0}}},list:{methodName:"wedaGetRecordsV2",defaultParams:{filter:{where:{}},select:{$master:!0}}}},S=function(e){var t=f(e);return new Proxy({},{get:function(r,n){if("string"==typeof n)return Object.prototype.hasOwnProperty.call(t,n)?t[n]:function(e,t){return new Proxy({},{get:function(r,n){var u=P[n];if(!u){var c=new Error("不支持的操作: ".concat(n));throw new s(c.message||"Unknown error occurred",{originError:c,code:"NotSupported",requestId:"N/A"})}return function(r){return i(void 0,0,void 0,(function(){var i,s,c,h,f;return a(this,(function(a){switch(a.label){case 0:return i=o(o({},u.defaultParams||{}),r||{}),[4,l({callFunction:t,dataSourceName:e,methodName:u.methodName,realMethodName:n,params:i,envType:null==r?void 0:r.envType})];case 1:return s=a.sent(),c={data:{}},h=u.responseKey,c.data=h?null===(f=null==s?void 0:s.data)||void 0===f?void 0:f[h]:null==s?void 0:s.data,[2,c]}}))}))}}})}(n,e)}})},O=function(){function e(e){var t=this;this.map=new Map,e&&(e instanceof Headers?e.forEach((function(e,r){t.append(r,e)})):Array.isArray(e)?e.forEach((function(e){var r=e[0],n=e[1];t.append(r,n)})):"object"==typeof e&&Object.keys(e).forEach((function(r){t.append(r,e[r])})))}return e.prototype.append=function(e,t){var r=e.toLowerCase(),n=this.map.get(r);n?this.map.set(r,"".concat(n,", ").concat(t)):this.map.set(r,String(t))},e.prototype.delete=function(e){this.map.delete(e.toLowerCase())},e.prototype.forEach=function(e,t){var r=this;this.map.forEach((function(n,o){e.call(t,n,o,r)}))},e.prototype.get=function(e){return this.map.get(e.toLowerCase())||null},e.prototype.has=function(e){return this.map.has(e.toLowerCase())},e.prototype.set=function(e,t){this.map.set(e.toLowerCase(),String(t))},e.prototype.entries=function(){return this.map.entries()},e.prototype.keys=function(){return this.map.keys()},e.prototype.values=function(){return this.map.values()},e.prototype.getSetCookie=function(){var e=[];return this.map.forEach((function(t,r){"set-cookie"===r&&e.push(t)})),e},e.prototype.toJSON=function(){var e={};return this.map.forEach((function(t,r){e[r]=t})),e},e.prototype[Symbol.iterator]=function(){return this.entries()},e}();"object"!=typeof globalThis||globalThis.Headers||(globalThis.Headers=O);var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function k(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E,A,T=function(e){try{return!!e()}catch(e){return!0}},R=!T((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),x=R,U=Function.prototype,q=U.call,C=x&&U.bind.bind(q,q),L=x?C:function(e){return function(){return q.apply(e,arguments)}},I=L,N=I({}.toString),M=I("".slice),B=function(e){return M(N(e),8,-1)},F=T,H=B,_=Object,G=L("".split),D=F((function(){return!_("z").propertyIsEnumerable(0)}))?function(e){return"String"===H(e)?G(e,""):_(e)}:_,z=function(e){return null==e},J=z,Q=TypeError,$=function(e){if(J(e))throw new Q("Can't call method on "+e);return e},V=D,K=$,W=function(e){return V(K(e))},Y={},X=function(e){return e&&e.Math===Math&&e},Z=X("object"==typeof globalThis&&globalThis)||X("object"==typeof window&&window)||X("object"==typeof self&&self)||X("object"==typeof j&&j)||X("object"==typeof j&&j)||function(){return this}()||Function("return this")(),ee="object"==typeof document&&document.all,te=void 0===ee&&void 0!==ee?function(e){return"function"==typeof e||e===ee}:function(e){return"function"==typeof e},re=te,ne=Z.WeakMap,oe=re(ne)&&/native code/.test(String(ne)),ie=te,ae=function(e){return"object"==typeof e?null!==e:ie(e)},se=!T((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ue={},ce=ae,le=Z.document,he=ce(le)&&ce(le.createElement),fe=function(e){return he?le.createElement(e):{}},de=fe,pe=!se&&!T((function(){return 7!==Object.defineProperty(de("div"),"a",{get:function(){return 7}}).a})),ve=se&&T((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ye=ae,me=String,ge=TypeError,be=function(e){if(ye(e))return e;throw new ge(me(e)+" is not an object")},we=R,Pe=Function.prototype.call,Se=we?Pe.bind(Pe):function(){return Pe.apply(Pe,arguments)},Oe={},je=Oe,ke=Z,Ee=te,Ae=function(e){return Ee(e)?e:void 0},Te=function(e,t){return arguments.length<2?Ae(je[e])||Ae(ke[e]):je[e]&&je[e][t]||ke[e]&&ke[e][t]},Re=L({}.isPrototypeOf),xe=Z.navigator,Ue=xe&&xe.userAgent,qe=Z,Ce=Ue?String(Ue):"",Le=qe.process,Ie=qe.Deno,Ne=Le&&Le.versions||Ie&&Ie.version,Me=Ne&&Ne.v8;Me&&(A=(E=Me.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!A&&Ce&&(!(E=Ce.match(/Edge\/(\d+)/))||E[1]>=74)&&(E=Ce.match(/Chrome\/(\d+)/))&&(A=+E[1]);var Be=A,Fe=T,He=Z.String,_e=!!Object.getOwnPropertySymbols&&!Fe((function(){var e=Symbol("symbol detection");return!He(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Ge=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,De=Te,ze=te,Je=Re,Qe=Object,$e=Ge?function(e){return"symbol"==typeof e}:function(e){var t=De("Symbol");return ze(t)&&Je(t.prototype,Qe(e))},Ve=String,Ke=function(e){try{return Ve(e)}catch(e){return"Object"}},We=te,Ye=Ke,Xe=TypeError,Ze=function(e){if(We(e))return e;throw new Xe(Ye(e)+" is not a function")},et=Ze,tt=z,rt=function(e,t){var r=e[t];return tt(r)?void 0:et(r)},nt=Se,ot=te,it=ae,at=TypeError,st={exports:{}},ut=Z,ct=Object.defineProperty,lt=Z,ht="__core-js_shared__",ft=st.exports=lt[ht]||function(e,t){try{ct(ut,e,{value:t,configurable:!0,writable:!0})}catch(r){ut[e]=t}return t}(ht,{});(ft.versions||(ft.versions=[])).push({version:"3.45.0",mode:"pure",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"});var dt=st.exports,pt=dt,vt=function(e,t){return pt[e]||(pt[e]=t||{})},yt=$,mt=Object,gt=function(e){return mt(yt(e))},bt=gt,wt=L({}.hasOwnProperty),Pt=Object.hasOwn||function(e,t){return wt(bt(e),t)},St=L,Ot=0,jt=Math.random(),kt=St(1.1.toString),Et=function(e){return"Symbol("+(void 0===e?"":e)+")_"+kt(++Ot+jt,36)},At=vt,Tt=Pt,Rt=Et,xt=_e,Ut=Ge,qt=Z.Symbol,Ct=At("wks"),Lt=Ut?qt.for||qt:qt&&qt.withoutSetter||Rt,It=function(e){return Tt(Ct,e)||(Ct[e]=xt&&Tt(qt,e)?qt[e]:Lt("Symbol."+e)),Ct[e]},Nt=Se,Mt=ae,Bt=$e,Ft=rt,Ht=function(e,t){var r,n;if("string"===t&&ot(r=e.toString)&&!it(n=nt(r,e)))return n;if(ot(r=e.valueOf)&&!it(n=nt(r,e)))return n;if("string"!==t&&ot(r=e.toString)&&!it(n=nt(r,e)))return n;throw new at("Can't convert object to primitive value")},_t=TypeError,Gt=It("toPrimitive"),Dt=$e,zt=function(e){var t=function(e,t){if(!Mt(e)||Bt(e))return e;var r,n=Ft(e,Gt);if(n){if(void 0===t&&(t="default"),r=Nt(n,e,t),!Mt(r)||Bt(r))return r;throw new _t("Can't convert object to primitive value")}return void 0===t&&(t="number"),Ht(e,t)}(e,"string");return Dt(t)?t:t+""},Jt=se,Qt=pe,$t=ve,Vt=be,Kt=zt,Wt=TypeError,Yt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,Zt="enumerable",er="configurable",tr="writable";ue.f=Jt?$t?function(e,t,r){if(Vt(e),t=Kt(t),Vt(r),"function"==typeof e&&"prototype"===t&&"value"in r&&tr in r&&!r[tr]){var n=Xt(e,t);n&&n[tr]&&(e[t]=r.value,r={configurable:er in r?r[er]:n[er],enumerable:Zt in r?r[Zt]:n[Zt],writable:!1})}return Yt(e,t,r)}:Yt:function(e,t,r){if(Vt(e),t=Kt(t),Vt(r),Qt)try{return Yt(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Wt("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var rr,nr,or,ir=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ar=ue,sr=ir,ur=se?function(e,t,r){return ar.f(e,t,sr(1,r))}:function(e,t,r){return e[t]=r,e},cr=Et,lr=vt("keys"),hr=function(e){return lr[e]||(lr[e]=cr(e))},fr={},dr=oe,pr=Z,vr=ae,yr=ur,mr=Pt,gr=dt,br=hr,wr=fr,Pr="Object already initialized",Sr=pr.TypeError,Or=pr.WeakMap;if(dr||gr.state){var jr=gr.state||(gr.state=new Or);jr.get=jr.get,jr.has=jr.has,jr.set=jr.set,rr=function(e,t){if(jr.has(e))throw new Sr(Pr);return t.facade=e,jr.set(e,t),t},nr=function(e){return jr.get(e)||{}},or=function(e){return jr.has(e)}}else{var kr=br("state");wr[kr]=!0,rr=function(e,t){if(mr(e,kr))throw new Sr(Pr);return t.facade=e,yr(e,kr,t),t},nr=function(e){return mr(e,kr)?e[kr]:{}},or=function(e){return mr(e,kr)}}var Er={set:rr,get:nr,has:or,enforce:function(e){return or(e)?nr(e):rr(e,{})},getterFor:function(e){return function(t){var r;if(!vr(t)||(r=nr(t)).type!==e)throw new Sr("Incompatible receiver, "+e+" required");return r}}},Ar=R,Tr=Function.prototype,Rr=Tr.apply,xr=Tr.call,Ur="object"==typeof Reflect&&Reflect.apply||(Ar?xr.bind(Rr):function(){return xr.apply(Rr,arguments)}),qr=B,Cr=L,Lr=function(e){if("Function"===qr(e))return Cr(e)},Ir={},Nr={},Mr={}.propertyIsEnumerable,Br=Object.getOwnPropertyDescriptor,Fr=Br&&!Mr.call({1:2},1);Nr.f=Fr?function(e){var t=Br(this,e);return!!t&&t.enumerable}:Mr;var Hr=se,_r=Se,Gr=Nr,Dr=ir,zr=W,Jr=zt,Qr=Pt,$r=pe,Vr=Object.getOwnPropertyDescriptor;Ir.f=Hr?Vr:function(e,t){if(e=zr(e),t=Jr(t),$r)try{return Vr(e,t)}catch(e){}if(Qr(e,t))return Dr(!_r(Gr.f,e,t),e[t])};var Kr=T,Wr=te,Yr=/#|\.prototype\./,Xr=function(e,t){var r=en[Zr(e)];return r===rn||r!==tn&&(Wr(t)?Kr(t):!!t)},Zr=Xr.normalize=function(e){return String(e).replace(Yr,".").toLowerCase()},en=Xr.data={},tn=Xr.NATIVE="N",rn=Xr.POLYFILL="P",nn=Xr,on=Ze,an=R,sn=Lr(Lr.bind),un=function(e,t){return on(e),void 0===t?e:an?sn(e,t):function(){return e.apply(t,arguments)}},cn=Z,ln=Ur,hn=Lr,fn=te,dn=Ir.f,pn=nn,vn=Oe,yn=un,mn=ur,gn=Pt,bn=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return ln(e,this,arguments)};return t.prototype=e.prototype,t},wn=function(e,t){var r,n,o,i,a,s,u,c,l,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?cn:d?cn[h]:cn[h]&&cn[h].prototype,y=f?vn:vn[h]||mn(vn,h,{})[h],m=y.prototype;for(i in t)n=!(r=pn(f?i:h+(d?".":"#")+i,e.forced))&&v&&gn(v,i),s=y[i],n&&(u=e.dontCallGetSet?(l=dn(v,i))&&l.value:v[i]),a=n&&u?u:t[i],(r||p||typeof s!=typeof a)&&(c=e.bind&&n?yn(a,cn):e.wrap&&n?bn(a):p&&fn(a)?hn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&mn(c,"sham",!0),mn(y,i,c),p&&(gn(vn,o=h+"Prototype")||mn(vn,o,{}),mn(vn[o],i,a),e.real&&m&&(r||!m[i])&&mn(m,i,a)))},Pn=se,Sn=Pt,On=Function.prototype,jn=Pn&&Object.getOwnPropertyDescriptor,kn=Sn(On,"name"),En={EXISTS:kn,PROPER:kn&&"something"===function(){}.name,CONFIGURABLE:kn&&(!Pn||Pn&&jn(On,"name").configurable)},An={},Tn=Math.ceil,Rn=Math.floor,xn=Math.trunc||function(e){var t=+e;return(t>0?Rn:Tn)(t)},Un=function(e){var t=+e;return t!=t||0===t?0:xn(t)},qn=Un,Cn=Math.max,Ln=Math.min,In=function(e,t){var r=qn(e);return r<0?Cn(r+t,0):Ln(r,t)},Nn=Un,Mn=Math.min,Bn=function(e){return t=e.length,(r=Nn(t))>0?Mn(r,9007199254740991):0;var t,r},Fn=W,Hn=In,_n=Bn,Gn=function(e){return function(t,r,n){var o=Fn(t),i=_n(o);if(0===i)return!e&&-1;var a,s=Hn(n,i);if(e&&r!=r){for(;i>s;)if((a=o[s++])!=a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},Dn={includes:Gn(!0),indexOf:Gn(!1)},zn=Pt,Jn=W,Qn=Dn.indexOf,$n=fr,Vn=L([].push),Kn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wn=Kn,Yn=Object.keys||function(e){return function(e,t){var r,n=Jn(e),o=0,i=[];for(r in n)!zn($n,r)&&zn(n,r)&&Vn(i,r);for(;t.length>o;)zn(n,r=t[o++])&&(~Qn(i,r)||Vn(i,r));return i}(e,Wn)},Xn=se,Zn=ve,eo=ue,to=be,ro=W,no=Yn;An.f=Xn&&!Zn?Object.defineProperties:function(e,t){to(e);for(var r,n=ro(t),o=no(t),i=o.length,a=0;i>a;)eo.f(e,r=o[a++],n[r]);return e};var oo,io=Te("document","documentElement"),ao=be,so=An,uo=Kn,co=fr,lo=io,ho=fe,fo="prototype",po="script",vo=hr("IE_PROTO"),yo=function(){},mo=function(e){return"<"+po+">"+e+"</"+po+">"},go=function(e){e.write(mo("")),e.close();var t=e.parentWindow.Object;return e=null,t},bo=function(){try{oo=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;bo="undefined"!=typeof document?document.domain&&oo?go(oo):(t=ho("iframe"),r="java"+po+":",t.style.display="none",lo.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(mo("document.F=Object")),e.close(),e.F):go(oo);for(var n=uo.length;n--;)delete bo[fo][uo[n]];return bo()};co[vo]=!0;var wo,Po,So,Oo=Object.create||function(e,t){var r;return null!==e?(yo[fo]=ao(e),r=new yo,yo[fo]=null,r[vo]=e):r=bo(),void 0===t?r:so.f(r,t)},jo=!T((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ko=Pt,Eo=te,Ao=gt,To=jo,Ro=hr("IE_PROTO"),xo=Object,Uo=xo.prototype,qo=To?xo.getPrototypeOf:function(e){var t=Ao(e);if(ko(t,Ro))return t[Ro];var r=t.constructor;return Eo(r)&&t instanceof r?r.prototype:t instanceof xo?Uo:null},Co=ur,Lo=function(e,t,r,n){return n&&n.enumerable?e[t]=r:Co(e,t,r),e},Io=T,No=te,Mo=ae,Bo=Oo,Fo=qo,Ho=Lo,_o=It("iterator"),Go=!1;[].keys&&("next"in(So=[].keys())?(Po=Fo(Fo(So)))!==Object.prototype&&(wo=Po):Go=!0),wo=!Mo(wo)||Io((function(){var e={};return wo[_o].call(e)!==e}))?{}:Bo(wo),No(wo[_o])||Ho(wo,_o,(function(){return this}));var Do={IteratorPrototype:wo,BUGGY_SAFARI_ITERATORS:Go},zo={};zo[It("toStringTag")]="z";var Jo="[object z]"===String(zo),Qo=Jo,$o=te,Vo=B,Ko=It("toStringTag"),Wo=Object,Yo="Arguments"===Vo(function(){return arguments}()),Xo=Qo?Vo:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wo(e),Ko))?r:Yo?Vo(t):"Object"===(n=Vo(t))&&$o(t.callee)?"Arguments":n},Zo=Xo,ei=Jo?{}.toString:function(){return"[object "+Zo(this)+"]"},ti=Jo,ri=ue.f,ni=ur,oi=Pt,ii=ei,ai=It("toStringTag"),si=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(oi(o,ai)||ri(o,ai,{configurable:!0,value:t}),n&&!ti&&ni(o,"toString",ii))},ui=Do.IteratorPrototype,ci=Oo,li=ir,hi=si,fi=Y,di=function(){return this},pi=function(e,t,r,n){var o=t+" Iterator";return e.prototype=ci(ui,{next:li(+!n,r)}),hi(e,o,!1,!0),fi[o]=di,e},vi=wn,yi=Se,mi=En,gi=pi,bi=qo,wi=si,Pi=Lo,Si=Y,Oi=Do,ji=mi.PROPER,ki=Oi.BUGGY_SAFARI_ITERATORS,Ei=It("iterator"),Ai="keys",Ti="values",Ri="entries",xi=function(){return this},Ui=function(e,t,r,n,o,i,a){gi(r,t,n);var s,u,c,l=function(e){if(e===o&&v)return v;if(!ki&&e&&e in d)return d[e];switch(e){case Ai:case Ti:case Ri:return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[Ei]||d["@@iterator"]||o&&d[o],v=!ki&&p||l(o),y="Array"===t&&d.entries||p;if(y&&(s=bi(y.call(new e)))!==Object.prototype&&s.next&&(wi(s,h,!0,!0),Si[h]=xi),ji&&o===Ti&&p&&p.name!==Ti&&(f=!0,v=function(){return yi(p,this)}),o)if(u={values:l(Ti),keys:i?v:l(Ai),entries:l(Ri)},a)for(c in u)(ki||f||!(c in d))&&Pi(d,c,u[c]);else vi({target:t,proto:!0,forced:ki||f},u);return a&&d[Ei]!==v&&Pi(d,Ei,v,{name:o}),Si[t]=v,u},qi=function(e,t){return{value:e,done:t}},Ci=W,Li=Y,Ii=Er;ue.f;var Ni=Ui,Mi=qi,Bi="Array Iterator",Fi=Ii.set,Hi=Ii.getterFor(Bi);Ni(Array,"Array",(function(e,t){Fi(this,{type:Bi,target:Ci(e),index:0,kind:t})}),(function(){var e=Hi(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Mi(void 0,!0);switch(e.kind){case"keys":return Mi(r,!1);case"values":return Mi(t[r],!1)}return Mi([r,t[r]],!1)}),"values"),Li.Arguments=Li.Array;var _i=wn,Gi=L,Di=In,zi=RangeError,Ji=String.fromCharCode,Qi=String.fromCodePoint,$i=Gi([].join);_i({target:"String",stat:!0,arity:1,forced:!!Qi&&1!==Qi.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],Di(t,1114111)!==t)throw new zi(t+" is not a valid code point");r[o]=t<65536?Ji(t):Ji(55296+((t-=65536)>>10),t%1024+56320)}return $i(r,"")}});var Vi=Z,Ki=se,Wi=Object.getOwnPropertyDescriptor,Yi=T,Xi=!0,Zi=It("iterator"),ea=!Yi((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b")||!t.size&&Xi||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Zi]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})),ta=ue,ra=function(e,t,r){return ta.f(e,t,r)},na=Lo,oa=Re,ia=TypeError,aa=function(e,t){if(oa(t,e))return e;throw new ia("Incorrect invocation")},sa=Xo,ua=String,ca=function(e){if("Symbol"===sa(e))throw new TypeError("Cannot convert a Symbol value to a string");return ua(e)},la=Xo,ha=rt,fa=z,da=Y,pa=It("iterator"),va=function(e){if(!fa(e))return ha(e,pa)||ha(e,"@@iterator")||da[la(e)]},ya=Se,ma=Ze,ga=be,ba=Ke,wa=va,Pa=TypeError,Sa=function(e,t){var r=arguments.length<2?wa(e):t;if(ma(r))return ga(ya(r,e));throw new Pa(ba(e)+" is not iterable")},Oa=TypeError,ja=function(e,t){if(e<t)throw new Oa("Not enough arguments");return e},ka=L([].slice),Ea=ka,Aa=Math.floor,Ta=function(e,t){var r=e.length;if(r<8)for(var n,o,i=1;i<r;){for(o=i,n=e[i];o&&t(e[o-1],n)>0;)e[o]=e[--o];o!==i++&&(e[o]=n)}else for(var a=Aa(r/2),s=Ta(Ea(e,0,a),t),u=Ta(Ea(e,a),t),c=s.length,l=u.length,h=0,f=0;h<c||f<l;)e[h+f]=h<c&&f<l?t(s[h],u[f])<=0?s[h++]:u[f++]:h<c?s[h++]:u[f++];return e},Ra=wn,xa=Z,Ua=function(e){if(!Ki)return Vi[e];var t=Wi(Vi,e);return t&&t.value},qa=Te,Ca=Se,La=L,Ia=se,Na=ea,Ma=Lo,Ba=ra,Fa=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:na(e,n,t[n],r);return e},Ha=si,_a=pi,Ga=Er,Da=aa,za=te,Ja=Pt,Qa=un,$a=Xo,Va=be,Ka=ae,Wa=ca,Ya=Oo,Xa=ir,Za=Sa,es=va,ts=qi,rs=ja,ns=Ta,os=It("iterator"),is="URLSearchParams",as=is+"Iterator",ss=Ga.set,us=Ga.getterFor(is),cs=Ga.getterFor(as),ls=Ua("fetch"),hs=Ua("Request"),fs=Ua("Headers"),ds=hs&&hs.prototype,ps=fs&&fs.prototype,vs=xa.TypeError,ys=xa.encodeURIComponent,ms=String.fromCharCode,gs=qa("String","fromCodePoint"),bs=parseInt,ws=La("".charAt),Ps=La([].join),Ss=La([].push),Os=La("".replace),js=La([].shift),ks=La([].splice),Es=La("".split),As=La("".slice),Ts=La(/./.exec),Rs=/\+/g,xs=/^[0-9a-f]+$/i,Us=function(e,t){var r=As(e,t,t+2);return Ts(xs,r)?bs(r,16):NaN},qs=function(e){for(var t=0,r=128;r>0&&e&r;r>>=1)t++;return t},Cs=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},Ls=function(e){for(var t=(e=Os(e,Rs," ")).length,r="",n=0;n<t;){var o=ws(e,n);if("%"===o){if("%"===ws(e,n+1)||n+3>t){r+="%",n++;continue}var i=Us(e,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=qs(i);if(0===a)o=ms(i);else{if(1===a||a>4){r+="�",n++;continue}for(var s=[i],u=1;u<a&&!(3+ ++n>t||"%"!==ws(e,n));){var c=Us(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;Ss(s,c),n+=2,u++}if(s.length!==a){r+="�";continue}var l=Cs(s);null===l?r+="�":o=gs(l)}}r+=o,n++}return r},Is=/[!'()~]|%20/g,Ns={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ms=function(e){return Ns[e]},Bs=function(e){return Os(ys(e),Is,Ms)},Fs=_a((function(e,t){ss(this,{type:as,target:us(e).entries,index:0,kind:t})}),is,(function(){var e=cs(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,ts(void 0,!0);var n=t[r];switch(e.kind){case"keys":return ts(n.key,!1);case"values":return ts(n.value,!1)}return ts([n.key,n.value],!1)}),!0),Hs=function(e){this.entries=[],this.url=null,void 0!==e&&(Ka(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ws(e,0)?As(e,1):e:Wa(e)))};Hs.prototype={type:is,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,u=this.entries,c=es(e);if(c)for(r=(t=Za(e,c)).next;!(n=Ca(r,t)).done;){if(i=(o=Za(Va(n.value))).next,(a=Ca(i,o)).done||(s=Ca(i,o)).done||!Ca(i,o).done)throw new vs("Expected sequence with length 2");Ss(u,{key:Wa(a.value),value:Wa(s.value)})}else for(var l in e)Ja(e,l)&&Ss(u,{key:l,value:Wa(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,o=Es(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(r=Es(t,"="),Ss(n,{key:Ls(js(r)),value:Ls(Ps(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Ss(r,Bs(e.key)+"="+Bs(e.value));return Ps(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var _s=function(){Da(this,Gs);var e=ss(this,new Hs(arguments.length>0?arguments[0]:void 0));Ia||(this.size=e.entries.length)},Gs=_s.prototype;if(Fa(Gs,{append:function(e,t){var r=us(this);rs(arguments.length,2),Ss(r.entries,{key:Wa(e),value:Wa(t)}),Ia||this.length++,r.updateURL()},delete:function(e){for(var t=us(this),r=rs(arguments.length,1),n=t.entries,o=Wa(e),i=r<2?void 0:arguments[1],a=void 0===i?i:Wa(i),s=0;s<n.length;){var u=n[s];if(u.key!==o||void 0!==a&&u.value!==a)s++;else if(ks(n,s,1),void 0!==a)break}Ia||(this.size=n.length),t.updateURL()},get:function(e){var t=us(this).entries;rs(arguments.length,1);for(var r=Wa(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=us(this).entries;rs(arguments.length,1);for(var r=Wa(e),n=[],o=0;o<t.length;o++)t[o].key===r&&Ss(n,t[o].value);return n},has:function(e){for(var t=us(this).entries,r=rs(arguments.length,1),n=Wa(e),o=r<2?void 0:arguments[1],i=void 0===o?o:Wa(o),a=0;a<t.length;){var s=t[a++];if(s.key===n&&(void 0===i||s.value===i))return!0}return!1},set:function(e,t){var r=us(this);rs(arguments.length,1);for(var n,o=r.entries,i=!1,a=Wa(e),s=Wa(t),u=0;u<o.length;u++)(n=o[u]).key===a&&(i?ks(o,u--,1):(i=!0,n.value=s));i||Ss(o,{key:a,value:s}),Ia||(this.size=o.length),r.updateURL()},sort:function(){var e=us(this);ns(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=us(this).entries,n=Qa(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new Fs(this,"keys")},values:function(){return new Fs(this,"values")},entries:function(){return new Fs(this,"entries")}},{enumerable:!0}),Ma(Gs,os,Gs.entries,{name:"entries"}),Ma(Gs,"toString",(function(){return us(this).serialize()}),{enumerable:!0}),Ia&&Ba(Gs,"size",{get:function(){return us(this).entries.length},configurable:!0,enumerable:!0}),Ha(_s,is),Ra({global:!0,constructor:!0,forced:!Na},{URLSearchParams:_s}),!Na&&za(fs)){var Ds=La(ps.has),zs=La(ps.set),Js=function(e){if(Ka(e)){var t,r=e.body;if($a(r)===is)return t=e.headers?new fs(e.headers):new fs,Ds(t,"content-type")||zs(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ya(e,{body:Xa(0,Wa(r)),headers:Xa(0,t)})}return e};if(za(ls)&&Ra({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return ls(e,arguments.length>1?Js(arguments[1]):{})}}),za(hs)){var Qs=function(e){return Da(this,ds),new hs(e,arguments.length>1?Js(arguments[1]):{})};ds.constructor=Qs,Qs.prototype=ds,Ra({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Qs})}}var $s={URLSearchParams:_s,getState:us},Vs=L,Ks=Un,Ws=ca,Ys=$,Xs=Vs("".charAt),Zs=Vs("".charCodeAt),eu=Vs("".slice),tu=function(e){return function(t,r){var n,o,i=Ws(Ys(t)),a=Ks(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=Zs(i,a))<55296||n>56319||a+1===s||(o=Zs(i,a+1))<56320||o>57343?e?Xs(i,a):n:e?eu(i,a,a+2):o-56320+(n-55296<<10)+65536}},ru={codeAt:tu(!1),charAt:tu(!0)},nu=ru.charAt,ou=ca,iu=Er,au=Ui,su=qi,uu="String Iterator",cu=iu.set,lu=iu.getterFor(uu);au(String,"String",(function(e){cu(this,{type:uu,string:ou(e),index:0})}),(function(){var e,t=lu(this),r=t.string,n=t.index;return n>=r.length?su(void 0,!0):(e=nu(r,n),t.index+=e.length,su(e,!1))}));var hu={};hu.f=Object.getOwnPropertySymbols;var fu=se,du=L,pu=Se,vu=T,yu=Yn,mu=hu,gu=Nr,bu=gt,wu=D,Pu=Object.assign,Su=Object.defineProperty,Ou=du([].concat),ju=!Pu||vu((function(){if(fu&&1!==Pu({b:1},Pu(Su({},"a",{enumerable:!0,get:function(){Su(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==Pu({},e)[r]||yu(Pu({},t)).join("")!==n}))?function(e,t){for(var r=bu(e),n=arguments.length,o=1,i=mu.f,a=gu.f;n>o;)for(var s,u=wu(arguments[o++]),c=i?Ou(yu(u),i(u)):yu(u),l=c.length,h=0;l>h;)s=c[h++],fu&&!pu(a,u,s)||(r[s]=u[s]);return r}:Pu,ku=Se,Eu=be,Au=rt,Tu=be,Ru=Y,xu=It("iterator"),Uu=Array.prototype,qu=te,Cu=dt,Lu=L(Function.toString);qu(Cu.inspectSource)||(Cu.inspectSource=function(e){return Lu(e)});var Iu=Cu.inspectSource,Nu=L,Mu=T,Bu=te,Fu=Xo,Hu=Iu,_u=function(){},Gu=Te("Reflect","construct"),Du=/^\s*(?:class|function)\b/,zu=Nu(Du.exec),Ju=!Du.test(_u),Qu=function(e){if(!Bu(e))return!1;try{return Gu(_u,[],e),!0}catch(e){return!1}},$u=function(e){if(!Bu(e))return!1;switch(Fu(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ju||!!zu(Du,Hu(e))}catch(e){return!0}};$u.sham=!0;var Vu,Ku=!Gu||Mu((function(){var e;return Qu(Qu.call)||!Qu(Object)||!Qu((function(){e=!0}))||e}))?$u:Qu,Wu=se,Yu=ue,Xu=ir,Zu=un,ec=Se,tc=gt,rc=function(e,t,r,n){try{return n?t(Tu(r)[0],r[1]):t(r)}catch(t){!function(e,t,r){var n,o;Eu(e);try{if(!(n=Au(e,"return"))){if("throw"===t)throw r;return r}n=ku(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;Eu(n)}(e,"throw",t)}},nc=function(e){return void 0!==e&&(Ru.Array===e||Uu[xu]===e)},oc=Ku,ic=Bn,ac=function(e,t,r){Wu?Yu.f(e,t,Xu(0,r)):e[t]=r},sc=Sa,uc=va,cc=Array,lc=L,hc=2147483647,fc=/[^\0-\u007E]/,dc=/[.\u3002\uFF0E\uFF61]/g,pc="Overflow: input needs wider integers to process",vc=RangeError,yc=lc(dc.exec),mc=Math.floor,gc=String.fromCharCode,bc=lc("".charCodeAt),wc=lc([].join),Pc=lc([].push),Sc=lc("".replace),Oc=lc("".split),jc=lc("".toLowerCase),kc=function(e){return e+22+75*(e<26)},Ec=function(e,t,r){var n=0;for(e=r?mc(e/700):e>>1,e+=mc(e/t);e>455;)e=mc(e/35),n+=36;return mc(n+36*e/(e+38))},Ac=function(e){var t,r,n=[],o=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=bc(e,r++);if(o>=55296&&o<=56319&&r<n){var i=bc(e,r++);56320==(64512&i)?Pc(t,((1023&o)<<10)+(1023&i)+65536):(Pc(t,o),r--)}else Pc(t,o)}return t}(e)).length,i=128,a=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Pc(n,gc(r));var u=n.length,c=u;for(u&&Pc(n,"-");c<o;){var l=hc;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<l&&(l=r);var h=c+1;if(l-i>mc((hc-a)/h))throw new vc(pc);for(a+=(l-i)*h,i=l,t=0;t<e.length;t++){if((r=e[t])<i&&++a>hc)throw new vc(pc);if(r===i){for(var f=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var v=f-p,y=36-p;Pc(n,gc(kc(p+v%y))),f=mc(v/y),d+=36}Pc(n,gc(kc(f))),s=Ec(a,h,c===u),a=0,c++}}a++,i++}return wc(n,"")},Tc=wn,Rc=se,xc=ea,Uc=Z,qc=un,Cc=L,Lc=Lo,Ic=ra,Nc=aa,Mc=Pt,Bc=ju,Fc=function(e){var t=tc(e),r=oc(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Zu(o,n>2?arguments[2]:void 0));var a,s,u,c,l,h,f=uc(t),d=0;if(!f||this===cc&&nc(f))for(a=ic(t),s=r?new this(a):cc(a);a>d;d++)h=i?o(t[d],d):t[d],ac(s,d,h);else for(s=r?new this:[],l=(c=sc(t,f)).next;!(u=ec(l,c)).done;d++)h=i?rc(c,o,[u.value,d],!0):u.value,ac(s,d,h);return s.length=d,s},Hc=ka,_c=ru.codeAt,Gc=function(e){var t,r,n=[],o=Oc(Sc(jc(e),dc,"."),".");for(t=0;t<o.length;t++)r=o[t],Pc(n,yc(fc,r)?"xn--"+Ac(r):r);return wc(n,".")},Dc=ca,zc=si,Jc=ja,Qc=$s,$c=Er,Vc=$c.set,Kc=$c.getterFor("URL"),Wc=Qc.URLSearchParams,Yc=Qc.getState,Xc=Uc.URL,Zc=Uc.TypeError,el=Uc.parseInt,tl=Math.floor,rl=Math.pow,nl=Cc("".charAt),ol=Cc(/./.exec),il=Cc([].join),al=Cc(1.1.toString),sl=Cc([].pop),ul=Cc([].push),cl=Cc("".replace),ll=Cc([].shift),hl=Cc("".split),fl=Cc("".slice),dl=Cc("".toLowerCase),pl=Cc([].unshift),vl="Invalid scheme",yl="Invalid host",ml="Invalid port",gl=/[a-z]/i,bl=/[\d+-.a-z]/i,wl=/\d/,Pl=/^0x/i,Sl=/^[0-7]+$/,Ol=/^\d+$/,jl=/^[\da-f]+$/i,kl=/[\0\t\n\r #%/:<>?@[\\\]^|]/,El=/[\0\t\n\r #/:<>?@[\\\]^|]/,Al=/^[\u0000-\u0020]+/,Tl=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Rl=/[\t\n\r]/g,xl=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)pl(t,e%256),e=tl(e/256);return il(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=al(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ul={},ql=Bc({},Ul,{" ":1,'"':1,"<":1,">":1,"`":1}),Cl=Bc({},ql,{"#":1,"?":1,"{":1,"}":1}),Ll=Bc({},Cl,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Il=function(e,t){var r=_c(e,0);return r>32&&r<127&&!Mc(t,e)?e:encodeURIComponent(e)},Nl={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ml=function(e,t){var r;return 2===e.length&&ol(gl,nl(e,0))&&(":"===(r=nl(e,1))||!t&&"|"===r)},Bl=function(e){var t;return e.length>1&&Ml(fl(e,0,2))&&(2===e.length||"/"===(t=nl(e,2))||"\\"===t||"?"===t||"#"===t)},Fl=function(e){return"."===e||"%2e"===dl(e)},Hl={},_l={},Gl={},Dl={},zl={},Jl={},Ql={},$l={},Vl={},Kl={},Wl={},Yl={},Xl={},Zl={},eh={},th={},rh={},nh={},oh={},ih={},ah={},sh=function(e,t,r){var n,o,i,a=Dc(e);if(t){if(o=this.parse(a))throw new Zc(o);this.searchParams=null}else{if(void 0!==r&&(n=new sh(r,!0)),o=this.parse(a,null,n))throw new Zc(o);(i=Yc(new Wc)).bindURL(this),this.searchParams=i}};sh.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s,u=this,c=t||Hl,l=0,h="",f=!1,d=!1,p=!1;for(e=Dc(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=cl(e,Al,""),e=cl(e,Tl,"$1")),e=cl(e,Rl,""),n=Fc(e);l<=n.length;){switch(o=n[l],c){case Hl:if(!o||!ol(gl,o)){if(t)return vl;c=Gl;continue}h+=dl(o),c=_l;break;case _l:if(o&&(ol(bl,o)||"+"===o||"-"===o||"."===o))h+=dl(o);else{if(":"!==o){if(t)return vl;h="",c=Gl,l=0;continue}if(t&&(u.isSpecial()!==Mc(Nl,h)||"file"===h&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&Nl[u.scheme]===u.port&&(u.port=null));h="","file"===u.scheme?c=Zl:u.isSpecial()&&r&&r.scheme===u.scheme?c=Dl:u.isSpecial()?c=$l:"/"===n[l+1]?(c=zl,l++):(u.cannotBeABaseURL=!0,ul(u.path,""),c=oh)}break;case Gl:if(!r||r.cannotBeABaseURL&&"#"!==o)return vl;if(r.cannotBeABaseURL&&"#"===o){u.scheme=r.scheme,u.path=Hc(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,c=ah;break}c="file"===r.scheme?Zl:Jl;continue;case Dl:if("/"!==o||"/"!==n[l+1]){c=Jl;continue}c=Vl,l++;break;case zl:if("/"===o){c=Kl;break}c=nh;continue;case Jl:if(u.scheme=r.scheme,o===Vu)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Hc(r.path),u.query=r.query;else if("/"===o||"\\"===o&&u.isSpecial())c=Ql;else if("?"===o)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Hc(r.path),u.query="",c=ih;else{if("#"!==o){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Hc(r.path),u.path.length--,c=nh;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Hc(r.path),u.query=r.query,u.fragment="",c=ah}break;case Ql:if(!u.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,c=nh;continue}c=Kl}else c=Vl;break;case $l:if(c=Vl,"/"!==o||"/"!==nl(h,l+1))continue;l++;break;case Vl:if("/"!==o&&"\\"!==o){c=Kl;continue}break;case Kl:if("@"===o){f&&(h="%40"+h),f=!0,i=Fc(h);for(var v=0;v<i.length;v++){var y=i[v];if(":"!==y||p){var m=Il(y,Ll);p?u.password+=m:u.username+=m}else p=!0}h=""}else if(o===Vu||"/"===o||"?"===o||"#"===o||"\\"===o&&u.isSpecial()){if(f&&""===h)return"Invalid authority";l-=Fc(h).length+1,h="",c=Wl}else h+=o;break;case Wl:case Yl:if(t&&"file"===u.scheme){c=th;continue}if(":"!==o||d){if(o===Vu||"/"===o||"?"===o||"#"===o||"\\"===o&&u.isSpecial()){if(u.isSpecial()&&""===h)return yl;if(t&&""===h&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(h))return a;if(h="",c=rh,t)return;continue}"["===o?d=!0:"]"===o&&(d=!1),h+=o}else{if(""===h)return yl;if(a=u.parseHost(h))return a;if(h="",c=Xl,t===Yl)return}break;case Xl:if(!ol(wl,o)){if(o===Vu||"/"===o||"?"===o||"#"===o||"\\"===o&&u.isSpecial()||t){if(""!==h){var g=el(h,10);if(g>65535)return ml;u.port=u.isSpecial()&&g===Nl[u.scheme]?null:g,h=""}if(t)return;c=rh;continue}return ml}h+=o;break;case Zl:if(u.scheme="file","/"===o||"\\"===o)c=eh;else{if(!r||"file"!==r.scheme){c=nh;continue}switch(o){case Vu:u.host=r.host,u.path=Hc(r.path),u.query=r.query;break;case"?":u.host=r.host,u.path=Hc(r.path),u.query="",c=ih;break;case"#":u.host=r.host,u.path=Hc(r.path),u.query=r.query,u.fragment="",c=ah;break;default:Bl(il(Hc(n,l),""))||(u.host=r.host,u.path=Hc(r.path),u.shortenPath()),c=nh;continue}}break;case eh:if("/"===o||"\\"===o){c=th;break}r&&"file"===r.scheme&&!Bl(il(Hc(n,l),""))&&(Ml(r.path[0],!0)?ul(u.path,r.path[0]):u.host=r.host),c=nh;continue;case th:if(o===Vu||"/"===o||"\\"===o||"?"===o||"#"===o){if(!t&&Ml(h))c=nh;else if(""===h){if(u.host="",t)return;c=rh}else{if(a=u.parseHost(h))return a;if("localhost"===u.host&&(u.host=""),t)return;h="",c=rh}continue}h+=o;break;case rh:if(u.isSpecial()){if(c=nh,"/"!==o&&"\\"!==o)continue}else if(t||"?"!==o)if(t||"#"!==o){if(o!==Vu&&(c=nh,"/"!==o))continue}else u.fragment="",c=ah;else u.query="",c=ih;break;case nh:if(o===Vu||"/"===o||"\\"===o&&u.isSpecial()||!t&&("?"===o||"#"===o)){if(".."===(s=dl(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"===o||"\\"===o&&u.isSpecial()||ul(u.path,"")):Fl(h)?"/"===o||"\\"===o&&u.isSpecial()||ul(u.path,""):("file"===u.scheme&&!u.path.length&&Ml(h)&&(u.host&&(u.host=""),h=nl(h,0)+":"),ul(u.path,h)),h="","file"===u.scheme&&(o===Vu||"?"===o||"#"===o))for(;u.path.length>1&&""===u.path[0];)ll(u.path);"?"===o?(u.query="",c=ih):"#"===o&&(u.fragment="",c=ah)}else h+=Il(o,Cl);break;case oh:"?"===o?(u.query="",c=ih):"#"===o?(u.fragment="",c=ah):o!==Vu&&(u.path[0]+=Il(o,Ul));break;case ih:t||"#"!==o?o!==Vu&&("'"===o&&u.isSpecial()?u.query+="%27":u.query+="#"===o?"%23":Il(o,Ul)):(u.fragment="",c=ah);break;case ah:o!==Vu&&(u.fragment+=Il(o,ql))}l++}},parseHost:function(e){var t,r,n;if("["===nl(e,0)){if("]"!==nl(e,e.length-1))return yl;if(!(t=function(e){var t,r,n,o,i,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return nl(e,h)};if(":"===f()){if(":"!==nl(e,1))return;h+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(t=r=0;r<4&&ol(jl,f());)t=16*t+el(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,c>6)return;for(n=0;f();){if(o=null,n>0){if(!("."===f()&&n<4))return;h++}if(!ol(wl,f()))return;for(;ol(wl,f());){if(i=el(f(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;h++}u[c]=256*u[c]+o,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!==c)return;return u}(fl(e,1,-1))))return yl;this.host=t}else if(this.isSpecial()){if(e=Gc(e),ol(kl,e))return yl;if(null===(t=function(e){var t,r,n,o,i,a,s,u=hl(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(o=u[n]))return e;if(i=10,o.length>1&&"0"===nl(o,0)&&(i=ol(Pl,o)?16:8,o=fl(o,8===i?1:2)),""===o)a=0;else{if(!ol(10===i?Ol:8===i?Sl:jl,o))return e;a=el(o,i)}ul(r,a)}for(n=0;n<t;n++)if(a=r[n],n===t-1){if(a>=rl(256,5-t))return null}else if(a>255)return null;for(s=sl(r),n=0;n<r.length;n++)s+=r[n]*rl(256,3-n);return s}(e)))return yl;this.host=t}else{if(ol(El,e))return yl;for(t="",r=Fc(e),n=0;n<r.length;n++)t+=Il(r[n],Ul);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return Mc(Nl,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Ml(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=xl(o),null!==i&&(c+=":"+i)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+il(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new Zc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new uh(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+xl(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Dc(e)+":",Hl)},getUsername:function(){return this.username},setUsername:function(e){var t=Fc(Dc(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Il(t[r],Ll)}},getPassword:function(){return this.password},setPassword:function(e){var t=Fc(Dc(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Il(t[r],Ll)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xl(e):xl(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Wl)},getHostname:function(){var e=this.host;return null===e?"":xl(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yl)},getPort:function(){var e=this.port;return null===e?"":Dc(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=Dc(e))?this.port=null:this.parse(e,Xl))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+il(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,rh))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=Dc(e))?this.query=null:("?"===nl(e,0)&&(e=fl(e,1)),this.query="",this.parse(e,ih)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=Dc(e))?("#"===nl(e,0)&&(e=fl(e,1)),this.fragment="",this.parse(e,ah)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var uh=function(e){var t=Nc(this,ch),r=Jc(arguments.length,1)>1?arguments[1]:void 0,n=Vc(t,new sh(e,!1,r));Rc||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},ch=uh.prototype,lh=function(e,t){return{get:function(){return Kc(this)[e]()},set:t&&function(e){return Kc(this)[t](e)},configurable:!0,enumerable:!0}};if(Rc&&(Ic(ch,"href",lh("serialize","setHref")),Ic(ch,"origin",lh("getOrigin")),Ic(ch,"protocol",lh("getProtocol","setProtocol")),Ic(ch,"username",lh("getUsername","setUsername")),Ic(ch,"password",lh("getPassword","setPassword")),Ic(ch,"host",lh("getHost","setHost")),Ic(ch,"hostname",lh("getHostname","setHostname")),Ic(ch,"port",lh("getPort","setPort")),Ic(ch,"pathname",lh("getPathname","setPathname")),Ic(ch,"search",lh("getSearch","setSearch")),Ic(ch,"searchParams",lh("getSearchParams")),Ic(ch,"hash",lh("getHash","setHash"))),Lc(ch,"toJSON",(function(){return Kc(this).serialize()}),{enumerable:!0}),Lc(ch,"toString",(function(){return Kc(this).serialize()}),{enumerable:!0}),Xc){var hh=Xc.createObjectURL,fh=Xc.revokeObjectURL;hh&&Lc(uh,"createObjectURL",qc(hh,Xc)),fh&&Lc(uh,"revokeObjectURL",qc(fh,Xc))}zc(uh,"URL"),Tc({global:!0,constructor:!0,forced:!xc,sham:!Rc},{URL:uh});var dh=wn,ph=T,vh=ja,yh=ca,mh=ea,gh=Te("URL"),bh=mh&&ph((function(){gh.canParse()})),wh=ph((function(){return 1!==gh.canParse.length}));dh({target:"URL",stat:!0,forced:!bh||wh},{canParse:function(e){var t=vh(arguments.length,1),r=yh(e),n=t<2||void 0===arguments[1]?void 0:yh(arguments[1]);try{return!!new gh(r,n)}catch(e){return!1}}});var Ph=wn,Sh=ja,Oh=ca,jh=ea,kh=Te("URL");Ph({target:"URL",stat:!0,forced:!jh},{parse:function(e){var t=Sh(arguments.length,1),r=Oh(e),n=t<2||void 0===arguments[1]?void 0:Oh(arguments[1]);try{return new kh(r,n)}catch(e){return null}}});var Eh=k(Oe.URL),Ah=function(e){function t(t){var r=e.call(this,t.message)||this;return r.name="PostgrestError",r.details=t.details,r.hint=t.hint,r.code=t.code,r}return n(t,e),t}(Error),Th=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.select=function(e){var t=!1,r=(null!=e?e:"*").split("").map((function(e){return/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)})).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this},t.prototype.order=function(e,t){var r=void 0===t?{}:t,n=r.ascending,o=void 0===n||n,i=r.nullsFirst,a=r.foreignTable,s=r.referencedTable,u=void 0===s?a:s,c=u?"".concat(u,".order"):"order",l=this.url.searchParams.get(c);return this.url.searchParams.set(c,"".concat(l?"".concat(l,","):"").concat(e,".").concat(o?"asc":"desc").concat(void 0===i?"":i?".nullsfirst":".nullslast")),this},t.prototype.limit=function(e,t){var r=void 0===t?{}:t,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=void 0===i?"limit":"".concat(i,".limit");return this.url.searchParams.set(a,"".concat(e)),this},t.prototype.range=function(e,t,r){var n=void 0===r?{}:r,o=n.foreignTable,i=n.referencedTable,a=void 0===i?o:i,s=void 0===a?"offset":"".concat(a,".offset"),u=void 0===a?"limit":"".concat(a,".limit");return this.url.searchParams.set(s,"".concat(e)),this.url.searchParams.set(u,"".concat(t-e+1)),this},t.prototype.abortSignal=function(e){return this.signal=e,this},t.prototype.single=function(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this},t.prototype.maybeSingle=function(){return"GET"===this.method?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this},t.prototype.csv=function(){return this.headers.set("Accept","text/csv"),this},t.prototype.geojson=function(){return this.headers.set("Accept","application/geo+json"),this},t.prototype.explain=function(e){var t,r=void 0===e?{}:e,n=r.analyze,o=void 0!==n&&n,i=r.verbose,a=void 0!==i&&i,s=r.settings,u=void 0!==s&&s,c=r.buffers,l=void 0!==c&&c,h=r.wal,f=void 0!==h&&h,d=r.format,p=void 0===d?"text":d,v=[o?"analyze":null,a?"verbose":null,u?"settings":null,l?"buffers":null,f?"wal":null].filter(Boolean).join("|"),y=null!==(t=this.headers.get("Accept"))&&void 0!==t?t:"application/json";return this.headers.set("Accept","application/vnd.pgrst.plan+".concat(p,'; for="').concat(y,'"; options=').concat(v,";")),this},t.prototype.rollback=function(){return this.headers.append("Prefer","tx=rollback"),this},t.prototype.returns=function(){return this},t.prototype.maxAffected=function(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer","max-affected=".concat(e)),this},t}(function(){function e(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(r=e.isMaybeSingle)&&void 0!==r&&r,e.fetch?this.fetch=e.fetch:this.fetch=fetch}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.setHeader=function(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this},e.prototype.then=function(e,t){var r=this;void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json");var n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((function(e){return i(r,0,void 0,(function(){var t,r,n,o,i,s,u,c,l,h,f,d;return a(this,(function(a){switch(a.label){case 0:return t=null,r=null,n=null,o=e.status,i=e.statusText,e.ok?"HEAD"===this.method?[3,2]:[4,e.text()]:[3,3];case 1:""===(c=a.sent())||(r="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null===(l=this.headers.get("Accept"))||void 0===l?void 0:l.includes("application/vnd.pgrst.plan+text"))?c:JSON.parse(c)),a.label=2;case 2:return s=null===(h=this.headers.get("Prefer"))||void 0===h?void 0:h.match(/count=(exact|planned|estimated)/),u=null===(f=e.headers.get("content-range"))||void 0===f?void 0:f.split("/"),s&&u&&u.length>1&&(n=parseInt(u[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(r)&&(r.length>1?(t={code:"PGRST116",details:"Results contain ".concat(r.length," rows, application/vnd.pgrst.object+json requires 1 row"),hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,n=null,o=406,i="Not Acceptable"):r=1===r.length?r[0]:null),[3,5];case 3:return[4,e.text()];case 4:c=a.sent();try{t=JSON.parse(c),Array.isArray(t)&&404===e.status&&(r=[],t=null,o=200,i="OK")}catch(r){404===e.status&&""===c?(o=204,i="No Content"):t={message:c}}if(t&&this.isMaybeSingle&&(null===(d=null==t?void 0:t.details)||void 0===d?void 0:d.includes("0 rows"))&&(t=null,o=200,i="OK"),t&&this.shouldThrowOnError)throw new Ah(t);a.label=5;case 5:return[2,{error:t,data:r,count:n,status:o,statusText:i}]}}))}))}));return this.shouldThrowOnError||(n=n.catch((function(e){var t,r,n;return{error:{message:"".concat(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError",": ").concat(null==e?void 0:e.message),details:"".concat(null!==(r=null==e?void 0:e.stack)&&void 0!==r?r:""),hint:"",code:"".concat(null!==(n=null==e?void 0:e.code)&&void 0!==n?n:"")},data:null,count:null,status:0,statusText:""}}))),n.then(e,t)},e.prototype.returns=function(){return this},e.prototype.overrideTypes=function(){return this},e}()),Rh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.eq=function(e,t){return this.url.searchParams.append(e,"eq.".concat(t)),this},t.prototype.neq=function(e,t){return this.url.searchParams.append(e,"neq.".concat(t)),this},t.prototype.gt=function(e,t){return this.url.searchParams.append(e,"gt.".concat(t)),this},t.prototype.gte=function(e,t){return this.url.searchParams.append(e,"gte.".concat(t)),this},t.prototype.lt=function(e,t){return this.url.searchParams.append(e,"lt.".concat(t)),this},t.prototype.lte=function(e,t){return this.url.searchParams.append(e,"lte.".concat(t)),this},t.prototype.like=function(e,t){return this.url.searchParams.append(e,"like.".concat(t)),this},t.prototype.likeAllOf=function(e,t){return this.url.searchParams.append(e,"like(all).{".concat(t.join(","),"}")),this},t.prototype.likeAnyOf=function(e,t){return this.url.searchParams.append(e,"like(any).{".concat(t.join(","),"}")),this},t.prototype.ilike=function(e,t){return this.url.searchParams.append(e,"ilike.".concat(t)),this},t.prototype.ilikeAllOf=function(e,t){return this.url.searchParams.append(e,"ilike(all).{".concat(t.join(","),"}")),this},t.prototype.ilikeAnyOf=function(e,t){return this.url.searchParams.append(e,"ilike(any).{".concat(t.join(","),"}")),this},t.prototype.is=function(e,t){return this.url.searchParams.append(e,"is.".concat(t)),this},t.prototype.in=function(e,t){var r=Array.from(new Set(t)).map((function(e){return"string"==typeof e&&new RegExp("[,()]").test(e)?'"'.concat(e,'"'):"".concat(e)})).join(",");return this.url.searchParams.append(e,"in.(".concat(r,")")),this},t.prototype.contains=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cs.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cs.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cs.".concat(JSON.stringify(t))),this},t.prototype.containedBy=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cd.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cd.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cd.".concat(JSON.stringify(t))),this},t.prototype.rangeGt=function(e,t){return this.url.searchParams.append(e,"sr.".concat(t)),this},t.prototype.rangeGte=function(e,t){return this.url.searchParams.append(e,"nxl.".concat(t)),this},t.prototype.rangeLt=function(e,t){return this.url.searchParams.append(e,"sl.".concat(t)),this},t.prototype.rangeLte=function(e,t){return this.url.searchParams.append(e,"nxr.".concat(t)),this},t.prototype.rangeAdjacent=function(e,t){return this.url.searchParams.append(e,"adj.".concat(t)),this},t.prototype.overlaps=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"ov.".concat(t)):this.url.searchParams.append(e,"ov.{".concat(t.join(","),"}")),this},t.prototype.textSearch=function(e,t,r){var n=void 0===r?{}:r,o=n.config,i=n.type,a="";"plain"===i?a="pl":"phrase"===i?a="ph":"websearch"===i&&(a="w");var s=void 0===o?"":"(".concat(o,")");return this.url.searchParams.append(e,"".concat(a,"fts").concat(s,".").concat(t)),this},t.prototype.match=function(e){var t=this;return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t.url.searchParams.append(r,"eq.".concat(n))})),this},t.prototype.not=function(e,t,r){return this.url.searchParams.append(e,"not.".concat(t,".").concat(r)),this},t.prototype.or=function(e,t){var r=void 0===t?{}:t,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=i?"".concat(i,".or"):"or";return this.url.searchParams.append(a,"(".concat(e,")")),this},t.prototype.filter=function(e,t,r){return this.url.searchParams.append(e,"".concat(t,".").concat(r)),this},t}(Th),xh=function(e){function t(t,r){var n=r.headers,o=void 0===n?{}:n,i=r.fetch;return e.call(this,t,{headers:o,schema:void 0,fetch:i})||this}return n(t,e),t}(function(){function e(e,t){var r=t.headers,n=void 0===r?{}:r,o=t.schema,i=t.fetch;this.url=e,this.headers=new Headers(n),this.schema=o,this.fetch=i}return e.prototype.select=function(e,t){var r=void 0===t?{}:t,n=r.head,o=void 0!==n&&n,i=r.count,a=o?"HEAD":"GET",s=!1,u=(null!=e?e:"*").split("").map((function(e){return/\s/.test(e)&&!s?"":('"'===e&&(s=!s),e)})).join("");return this.url.searchParams.set("select",u),i&&this.headers.append("Prefer","count=".concat(i)),new Rh({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})},e.prototype.insert=function(e,t){var r,n=void 0===t?{}:t,o=n.count,i=n.defaultToNull,a=void 0===i||i;if(o&&this.headers.append("Prefer","count=".concat(o)),a||this.headers.append("Prefer","missing=default"),Array.isArray(e)){var s=e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]);if(s.length>0){var u=Array.from(new Set(s)).map((function(e){return'"'.concat(e,'"')}));this.url.searchParams.set("columns",u.join(","))}}return new Rh({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.upsert=function(e,t){var r,n=void 0===t?{}:t,o=n.onConflict,i=n.ignoreDuplicates,a=void 0!==i&&i,s=n.count,u=n.defaultToNull,c=void 0===u||u;if(this.headers.append("Prefer","resolution=".concat(a?"ignore":"merge","-duplicates")),void 0!==o&&this.url.searchParams.set("on_conflict",o),s&&this.headers.append("Prefer","count=".concat(s)),c||this.headers.append("Prefer","missing=default"),Array.isArray(e)){var l=e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]);if(l.length>0){var h=Array.from(new Set(l)).map((function(e){return'"'.concat(e,'"')}));this.url.searchParams.set("columns",h.join(","))}}return new Rh({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.update=function(e,t){var r,n=(void 0===t?{}:t).count;return n&&this.headers.append("Prefer","count=".concat(n)),new Rh({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.delete=function(e){var t,r=(void 0===e?{}:e).count;return r&&this.headers.append("Prefer","count=".concat(r)),new Rh({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:null!==(t=this.fetch)&&void 0!==t?t:fetch})},e}()),Uh=function(){function e(e,t){var r=void 0===t?{}:t,n=r.headers,o=void 0===n?{}:n,i=r.fetch;this.url=e,this.headers=new Headers(o),this.fetch=i}return e.prototype.from=function(e){var t=new Eh("".concat(this.url,"/").concat(e));return new xh(t,{headers:this.headers,fetch:this.fetch})},e}();function qh(e,t){if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var r=e.callFunction.bind(e);return e.models=S(r),e.mysql=Ch(e,{envId:null==t?void 0:t.envId}),e}function Ch(e,t){var r=null==t?void 0:t.envId,n=(null==t?void 0:t.mysqlBaseUrl)||Lh(e,null==t?void 0:t.envId).mysql,s=null==t?void 0:t.fetch;return function(t){var u=this;return new Uh(n,{fetch:s||function(n,s){return i(u,0,void 0,(function(){var i,u,c;return a(this,(function(a){return i=(null==t?void 0:t.instance)||"default",u=(null==t?void 0:t.database)||r,c={},(null==s?void 0:s.headers)instanceof Headers?s.headers.forEach((function(e,t){c[t]=e})):c=(null==s?void 0:s.headers)||{},[2,e.callFunction({name:"httpOverCallFunction",data:{url:n.toString(),method:(null==s?void 0:s.method)||"GET",headers:o(o({},c||{}),{"Content-Type":"application/json","X-Db-Instance":i,"Accept-Profile":u,"Content-Profile":u}),body:null==s?void 0:s.body}}).then((function(e){var t=null==e?void 0:e.result;return{ok:(null==t?void 0:t.statusCode)>=200&&(null==t?void 0:t.statusCode)<300,status:(null==t?void 0:t.statusCode)||200,statusText:(null==t?void 0:t.statusMessage)||"OK",json:function(){return Promise.resolve((null==t?void 0:t.body)||{})},text:function(){return Promise.resolve("string"==typeof(null==t?void 0:t.body)?t.body:JSON.stringify((null==t?void 0:t.body)||{}))},headers:new Headers((null==t?void 0:t.headers)||{})}}))]}))}))}})}}function Lh(e,t){var r,n,o,i,a=t||(null===(n=null===(r=null==e?void 0:e.extend)||void 0===r?void 0:r.AI)||void 0===n?void 0:n.env);if("string"==typeof a&&a.trim()||(a=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.env),"string"==typeof a&&a.trim()||(a=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.envName),"string"!=typeof a||!a.trim())throw new Error("Generating default gateway base url failed: env not found");return a=a.trim(),{model:"https://".concat(a,".api.tcloudbasegateway.com/v1/model"),sql:"https://".concat(a,".api.tcloudbasegateway.com/v1/sql"),mysql:"https://".concat(a,".api.tcloudbasegateway.com/v1/rdb/rest")}}var Ih={init:qh,generateHTTPClient:g,generateMySQLClient:Ch};e.default=Ih,e.generateHTTPClient=g,e.generateMySQLClient=Ch,e.init=qh,e.initHTTPOverCallFunction=function(e,t){var r=this;if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var n,s=e.callFunction.bind(e);try{var u=(null==t?void 0:t.baseUrl)||Lh(e,null==t?void 0:t.envId).model,c=(null==t?void 0:t.sqlBaseUrl)||Lh(e,null==t?void 0:t.envId).sql;n=g(s,(function(e){var t=e.url,n=e.body,u=e.method,c=e.headers;return i(r,0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return[4,s({name:"httpOverCallFunction",data:{url:t,method:null==u?void 0:u.toUpperCase(),headers:o(o({},c||{}),{"Content-Type":"application/json"}),body:n}})];case 1:return e=i.sent(),[2,null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.body]}}))}))}),u,{sqlBaseUrl:c})}catch(e){console.error("init http orm client failed, try call function orm",e),n=S(s)}return e.models=n,e.mysql=Ch(e,{envId:null==t?void 0:t.envId,mysqlBaseUrl:null==t?void 0:t.mysqlBaseUrl}),e},Object.defineProperty(e,"__esModule",{value:!0})}(t)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(504)})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cloudbase_mysql",[],t):"object"==typeof exports?exports.cloudbase_mysql=t():e.cloudbase_mysql=t()}("undefined"!=typeof window?window:this,(()=>(()=>{var e={504:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(840),t)},276:function(e,t,r){!function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function n(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}s((n=n.apply(e,[])).next())}))}function a(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var s=function(e){function t(t,r){var n=e.call(this,t)||this;return n.name="WxCloudSDKError",n.code=null==r?void 0:r.code,n.requestId=null==r?void 0:r.requestId,n.originError=null==r?void 0:r.originError,n}return n(t,e),t}(Error);function u(){return"undefined"!=typeof window&&window||"undefined"!=typeof globalThis&&globalThis}function c(){try{var e=u();if(!e)return;return"undefined"==typeof wx?u().location.href:e.__wxRoute}catch(e){}}var l=function(e){var t=e.dataSourceName,r=e.methodName,n=e.params,o=e.realMethodName,l=e.callFunction,h=e.envType,f=void 0===h?"prod":h,d=e.mode;return e.cloud,i(void 0,0,void 0,(function(){var e,i,h,p,v,y;return a(this,(function(a){switch(a.label){case 0:e={data:{},requestId:""},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,l({name:"lowcode-datasource",data:{dataSourceName:t,methodName:r,params:n,userAgent:(g=u(),(null==g?void 0:g.navigator)?g.navigator.userAgent:"undefined"!=typeof wx&&wx.getSystemInfo?(wx.getSystemInfo({success:function(e){e&&(m=["brand","model","version","system","platform","SDKVersion","language"].map((function(t){return"".concat(t,": ").concat(e[t])})).join(", "))}}),m):void 0),referrer:c(),"x-sdk-version":"1.8.6-beta.1",envType:f,mode:d}})];case 2:if(i=a.sent(),h=(null===(v=null==i?void 0:i.result)||void 0===v?void 0:v.requestId)||(null==i?void 0:i.requestId)||(null==i?void 0:i.requestID),null==i?void 0:i.result.code)throw new s("【错误】".concat(null==i?void 0:i.result.message,"\n【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(o,"\n【错误码】").concat(null==i?void 0:i.result.code,"\n【请求ID】").concat(h||"N/A"),{code:null==i?void 0:i.result.code,requestId:h});return e.data=(null===(y=null==i?void 0:i.result)||void 0===y?void 0:y.data)||{},e.requestId=h,[3,4];case 3:throw"WxCloudSDKError"===(p=a.sent()).name?p:(console.log(p),new s("【错误】".concat(p.message,"\n 【操作】调用 models.").concat(t?"".concat(t,"."):"").concat(o,"\n 【请求ID】N/A"),{code:"UnknownError",originError:p}));case 4:return[2,e]}var m,g}))}))},h=function(e){var t=e.sql,r=e.params,n=e.config,o=e.callFunction,s=e.unsafe,u=void 0!==s&&s,c=e.cloud;return i(void 0,0,void 0,(function(){return a(this,(function(e){return[2,l({realMethodName:"$runSQL",methodName:"callWedaApi",params:{action:"RunMysqlCommand",data:{sqlTemplate:t,config:n,parameter:u?"":Object.entries(r||{}).reduce((function(e,t){var r=t[0],n=t[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}e.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return e}),[])||[]}},callFunction:o,mode:"sdk",cloud:c})]}))}))},f=function(e,t){return{$runSQL:function(r,n,s){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,h({sql:r,params:n,config:o(o({},s),{preparedStatements:!0}),callFunction:e,cloud:t})];case 1:return[2,i.sent()]}}))}))},$runSQLRaw:function(r,n){return i(this,0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,h({sql:r,params:[],config:o(o({},n),{preparedStatements:!1}),callFunction:e,cloud:t})];case 1:return[2,i.sent()]}}))}))}}},d={filter:{where:{}},select:{$master:!0}};function p(e){return{getUrl:function(t){return"".concat(t,"/").concat(e)},method:"post"}}var v={get:o(o({},p("get")),{defaultParams:o({},d)}),list:o(o({},p("list")),{defaultParams:o({},d)}),create:p("create"),createMany:p("createMany"),update:o(o({},p("update")),{method:"put"}),updateMany:o(o({},p("updateMany")),{method:"put"}),upsert:p("upsert"),delete:p("delete"),deleteMany:p("deleteMany")},y="Unknown error occurred",m="NotSupported",g=function(e,t,r,n){var o=f(e,null==n?void 0:n.cloud);return new Proxy({},{get:function(e,i){if("string"==typeof i)return Object.prototype.hasOwnProperty.call(o,i)?o[i]:w(r,i,t,n)}})},b=function(e,t,r,n,o){return new s("【错误】".concat(e,"\n【操作】调用 models.").concat(t,".").concat(r,"\n【错误码】").concat(n,"\n【请求ID】").concat(o),{code:n,requestId:o})},w=function(e,t,r,n){var u=new Proxy({},{get:function(u,c){if("runSQLTemplate"!==c){var l=v[c];if(!l){var h=new Error("不支持的操作: ".concat(c));throw new s(h.message||y,{originError:h,code:m,requestId:"N/A"})}return function(n){return void 0===n&&(n={}),i(void 0,0,void 0,(function(){var o,i,u,h,f,d,p,v,m,g;return a(this,(function(a){switch(a.label){case 0:o=l.getUrl,i=l.method,u=l.defaultParams,h=void 0===u?{}:u,f=Object.assign({},h,n),d="pre"===f.envType?"pre":"prod",p=[e,d,o(t)].join("/"),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:p,body:JSON.stringify(f),method:i})];case 2:if((v=a.sent()).code)throw b(null==v?void 0:v.message,t,c,null==v?void 0:v.code,null==v?void 0:v.requestId);return"get"===c&&Object.assign(v,{data:null!==(g=v.data.record)&&void 0!==g?g:v.data}),[2,v];case 3:throw m=a.sent(),new s((null==m?void 0:m.message)||y,{originError:m});case 4:return[2]}}))}))}}if(!(null==n?void 0:n.sqlBaseUrl))throw h=new Error("不支持的操作: ".concat(c)),new s(h.message||y,{originError:h,code:m,requestId:"N/A"});return function(e){return i(void 0,0,void 0,(function(){var i,u,l,h,f,d,p,v,m,g,w,P,S,O,j,k;return a(this,(function(a){switch(a.label){case 0:i=e.params,u=e.templateName,l=e.envType,h="pre"===l?"pre":"prod",f=[n.sqlBaseUrl,h,u,"run"].join("/"),d=Object.entries(i||{}).reduce((function(e,t){var r=t[0],n=t[1];if(void 0!==n){var o="OBJECT";switch(typeof n){case"boolean":o="BOOLEAN";break;case"number":o="NUMBER";break;case"string":o="STRING";break;default:o=Array.isArray(n)?"ARRAY":"OBJECT"}e.push({key:r,type:o,value:"STRING"===o?n:JSON.stringify(n)})}return e}),[]),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r({url:f,body:JSON.stringify({parameter:d}),method:"POST"})];case 2:if(p=a.sent(),null===(m=null==p?void 0:p.Response)||void 0===m?void 0:m.Error)throw b(null===(w=null===(g=null==p?void 0:p.Response)||void 0===g?void 0:g.Error)||void 0===w?void 0:w.Message,t,c,null===(S=null===(P=null==p?void 0:p.Response)||void 0===P?void 0:P.Error)||void 0===S?void 0:S.Code,null===(O=null==p?void 0:p.Response)||void 0===O?void 0:O.RequestId);return[2,o(o({},null!==(j=null==p?void 0:p.Response)&&void 0!==j?j:{}),{data:null===(k=null==p?void 0:p.Response)||void 0===k?void 0:k.Data})];case 3:throw v=a.sent(),new s((null==v?void 0:v.message)||y,{originError:v});case 4:return[2]}}))}))}}});return u},P={create:{methodName:"wedaCreateV2"},createMany:{methodName:"wedaBatchCreateV2"},update:{methodName:"wedaUpdateV2"},upsert:{methodName:"wedaUpsertV2"},updateMany:{methodName:"wedaBatchUpdateV2"},delete:{methodName:"wedaDeleteV2"},deleteMany:{methodName:"wedaBatchDeleteV2"},get:{methodName:"wedaGetItemV2",defaultParams:{filter:{where:{}},select:{$master:!0}}},list:{methodName:"wedaGetRecordsV2",defaultParams:{filter:{where:{}},select:{$master:!0}}}},S=function(e,t){var r=f(e,t);return new Proxy({},{get:function(n,u){if("string"==typeof u)return Object.prototype.hasOwnProperty.call(r,u)?r[u]:function(e,t,r){return new Proxy({},{get:function(n,u){var c=P[u];if(!c){var h=new Error("不支持的操作: ".concat(u));throw new s(h.message||"Unknown error occurred",{originError:h,code:"NotSupported",requestId:"N/A"})}return function(n){return i(void 0,0,void 0,(function(){var i,s,h,f,d;return a(this,(function(a){switch(a.label){case 0:return i=o(o({},c.defaultParams||{}),n||{}),[4,l({callFunction:t,dataSourceName:e,methodName:c.methodName,realMethodName:u,params:i,envType:null==n?void 0:n.envType,cloud:r})];case 1:return s=a.sent(),h={data:{}},f=c.responseKey,h.data=f?null===(d=null==s?void 0:s.data)||void 0===d?void 0:d[f]:null==s?void 0:s.data,[2,h]}}))}))}}})}(u,e,t)}})},O=function(){function e(e){var t=this;this.map=new Map,e&&(e instanceof Headers?e.forEach((function(e,r){t.append(r,e)})):Array.isArray(e)?e.forEach((function(e){var r=e[0],n=e[1];t.append(r,n)})):"object"==typeof e&&Object.keys(e).forEach((function(r){t.append(r,e[r])})))}return e.prototype.append=function(e,t){var r=e.toLowerCase(),n=this.map.get(r);n?this.map.set(r,"".concat(n,", ").concat(t)):this.map.set(r,String(t))},e.prototype.delete=function(e){this.map.delete(e.toLowerCase())},e.prototype.forEach=function(e,t){var r=this;this.map.forEach((function(n,o){e.call(t,n,o,r)}))},e.prototype.get=function(e){return this.map.get(e.toLowerCase())||null},e.prototype.has=function(e){return this.map.has(e.toLowerCase())},e.prototype.set=function(e,t){this.map.set(e.toLowerCase(),String(t))},e.prototype.entries=function(){return this.map.entries()},e.prototype.keys=function(){return this.map.keys()},e.prototype.values=function(){return this.map.values()},e.prototype.getSetCookie=function(){var e=[];return this.map.forEach((function(t,r){"set-cookie"===r&&e.push(t)})),e},e.prototype.toJSON=function(){var e={};return this.map.forEach((function(t,r){e[r]=t})),e},e.prototype[Symbol.iterator]=function(){return this.entries()},e}();"object"!=typeof globalThis||globalThis.Headers||(globalThis.Headers=O);var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};var k,E,A=function(e){try{return!!e()}catch(e){return!0}},T=!A((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),R=T,x=Function.prototype,U=x.call,C=R&&x.bind.bind(U,U),q=R?C:function(e){return function(){return U.apply(e,arguments)}},L=q,I=L({}.toString),N=L("".slice),M=function(e){return N(I(e),8,-1)},B=A,H=M,F=Object,_=q("".split),G=B((function(){return!F("z").propertyIsEnumerable(0)}))?function(e){return"String"===H(e)?_(e,""):F(e)}:F,D=function(e){return null==e},z=D,J=TypeError,Q=function(e){if(z(e))throw new J("Can't call method on "+e);return e},$=G,V=Q,K=function(e){return $(V(e))},W={},Y=function(e){return e&&e.Math===Math&&e},X=Y("object"==typeof globalThis&&globalThis)||Y("object"==typeof window&&window)||Y("object"==typeof self&&self)||Y("object"==typeof j&&j)||Y("object"==typeof j&&j)||function(){return this}()||Function("return this")(),Z="object"==typeof document&&document.all,ee=void 0===Z&&void 0!==Z?function(e){return"function"==typeof e||e===Z}:function(e){return"function"==typeof e},te=ee,re=X.WeakMap,ne=te(re)&&/native code/.test(String(re)),oe=ee,ie=function(e){return"object"==typeof e?null!==e:oe(e)},ae=!A((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),se={},ue=ie,ce=X.document,le=ue(ce)&&ue(ce.createElement),he=function(e){return le?ce.createElement(e):{}},fe=he,de=!ae&&!A((function(){return 7!==Object.defineProperty(fe("div"),"a",{get:function(){return 7}}).a})),pe=ae&&A((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ve=ie,ye=String,me=TypeError,ge=function(e){if(ve(e))return e;throw new me(ye(e)+" is not an object")},be=T,we=Function.prototype.call,Pe=be?we.bind(we):function(){return we.apply(we,arguments)},Se={},Oe=Se,je=X,ke=ee,Ee=function(e){return ke(e)?e:void 0},Ae=function(e,t){return arguments.length<2?Ee(Oe[e])||Ee(je[e]):Oe[e]&&Oe[e][t]||je[e]&&je[e][t]},Te=q({}.isPrototypeOf),Re=X.navigator,xe=Re&&Re.userAgent,Ue=X,Ce=xe?String(xe):"",qe=Ue.process,Le=Ue.Deno,Ie=qe&&qe.versions||Le&&Le.version,Ne=Ie&&Ie.v8;Ne&&(E=(k=Ne.split("."))[0]>0&&k[0]<4?1:+(k[0]+k[1])),!E&&Ce&&(!(k=Ce.match(/Edge\/(\d+)/))||k[1]>=74)&&(k=Ce.match(/Chrome\/(\d+)/))&&(E=+k[1]);var Me=E,Be=A,He=X.String,Fe=!!Object.getOwnPropertySymbols&&!Be((function(){var e=Symbol("symbol detection");return!He(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Me&&Me<41})),_e=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=Ae,De=ee,ze=Te,Je=Object,Qe=_e?function(e){return"symbol"==typeof e}:function(e){var t=Ge("Symbol");return De(t)&&ze(t.prototype,Je(e))},$e=String,Ve=function(e){try{return $e(e)}catch(e){return"Object"}},Ke=ee,We=Ve,Ye=TypeError,Xe=function(e){if(Ke(e))return e;throw new Ye(We(e)+" is not a function")},Ze=Xe,et=D,tt=function(e,t){var r=e[t];return et(r)?void 0:Ze(r)},rt=Pe,nt=ee,ot=ie,it=TypeError,at={exports:{}},st=X,ut=Object.defineProperty,ct=X,lt="__core-js_shared__",ht=at.exports=ct[lt]||function(e,t){try{ut(st,e,{value:t,configurable:!0,writable:!0})}catch(r){st[e]=t}return t}(lt,{});(ht.versions||(ht.versions=[])).push({version:"3.45.0",mode:"pure",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ft=at.exports,dt=ft,pt=function(e,t){return dt[e]||(dt[e]=t||{})},vt=Q,yt=Object,mt=function(e){return yt(vt(e))},gt=mt,bt=q({}.hasOwnProperty),wt=Object.hasOwn||function(e,t){return bt(gt(e),t)},Pt=q,St=0,Ot=Math.random(),jt=Pt(1.1.toString),kt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+jt(++St+Ot,36)},Et=pt,At=wt,Tt=kt,Rt=Fe,xt=_e,Ut=X.Symbol,Ct=Et("wks"),qt=xt?Ut.for||Ut:Ut&&Ut.withoutSetter||Tt,Lt=function(e){return At(Ct,e)||(Ct[e]=Rt&&At(Ut,e)?Ut[e]:qt("Symbol."+e)),Ct[e]},It=Pe,Nt=ie,Mt=Qe,Bt=tt,Ht=TypeError,Ft=Lt("toPrimitive"),_t=function(e,t){if(!Nt(e)||Mt(e))return e;var r,n=Bt(e,Ft);if(n){if(void 0===t&&(t="default"),r=It(n,e,t),!Nt(r)||Mt(r))return r;throw new Ht("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&nt(r=e.toString)&&!ot(n=rt(r,e)))return n;if(nt(r=e.valueOf)&&!ot(n=rt(r,e)))return n;if("string"!==t&&nt(r=e.toString)&&!ot(n=rt(r,e)))return n;throw new it("Can't convert object to primitive value")}(e,t)},Gt=Qe,Dt=function(e){var t=_t(e,"string");return Gt(t)?t:t+""},zt=ae,Jt=de,Qt=pe,$t=ge,Vt=Dt,Kt=TypeError,Wt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Xt="enumerable",Zt="configurable",er="writable";se.f=zt?Qt?function(e,t,r){if($t(e),t=Vt(t),$t(r),"function"==typeof e&&"prototype"===t&&"value"in r&&er in r&&!r[er]){var n=Yt(e,t);n&&n[er]&&(e[t]=r.value,r={configurable:Zt in r?r[Zt]:n[Zt],enumerable:Xt in r?r[Xt]:n[Xt],writable:!1})}return Wt(e,t,r)}:Wt:function(e,t,r){if($t(e),t=Vt(t),$t(r),Jt)try{return Wt(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Kt("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var tr,rr,nr,or=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ir=se,ar=or,sr=ae?function(e,t,r){return ir.f(e,t,ar(1,r))}:function(e,t,r){return e[t]=r,e},ur=kt,cr=pt("keys"),lr=function(e){return cr[e]||(cr[e]=ur(e))},hr={},fr=ne,dr=X,pr=ie,vr=sr,yr=wt,mr=ft,gr=lr,br=hr,wr="Object already initialized",Pr=dr.TypeError,Sr=dr.WeakMap;if(fr||mr.state){var Or=mr.state||(mr.state=new Sr);Or.get=Or.get,Or.has=Or.has,Or.set=Or.set,tr=function(e,t){if(Or.has(e))throw new Pr(wr);return t.facade=e,Or.set(e,t),t},rr=function(e){return Or.get(e)||{}},nr=function(e){return Or.has(e)}}else{var jr=gr("state");br[jr]=!0,tr=function(e,t){if(yr(e,jr))throw new Pr(wr);return t.facade=e,vr(e,jr,t),t},rr=function(e){return yr(e,jr)?e[jr]:{}},nr=function(e){return yr(e,jr)}}var kr={set:tr,get:rr,has:nr,enforce:function(e){return nr(e)?rr(e):tr(e,{})},getterFor:function(e){return function(t){var r;if(!pr(t)||(r=rr(t)).type!==e)throw new Pr("Incompatible receiver, "+e+" required");return r}}},Er=T,Ar=Function.prototype,Tr=Ar.apply,Rr=Ar.call,xr="object"==typeof Reflect&&Reflect.apply||(Er?Rr.bind(Tr):function(){return Rr.apply(Tr,arguments)}),Ur=M,Cr=q,qr=function(e){if("Function"===Ur(e))return Cr(e)},Lr={},Ir={},Nr={}.propertyIsEnumerable,Mr=Object.getOwnPropertyDescriptor,Br=Mr&&!Nr.call({1:2},1);Ir.f=Br?function(e){var t=Mr(this,e);return!!t&&t.enumerable}:Nr;var Hr=ae,Fr=Pe,_r=Ir,Gr=or,Dr=K,zr=Dt,Jr=wt,Qr=de,$r=Object.getOwnPropertyDescriptor;Lr.f=Hr?$r:function(e,t){if(e=Dr(e),t=zr(t),Qr)try{return $r(e,t)}catch(e){}if(Jr(e,t))return Gr(!Fr(_r.f,e,t),e[t])};var Vr=A,Kr=ee,Wr=/#|\.prototype\./,Yr=function(e,t){var r=Zr[Xr(e)];return r===tn||r!==en&&(Kr(t)?Vr(t):!!t)},Xr=Yr.normalize=function(e){return String(e).replace(Wr,".").toLowerCase()},Zr=Yr.data={},en=Yr.NATIVE="N",tn=Yr.POLYFILL="P",rn=Yr,nn=Xe,on=T,an=qr(qr.bind),sn=function(e,t){return nn(e),void 0===t?e:on?an(e,t):function(){return e.apply(t,arguments)}},un=X,cn=xr,ln=qr,hn=ee,fn=Lr.f,dn=rn,pn=Se,vn=sn,yn=sr,mn=wt,gn=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return cn(e,this,arguments)};return t.prototype=e.prototype,t},bn=function(e,t){var r,n,o,i,a,s,u,c,l,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?un:d?un[h]:un[h]&&un[h].prototype,y=f?pn:pn[h]||yn(pn,h,{})[h],m=y.prototype;for(i in t)n=!(r=dn(f?i:h+(d?".":"#")+i,e.forced))&&v&&mn(v,i),s=y[i],n&&(u=e.dontCallGetSet?(l=fn(v,i))&&l.value:v[i]),a=n&&u?u:t[i],(r||p||typeof s!=typeof a)&&(c=e.bind&&n?vn(a,un):e.wrap&&n?gn(a):p&&hn(a)?ln(a):a,(e.sham||a&&a.sham||s&&s.sham)&&yn(c,"sham",!0),yn(y,i,c),p&&(mn(pn,o=h+"Prototype")||yn(pn,o,{}),yn(pn[o],i,a),e.real&&m&&(r||!m[i])&&yn(m,i,a)))},wn=ae,Pn=wt,Sn=Function.prototype,On=wn&&Object.getOwnPropertyDescriptor,jn=Pn(Sn,"name"),kn={EXISTS:jn,PROPER:jn&&"something"===function(){}.name,CONFIGURABLE:jn&&(!wn||wn&&On(Sn,"name").configurable)},En={},An=Math.ceil,Tn=Math.floor,Rn=Math.trunc||function(e){var t=+e;return(t>0?Tn:An)(t)},xn=function(e){var t=+e;return t!=t||0===t?0:Rn(t)},Un=xn,Cn=Math.max,qn=Math.min,Ln=function(e,t){var r=Un(e);return r<0?Cn(r+t,0):qn(r,t)},In=xn,Nn=Math.min,Mn=function(e){return function(e){var t=In(e);return t>0?Nn(t,9007199254740991):0}(e.length)},Bn=K,Hn=Ln,Fn=Mn,_n=function(e){return function(t,r,n){var o=Bn(t),i=Fn(o);if(0===i)return!e&&-1;var a,s=Hn(n,i);if(e&&r!=r){for(;i>s;)if((a=o[s++])!=a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},Gn={includes:_n(!0),indexOf:_n(!1)},Dn=wt,zn=K,Jn=Gn.indexOf,Qn=hr,$n=q([].push),Vn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Kn=Vn,Wn=Object.keys||function(e){return function(e,t){var r,n=zn(e),o=0,i=[];for(r in n)!Dn(Qn,r)&&Dn(n,r)&&$n(i,r);for(;t.length>o;)Dn(n,r=t[o++])&&(~Jn(i,r)||$n(i,r));return i}(e,Kn)},Yn=ae,Xn=pe,Zn=se,eo=ge,to=K,ro=Wn;En.f=Yn&&!Xn?Object.defineProperties:function(e,t){eo(e);for(var r,n=to(t),o=ro(t),i=o.length,a=0;i>a;)Zn.f(e,r=o[a++],n[r]);return e};var no,oo=Ae("document","documentElement"),io=ge,ao=En,so=Vn,uo=hr,co=oo,lo=he,ho="prototype",fo="script",po=lr("IE_PROTO"),vo=function(){},yo=function(e){return"<"+fo+">"+e+"</"+fo+">"},mo=function(e){e.write(yo("")),e.close();var t=e.parentWindow.Object;return e=null,t},go=function(){try{no=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;go="undefined"!=typeof document?document.domain&&no?mo(no):(t=lo("iframe"),r="java"+fo+":",t.style.display="none",co.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(yo("document.F=Object")),e.close(),e.F):mo(no);for(var n=so.length;n--;)delete go[ho][so[n]];return go()};uo[po]=!0;var bo,wo,Po,So=Object.create||function(e,t){var r;return null!==e?(vo[ho]=io(e),r=new vo,vo[ho]=null,r[po]=e):r=go(),void 0===t?r:ao.f(r,t)},Oo=!A((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),jo=wt,ko=ee,Eo=mt,Ao=Oo,To=lr("IE_PROTO"),Ro=Object,xo=Ro.prototype,Uo=Ao?Ro.getPrototypeOf:function(e){var t=Eo(e);if(jo(t,To))return t[To];var r=t.constructor;return ko(r)&&t instanceof r?r.prototype:t instanceof Ro?xo:null},Co=sr,qo=function(e,t,r,n){return n&&n.enumerable?e[t]=r:Co(e,t,r),e},Lo=A,Io=ee,No=ie,Mo=So,Bo=Uo,Ho=qo,Fo=Lt("iterator"),_o=!1;[].keys&&("next"in(Po=[].keys())?(wo=Bo(Bo(Po)))!==Object.prototype&&(bo=wo):_o=!0);var Go=!No(bo)||Lo((function(){var e={};return bo[Fo].call(e)!==e}));Io((bo=Go?{}:Mo(bo))[Fo])||Ho(bo,Fo,(function(){return this}));var Do={IteratorPrototype:bo,BUGGY_SAFARI_ITERATORS:_o},zo={};zo[Lt("toStringTag")]="z";var Jo="[object z]"===String(zo),Qo=Jo,$o=ee,Vo=M,Ko=Lt("toStringTag"),Wo=Object,Yo="Arguments"===Vo(function(){return arguments}()),Xo=Qo?Vo:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Wo(e),Ko))?r:Yo?Vo(t):"Object"===(n=Vo(t))&&$o(t.callee)?"Arguments":n},Zo=Xo,ei=Jo?{}.toString:function(){return"[object "+Zo(this)+"]"},ti=Jo,ri=se.f,ni=sr,oi=wt,ii=ei,ai=Lt("toStringTag"),si=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(oi(o,ai)||ri(o,ai,{configurable:!0,value:t}),n&&!ti&&ni(o,"toString",ii))},ui=Do.IteratorPrototype,ci=So,li=or,hi=si,fi=W,di=function(){return this},pi=function(e,t,r,n){var o=t+" Iterator";return e.prototype=ci(ui,{next:li(+!n,r)}),hi(e,o,!1,!0),fi[o]=di,e},vi=bn,yi=Pe,mi=pi,gi=Uo,bi=si,wi=qo,Pi=W,Si=kn.PROPER,Oi=Do.BUGGY_SAFARI_ITERATORS,ji=Lt("iterator"),ki="keys",Ei="values",Ai="entries",Ti=function(){return this},Ri=function(e,t,r,n,o,i,a){mi(r,t,n);var s,u,c,l=function(e){if(e===o&&v)return v;if(!Oi&&e&&e in d)return d[e];switch(e){case ki:case Ei:case Ai:return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[ji]||d["@@iterator"]||o&&d[o],v=!Oi&&p||l(o),y="Array"===t&&d.entries||p;if(y&&(s=gi(y.call(new e)))!==Object.prototype&&s.next&&(bi(s,h,!0,!0),Pi[h]=Ti),Si&&o===Ei&&p&&p.name!==Ei&&(f=!0,v=function(){return yi(p,this)}),o)if(u={values:l(Ei),keys:i?v:l(ki),entries:l(Ai)},a)for(c in u)(Oi||f||!(c in d))&&wi(d,c,u[c]);else vi({target:t,proto:!0,forced:Oi||f},u);return a&&d[ji]!==v&&wi(d,ji,v,{name:o}),Pi[t]=v,u},xi=function(e,t){return{value:e,done:t}},Ui=K,Ci=W,qi=kr;se.f;var Li=Ri,Ii=xi,Ni="Array Iterator",Mi=qi.set,Bi=qi.getterFor(Ni);Li(Array,"Array",(function(e,t){Mi(this,{type:Ni,target:Ui(e),index:0,kind:t})}),(function(){var e=Bi(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Ii(void 0,!0);switch(e.kind){case"keys":return Ii(r,!1);case"values":return Ii(t[r],!1)}return Ii([r,t[r]],!1)}),"values"),Ci.Arguments=Ci.Array;var Hi=bn,Fi=q,_i=Ln,Gi=RangeError,Di=String.fromCharCode,zi=String.fromCodePoint,Ji=Fi([].join);Hi({target:"String",stat:!0,arity:1,forced:!!zi&&1!==zi.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],_i(t,1114111)!==t)throw new Gi(t+" is not a valid code point");r[o]=t<65536?Di(t):Di(55296+((t-=65536)>>10),t%1024+56320)}return Ji(r,"")}});var Qi=X,$i=ae,Vi=Object.getOwnPropertyDescriptor,Ki=A,Wi=Lt("iterator"),Yi=!Ki((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b")||!t.size&&true||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Wi]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})),Xi=se,Zi=function(e,t,r){return Xi.f(e,t,r)},ea=qo,ta=Te,ra=TypeError,na=function(e,t){if(ta(t,e))return e;throw new ra("Incorrect invocation")},oa=Xo,ia=String,aa=function(e){if("Symbol"===oa(e))throw new TypeError("Cannot convert a Symbol value to a string");return ia(e)},sa=Xo,ua=tt,ca=D,la=W,ha=Lt("iterator"),fa=function(e){if(!ca(e))return ua(e,ha)||ua(e,"@@iterator")||la[sa(e)]},da=Pe,pa=Xe,va=ge,ya=Ve,ma=fa,ga=TypeError,ba=function(e,t){var r=arguments.length<2?ma(e):t;if(pa(r))return va(da(r,e));throw new ga(ya(e)+" is not iterable")},wa=TypeError,Pa=function(e,t){if(e<t)throw new wa("Not enough arguments");return e},Sa=q([].slice),Oa=Sa,ja=Math.floor,ka=function(e,t){var r=e.length;if(r<8)for(var n,o,i=1;i<r;){for(o=i,n=e[i];o&&t(e[o-1],n)>0;)e[o]=e[--o];o!==i++&&(e[o]=n)}else for(var a=ja(r/2),s=ka(Oa(e,0,a),t),u=ka(Oa(e,a),t),c=s.length,l=u.length,h=0,f=0;h<c||f<l;)e[h+f]=h<c&&f<l?t(s[h],u[f])<=0?s[h++]:u[f++]:h<c?s[h++]:u[f++];return e},Ea=bn,Aa=X,Ta=function(e){if(!$i)return Qi[e];var t=Vi(Qi,e);return t&&t.value},Ra=Ae,xa=Pe,Ua=q,Ca=ae,qa=Yi,La=qo,Ia=Zi,Na=si,Ma=pi,Ba=kr,Ha=na,Fa=ee,_a=wt,Ga=sn,Da=Xo,za=ge,Ja=ie,Qa=aa,$a=So,Va=or,Ka=ba,Wa=fa,Ya=xi,Xa=Pa,Za=ka,es=Lt("iterator"),ts="URLSearchParams",rs=ts+"Iterator",ns=Ba.set,os=Ba.getterFor(ts),is=Ba.getterFor(rs),as=Ta("fetch"),ss=Ta("Request"),us=Ta("Headers"),cs=ss&&ss.prototype,ls=us&&us.prototype,hs=Aa.TypeError,fs=Aa.encodeURIComponent,ds=String.fromCharCode,ps=Ra("String","fromCodePoint"),vs=parseInt,ys=Ua("".charAt),ms=Ua([].join),gs=Ua([].push),bs=Ua("".replace),ws=Ua([].shift),Ps=Ua([].splice),Ss=Ua("".split),Os=Ua("".slice),js=Ua(/./.exec),ks=/\+/g,Es=/^[0-9a-f]+$/i,As=function(e,t){var r=Os(e,t,t+2);return js(Es,r)?vs(r,16):NaN},Ts=function(e){for(var t=0,r=128;r>0&&e&r;r>>=1)t++;return t},Rs=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},xs=function(e){for(var t=(e=bs(e,ks," ")).length,r="",n=0;n<t;){var o=ys(e,n);if("%"===o){if("%"===ys(e,n+1)||n+3>t){r+="%",n++;continue}var i=As(e,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=Ts(i);if(0===a)o=ds(i);else{if(1===a||a>4){r+="�",n++;continue}for(var s=[i],u=1;u<a&&!(3+ ++n>t||"%"!==ys(e,n));){var c=As(e,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;gs(s,c),n+=2,u++}if(s.length!==a){r+="�";continue}var l=Rs(s);null===l?r+="�":o=ps(l)}}r+=o,n++}return r},Us=/[!'()~]|%20/g,Cs={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},qs=function(e){return Cs[e]},Ls=function(e){return bs(fs(e),Us,qs)},Is=Ma((function(e,t){ns(this,{type:rs,target:os(e).entries,index:0,kind:t})}),ts,(function(){var e=is(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Ya(void 0,!0);var n=t[r];switch(e.kind){case"keys":return Ya(n.key,!1);case"values":return Ya(n.value,!1)}return Ya([n.key,n.value],!1)}),!0),Ns=function(e){this.entries=[],this.url=null,void 0!==e&&(Ja(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===ys(e,0)?Os(e,1):e:Qa(e)))};Ns.prototype={type:ts,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,u=this.entries,c=Wa(e);if(c)for(r=(t=Ka(e,c)).next;!(n=xa(r,t)).done;){if(i=(o=Ka(za(n.value))).next,(a=xa(i,o)).done||(s=xa(i,o)).done||!xa(i,o).done)throw new hs("Expected sequence with length 2");gs(u,{key:Qa(a.value),value:Qa(s.value)})}else for(var l in e)_a(e,l)&&gs(u,{key:l,value:Qa(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,o=Ss(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(r=Ss(t,"="),gs(n,{key:xs(ws(r)),value:xs(ms(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],gs(r,Ls(e.key)+"="+Ls(e.value));return ms(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ms=function(){Ha(this,Bs);var e=ns(this,new Ns(arguments.length>0?arguments[0]:void 0));Ca||(this.size=e.entries.length)},Bs=Ms.prototype;if(function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:ea(e,n,t[n],r)}(Bs,{append:function(e,t){var r=os(this);Xa(arguments.length,2),gs(r.entries,{key:Qa(e),value:Qa(t)}),Ca||this.length++,r.updateURL()},delete:function(e){for(var t=os(this),r=Xa(arguments.length,1),n=t.entries,o=Qa(e),i=r<2?void 0:arguments[1],a=void 0===i?i:Qa(i),s=0;s<n.length;){var u=n[s];if(u.key!==o||void 0!==a&&u.value!==a)s++;else if(Ps(n,s,1),void 0!==a)break}Ca||(this.size=n.length),t.updateURL()},get:function(e){var t=os(this).entries;Xa(arguments.length,1);for(var r=Qa(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=os(this).entries;Xa(arguments.length,1);for(var r=Qa(e),n=[],o=0;o<t.length;o++)t[o].key===r&&gs(n,t[o].value);return n},has:function(e){for(var t=os(this).entries,r=Xa(arguments.length,1),n=Qa(e),o=r<2?void 0:arguments[1],i=void 0===o?o:Qa(o),a=0;a<t.length;){var s=t[a++];if(s.key===n&&(void 0===i||s.value===i))return!0}return!1},set:function(e,t){var r=os(this);Xa(arguments.length,1);for(var n,o=r.entries,i=!1,a=Qa(e),s=Qa(t),u=0;u<o.length;u++)(n=o[u]).key===a&&(i?Ps(o,u--,1):(i=!0,n.value=s));i||gs(o,{key:a,value:s}),Ca||(this.size=o.length),r.updateURL()},sort:function(){var e=os(this);Za(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=os(this).entries,n=Ga(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new Is(this,"keys")},values:function(){return new Is(this,"values")},entries:function(){return new Is(this,"entries")}},{enumerable:!0}),La(Bs,es,Bs.entries,{name:"entries"}),La(Bs,"toString",(function(){return os(this).serialize()}),{enumerable:!0}),Ca&&Ia(Bs,"size",{get:function(){return os(this).entries.length},configurable:!0,enumerable:!0}),Na(Ms,ts),Ea({global:!0,constructor:!0,forced:!qa},{URLSearchParams:Ms}),!qa&&Fa(us)){var Hs=Ua(ls.has),Fs=Ua(ls.set),_s=function(e){if(Ja(e)){var t,r=e.body;if(Da(r)===ts)return t=e.headers?new us(e.headers):new us,Hs(t,"content-type")||Fs(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),$a(e,{body:Va(0,Qa(r)),headers:Va(0,t)})}return e};if(Fa(as)&&Ea({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return as(e,arguments.length>1?_s(arguments[1]):{})}}),Fa(ss)){var Gs=function(e){return Ha(this,cs),new ss(e,arguments.length>1?_s(arguments[1]):{})};cs.constructor=Gs,Gs.prototype=cs,Ea({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Gs})}}var Ds={URLSearchParams:Ms,getState:os},zs=q,Js=xn,Qs=aa,$s=Q,Vs=zs("".charAt),Ks=zs("".charCodeAt),Ws=zs("".slice),Ys=function(e){return function(t,r){var n,o,i=Qs($s(t)),a=Js(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=Ks(i,a))<55296||n>56319||a+1===s||(o=Ks(i,a+1))<56320||o>57343?e?Vs(i,a):n:e?Ws(i,a,a+2):o-56320+(n-55296<<10)+65536}},Xs={codeAt:Ys(!1),charAt:Ys(!0)},Zs=Xs.charAt,eu=aa,tu=kr,ru=Ri,nu=xi,ou="String Iterator",iu=tu.set,au=tu.getterFor(ou);ru(String,"String",(function(e){iu(this,{type:ou,string:eu(e),index:0})}),(function(){var e,t=au(this),r=t.string,n=t.index;return n>=r.length?nu(void 0,!0):(e=Zs(r,n),t.index+=e.length,nu(e,!1))}));var su={};su.f=Object.getOwnPropertySymbols;var uu=ae,cu=q,lu=Pe,hu=A,fu=Wn,du=su,pu=Ir,vu=mt,yu=G,mu=Object.assign,gu=Object.defineProperty,bu=cu([].concat),wu=!mu||hu((function(){if(uu&&1!==mu({b:1},mu(gu({},"a",{enumerable:!0,get:function(){gu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==mu({},e)[r]||fu(mu({},t)).join("")!==n}))?function(e,t){for(var r=vu(e),n=arguments.length,o=1,i=du.f,a=pu.f;n>o;)for(var s,u=yu(arguments[o++]),c=i?bu(fu(u),i(u)):fu(u),l=c.length,h=0;l>h;)s=c[h++],uu&&!lu(a,u,s)||(r[s]=u[s]);return r}:mu,Pu=Pe,Su=ge,Ou=tt,ju=ge,ku=W,Eu=Lt("iterator"),Au=Array.prototype,Tu=ee,Ru=ft,xu=q(Function.toString);Tu(Ru.inspectSource)||(Ru.inspectSource=function(e){return xu(e)});var Uu=Ru.inspectSource,Cu=q,qu=A,Lu=ee,Iu=Xo,Nu=Uu,Mu=function(){},Bu=Ae("Reflect","construct"),Hu=/^\s*(?:class|function)\b/,Fu=Cu(Hu.exec),_u=!Hu.test(Mu),Gu=function(e){if(!Lu(e))return!1;try{return Bu(Mu,[],e),!0}catch(e){return!1}},Du=function(e){if(!Lu(e))return!1;switch(Iu(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _u||!!Fu(Hu,Nu(e))}catch(e){return!0}};Du.sham=!0;var zu,Ju=!Bu||qu((function(){var e;return Gu(Gu.call)||!Gu(Object)||!Gu((function(){e=!0}))||e}))?Du:Gu,Qu=ae,$u=se,Vu=or,Ku=sn,Wu=Pe,Yu=mt,Xu=function(e,t,r,n){try{return n?t(ju(r)[0],r[1]):t(r)}catch(t){!function(e,t,r){var n,o;Su(e);try{if(!(n=Ou(e,"return"))){if("throw"===t)throw r;return r}n=Pu(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;Su(n)}(e,"throw",t)}},Zu=Ju,ec=Mn,tc=function(e,t,r){Qu?$u.f(e,t,Vu(0,r)):e[t]=r},rc=ba,nc=fa,oc=Array,ic=q,ac=2147483647,sc=/[^\0-\u007E]/,uc=/[.\u3002\uFF0E\uFF61]/g,cc="Overflow: input needs wider integers to process",lc=RangeError,hc=ic(uc.exec),fc=Math.floor,dc=String.fromCharCode,pc=ic("".charCodeAt),vc=ic([].join),yc=ic([].push),mc=ic("".replace),gc=ic("".split),bc=ic("".toLowerCase),wc=function(e){return e+22+75*(e<26)},Pc=function(e,t,r){var n=0;for(e=r?fc(e/700):e>>1,e+=fc(e/t);e>455;)e=fc(e/35),n+=36;return fc(n+36*e/(e+38))},Sc=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=pc(e,r++);if(o>=55296&&o<=56319&&r<n){var i=pc(e,r++);56320==(64512&i)?yc(t,((1023&o)<<10)+(1023&i)+65536):(yc(t,o),r--)}else yc(t,o)}return t}(e);var r,n,o=e.length,i=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&yc(t,dc(n));var u=t.length,c=u;for(u&&yc(t,"-");c<o;){var l=ac;for(r=0;r<e.length;r++)(n=e[r])>=i&&n<l&&(l=n);var h=c+1;if(l-i>fc((ac-a)/h))throw new lc(cc);for(a+=(l-i)*h,i=l,r=0;r<e.length;r++){if((n=e[r])<i&&++a>ac)throw new lc(cc);if(n===i){for(var f=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var v=f-p,y=36-p;yc(t,dc(wc(p+v%y))),f=fc(v/y),d+=36}yc(t,dc(wc(f))),s=Pc(a,h,c===u),a=0,c++}}a++,i++}return vc(t,"")},Oc=bn,jc=ae,kc=Yi,Ec=X,Ac=sn,Tc=q,Rc=qo,xc=Zi,Uc=na,Cc=wt,qc=wu,Lc=function(e){var t=Yu(e),r=Zu(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Ku(o,n>2?arguments[2]:void 0));var a,s,u,c,l,h,f=nc(t),d=0;if(!f||this===oc&&function(e){return void 0!==e&&(ku.Array===e||Au[Eu]===e)}(f))for(a=ec(t),s=r?new this(a):oc(a);a>d;d++)h=i?o(t[d],d):t[d],tc(s,d,h);else for(s=r?new this:[],l=(c=rc(t,f)).next;!(u=Wu(l,c)).done;d++)h=i?Xu(c,o,[u.value,d],!0):u.value,tc(s,d,h);return s.length=d,s},Ic=Sa,Nc=Xs.codeAt,Mc=aa,Bc=si,Hc=Pa,Fc=Ds,_c=kr,Gc=_c.set,Dc=_c.getterFor("URL"),zc=Fc.URLSearchParams,Jc=Fc.getState,Qc=Ec.URL,$c=Ec.TypeError,Vc=Ec.parseInt,Kc=Math.floor,Wc=Math.pow,Yc=Tc("".charAt),Xc=Tc(/./.exec),Zc=Tc([].join),el=Tc(1.1.toString),tl=Tc([].pop),rl=Tc([].push),nl=Tc("".replace),ol=Tc([].shift),il=Tc("".split),al=Tc("".slice),sl=Tc("".toLowerCase),ul=Tc([].unshift),cl="Invalid scheme",ll="Invalid host",hl="Invalid port",fl=/[a-z]/i,dl=/[\d+-.a-z]/i,pl=/\d/,vl=/^0x/i,yl=/^[0-7]+$/,ml=/^\d+$/,gl=/^[\da-f]+$/i,bl=/[\0\t\n\r #%/:<>?@[\\\]^|]/,wl=/[\0\t\n\r #/:<>?@[\\\]^|]/,Pl=/^[\u0000-\u0020]+/,Sl=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ol=/[\t\n\r]/g,jl=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)ul(t,e%256),e=Kc(e/256);return Zc(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=el(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},kl={},El=qc({},kl,{" ":1,'"':1,"<":1,">":1,"`":1}),Al=qc({},El,{"#":1,"?":1,"{":1,"}":1}),Tl=qc({},Al,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Rl=function(e,t){var r=Nc(e,0);return r>32&&r<127&&!Cc(t,e)?e:encodeURIComponent(e)},xl={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ul=function(e,t){var r;return 2===e.length&&Xc(fl,Yc(e,0))&&(":"===(r=Yc(e,1))||!t&&"|"===r)},Cl=function(e){var t;return e.length>1&&Ul(al(e,0,2))&&(2===e.length||"/"===(t=Yc(e,2))||"\\"===t||"?"===t||"#"===t)},ql=function(e){return"."===e||"%2e"===sl(e)},Ll=function(e){return".."===(e=sl(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},Il={},Nl={},Ml={},Bl={},Hl={},Fl={},_l={},Gl={},Dl={},zl={},Jl={},Ql={},$l={},Vl={},Kl={},Wl={},Yl={},Xl={},Zl={},eh={},th={},rh=function(e,t,r){var n,o,i,a=Mc(e);if(t){if(o=this.parse(a))throw new $c(o);this.searchParams=null}else{if(void 0!==r&&(n=new rh(r,!0)),o=this.parse(a,null,n))throw new $c(o);(i=Jc(new zc)).bindURL(this),this.searchParams=i}};rh.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s=this,u=t||Il,c=0,l="",h=!1,f=!1,d=!1;for(e=Mc(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=nl(e,Pl,""),e=nl(e,Sl,"$1")),e=nl(e,Ol,""),n=Lc(e);c<=n.length;){switch(o=n[c],u){case Il:if(!o||!Xc(fl,o)){if(t)return cl;u=Ml;continue}l+=sl(o),u=Nl;break;case Nl:if(o&&(Xc(dl,o)||"+"===o||"-"===o||"."===o))l+=sl(o);else{if(":"!==o){if(t)return cl;l="",u=Ml,c=0;continue}if(t&&(s.isSpecial()!==Cc(xl,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,t)return void(s.isSpecial()&&xl[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?u=Vl:s.isSpecial()&&r&&r.scheme===s.scheme?u=Bl:s.isSpecial()?u=Gl:"/"===n[c+1]?(u=Hl,c++):(s.cannotBeABaseURL=!0,rl(s.path,""),u=Zl)}break;case Ml:if(!r||r.cannotBeABaseURL&&"#"!==o)return cl;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=Ic(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,u=th;break}u="file"===r.scheme?Vl:Fl;continue;case Bl:if("/"!==o||"/"!==n[c+1]){u=Fl;continue}u=Dl,c++;break;case Hl:if("/"===o){u=zl;break}u=Xl;continue;case Fl:if(s.scheme=r.scheme,o===zu)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Ic(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())u=_l;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Ic(r.path),s.query="",u=eh;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Ic(r.path),s.path.length--,u=Xl;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=Ic(r.path),s.query=r.query,s.fragment="",u=th}break;case _l:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,u=Xl;continue}u=zl}else u=Dl;break;case Gl:if(u=Dl,"/"!==o||"/"!==Yc(l,c+1))continue;c++;break;case Dl:if("/"!==o&&"\\"!==o){u=zl;continue}break;case zl:if("@"===o){h&&(l="%40"+l),h=!0,i=Lc(l);for(var p=0;p<i.length;p++){var v=i[p];if(":"!==v||d){var y=Rl(v,Tl);d?s.password+=y:s.username+=y}else d=!0}l=""}else if(o===zu||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(h&&""===l)return"Invalid authority";c-=Lc(l).length+1,l="",u=Jl}else l+=o;break;case Jl:case Ql:if(t&&"file"===s.scheme){u=Wl;continue}if(":"!==o||f){if(o===zu||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(s.isSpecial()&&""===l)return ll;if(t&&""===l&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(l))return a;if(l="",u=Yl,t)return;continue}"["===o?f=!0:"]"===o&&(f=!1),l+=o}else{if(""===l)return ll;if(a=s.parseHost(l))return a;if(l="",u=$l,t===Ql)return}break;case $l:if(!Xc(pl,o)){if(o===zu||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()||t){if(""!==l){var m=Vc(l,10);if(m>65535)return hl;s.port=s.isSpecial()&&m===xl[s.scheme]?null:m,l=""}if(t)return;u=Yl;continue}return hl}l+=o;break;case Vl:if(s.scheme="file","/"===o||"\\"===o)u=Kl;else{if(!r||"file"!==r.scheme){u=Xl;continue}switch(o){case zu:s.host=r.host,s.path=Ic(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=Ic(r.path),s.query="",u=eh;break;case"#":s.host=r.host,s.path=Ic(r.path),s.query=r.query,s.fragment="",u=th;break;default:Cl(Zc(Ic(n,c),""))||(s.host=r.host,s.path=Ic(r.path),s.shortenPath()),u=Xl;continue}}break;case Kl:if("/"===o||"\\"===o){u=Wl;break}r&&"file"===r.scheme&&!Cl(Zc(Ic(n,c),""))&&(Ul(r.path[0],!0)?rl(s.path,r.path[0]):s.host=r.host),u=Xl;continue;case Wl:if(o===zu||"/"===o||"\\"===o||"?"===o||"#"===o){if(!t&&Ul(l))u=Xl;else if(""===l){if(s.host="",t)return;u=Yl}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),t)return;l="",u=Yl}continue}l+=o;break;case Yl:if(s.isSpecial()){if(u=Xl,"/"!==o&&"\\"!==o)continue}else if(t||"?"!==o)if(t||"#"!==o){if(o!==zu&&(u=Xl,"/"!==o))continue}else s.fragment="",u=th;else s.query="",u=eh;break;case Xl:if(o===zu||"/"===o||"\\"===o&&s.isSpecial()||!t&&("?"===o||"#"===o)){if(Ll(l)?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||rl(s.path,"")):ql(l)?"/"===o||"\\"===o&&s.isSpecial()||rl(s.path,""):("file"===s.scheme&&!s.path.length&&Ul(l)&&(s.host&&(s.host=""),l=Yc(l,0)+":"),rl(s.path,l)),l="","file"===s.scheme&&(o===zu||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)ol(s.path);"?"===o?(s.query="",u=eh):"#"===o&&(s.fragment="",u=th)}else l+=Rl(o,Al);break;case Zl:"?"===o?(s.query="",u=eh):"#"===o?(s.fragment="",u=th):o!==zu&&(s.path[0]+=Rl(o,kl));break;case eh:t||"#"!==o?o!==zu&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":Rl(o,kl)):(s.fragment="",u=th);break;case th:o!==zu&&(s.fragment+=Rl(o,El))}c++}},parseHost:function(e){var t,r,n;if("["===Yc(e,0)){if("]"!==Yc(e,e.length-1))return ll;if(t=function(e){var t,r,n,o,i,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return Yc(e,h)};if(":"===f()){if(":"!==Yc(e,1))return;h+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(t=r=0;r<4&&Xc(gl,f());)t=16*t+Vc(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,c>6)return;for(n=0;f();){if(o=null,n>0){if(!("."===f()&&n<4))return;h++}if(!Xc(pl,f()))return;for(;Xc(pl,f());){if(i=Vc(f(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;h++}u[c]=256*u[c]+o,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!==c)return;return u}(al(e,1,-1)),!t)return ll;this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],o=gc(mc(bc(e),uc,"."),".");for(t=0;t<o.length;t++)r=o[t],yc(n,hc(sc,r)?"xn--"+Sc(r):r);return vc(n,".")}(e),Xc(bl,e))return ll;if(t=function(e){var t,r,n,o,i,a,s,u=il(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(o=u[n]))return e;if(i=10,o.length>1&&"0"===Yc(o,0)&&(i=Xc(vl,o)?16:8,o=al(o,8===i?1:2)),""===o)a=0;else{if(!Xc(10===i?ml:8===i?yl:gl,o))return e;a=Vc(o,i)}rl(r,a)}for(n=0;n<t;n++)if(a=r[n],n===t-1){if(a>=Wc(256,5-t))return null}else if(a>255)return null;for(s=tl(r),n=0;n<r.length;n++)s+=r[n]*Wc(256,3-n);return s}(e),null===t)return ll;this.host=t}else{if(Xc(wl,e))return ll;for(t="",r=Lc(e),n=0;n<r.length;n++)t+=Rl(r[n],kl);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return Cc(xl,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Ul(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=jl(o),null!==i&&(c+=":"+i)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+Zc(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new $c(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new nh(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+jl(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Mc(e)+":",Il)},getUsername:function(){return this.username},setUsername:function(e){var t=Lc(Mc(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Rl(t[r],Tl)}},getPassword:function(){return this.password},setPassword:function(e){var t=Lc(Mc(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Rl(t[r],Tl)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?jl(e):jl(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Jl)},getHostname:function(){var e=this.host;return null===e?"":jl(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ql)},getPort:function(){var e=this.port;return null===e?"":Mc(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=Mc(e))?this.port=null:this.parse(e,$l))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Zc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Yl))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=Mc(e))?this.query=null:("?"===Yc(e,0)&&(e=al(e,1)),this.query="",this.parse(e,eh)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=Mc(e))?("#"===Yc(e,0)&&(e=al(e,1)),this.fragment="",this.parse(e,th)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nh=function(e){var t=Uc(this,oh),r=Hc(arguments.length,1)>1?arguments[1]:void 0,n=Gc(t,new rh(e,!1,r));jc||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},oh=nh.prototype,ih=function(e,t){return{get:function(){return Dc(this)[e]()},set:t&&function(e){return Dc(this)[t](e)},configurable:!0,enumerable:!0}};if(jc&&(xc(oh,"href",ih("serialize","setHref")),xc(oh,"origin",ih("getOrigin")),xc(oh,"protocol",ih("getProtocol","setProtocol")),xc(oh,"username",ih("getUsername","setUsername")),xc(oh,"password",ih("getPassword","setPassword")),xc(oh,"host",ih("getHost","setHost")),xc(oh,"hostname",ih("getHostname","setHostname")),xc(oh,"port",ih("getPort","setPort")),xc(oh,"pathname",ih("getPathname","setPathname")),xc(oh,"search",ih("getSearch","setSearch")),xc(oh,"searchParams",ih("getSearchParams")),xc(oh,"hash",ih("getHash","setHash"))),Rc(oh,"toJSON",(function(){return Dc(this).serialize()}),{enumerable:!0}),Rc(oh,"toString",(function(){return Dc(this).serialize()}),{enumerable:!0}),Qc){var ah=Qc.createObjectURL,sh=Qc.revokeObjectURL;ah&&Rc(nh,"createObjectURL",Ac(ah,Qc)),sh&&Rc(nh,"revokeObjectURL",Ac(sh,Qc))}Bc(nh,"URL"),Oc({global:!0,constructor:!0,forced:!kc,sham:!jc},{URL:nh});var uh=bn,ch=A,lh=Pa,hh=aa,fh=Yi,dh=Ae("URL"),ph=fh&&ch((function(){dh.canParse()})),vh=ch((function(){return 1!==dh.canParse.length}));uh({target:"URL",stat:!0,forced:!ph||vh},{canParse:function(e){var t=lh(arguments.length,1),r=hh(e),n=t<2||void 0===arguments[1]?void 0:hh(arguments[1]);try{return!!new dh(r,n)}catch(e){return!1}}});var yh=bn,mh=Pa,gh=aa,bh=Yi,wh=Ae("URL");yh({target:"URL",stat:!0,forced:!bh},{parse:function(e){var t=mh(arguments.length,1),r=gh(e),n=t<2||void 0===arguments[1]?void 0:gh(arguments[1]);try{return new wh(r,n)}catch(e){return null}}});var Ph=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Se.URL),Sh=function(e){function t(t){var r=e.call(this,t.message)||this;return r.name="PostgrestError",r.details=t.details,r.hint=t.hint,r.code=t.code,r}return n(t,e),t}(Error),Oh=function(){function e(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(r=e.isMaybeSingle)&&void 0!==r&&r,e.fetch?this.fetch=e.fetch:this.fetch=fetch}return e.prototype.throwOnError=function(){return this.shouldThrowOnError=!0,this},e.prototype.setHeader=function(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this},e.prototype.then=function(e,t){var r=this;void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json");var n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((function(e){return i(r,0,void 0,(function(){var t,r,n,o,i,s,u,c,l,h,f,d;return a(this,(function(a){switch(a.label){case 0:return t=null,r=null,n=null,o=e.status,i=e.statusText,e.ok?"HEAD"===this.method?[3,2]:[4,e.text()]:[3,3];case 1:""===(c=a.sent())||(r="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null===(l=this.headers.get("Accept"))||void 0===l?void 0:l.includes("application/vnd.pgrst.plan+text"))?c:JSON.parse(c)),a.label=2;case 2:return s=null===(h=this.headers.get("Prefer"))||void 0===h?void 0:h.match(/count=(exact|planned|estimated)/),u=null===(f=e.headers.get("content-range"))||void 0===f?void 0:f.split("/"),s&&u&&u.length>1&&(n=parseInt(u[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(r)&&(r.length>1?(t={code:"PGRST116",details:"Results contain ".concat(r.length," rows, application/vnd.pgrst.object+json requires 1 row"),hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,n=null,o=406,i="Not Acceptable"):r=1===r.length?r[0]:null),[3,5];case 3:return[4,e.text()];case 4:c=a.sent();try{t=JSON.parse(c),Array.isArray(t)&&404===e.status&&(r=[],t=null,o=200,i="OK")}catch(r){404===e.status&&""===c?(o=204,i="No Content"):t={message:c}}if(t&&this.isMaybeSingle&&(null===(d=null==t?void 0:t.details)||void 0===d?void 0:d.includes("0 rows"))&&(t=null,o=200,i="OK"),t&&this.shouldThrowOnError)throw new Sh(t);a.label=5;case 5:return[2,{error:t,data:r,count:n,status:o,statusText:i}]}}))}))}));return this.shouldThrowOnError||(n=n.catch((function(e){var t,r,n;return{error:{message:"".concat(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError",": ").concat(null==e?void 0:e.message),details:"".concat(null!==(r=null==e?void 0:e.stack)&&void 0!==r?r:""),hint:"",code:"".concat(null!==(n=null==e?void 0:e.code)&&void 0!==n?n:"")},data:null,count:null,status:0,statusText:""}}))),n.then(e,t)},e.prototype.returns=function(){return this},e.prototype.overrideTypes=function(){return this},e}(),jh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.select=function(e){var t=!1,r=(null!=e?e:"*").split("").map((function(e){return/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)})).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this},t.prototype.order=function(e,t){var r=void 0===t?{}:t,n=r.ascending,o=void 0===n||n,i=r.nullsFirst,a=r.foreignTable,s=r.referencedTable,u=void 0===s?a:s,c=u?"".concat(u,".order"):"order",l=this.url.searchParams.get(c);return this.url.searchParams.set(c,"".concat(l?"".concat(l,","):"").concat(e,".").concat(o?"asc":"desc").concat(void 0===i?"":i?".nullsfirst":".nullslast")),this},t.prototype.limit=function(e,t){var r=void 0===t?{}:t,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=void 0===i?"limit":"".concat(i,".limit");return this.url.searchParams.set(a,"".concat(e)),this},t.prototype.range=function(e,t,r){var n=void 0===r?{}:r,o=n.foreignTable,i=n.referencedTable,a=void 0===i?o:i,s=void 0===a?"offset":"".concat(a,".offset"),u=void 0===a?"limit":"".concat(a,".limit");return this.url.searchParams.set(s,"".concat(e)),this.url.searchParams.set(u,"".concat(t-e+1)),this},t.prototype.abortSignal=function(e){return this.signal=e,this},t.prototype.single=function(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this},t.prototype.maybeSingle=function(){return"GET"===this.method?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this},t.prototype.csv=function(){return this.headers.set("Accept","text/csv"),this},t.prototype.geojson=function(){return this.headers.set("Accept","application/geo+json"),this},t.prototype.explain=function(e){var t,r=void 0===e?{}:e,n=r.analyze,o=void 0!==n&&n,i=r.verbose,a=void 0!==i&&i,s=r.settings,u=void 0!==s&&s,c=r.buffers,l=void 0!==c&&c,h=r.wal,f=void 0!==h&&h,d=r.format,p=void 0===d?"text":d,v=[o?"analyze":null,a?"verbose":null,u?"settings":null,l?"buffers":null,f?"wal":null].filter(Boolean).join("|"),y=null!==(t=this.headers.get("Accept"))&&void 0!==t?t:"application/json";return this.headers.set("Accept","application/vnd.pgrst.plan+".concat(p,'; for="').concat(y,'"; options=').concat(v,";")),this},t.prototype.rollback=function(){return this.headers.append("Prefer","tx=rollback"),this},t.prototype.returns=function(){return this},t.prototype.maxAffected=function(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer","max-affected=".concat(e)),this},t}(Oh),kh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.eq=function(e,t){return this.url.searchParams.append(e,"eq.".concat(t)),this},t.prototype.neq=function(e,t){return this.url.searchParams.append(e,"neq.".concat(t)),this},t.prototype.gt=function(e,t){return this.url.searchParams.append(e,"gt.".concat(t)),this},t.prototype.gte=function(e,t){return this.url.searchParams.append(e,"gte.".concat(t)),this},t.prototype.lt=function(e,t){return this.url.searchParams.append(e,"lt.".concat(t)),this},t.prototype.lte=function(e,t){return this.url.searchParams.append(e,"lte.".concat(t)),this},t.prototype.like=function(e,t){return this.url.searchParams.append(e,"like.".concat(t)),this},t.prototype.likeAllOf=function(e,t){return this.url.searchParams.append(e,"like(all).{".concat(t.join(","),"}")),this},t.prototype.likeAnyOf=function(e,t){return this.url.searchParams.append(e,"like(any).{".concat(t.join(","),"}")),this},t.prototype.ilike=function(e,t){return this.url.searchParams.append(e,"ilike.".concat(t)),this},t.prototype.ilikeAllOf=function(e,t){return this.url.searchParams.append(e,"ilike(all).{".concat(t.join(","),"}")),this},t.prototype.ilikeAnyOf=function(e,t){return this.url.searchParams.append(e,"ilike(any).{".concat(t.join(","),"}")),this},t.prototype.is=function(e,t){return this.url.searchParams.append(e,"is.".concat(t)),this},t.prototype.in=function(e,t){var r=Array.from(new Set(t)).map((function(e){return"string"==typeof e&&new RegExp("[,()]").test(e)?'"'.concat(e,'"'):"".concat(e)})).join(",");return this.url.searchParams.append(e,"in.(".concat(r,")")),this},t.prototype.contains=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cs.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cs.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cs.".concat(JSON.stringify(t))),this},t.prototype.containedBy=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cd.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cd.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cd.".concat(JSON.stringify(t))),this},t.prototype.rangeGt=function(e,t){return this.url.searchParams.append(e,"sr.".concat(t)),this},t.prototype.rangeGte=function(e,t){return this.url.searchParams.append(e,"nxl.".concat(t)),this},t.prototype.rangeLt=function(e,t){return this.url.searchParams.append(e,"sl.".concat(t)),this},t.prototype.rangeLte=function(e,t){return this.url.searchParams.append(e,"nxr.".concat(t)),this},t.prototype.rangeAdjacent=function(e,t){return this.url.searchParams.append(e,"adj.".concat(t)),this},t.prototype.overlaps=function(e,t){return"string"==typeof t?this.url.searchParams.append(e,"ov.".concat(t)):this.url.searchParams.append(e,"ov.{".concat(t.join(","),"}")),this},t.prototype.textSearch=function(e,t,r){var n=void 0===r?{}:r,o=n.config,i=n.type,a="";"plain"===i?a="pl":"phrase"===i?a="ph":"websearch"===i&&(a="w");var s=void 0===o?"":"(".concat(o,")");return this.url.searchParams.append(e,"".concat(a,"fts").concat(s,".").concat(t)),this},t.prototype.match=function(e){var t=this;return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t.url.searchParams.append(r,"eq.".concat(n))})),this},t.prototype.not=function(e,t,r){return this.url.searchParams.append(e,"not.".concat(t,".").concat(r)),this},t.prototype.or=function(e,t){var r=void 0===t?{}:t,n=r.foreignTable,o=r.referencedTable,i=void 0===o?n:o,a=i?"".concat(i,".or"):"or";return this.url.searchParams.append(a,"(".concat(e,")")),this},t.prototype.filter=function(e,t,r){return this.url.searchParams.append(e,"".concat(t,".").concat(r)),this},t}(jh),Eh=function(){function e(e,t){var r=t.headers,n=void 0===r?{}:r,o=t.schema,i=t.fetch;this.url=e,this.headers=new Headers(n),this.schema=o,this.fetch=i}return e.prototype.select=function(e,t){var r=void 0===t?{}:t,n=r.head,o=void 0!==n&&n,i=r.count,a=o?"HEAD":"GET",s=!1,u=(null!=e?e:"*").split("").map((function(e){return/\s/.test(e)&&!s?"":('"'===e&&(s=!s),e)})).join("");return this.url.searchParams.set("select",u),i&&this.headers.append("Prefer","count=".concat(i)),new kh({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})},e.prototype.insert=function(e,t){var r,n=void 0===t?{}:t,o=n.count,i=n.defaultToNull,a=void 0===i||i;if(o&&this.headers.append("Prefer","count=".concat(o)),a||this.headers.append("Prefer","missing=default"),Array.isArray(e)){var s=e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]);if(s.length>0){var u=Array.from(new Set(s)).map((function(e){return'"'.concat(e,'"')}));this.url.searchParams.set("columns",u.join(","))}}return new kh({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.upsert=function(e,t){var r,n=void 0===t?{}:t,o=n.onConflict,i=n.ignoreDuplicates,a=void 0!==i&&i,s=n.count,u=n.defaultToNull,c=void 0===u||u;if(this.headers.append("Prefer","resolution=".concat(a?"ignore":"merge","-duplicates")),void 0!==o&&this.url.searchParams.set("on_conflict",o),s&&this.headers.append("Prefer","count=".concat(s)),c||this.headers.append("Prefer","missing=default"),Array.isArray(e)){var l=e.reduce((function(e,t){return e.concat(Object.keys(t))}),[]);if(l.length>0){var h=Array.from(new Set(l)).map((function(e){return'"'.concat(e,'"')}));this.url.searchParams.set("columns",h.join(","))}}return new kh({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.update=function(e,t){var r,n=(void 0===t?{}:t).count;return n&&this.headers.append("Prefer","count=".concat(n)),new kh({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})},e.prototype.delete=function(e){var t,r=(void 0===e?{}:e).count;return r&&this.headers.append("Prefer","count=".concat(r)),new kh({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:null!==(t=this.fetch)&&void 0!==t?t:fetch})},e}(),Ah=function(){function e(e,t){var r=void 0===t?{}:t,n=r.headers,o=void 0===n?{}:n,i=r.schema,a=r.fetch;this.url=e,this.headers=new Headers(o),this.schemaName=i,this.fetch=a}return e.prototype.from=function(e){var t=new URL("".concat(this.url,"/").concat(e));return new Eh(t,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})},e.prototype.schema=function(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch})},e.prototype.rpc=function(e,t,r){var n;void 0===t&&(t={});var o,i,a=void 0===r?{}:r,s=a.head,u=void 0!==s&&s,c=a.get,l=void 0!==c&&c,h=a.count,f=new URL("".concat(this.url,"/rpc/").concat(e));u||l?(o=u?"HEAD":"GET",Object.entries(t).filter((function(e){return e[0],void 0!==e[1]})).map((function(e){var t=e[0],r=e[1];return[t,Array.isArray(r)?"{".concat(r.join(","),"}"):"".concat(r)]})).forEach((function(e){var t=e[0],r=e[1];f.searchParams.append(t,r)}))):(o="POST",i=t);var d=new Headers(this.headers);return h&&d.set("Prefer","count=".concat(h)),new kh({method:o,url:f,headers:d,schema:this.schemaName,body:i,fetch:null!==(n=this.fetch)&&void 0!==n?n:fetch})},e}(),Th=function(e){function t(t,r){var n=r.headers,o=void 0===n?{}:n,i=r.fetch;return e.call(this,t,{headers:o,schema:void 0,fetch:i})||this}return n(t,e),t}(Eh),Rh=function(){function e(e,t){var r=void 0===t?{}:t,n=r.headers,o=void 0===n?{}:n,i=r.fetch;this.url=e,this.headers=new Headers(o),this.fetch=i}return e.prototype.from=function(e){var t=new Ph("".concat(this.url,"/").concat(e));return new Th(t,{headers:this.headers,fetch:this.fetch})},e}();function xh(e,t){if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var r=e.callFunction.bind(e);return e.models=S(r,e),e.mysql=Ch(e,{envId:null==t?void 0:t.envId}),e.rdb=qh(e,{envId:null==t?void 0:t.envId}),e}function Uh(e,t,r){var n=this;return function(t){if(r)return r;var s=null==t?void 0:t.instance,u=null==t?void 0:t.database;return function(t,r){return i(n,0,void 0,(function(){var n;return a(this,(function(i){return n={},(null==r?void 0:r.headers)instanceof Headers?r.headers.forEach((function(e,t){n[t]=e})):n=(null==r?void 0:r.headers)||{},[2,e.callFunction({name:"httpOverCallFunction",data:{url:t.toString(),method:(null==r?void 0:r.method)||"GET",headers:o(o({"Content-Type":"application/json"},n||{}),{"X-Db-Instance":s||(null==n?void 0:n["X-Db-Instance"]),"Accept-Profile":u||(null==n?void 0:n["Accept-Profile"]),"Content-Profile":u||(null==n?void 0:n["Content-Profile"])}),body:null==r?void 0:r.body}}).then((function(e){var t=null==e?void 0:e.result;return{ok:(null==t?void 0:t.statusCode)>=200&&(null==t?void 0:t.statusCode)<300,status:(null==t?void 0:t.statusCode)||200,statusText:(null==t?void 0:t.statusMessage)||"OK",json:function(){return Promise.resolve((null==t?void 0:t.body)||{})},text:function(){return Promise.resolve("string"==typeof(null==t?void 0:t.body)?t.body:JSON.stringify((null==t?void 0:t.body)||{}))},headers:new Headers((null==t?void 0:t.headers)||{})}}))]}))}))}}}function Ch(e,t){var r=(null==t?void 0:t.mysqlBaseUrl)||Lh(e,null==t?void 0:t.envId).mysql,n=Uh(e,null==t||t.envId,null==t?void 0:t.fetch);return function(e){return new Rh(r,{fetch:n(e)})}}function qh(e,t){var r=(null==t?void 0:t.pgBaseUrl)||Lh(e,null==t?void 0:t.envId).rdb,n=Uh(e,null==t||t.envId,null==t?void 0:t.fetch);return function(e){return new Ah(r,{fetch:n(e),schema:(null==e?void 0:e.schema)||(null==e?void 0:e.database)})}}function Lh(e,t){var r=function(e,t){var r,n,o,i,a=t||(null===(n=null===(r=null==e?void 0:e.extend)||void 0===r?void 0:r.AI)||void 0===n?void 0:n.env);return"string"==typeof a&&a.trim()||(a=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.env),"string"==typeof a&&a.trim()||(a=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.envName),"string"==typeof a&&a.trim()?a.trim():""}(e,t);if(!r)throw new Error("Generating default gateway base url failed: env not found");return{model:"https://".concat(r,".api.tcloudbasegateway.com/v1/model"),sql:"https://".concat(r,".api.tcloudbasegateway.com/v1/sql"),mysql:"https://".concat(r,".api.tcloudbasegateway.com/v1/rdb/rest"),rdb:"https://".concat(r,".api.tcloudbasegateway.com/v1/rdb/rest")}}var Ih={init:xh,generateHTTPClient:g,generateMySQLClient:Ch,generatePGClient:qh};e.default=Ih,e.generateHTTPClient=g,e.generateMySQLClient=Ch,e.generatePGClient=qh,e.init=xh,e.initHTTPOverCallFunction=function(e,t){var r=this;if(!e)throw new Error("cloud is required");if(!e.callFunction)throw new Error("cloud.callFunction is required");var n,s=e.callFunction.bind(e);try{var u=(null==t?void 0:t.baseUrl)||Lh(e,null==t?void 0:t.envId).model,c=(null==t?void 0:t.sqlBaseUrl)||Lh(e,null==t?void 0:t.envId).sql;n=g(s,(function(e){var t=e.url,n=e.body,u=e.method,c=e.headers;return i(r,0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return[4,s({name:"httpOverCallFunction",data:{url:t,method:null==u?void 0:u.toUpperCase(),headers:o(o({},c||{}),{"Content-Type":"application/json"}),body:n}})];case 1:return e=i.sent(),[2,null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.body]}}))}))}),u,{sqlBaseUrl:c,cloud:e})}catch(e){console.error("init http orm client failed, try call function orm",e),n=S(s)}return e.models=n,e.mysql=Ch(e,{envId:null==t?void 0:t.envId,mysqlBaseUrl:null==t?void 0:t.mysqlBaseUrl}),e},Object.defineProperty(e,"__esModule",{value:!0})}(t)},840:(e,t,r)=>{"use strict";r.r(t),r.d(t,{registerMySQL:()=>c});var n=r(276),o={};for(const e in n)["default","registerMySQL"].indexOf(e)<0&&(o[e]=()=>n[e]);r.d(t,o);var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t,r){var o=this,a=e.request.fetch.bind(e.request),s=t||{},u=s.instance,c=void 0===u?r?void 0:"default":u,l=s.database,h=void 0===l?r?void 0:e.config.env:l,f=function(e,t){return r=o,n=void 0,u=function(){var r,n,o,s;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(u){switch(u.label){case 0:return r={},t.headers instanceof Headers?t.headers.forEach((function(e,t){r[t]=e})):r=t.headers||{},[["X-Db-Instance",c],["Accept-Profile",h],["Content-Profile",h]].forEach((function(e){var t=e[0],n=e[1];r[t]||r[t.toLocaleLowerCase()]||!n||(r[t]=n)})),[4,a(i(i({url:e.toString()},t),{headers:i({"Content-Type":"application/json"},r),shouldThrowOnError:!1}))];case 1:n=u.sent(),o={},u.label=2;case 2:return u.trys.push([2,4,,5]),[4,n.data];case 3:return o=u.sent(),[3,5];case 4:if(!(s=u.sent()).message.includes("Unexpected end of JSON input"))throw s;return[3,5];case 5:return[2,{ok:(null==n?void 0:n.statusCode)>=200&&(null==n?void 0:n.statusCode)<300,status:(null==n?void 0:n.statusCode)||200,statusText:(null==n?void 0:n.statusMessage)||"OK",json:function(){return Promise.resolve(o||{})},text:function(){return Promise.resolve("string"==typeof o?o:JSON.stringify(o||{}))},headers:null==n?void 0:n.header}]}}))},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{a(u.next(e))}catch(e){t(e)}}function i(e){try{a(u.throw(e))}catch(e){t(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(o,i)}a((u=u.apply(r,n||[])).next())}));var r,n,s,u},d=e.getEndPointWithKey("GATEWAY"),p=d.BASE_URL,v=d.PROTOCOL,y="".concat(v).concat(p,"/rdb/rest");return r?(0,n.generatePGClient)(e,{pgBaseUrl:y,fetch:f}):(0,n.generateMySQLClient)(e,{mysqlBaseUrl:y,fetch:f})}var s={name:"mysql",entity:{mysql:function(e){return a(this,e,!1)(e)}}},u={name:"rdb",entity:{rdb:function(e){return a(this,e,!0)(e)}}};try{cloudbase.registerComponent(s),cloudbase.registerComponent(u)}catch(e){}function c(e){try{e.registerComponent(s),e.registerComponent(u)}catch(e){console.warn(e)}}try{window.registerMySQL=c}catch(e){}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(504)})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/js-sdk",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "description": "cloudbase javascript sdk",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -47,25 +47,25 @@
47
47
  "license": "Apache-2.0",
48
48
  "dependencies": {
49
49
  "@cloudbase/adapter-interface": "^0.7.1",
50
- "@cloudbase/ai": "3.3.4",
51
- "@cloudbase/analytics": "3.3.4",
52
- "@cloudbase/apis": "3.3.4",
53
- "@cloudbase/app": "3.3.4",
54
- "@cloudbase/auth": "3.3.4",
55
- "@cloudbase/cloudrun": "3.3.4",
50
+ "@cloudbase/ai": "3.3.5",
51
+ "@cloudbase/analytics": "3.3.5",
52
+ "@cloudbase/apis": "3.3.5",
53
+ "@cloudbase/app": "3.3.5",
54
+ "@cloudbase/auth": "3.3.5",
55
+ "@cloudbase/cloudrun": "3.3.5",
56
56
  "@cloudbase/database": "0.12.0",
57
- "@cloudbase/functions": "3.3.4",
58
- "@cloudbase/model": "3.3.4",
59
- "@cloudbase/mysql": "3.3.4",
60
- "@cloudbase/realtime": "3.3.4",
61
- "@cloudbase/storage": "3.3.4",
62
- "@cloudbase/types": "3.3.4",
63
- "@cloudbase/utilities": "3.3.4"
57
+ "@cloudbase/functions": "3.3.5",
58
+ "@cloudbase/model": "3.3.5",
59
+ "@cloudbase/mysql": "3.3.5",
60
+ "@cloudbase/realtime": "3.3.5",
61
+ "@cloudbase/storage": "3.3.5",
62
+ "@cloudbase/types": "3.3.5",
63
+ "@cloudbase/utilities": "3.3.5"
64
64
  },
65
65
  "browserslist": [
66
66
  "last 2 version",
67
67
  "> 1%",
68
68
  "chrome 53"
69
69
  ],
70
- "gitHead": "007548511b11c6e7648bb93c10b9dbae3a480a32"
70
+ "gitHead": "c49e85b029e204845cc7e402aef4ca7af89b7875"
71
71
  }