@verdocs/web-sdk 2.2.23 → 2.2.24
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.
- package/dist/cjs/{TemplateStore-a5fa2b0c.js → TemplateStore-f29807cb.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-45deeb6a.js → VerdocsEndpoint-dac7e172.js} +62 -35
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +7 -16
- package/dist/cjs/verdocs-settings.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.js +1 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.js +6 -15
- package/dist/components/VerdocsEndpoint.js +62 -35
- package/dist/components/verdocs-settings-organization2.js +6 -15
- package/dist/components/verdocs-settings.js +1 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-e8cf5a15.js → TemplateStore-8d2216c0.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-d58d5544.js → VerdocsEndpoint-665cd4ff.js} +62 -35
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +7 -16
- package/dist/esm/verdocs-settings.entry.js +2 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +2 -2
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{TemplateStore-e8cf5a15.js → TemplateStore-8d2216c0.js} +1 -1
- package/dist/esm-es5/VerdocsEndpoint-665cd4ff.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-45d5e035.system.entry.js → p-0356d236.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2deae25.entry.js → p-06ce4273.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-48c62137.system.entry.js → p-08516605.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ae971bb4.system.entry.js → p-14d75e85.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-428de4a5.entry.js → p-1a978084.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ccb86b6.entry.js → p-26477930.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad273610.entry.js → p-332ca951.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-42f27e8c.entry.js → p-36e54b51.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-79b0c643.entry.js → p-37cbcaa4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-07b5f356.system.entry.js → p-3a477f56.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-edabba6b.system.entry.js → p-3b6c429b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ba04698a.entry.js → p-3c2b77e1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e40dd4d1.entry.js → p-3e7e86b3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5ab837bf.entry.js → p-42d906e7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1753f57b.system.js → p-442b15ed.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-47e004ea.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9009e136.entry.js → p-4d9887e8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4fcc89b5.js +1 -0
- package/dist/verdocs-web-sdk/{p-965b66a8.entry.js → p-51bb1472.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5427b9da.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cd64b223.system.entry.js → p-5582b7bb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4017b53a.system.entry.js → p-55ae6bcc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-21e137f0.system.entry.js → p-57c6242a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-07696831.system.entry.js → p-57eead7b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a894761f.system.entry.js → p-5f8b36d8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fab73ec8.system.entry.js → p-60d8a2cb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a90098d.entry.js → p-6ab93d62.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-66cec042.system.entry.js → p-6f50d2eb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a1e82d5a.entry.js → p-76048eac.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84efd562.entry.js → p-7c3b27d4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8d14ace0.entry.js → p-7f81ea6d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bbd400a5.entry.js → p-8a3d93ff.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2549a794.system.entry.js → p-8ad808d6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aba05f25.system.entry.js → p-93d84655.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3da4fed1.entry.js → p-98e72c2a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1dda2d09.entry.js → p-a10951b6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7bd5db75.system.entry.js → p-a85feb0b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0b2102df.entry.js → p-abb253e4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2284d430.system.entry.js → p-c17390a3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-506754d5.system.entry.js → p-c8246748.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f9e89b56.system.entry.js → p-d6af1df4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a0ad315e.system.entry.js → p-d6b73c2b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d4aec860.entry.js → p-dd99d3c8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d4d8858f.js → p-de14cfa1.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0df9e6e1.system.entry.js → p-e242f362.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e2e28966.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-51979353.entry.js → p-e5a86420.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6f1e794d.system.entry.js → p-ea708cfb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2b6e4f2a.entry.js → p-eb1a70c9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-15df3998.system.entry.js → p-ec8f0b94.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-45bee3f6.system.entry.js → p-f3a3e38e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77ecee31.entry.js → p-fb38a556.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/custom-elements.json +0 -2055
- package/dist/esm-es5/VerdocsEndpoint-d58d5544.js +0 -1
- package/dist/verdocs-web-sdk/p-4422958b.system.js +0 -1
- package/dist/verdocs-web-sdk/p-78e4f430.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-883d60e1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-af048fad.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};import{d as decodeAccessTokenBody}from"./Types-5f31149e.js";var TemplateSenderTypes$1;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes$1||(TemplateSenderTypes$1={}));var TemplatePermissions;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(TemplatePermissions||(TemplatePermissions={}));var TemplateSenderTypes;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(TemplateSenderTypes||(TemplateSenderTypes={}));var TemplateActions;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(TemplateActions||(TemplateActions={}));var SortOptions;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(SortOptions||(SortOptions={}));var Permissions;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(Permissions||(Permissions={}));var Plans;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(Plans||(Plans={}));var Roles;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(Roles||(Roles={}));var denyList=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var isRetryAllowed=function(e){return!denyList.has(e&&e.code)};function asyncGeneratorStep(e,t,r,n,i,o,s){try{var a=e[o](s);var u=a.value}catch(e){r(e);return}if(a.done){t(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){asyncGeneratorStep(o,n,i,s,a,"next",e)}function a(e){asyncGeneratorStep(o,n,i,s,a,"throw",e)}s(undefined)}))}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){ownKeys(Object(r),true).forEach((function(t){_defineProperty(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var namespace="axios-retry";function isNetworkError(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&isRetryAllowed(e)}var SAFE_HTTP_METHODS=["get","head","options"];var IDEMPOTENT_HTTP_METHODS=SAFE_HTTP_METHODS.concat(["put","delete"]);function isRetryableError(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function isSafeRequestError(e){if(!e.config){return false}return isRetryableError(e)&&SAFE_HTTP_METHODS.indexOf(e.config.method)!==-1}function isIdempotentRequestError(e){if(!e.config){return false}return isRetryableError(e)&&IDEMPOTENT_HTTP_METHODS.indexOf(e.config.method)!==-1}function isNetworkOrIdempotentRequestError(e){return isNetworkError(e)||isIdempotentRequestError(e)}function noDelay(){return 0}function exponentialDelay(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function getCurrentState(e){var t=e[namespace]||{};t.retryCount=t.retryCount||0;e[namespace]=t;return t}function getRequestOptions(e,t){return _objectSpread(_objectSpread({},t),e[namespace])}function fixConfig(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function shouldRetry(e,t,r,n){return _shouldRetry.apply(this,arguments)}function _shouldRetry(){_shouldRetry=_asyncToGenerator((function(e,t,r,n){var i,o,s;return __generator(this,(function(a){switch(a.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];a.label=1;case 1:a.trys.push([1,3,,4]);return[4,i];case 2:o=a.sent();return[2,o!==false];case 3:s=a.sent();return[2,false];case 4:return[2,i]}}))}));return _shouldRetry.apply(this,arguments)}function axiosRetry(e,t){e.interceptors.request.use((function(e){var t=getCurrentState(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=_asyncToGenerator((function(r){var n,i,o,s,a,u,l,c,f,d,p,h,E,m,v,y;return __generator(this,(function(R){switch(R.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=getRequestOptions(n,t),o=i.retries,s=o===void 0?3:o,a=i.retryCondition,u=a===void 0?isNetworkOrIdempotentRequestError:a,l=i.retryDelay,c=l===void 0?noDelay:l,f=i.shouldResetTimeout,d=f===void 0?false:f,p=i.onRetry,h=p===void 0?function(){}:p;E=getCurrentState(n);return[4,shouldRetry(s,u,E,r)];case 1:if(R.sent()){E.retryCount+=1;m=c(E.retryCount,r);fixConfig(e,n);if(!d&&n.timeout&&E.lastRequestTime){v=Date.now()-E.lastRequestTime;y=n.timeout-v-m;if(y<=0){return[2,Promise.reject(r)]}n.timeout=y}n.transformRequest=[function(e){return e}];h(E.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),m)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}axiosRetry.isNetworkError=isNetworkError;axiosRetry.isSafeRequestError=isSafeRequestError;axiosRetry.isIdempotentRequestError=isIdempotentRequestError;axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError;axiosRetry.exponentialDelay=exponentialDelay;axiosRetry.isRetryableError=isRetryableError;function bind(e,t){return function r(){return e.apply(t,arguments)}}var toString=Object.prototype.toString;var getPrototypeOf=Object.getPrototypeOf;var kindOf=function(e){return function(t){var r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var kindOfTest=function(e){e=e.toLowerCase();return function(t){return kindOf(t)===e}};var typeOfTest=function(e){return function(t){return typeof t===e}};var isArray=Array.isArray;var isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&isArrayBuffer(e.buffer)}return t}var isString=typeOfTest("string");var isFunction=typeOfTest("function");var isNumber=typeOfTest("number");var isObject=function(e){return e!==null&&typeof e==="object"};var isBoolean=function(e){return e===true||e===false};var isPlainObject=function(e){if(kindOf(e)!=="object"){return false}var t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var isDate=kindOfTest("Date");var isFile=kindOfTest("File");var isBlob=kindOfTest("Blob");var isFileList=kindOfTest("FileList");var isStream=function(e){return isObject(e)&&isFunction(e.pipe)};var isFormData=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))};var isURLSearchParams=kindOfTest("URLSearchParams");var trim=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function forEach(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var s;var a;if(typeof e!=="object"){e=[e]}if(isArray(e)){for(s=0,a=e.length;s<a;s++){t.call(null,e[s],s,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var l=u.length;var c=void 0;for(s=0;s<l;s++){c=u[s];t.call(null,e[c],c,e)}}}function findKey(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var _global=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var isContextDefined=function(e){return!isUndefined(e)&&e!==_global};function merge(){var e=(isContextDefined(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&findKey(t,n)||n;if(isPlainObject(t[i])&&isPlainObject(r)){t[i]=merge(t[i],r)}else if(isPlainObject(r)){t[i]=merge({},r)}else if(isArray(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&forEach(arguments[n],r)}return t}var extend=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;forEach(t,(function(t,n){if(r&&isFunction(t)){e[n]=bind(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var stripBOM=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var inherits=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var toFlatObject=function(e,t,r,n){var i;var o;var s;var a={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!a[s]){t[s]=e[s];a[s]=true}}e=r!==false&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var endsWith=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var toArray=function(e){if(!e)return null;if(isArray(e))return e;var t=e.length;if(!isNumber(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var isTypedArray=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&getPrototypeOf(Uint8Array));var forEachEntry=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var matchAll=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var isHTMLForm=kindOfTest("HTMLFormElement");var toCamelCase=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var hasOwnProperty=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var isRegExp=kindOfTest("RegExp");var reduceDescriptors=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};forEach(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var freezeMethods=function(e){reduceDescriptors(e,(function(t,r){if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!isFunction(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var toObjectSet=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};isArray(e)?n(e):n(String(e).split(t));return r};var noop=function(){};var toFiniteNumber=function(e,t){e=+e;return Number.isFinite(e)?e:t};var ALPHA="abcdefghijklmnopqrstuvwxyz";var DIGIT="0123456789";var ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT};var generateString=function(e,t){if(e===void 0){e=16}if(t===void 0){t=ALPHABET.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var toJSONObject=function(e){var t=new Array(10);var r=function(e,n){if(isObject(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=isArray(e)?[]:{};forEach(e,(function(e,t){var o=r(e,n+1);!isUndefined(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var isAsyncFn=kindOfTest("AsyncFunction");var isThenable=function(e){return e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch)};var utils={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable};function AxiosError(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}utils.inherits(AxiosError,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var prototype$1=AxiosError.prototype;var descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){descriptors[e]={value:e}}));Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:true});AxiosError.from=function(e,t,r,n,i,o){var s=Object.create(prototype$1);utils.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));AxiosError.call(s,e.message,t,r,n,i);s.cause=e;s.name=e.name;o&&Object.assign(s,o);return s};var httpAdapter=null;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=removeBrackets(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}var predicates=utils.toFlatObject(utils,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function toFormData(e,t,r){if(!utils.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=utils.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!utils.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var s=r.indexes;var a=r.Blob||typeof Blob!=="undefined"&&Blob;var u=a&&utils.isSpecCompliantForm(t);if(!utils.isFunction(i)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(utils.isDate(e)){return e.toISOString()}if(!u&&utils.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(utils.isArrayBuffer(e)||utils.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var a=e;if(e&&!i&&typeof e==="object"){if(utils.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(utils.isArray(e)&&isFlatArray(e)||(utils.isFileList(e)||utils.endsWith(r,"[]"))&&(a=utils.toArray(e))){r=removeBrackets(r);a.forEach((function e(n,i){!(utils.isUndefined(n)||n===null)&&t.append(s===true?renderKey([r],i,o):s===null?r:r+"[]",l(n))}));return false}}if(isVisitable(e)){return true}t.append(renderKey(i,r,o),l(e));return false}var f=[];var d=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable:isVisitable});function p(e,r){if(utils.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);utils.forEach(e,(function e(n,o){var s=!(utils.isUndefined(n)||n===null)&&i.call(t,n,utils.isString(o)?o.trim():o,r,d);if(s===true){p(n,r?r.concat(o):[o])}}));f.pop()}if(!utils.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function encode$1(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function AxiosURLSearchParams(e,t){this._pairs=[];e&&toFormData(e,this,t)}var prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])};prototype.toString=function e(t){var r=t?function(e){return t.call(this,e,encode$1)}:encode$1;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t){return e}var n=r&&r.encode||encode;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=utils.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n)}if(o){var s=e.indexOf("#");if(s!==-1){e=e.slice(0,s)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var InterceptorManager=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){utils.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var transitionalDefaults={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var URLSearchParams$1=typeof URLSearchParams!=="undefined"?URLSearchParams:AxiosURLSearchParams;var FormData$1=typeof FormData!=="undefined"?FormData:null;var Blob$1=typeof Blob!=="undefined"?Blob:null;var isStandardBrowserEnv=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var isStandardBrowserWebWorkerEnv=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var platform={isBrowser:true,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv:isStandardBrowserEnv,isStandardBrowserWebWorkerEnv:isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function arrayToObject(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function formDataToJSON(e){function t(e,r,n,i){var o=e[i++];var s=Number.isFinite(+o);var a=i>=e.length;o=!o&&utils.isArray(n)?n.length:o;if(a){if(utils.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!s}if(!n[o]||!utils.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&utils.isArray(n[o])){n[o]=arrayToObject(n[o])}return!s}if(utils.isFormData(e)&&utils.isFunction(e.entries)){var r={};utils.forEachEntry(e,(function(e,n){t(parsePropPath(e),n,r,0)}));return r}return null}var DEFAULT_CONTENT_TYPE={"Content-Type":undefined};function stringifySafely(e,t,r){if(utils.isString(e)){try{(t||JSON.parse)(e);return utils.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=utils.isObject(t);if(o&&utils.isHTMLForm(t)){t=new FormData(t)}var s=utils.isFormData(t);if(s){if(!i){return t}return i?JSON.stringify(formDataToJSON(t)):t}if(utils.isArrayBuffer(t)||utils.isBuffer(t)||utils.isStream(t)||utils.isFile(t)||utils.isBlob(t)){return t}if(utils.isArrayBufferView(t)){return t.buffer}if(utils.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return toURLEncodedForm(t,this.formSerializer).toString()}if((a=utils.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return toFormData(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return stringifySafely(t)}return t}],transformResponse:[function e(t){var r=this.transitional||defaults.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&utils.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var s=!o&&i;try{return JSON.parse(t)}catch(e){if(s){if(e.name==="SyntaxError"){throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],(function e(t){defaults.headers[t]={}}));utils.forEach(["post","put","patch"],(function e(t){defaults.headers[t]=utils.merge(DEFAULT_CONTENT_TYPE)}));var ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&ignoreDuplicateOf[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var $internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){if(e===false||e==null){return e}return utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var isValidHeaderName=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function matchHeaderValue(e,t,r,n,i){if(utils.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!utils.isString(t))return;if(utils.isString(n)){return t.indexOf(n)!==-1}if(utils.isRegExp(n)){return n.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function buildAccessors(e,t){var r=utils.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var AxiosHeaders=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=normalizeHeader(t);if(!i){throw new Error("header name must be a non-empty string")}var o=utils.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=normalizeValue(e)}}var o=function(e,t){return utils.forEach(e,(function(e,r){return i(e,r,t)}))};if(utils.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(utils.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)){o(parseHeaders(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=normalizeHeader(e);if(e){var r=utils.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return parseTokens(n)}if(utils.isFunction(t)){return t.call(this,n,r)}if(utils.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=normalizeHeader(e);if(e){var r=utils.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||matchHeaderValue(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=normalizeHeader(e);if(e){var i=utils.findKey(r,e);if(i&&(!t||matchHeaderValue(r,r[i],i,t))){delete r[i];n=true}}}if(utils.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||matchHeaderValue(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};utils.forEach(this,(function(n,i){var o=utils.findKey(r,i);if(o){t[o]=normalizeValue(n);delete t[i];return}var s=e?formatHeader(i):String(i).trim();if(s!==i){delete t[i]}t[s]=normalizeValue(n);r[s]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);utils.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&utils.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[$internals]=this[$internals]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=normalizeHeader(e);if(!r[t]){buildAccessors(n,e);r[t]=true}}utils.isArray(e)?e.forEach(i):i(e);return this};return e}();AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.freezeMethods(AxiosHeaders.prototype);utils.freezeMethods(AxiosHeaders);function transformData(e,t){var r=this||defaults;var n=t||r;var i=AxiosHeaders.from(n.headers);var o=n.data;utils.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,r);this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:true});function settle(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var cookies=platform.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(r));if(utils.isNumber(n)){a.push("expires="+new Date(n).toGMTString())}if(utils.isString(i)){a.push("path="+i)}if(utils.isString(o)){a.push("domain="+o)}if(s===true){a.push("secure")}document.cookie=a.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){if(e&&!isAbsoluteURL(t)){return combineURLs(e,t)}return t}var isURLSameOrigin=platform.isStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=utils.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function parseProtocol(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var s;t=t!==undefined?t:1e3;return function a(u){var l=Date.now();var c=n[o];if(!s){s=l}r[i]=u;n[i]=l;var f=o;var d=0;while(f!==i){d+=r[f++];f=f%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(l-s<t){return}var p=c&&l-c;return p?Math.round(d*1e3/p):undefined}}function progressEventReducer(e,t){var r=0;var n=speedometer(50,250);return function(i){var o=i.loaded;var s=i.lengthComputable?i.total:undefined;var a=o-r;var u=n(a);var l=o<=s;r=o;var c={loaded:o,total:s,progress:s?o/s:undefined,bytes:a,rate:u?u:undefined,estimated:u&&s&&l?(s-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var isXHRAdapterSupported=typeof XMLHttpRequest!=="undefined";var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function t(r,n){var i=e.data;var o=AxiosHeaders.from(e.headers).normalize();var s=e.responseType;var a;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(a)}if(e.signal){e.signal.removeEventListener("abort",a)}}if(utils.isFormData(i)){if(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv){o.setContentType(false)}else{o.setContentType("multipart/form-data;",false)}}var l=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"";var f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(c+":"+f))}var d=buildFullPath(e.baseURL,e.url);l.open(e.method.toUpperCase(),buildURL(d,e.params,e.paramsSerializer),true);l.timeout=e.timeout;function p(){if(!l){return}var t=AxiosHeaders.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());var i=!s||s==="text"||s==="json"?l.responseText:l.response;var o={data:i,status:l.status,statusText:l.statusText,headers:t,config:e,request:l};settle((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);l=null}if("onloadend"in l){l.onloadend=p}else{l.onreadystatechange=function e(){if(!l||l.readyState!==4){return}if(l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)){return}setTimeout(p)}}l.onabort=function t(){if(!l){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,l));l=null};l.onerror=function t(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,l));l=null};l.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||transitionalDefaults;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new AxiosError(r,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,l));l=null};if(platform.isStandardBrowserEnv){var h=(e.withCredentials||isURLSameOrigin(d))&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in l){utils.forEach(o.toJSON(),(function e(t,r){l.setRequestHeader(r,t)}))}if(!utils.isUndefined(e.withCredentials)){l.withCredentials=!!e.withCredentials}if(s&&s!=="json"){l.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){l.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&l.upload){l.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){a=function(t){if(!l){return}n(!t||t.type?new CanceledError(null,e,l):t);l.abort();l=null};e.cancelToken&&e.cancelToken.subscribe(a);if(e.signal){e.signal.aborted?a():e.signal.addEventListener("abort",a)}}var E=parseProtocol(d);if(E&&platform.protocols.indexOf(E)===-1){n(new AxiosError("Unsupported protocol "+E+":",AxiosError.ERR_BAD_REQUEST,e));return}l.send(i||null)}))};var knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var adapters={getAdapter:function(e){e=utils.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=utils.isString(r)?knownAdapters[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new AxiosError("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(utils.hasOwnProp(knownAdapters,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!utils.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new CanceledError(null,e)}}function dispatchRequest(e){throwIfCancellationRequested(e);e.headers=AxiosHeaders.from(e.headers);e.data=transformData.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=adapters.getAdapter(e.adapter||defaults.adapter);return t(e).then((function t(r){throwIfCancellationRequested(e);r.data=transformData.call(e,e.transformResponse,r);r.headers=AxiosHeaders.from(r.headers);return r}),(function t(r){if(!isCancel(r)){throwIfCancellationRequested(e);if(r&&r.response){r.response.data=transformData.call(e,e.transformResponse,r.response);r.response.headers=AxiosHeaders.from(r.response.headers)}}return Promise.reject(r)}))}var headersToObject=function(e){return e instanceof AxiosHeaders?e.toJSON():e};function mergeConfig(e,t){t=t||{};var r={};function n(e,t,r){if(utils.isPlainObject(e)&&utils.isPlainObject(t)){return utils.merge.call({caseless:r},e,t)}else if(utils.isPlainObject(t)){return utils.merge({},t)}else if(utils.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!utils.isUndefined(t)){return n(e,t,r)}else if(!utils.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!utils.isUndefined(t)){return n(undefined,t)}}function s(e,t){if(!utils.isUndefined(t)){return n(undefined,t)}else if(!utils.isUndefined(e)){return n(undefined,e)}}function a(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:function(e,t){return i(headersToObject(e),headersToObject(t),true)}};utils.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var s=u[o]||i;var l=s(e[o],t[o],o);utils.isUndefined(l)&&s!==a||(r[o]=l)}));return r}var VERSION="1.4.0";var validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new AxiosError(i(n," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED)}if(r&&!deprecatedWarnings[n]){deprecatedWarnings[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function assertOptions(e,t,r){if(typeof e!=="object"){throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var s=t[o];if(s){var a=e[o];var u=a===undefined||s(a,o,e);if(u!==true){throw new AxiosError("option "+o+" must be "+u,AxiosError.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}}var validator={assertOptions:assertOptions,validators:validators$1};var validators=validator.validators;var Axios=function(){function e(e){this.defaults=e;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=mergeConfig(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false)}if(n!=null){if(utils.isFunction(n)){t.paramsSerializer={serialize:n}}else{validator.assertOptions(n,{encode:validators.function,serialize:validators.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&utils.merge(i.common,i[t.method]);o&&utils.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=AxiosHeaders.concat(o,i);var s=[];var a=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}a=a&&r.synchronous;s.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var l;var c=0;var f;if(!a){var d=[dispatchRequest.bind(this),undefined];d.unshift.apply(d,s);d.push.apply(d,u);f=d.length;l=Promise.resolve(t);while(c<f){l=l.then(d[c++],d[c++])}return l}f=s.length;var p=t;c=0;while(c<f){var h=s[c++];var E=s[c++];try{p=h(p)}catch(e){E.call(this,e);break}}try{l=dispatchRequest.call(this,p)}catch(e){return Promise.reject(e)}c=0;f=u.length;while(c<f){l=l.then(u[c++],u[c++])}return l};e.prototype.getUri=function(e){e=mergeConfig(this.defaults,e);var t=buildFullPath(e.baseURL,e.url);return buildURL(t,e.params,e.paramsSerializer)};return e}();utils.forEach(["delete","get","head","options"],(function e(t){Axios.prototype[t]=function(e,r){return this.request(mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}}));utils.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(mergeConfig(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[t]=r();Axios.prototype[t+"Form"]=r(true)}));var CancelToken=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new CanceledError(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function spread(e){return function t(r){return e.apply(null,r)}}function isAxiosError(e){return utils.isObject(e)&&e.isAxiosError===true}var HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach((function(e){var t=e[0],r=e[1];HttpStatusCode[r]=t}));function createInstance(e){var t=new Axios(e);var r=bind(Axios.prototype.request,t);utils.extend(r,Axios.prototype,t,{allOwnKeys:true});utils.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return createInstance(mergeConfig(e,r))};return r}var axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function e(t){return Promise.all(t)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=function(e){return formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e)};axios.HttpStatusCode=HttpStatusCode;axios.default=axios;var naiveFallback=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var globalThis_1=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return naiveFallback()}try{if(!__global__)return naiveFallback();return __global__}finally{delete Object.prototype.__global__}}();var ENDPOINT_KEY=Symbol.for("verdocs-default-endpoint");var requestLogger=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var VerdocsEndpoint=function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.baseURLv2="https://api-v2.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.baseURLv2=(e===null||e===void 0?void 0:e.baseURLv2)||"https://api-v2.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=axios.create({baseURL:this.baseURL,timeout:this.timeout});axiosRetry(this.api,{retries:0,retryDelay:axiosRetry.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){globalThis_1[ENDPOINT_KEY]=this};e.getDefault=function(){if(!globalThis_1[ENDPOINT_KEY]){globalThis_1[ENDPOINT_KEY]=new e;window.console.debug("[JS_SDK] Created default endpoint",globalThis_1[ENDPOINT_KEY])}return globalThis_1[ENDPOINT_KEY]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getBaseURLv2=function(){return this.baseURLv2};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setBaseURLv2=function(e){this.baseURLv2=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(requestLogger)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var t=decodeAccessTokenBody(e);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=t;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}();export{TemplateSenderTypes as T,VerdocsEndpoint as V,TemplateActions as a};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e({T:void 0,a:void 0});var r;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(r||(r={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(i||(i=e("T",{})));var o;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(o||(o=e("a",{})));var a;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(a||(a={}));var s;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(s||(s={}));var u;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(u||(u={}));var c;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(c||(c={}));var f=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var l=function(e){return!f.has(e&&e.code)};function p(e,t,r,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){r(e);return}if(s.done){t(u)}else{Promise.resolve(u).then(n,i)}}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){p(o,n,i,a,s,"next",e)}function s(e){p(o,n,i,a,s,"throw",e)}a(undefined)}))}}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){h(Object(r),true).forEach((function(t){E(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function E(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var m="axios-retry";function y(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&l(e)}var R=["get","head","options"];var g=R.concat(["put","delete"]);function _(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function b(e){if(!e.config){return false}return _(e)&&R.indexOf(e.config.method)!==-1}function T(e){if(!e.config){return false}return _(e)&&g.indexOf(e.config.method)!==-1}function O(e){return y(e)||T(e)}function A(){return 0}function w(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function S(e){var t=e[m]||{};t.retryCount=t.retryCount||0;e[m]=t;return t}function L(e,t){return v(v({},t),e[m])}function C(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function N(e,t,r,n){return I.apply(this,arguments)}function I(){I=d((function(e,t,r,n){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}));return I.apply(this,arguments)}function D(e,t){e.interceptors.request.use((function(e){var t=S(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=d((function(r){var n,i,o,a,s,u,c,f,l,p,d,h,v,E,m,y;return __generator(this,(function(R){switch(R.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=L(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?O:s,c=i.retryDelay,f=c===void 0?A:c,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;v=S(n);return[4,N(a,u,v,r)];case 1:if(R.sent()){v.retryCount+=1;E=f(v.retryCount,r);C(e,n);if(!p&&n.timeout&&v.lastRequestTime){m=Date.now()-v.lastRequestTime;y=n.timeout-m-E;if(y<=0){return[2,Promise.reject(r)]}n.timeout=y}n.transformRequest=[function(e){return e}];h(v.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),E)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}D.isNetworkError=y;D.isSafeRequestError=b;D.isIdempotentRequestError=T;D.isNetworkOrIdempotentRequestError=O;D.exponentialDelay=w;D.isRetryableError=_;function P(e,t){return function r(){return e.apply(t,arguments)}}var U=Object.prototype.toString;var j=Object.getPrototypeOf;var B=function(e){return function(t){var r=U.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var x=function(e){e=e.toLowerCase();return function(t){return B(t)===e}};var M=function(e){return function(t){return typeof t===e}};var F=Array.isArray;var k=M("undefined");function q(e){return e!==null&&!k(e)&&e.constructor!==null&&!k(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var G=x("ArrayBuffer");function V(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&G(e.buffer)}return t}var H=M("string");var z=M("function");var J=M("number");var K=function(e){return e!==null&&typeof e==="object"};var W=function(e){return e===true||e===false};var Y=function(e){if(B(e)!=="object"){return false}var t=j(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var X=x("Date");var Z=x("File");var $=x("Blob");var Q=x("FileList");var ee=function(e){return K(e)&&z(e.pipe)};var te=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||z(e.append)&&((t=B(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))};var re=x("URLSearchParams");var ne=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ie(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(F(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function oe(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var ae=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var se=function(e){return!k(e)&&e!==ae};function ue(){var e=(se(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&oe(t,n)||n;if(Y(t[i])&&Y(r)){t[i]=ue(t[i],r)}else if(Y(r)){t[i]=ue({},r)}else if(F(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&ie(arguments[n],r)}return t}var ce=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;ie(t,(function(t,n){if(r&&z(t)){e[n]=P(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var fe=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var le=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var pe=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var de=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var he=function(e){if(!e)return null;if(F(e))return e;var t=e.length;if(!J(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var ve=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&j(Uint8Array));var Ee=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var me=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ye=x("HTMLFormElement");var Re=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ge=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var _e=x("RegExp");var be=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};ie(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var Te=function(e){be(e,(function(t,r){if(z(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!z(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var Oe=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};F(e)?n(e):n(String(e).split(t));return r};var Ae=function(){};var we=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Se="abcdefghijklmnopqrstuvwxyz";var Le="0123456789";var Ce={DIGIT:Le,ALPHA:Se,ALPHA_DIGIT:Se+Se.toUpperCase()+Le};var Ne=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Ce.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function Ie(e){return!!(e&&z(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var De=function(e){var t=new Array(10);var r=function(e,n){if(K(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=F(e)?[]:{};ie(e,(function(e,t){var o=r(e,n+1);!k(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var Pe=x("AsyncFunction");var Ue=function(e){return e&&(K(e)||z(e))&&z(e.then)&&z(e.catch)};var je={isArray:F,isArrayBuffer:G,isBuffer:q,isFormData:te,isArrayBufferView:V,isString:H,isNumber:J,isBoolean:W,isObject:K,isPlainObject:Y,isUndefined:k,isDate:X,isFile:Z,isBlob:$,isRegExp:_e,isFunction:z,isStream:ee,isURLSearchParams:re,isTypedArray:ve,isFileList:Q,forEach:ie,merge:ue,extend:ce,trim:ne,stripBOM:fe,inherits:le,toFlatObject:pe,kindOf:B,kindOfTest:x,endsWith:de,toArray:he,forEachEntry:Ee,matchAll:me,isHTMLForm:ye,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:be,freezeMethods:Te,toObjectSet:Oe,toCamelCase:Re,noop:Ae,toFiniteNumber:we,findKey:oe,global:ae,isContextDefined:se,ALPHABET:Ce,generateString:Ne,isSpecCompliantForm:Ie,toJSONObject:De,isAsyncFn:Pe,isThenable:Ue};function Be(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}je.inherits(Be,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var xe=Be.prototype;var Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){Me[e]={value:e}}));Object.defineProperties(Be,Me);Object.defineProperty(xe,"isAxiosError",{value:true});Be.from=function(e,t,r,n,i,o){var a=Object.create(xe);je.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Be.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Fe=null;function ke(e){return je.isPlainObject(e)||je.isArray(e)}function qe(e){return je.endsWith(e,"[]")?e.slice(0,-2):e}function Ge(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=qe(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Ve(e){return je.isArray(e)&&!e.some(ke)}var He=je.toFlatObject(je,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function ze(e,t,r){if(!je.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!je.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&je.isSpecCompliantForm(t);if(!je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(je.isDate(e)){return e.toISOString()}if(!u&&je.isBlob(e)){throw new Be("Blob is not supported. Use a Buffer instead.")}if(je.isArrayBuffer(e)||je.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(je.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(je.isArray(e)&&Ve(e)||(je.isFileList(e)||je.endsWith(r,"[]"))&&(s=je.toArray(e))){r=qe(r);s.forEach((function e(n,i){!(je.isUndefined(n)||n===null)&&t.append(a===true?Ge([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(ke(e)){return true}t.append(Ge(i,r,o),c(e));return false}var l=[];var p=Object.assign(He,{defaultVisitor:f,convertValue:c,isVisitable:ke});function d(e,r){if(je.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);je.forEach(e,(function e(n,o){var a=!(je.isUndefined(n)||n===null)&&i.call(t,n,je.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!je.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Je(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function Ke(e,t){this._pairs=[];e&&ze(e,this,t)}var We=Ke.prototype;We.append=function e(t,r){this._pairs.push([t,r])};We.toString=function e(t){var r=t?function(e){return t.call(this,e,Je)}:Je;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ye(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xe(e,t,r){if(!t){return e}var n=r&&r.encode||Ye;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=je.isURLSearchParams(t)?t.toString():new Ke(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Ze=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){je.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var $e={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Qe=typeof URLSearchParams!=="undefined"?URLSearchParams:Ke;var et=typeof FormData!=="undefined"?FormData:null;var tt=typeof Blob!=="undefined"?Blob:null;var rt=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var nt=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var it={isBrowser:true,classes:{URLSearchParams:Qe,FormData:et,Blob:tt},isStandardBrowserEnv:rt,isStandardBrowserWebWorkerEnv:nt,protocols:["http","https","file","blob","url","data"]};function ot(e,t){return ze(e,new it.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function at(e){return je.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function st(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function ut(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&je.isArray(n)?n.length:o;if(s){if(je.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!je.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&je.isArray(n[o])){n[o]=st(n[o])}return!a}if(je.isFormData(e)&&je.isFunction(e.entries)){var r={};je.forEachEntry(e,(function(e,n){t(at(e),n,r,0)}));return r}return null}var ct={"Content-Type":undefined};function ft(e,t,r){if(je.isString(e)){try{(t||JSON.parse)(e);return je.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var lt={transitional:$e,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=je.isObject(t);if(o&&je.isHTMLForm(t)){t=new FormData(t)}var a=je.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(ut(t)):t}if(je.isArrayBuffer(t)||je.isBuffer(t)||je.isStream(t)||je.isFile(t)||je.isBlob(t)){return t}if(je.isArrayBufferView(t)){return t.buffer}if(je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return ot(t,this.formSerializer).toString()}if((s=je.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return ze(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return ft(t)}return t}],transformResponse:[function e(t){var r=this.transitional||lt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&je.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw Be.from(e,Be.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:it.classes.FormData,Blob:it.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};je.forEach(["delete","get","head"],(function e(t){lt.headers[t]={}}));je.forEach(["post","put","patch"],(function e(t){lt.headers[t]=je.merge(ct)}));var pt=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var dt=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&pt[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var ht=Symbol("internals");function vt(e){return e&&String(e).trim().toLowerCase()}function Et(e){if(e===false||e==null){return e}return je.isArray(e)?e.map(Et):String(e)}function mt(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var yt=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Rt(e,t,r,n,i){if(je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!je.isString(t))return;if(je.isString(n)){return t.indexOf(n)!==-1}if(je.isRegExp(n)){return n.test(t)}}function gt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function _t(e,t){var r=je.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var bt=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=vt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=je.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Et(e)}}var o=function(e,t){return je.forEach(e,(function(e,r){return i(e,r,t)}))};if(je.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(je.isString(e)&&(e=e.trim())&&!yt(e)){o(dt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=vt(e);if(e){var r=je.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return mt(n)}if(je.isFunction(t)){return t.call(this,n,r)}if(je.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=vt(e);if(e){var r=je.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Rt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=vt(e);if(e){var i=je.findKey(r,e);if(i&&(!t||Rt(r,r[i],i,t))){delete r[i];n=true}}}if(je.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Rt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};je.forEach(this,(function(n,i){var o=je.findKey(r,i);if(o){t[o]=Et(n);delete t[i];return}var a=e?gt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Et(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);je.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&je.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[ht]=this[ht]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=vt(e);if(!r[t]){_t(n,e);r[t]=true}}je.isArray(e)?e.forEach(i):i(e);return this};return e}();bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.freezeMethods(bt.prototype);je.freezeMethods(bt);function Tt(e,t){var r=this||lt;var n=t||r;var i=bt.from(n.headers);var o=n.data;je.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Ot(e){return!!(e&&e.__CANCEL__)}function At(e,t,r){Be.call(this,e==null?"canceled":e,Be.ERR_CANCELED,t,r);this.name="CanceledError"}je.inherits(At,Be,{__CANCEL__:true});function wt(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Be("Request failed with status code "+r.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var St=it.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(je.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(je.isString(i)){s.push("path="+i)}if(je.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function Lt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ct(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Nt(e,t){if(e&&!Lt(t)){return Ct(e,t)}return t}var It=it.isStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=je.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Dt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Pt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function Ut(e,t){var r=0;var n=Pt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var jt=typeof XMLHttpRequest!=="undefined";var Bt=jt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=bt.from(e.headers).normalize();var a=e.responseType;var s;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(s)}if(e.signal){e.signal.removeEventListener("abort",s)}}if(je.isFormData(i)){if(it.isStandardBrowserEnv||it.isStandardBrowserWebWorkerEnv){o.setContentType(false)}else{o.setContentType("multipart/form-data;",false)}}var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"";var l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+l))}var p=Nt(e.baseURL,e.url);c.open(e.method.toUpperCase(),Xe(p,e.params,e.paramsSerializer),true);c.timeout=e.timeout;function d(){if(!c){return}var t=bt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?c.responseText:c.response;var o={data:i,status:c.status,statusText:c.statusText,headers:t,config:e,request:c};wt((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);c=null}if("onloadend"in c){c.onloadend=d}else{c.onreadystatechange=function e(){if(!c||c.readyState!==4){return}if(c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}c.onabort=function t(){if(!c){return}n(new Be("Request aborted",Be.ECONNABORTED,e,c));c=null};c.onerror=function t(){n(new Be("Network Error",Be.ERR_NETWORK,e,c));c=null};c.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||$e;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Be(r,i.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,c));c=null};if(it.isStandardBrowserEnv){var h=(e.withCredentials||It(p))&&e.xsrfCookieName&&St.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in c){je.forEach(o.toJSON(),(function e(t,r){c.setRequestHeader(r,t)}))}if(!je.isUndefined(e.withCredentials)){c.withCredentials=!!e.withCredentials}if(a&&a!=="json"){c.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){c.addEventListener("progress",Ut(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&c.upload){c.upload.addEventListener("progress",Ut(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!c){return}n(!t||t.type?new At(null,e,c):t);c.abort();c=null};e.cancelToken&&e.cancelToken.subscribe(s);if(e.signal){e.signal.aborted?s():e.signal.addEventListener("abort",s)}}var v=Dt(p);if(v&&it.protocols.indexOf(v)===-1){n(new Be("Unsupported protocol "+v+":",Be.ERR_BAD_REQUEST,e));return}c.send(i||null)}))};var xt={http:Fe,xhr:Bt};je.forEach(xt,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Mt={getAdapter:function(e){e=je.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=je.isString(r)?xt[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new Be("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(je.hasOwnProp(xt,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!je.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:xt};function Ft(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new At(null,e)}}function kt(e){Ft(e);e.headers=bt.from(e.headers);e.data=Tt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Mt.getAdapter(e.adapter||lt.adapter);return t(e).then((function t(r){Ft(e);r.data=Tt.call(e,e.transformResponse,r);r.headers=bt.from(r.headers);return r}),(function t(r){if(!Ot(r)){Ft(e);if(r&&r.response){r.response.data=Tt.call(e,e.transformResponse,r.response);r.response.headers=bt.from(r.response.headers)}}return Promise.reject(r)}))}var qt=function(e){return e instanceof bt?e.toJSON():e};function Gt(e,t){t=t||{};var r={};function n(e,t,r){if(je.isPlainObject(e)&&je.isPlainObject(t)){return je.merge.call({caseless:r},e,t)}else if(je.isPlainObject(t)){return je.merge({},t)}else if(je.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!je.isUndefined(t)){return n(e,t,r)}else if(!je.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!je.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!je.isUndefined(t)){return n(undefined,t)}else if(!je.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(qt(e),qt(t),true)}};je.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);je.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Vt="1.4.0";var Ht={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ht[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var zt={};Ht.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Vt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Be(i(n," has been removed"+(r?" in "+r:"")),Be.ERR_DEPRECATED)}if(r&&!zt[n]){zt[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function Jt(e,t,r){if(typeof e!=="object"){throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Be("option "+o+" must be "+u,Be.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Be("Unknown option "+o,Be.ERR_BAD_OPTION)}}}var Kt={assertOptions:Jt,validators:Ht};var Wt=Kt.validators;var Yt=function(){function e(e){this.defaults=e;this.interceptors={request:new Ze,response:new Ze}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Gt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Kt.assertOptions(r,{silentJSONParsing:Wt.transitional(Wt.boolean),forcedJSONParsing:Wt.transitional(Wt.boolean),clarifyTimeoutError:Wt.transitional(Wt.boolean)},false)}if(n!=null){if(je.isFunction(n)){t.paramsSerializer={serialize:n}}else{Kt.assertOptions(n,{encode:Wt.function,serialize:Wt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&je.merge(i.common,i[t.method]);o&&je.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=bt.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[kt.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{d=h(d)}catch(e){v.call(this,e);break}}try{c=kt.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=Gt(this.defaults,e);var t=Nt(e.baseURL,e.url);return Xe(t,e.params,e.paramsSerializer)};return e}();je.forEach(["delete","get","head","options"],(function e(t){Yt.prototype[t]=function(e,r){return this.request(Gt(r||{},{method:t,url:e,data:(r||{}).data}))}}));je.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Gt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Yt.prototype[t]=r();Yt.prototype[t+"Form"]=r(true)}));var Xt=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new At(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function Zt(e){return function t(r){return e.apply(null,r)}}function $t(e){return je.isObject(e)&&e.isAxiosError===true}var Qt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qt).forEach((function(e){var t=e[0],r=e[1];Qt[r]=t}));function er(e){var t=new Yt(e);var r=P(Yt.prototype.request,t);je.extend(r,Yt.prototype,t,{allOwnKeys:true});je.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return er(Gt(e,r))};return r}var tr=er(lt);tr.Axios=Yt;tr.CanceledError=At;tr.CancelToken=Xt;tr.isCancel=Ot;tr.VERSION=Vt;tr.toFormData=ze;tr.AxiosError=Be;tr.Cancel=tr.CanceledError;tr.all=function e(t){return Promise.all(t)};tr.spread=Zt;tr.isAxiosError=$t;tr.mergeConfig=Gt;tr.AxiosHeaders=bt;tr.formToJSON=function(e){return ut(je.isHTMLForm(e)?new FormData(e):e)};tr.HttpStatusCode=Qt;tr.default=tr;var rr=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var nr=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return rr()}try{if(!__global__)return rr();return __global__}finally{delete Object.prototype.__global__}}();var ir=Symbol.for("verdocs-default-endpoint");var or=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var ar=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.baseURLv2="https://api-v2.verdocs.com";this.clientID="not-set";this.timeout=6e4;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.baseURLv2=(e===null||e===void 0?void 0:e.baseURLv2)||"https://api-v2.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=tr.create({baseURL:this.baseURL,timeout:this.timeout});D(this.api,{retries:0,retryDelay:D.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){nr[ir]=this};e.getDefault=function(){if(!nr[ir]){nr[ir]=new e;window.console.debug("[JS_SDK] Created default endpoint",nr[ir])}return nr[ir]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getBaseURLv2=function(){return this.baseURLv2};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setBaseURLv2=function(e){this.baseURLv2=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(or)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;delete this.api.defaults.headers.common.signer;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as s,c as i,h as t,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as o}from"./p-af048fad.js";import{S as r}from"./p-7a1b2643.js";const a=class{constructor(t){s(this,t),this.sdkError=i(this,"sdkError",7),this.endpoint=o.getDefault(),this.tab="profile"}async componentWillLoad(){var s,i,t;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[SETTINGS] Unable to start session, must be authenticated")}catch(e){console.log("[SETTINGS] Error with session",e),null===(s=this.sdkError)||void 0===s||s.emit(new r(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(t=e.response)||void 0===t?void 0:t.data))}}render(){return this.endpoint.session?t(e,null,t("div",{class:"tabs"},t("div",{class:"tab "+("profile"===this.tab?"active":""),onClick:()=>this.tab="profile"},"Profile"),t("div",{class:"tab "+("organization"===this.tab?"active":""),onClick:()=>this.tab="organization"},"Organization"),t("div",{class:"tab "+("members"===this.tab?"active":""),onClick:()=>this.tab="members"},"Members"),t("div",{class:"tab "+("apikeys"===this.tab?"active":""),onClick:()=>this.tab="apikeys"},"API Keys")),"profile"===this.tab&&t("verdocs-settings-profile",{endpoint:this.endpoint}),"organization"===this.tab&&t("verdocs-settings-organization",{endpoint:this.endpoint}),"members"===this.tab&&t("verdocs-settings-members",{endpoint:this.endpoint}),"apikeys"===this.tab&&t("verdocs-settings-api-keys",{endpoint:this.endpoint})):t(e,null,t("verdocs-loader",null))}};a.style='verdocs-settings{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}';export{a as verdocs_settings}
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function s(t){try{c(i.next(t))}catch(t){r(t)}}function a(t){try{c(i["throw"](t))}catch(t){r(t)}}function c(t){t.done?n(t.value):o(t.value).then(s,a)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return c([t,e])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];o=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-4422958b.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,o,r,s;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.H},function(){},function(t){r=t.V},function(t){s=t.S}],execute:function(){var a='verdocs-settings{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}';var c=t("verdocs_settings",function(){function t(t){e(this,t);this.sdkError=n(this,"sdkError",7);this.endpoint=r.getDefault();this.tab="profile"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Unable to start session, must be authenticated");return[2]}}catch(i){console.log("[SETTINGS] Error with session",i);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new s(i.message,(e=i.response)===null||e===void 0?void 0:e.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};t.prototype.render=function(){var t=this;if(!this.endpoint.session){return i(o,null,i("verdocs-loader",null))}return i(o,null,i("div",{class:"tabs"},i("div",{class:"tab ".concat(this.tab==="profile"?"active":""),onClick:function(){return t.tab="profile"}},"Profile"),i("div",{class:"tab ".concat(this.tab==="organization"?"active":""),onClick:function(){return t.tab="organization"}},"Organization"),i("div",{class:"tab ".concat(this.tab==="members"?"active":""),onClick:function(){return t.tab="members"}},"Members"),i("div",{class:"tab ".concat(this.tab==="apikeys"?"active":""),onClick:function(){return t.tab="apikeys"}},"API Keys")),this.tab==="profile"&&i("verdocs-settings-profile",{endpoint:this.endpoint}),this.tab==="organization"&&i("verdocs-settings-organization",{endpoint:this.endpoint}),this.tab==="members"&&i("verdocs-settings-members",{endpoint:this.endpoint}),this.tab==="apikeys"&&i("verdocs-settings-api-keys",{endpoint:this.endpoint}))};return t}());c.style=a}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as t}from"./p-05788c2b.js";var e,n,r,o,i,s,u,c;!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(e||(e={})),function(t){t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(n||(n={})),function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(r||(r={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(o||(o={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(i||(i={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(s||(s={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(u||(u={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(c||(c={}));const a=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function l(t,e,n,r,o,i,s){try{var u=t[i](s),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){l(i,r,o,s,u,"next",t)}function u(t){l(i,r,o,s,u,"throw",t)}s(void 0)}))}}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&(t=>!a.has(t&&t.code))(t)}var b=["get","head","options"],E=b.concat(["put","delete"]);function w(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function _(t){return!!t.config&&w(t)&&-1!==E.indexOf(t.config.method)}function y(t){return p(t)||_(t)}function R(){return 0}function O(t){var e=t["axios-retry"]||{};return e.retryCount=e.retryCount||0,t["axios-retry"]=e,e}function g(){return(g=f((function*(t,e,n,r){var o=n.retryCount<t&&e(r);if("object"==typeof o)try{return!1!==(yield o)}catch(t){return!1}return o}))).apply(this,arguments)}function v(t,e){t.interceptors.request.use((t=>(O(t).lastRequestTime=Date.now(),t))),t.interceptors.response.use(null,function(){var n=f((function*(n){var{config:r}=n;if(!r)return Promise.reject(n);var{retries:o=3,retryCondition:i=y,retryDelay:s=R,shouldResetTimeout:u=!1,onRetry:c=(()=>{})}=function(t,e){return d(d({},e),t["axios-retry"])}(r,e),a=O(r);if(yield function(t,e,n,r){return g.apply(this,arguments)}(o,i,a,n)){a.retryCount+=1;var l=s(a.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!u&&r.timeout&&a.lastRequestTime){var f=Date.now()-a.lastRequestTime,h=r.timeout-f-l;if(h<=0)return Promise.reject(n);r.timeout=h}return r.transformRequest=[t=>t],c(a.retryCount,n,r),new Promise((e=>setTimeout((()=>e(t(r))),l)))}return Promise.reject(n)}));return function(t){return n.apply(this,arguments)}}())}function T(t,e){return function(){return t.apply(e,arguments)}}v.isNetworkError=p,v.isSafeRequestError=function(t){return!!t.config&&w(t)&&-1!==b.indexOf(t.config.method)},v.isIdempotentRequestError=_,v.isNetworkOrIdempotentRequestError=y,v.exponentialDelay=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=100*Math.pow(2,t),n=.2*e*Math.random();return e+n},v.isRetryableError=w;const{toString:S}=Object.prototype,{getPrototypeOf:A}=Object,N=(j=Object.create(null),t=>{const e=S.call(t);return j[e]||(j[e]=e.slice(8,-1).toLowerCase())});var j;const C=t=>(t=t.toLowerCase(),e=>N(e)===t),D=t=>e=>typeof e===t,{isArray:L}=Array,U=D("undefined"),P=C("ArrayBuffer"),I=D("string"),F=D("function"),B=D("number"),x=t=>null!==t&&"object"==typeof t,M=t=>{if("object"!==N(t))return!1;const e=A(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},H=C("Date"),q=C("File"),k=C("Blob"),z=C("FileList"),G=C("URLSearchParams");function J(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),L(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function K(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,X=t=>!U(t)&&t!==V,$=(Y="undefined"!=typeof Uint8Array&&A(Uint8Array),t=>Y&&t instanceof Y);var Y;const W=C("HTMLFormElement"),Z=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Q=C("RegExp"),tt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};J(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},et="abcdefghijklmnopqrstuvwxyz",nt={DIGIT:"0123456789",ALPHA:et,ALPHA_DIGIT:et+et.toUpperCase()+"0123456789"},rt=C("AsyncFunction"),ot={isArray:L,isArrayBuffer:P,isBuffer:function(t){return null!==t&&!U(t)&&null!==t.constructor&&!U(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||F(t.append)&&("formdata"===(e=N(t))||"object"===e&&F(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&P(t.buffer),e},isString:I,isNumber:B,isBoolean:t=>!0===t||!1===t,isObject:x,isPlainObject:M,isUndefined:U,isDate:H,isFile:q,isBlob:k,isRegExp:Q,isFunction:F,isStream:t=>x(t)&&F(t.pipe),isURLSearchParams:G,isTypedArray:$,isFileList:z,forEach:J,merge:function t(){const{caseless:e}=X(this)&&this||{},n={},r=(r,o)=>{const i=e&&K(n,o)||o;n[i]=M(n[i])&&M(r)?t(n[i],r):M(r)?t({},r):L(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&J(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(J(e,((e,r)=>{t[r]=n&&F(e)?T(e,n):e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&A(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:N,kindOfTest:C,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length);const r=t.indexOf(e,n-=e.length);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(L(t))return t;let e=t.length;if(!B(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:W,hasOwnProperty:Z,hasOwnProp:Z,reduceDescriptors:tt,freezeMethods:t=>{tt(t,((e,n)=>{if(F(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;F(t[n])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return L(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:K,global:V,isContextDefined:X,ALPHABET:nt,generateString:(t=16,e=nt.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&F(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(x(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=L(t)?[]:{};return J(t,((t,e)=>{const i=n(t,r+1);!U(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:rt,isThenable:t=>t&&(x(t)||F(t))&&F(t.then)&&F(t.catch)};function it(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}ot.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ot.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const st=it.prototype,ut={};function ct(t){return ot.isPlainObject(t)||ot.isArray(t)}function at(t){return ot.endsWith(t,"[]")?t.slice(0,-2):t}function lt(t,e,n){return t?t.concat(e).map((function(t,e){return t=at(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ut[t]={value:t}})),Object.defineProperties(it,ut),Object.defineProperty(st,"isAxiosError",{value:!0}),it.from=(t,e,n,r,o,i)=>{const s=Object.create(st);return ot.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),it.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const ft=ot.toFlatObject(ot,{},null,(function(t){return/^is[A-Z]/.test(t)}));function ht(t,e,n){if(!ot.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ot.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ot.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ot.isSpecCompliantForm(e);if(!ot.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ot.isDate(t))return t.toISOString();if(!u&&ot.isBlob(t))throw new it("Blob is not supported. Use a Buffer instead.");return ot.isArrayBuffer(t)||ot.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function a(t,n,o){let u=t;if(t&&!o&&"object"==typeof t)if(ot.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ot.isArray(t)&&function(t){return ot.isArray(t)&&!t.some(ct)}(t)||(ot.isFileList(t)||ot.endsWith(n,"[]"))&&(u=ot.toArray(t)))return n=at(n),u.forEach((function(t,r){!ot.isUndefined(t)&&null!==t&&e.append(!0===s?lt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ct(t)||(e.append(lt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(ft,{defaultVisitor:a,convertValue:c,isVisitable:ct});if(!ot.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ot.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ot.forEach(n,(function(n,i){!0===(!(ot.isUndefined(n)||null===n)&&o.call(e,n,ot.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function dt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function mt(t,e){this._pairs=[],t&&ht(t,this,e)}const pt=mt.prototype;function bt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Et(t,e,n){if(!e)return t;const r=n&&n.encode||bt,o=n&&n.serialize;let i;if(i=o?o(e,n):ot.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}pt.append=function(t,e){this._pairs.push([t,e])},pt.toString=function(t){const e=t?function(e){return t.call(this,e,dt)}:dt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class wt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ot.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const _t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Rt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ot.isArray(r)?r.length:i,u?(r[i]=ot.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ot.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ot.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s)}if(ot.isFormData(t)&&ot.isFunction(t.entries)){const n={};return ot.forEachEntry(t,((t,r)=>{e(function(t){return ot.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Ot={"Content-Type":void 0},gt={transitional:_t,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ot.isObject(t);if(o&&ot.isHTMLForm(t)&&(t=new FormData(t)),ot.isFormData(t))return r&&r?JSON.stringify(Rt(t)):t;if(ot.isArrayBuffer(t)||ot.isBuffer(t)||ot.isStream(t)||ot.isFile(t)||ot.isBlob(t))return t;if(ot.isArrayBufferView(t))return t.buffer;if(ot.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ht(t,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ot.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ht(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ot.isString(t))try{return(0,JSON.parse)(t),ot.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||gt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ot.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw it.from(t,it.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ot.forEach(["delete","get","head"],(function(t){gt.headers[t]={}})),ot.forEach(["post","put","patch"],(function(t){gt.headers[t]=ot.merge(Ot)}));const vt=ot.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tt=Symbol("internals");function St(t){return t&&String(t).trim().toLowerCase()}function At(t){return!1===t||null==t?t:ot.isArray(t)?t.map(At):String(t)}function Nt(t,e,n,r,o){return ot.isFunction(r)?r.call(this,e,n):(o&&(e=n),ot.isString(e)?ot.isString(r)?-1!==e.indexOf(r):ot.isRegExp(r)?r.test(e):void 0:void 0)}class jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=St(e);if(!o)throw new Error("header name must be a non-empty string");const i=ot.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=At(t))}const i=(t,e)=>ot.forEach(t,((t,n)=>o(t,n,e)));return ot.isPlainObject(t)||t instanceof this.constructor?i(t,e):ot.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&vt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=St(t)){const n=ot.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(ot.isFunction(e))return e.call(this,t,n);if(ot.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=St(t)){const n=ot.findKey(this,t);return!(!n||void 0===this[n]||e&&!Nt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=St(t)){const o=ot.findKey(n,t);!o||e&&!Nt(0,n[o],o,e)||(delete n[o],r=!0)}}return ot.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Nt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ot.forEach(this,((r,o)=>{const i=ot.findKey(n,o);if(i)return e[i]=At(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=At(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ot.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ot.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Tt]=this[Tt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=St(t);e[r]||(function(t,e){const n=ot.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return ot.isArray(t)?t.forEach(r):r(t),this}}function Ct(t,e){const n=this||gt,r=e||n,o=jt.from(r.headers);let i=r.data;return ot.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Dt(t){return!(!t||!t.__CANCEL__)}function Lt(t,e,n){it.call(this,null==t?"canceled":t,it.ERR_CANCELED,e,n),this.name="CanceledError"}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ot.freezeMethods(jt.prototype),ot.freezeMethods(jt),ot.inherits(Lt,it,{__CANCEL__:!0});const Ut=yt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),ot.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ot.isString(r)&&s.push("path="+r),ot.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Pt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const It=yt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=ot.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Ft(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(u){const c=Date.now(),a=r[s];o||(o=c),n[i]=u,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const h=a&&c-a;return h?Math.round(1e3*f/h):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,c=r(u);n=i;const a={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};a[e?"download":"upload"]=!0,t(a)}}const Bt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=jt.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}ot.isFormData(r)&&(yt.isStandardBrowserEnv||yt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const a=Pt(t.baseURL,t.url);function l(){if(!c)return;const r=jt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Et(a,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new it("Request aborted",it.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new it("Network Error",it.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new it(e,(t.transitional||_t).clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,t,c)),c=null},yt.isStandardBrowserEnv){const e=(t.withCredentials||It(a))&&t.xsrfCookieName&&Ut.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&ot.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),ot.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Ft(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Ft(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Lt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(a);f&&-1===yt.protocols.indexOf(f)?n(new it("Unsupported protocol "+f+":",it.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};ot.forEach(Bt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lt(null,t)}function Mt(t){return xt(t),t.headers=jt.from(t.headers),t.data=Ct.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=ot.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=ot.isString(n)?Bt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(ot.hasOwnProp(Bt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!ot.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||gt.adapter)(t).then((function(e){return xt(t),e.data=Ct.call(t,t.transformResponse,e),e.headers=jt.from(e.headers),e}),(function(e){return Dt(e)||(xt(t),e&&e.response&&(e.response.data=Ct.call(t,t.transformResponse,e.response),e.response.headers=jt.from(e.response.headers))),Promise.reject(e)}))}const Ht=t=>t instanceof jt?t.toJSON():t;function qt(t,e){e=e||{};const n={};function r(t,e,n){return ot.isPlainObject(t)&&ot.isPlainObject(e)?ot.merge.call({caseless:n},t,e):ot.isPlainObject(e)?ot.merge({},e):ot.isArray(e)?e.slice():e}function o(t,e,n){return ot.isUndefined(e)?ot.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ot.isUndefined(e))return r(void 0,e)}function s(t,e){return ot.isUndefined(e)?ot.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Ht(t),Ht(e),!0)};return ot.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ot.isUndefined(s)&&i!==u||(n[r]=s)})),n}const kt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{kt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const zt={};kt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.4.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new it(r(o," has been removed"+(e?" in "+e:"")),it.ERR_DEPRECATED);return e&&!zt[o]&&(zt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const Gt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new it("option "+i+" must be "+n,it.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new it("Unknown option "+i,it.ERR_BAD_OPTION)}},validators:kt},Jt=Gt.validators;class Kt{constructor(t){this.defaults=t,this.interceptors={request:new wt,response:new wt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=qt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&Gt.assertOptions(n,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),null!=r&&(ot.isFunction(r)?e.paramsSerializer={serialize:r}:Gt.assertOptions(r,{encode:Jt.function,serialize:Jt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&ot.merge(o.common,o[e.method]),i&&ot.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=jt.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let a;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!u){const t=[Mt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,a=Promise.resolve(e);f<l;)a=a.then(t[f++],t[f++]);return a}l=s.length;let h=e;for(f=0;f<l;){const t=s[f++],e=s[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{a=Mt.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)a=a.then(c[f++],c[f++]);return a}getUri(t){return Et(Pt((t=qt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ot.forEach(["delete","get","head","options"],(function(t){Kt.prototype[t]=function(e,n){return this.request(qt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ot.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(qt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Kt.prototype[t]=e(),Kt.prototype[t+"Form"]=e(!0)}));class Vt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Lt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Vt((function(e){t=e})),cancel:t}}}const Xt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xt).forEach((([t,e])=>{Xt[e]=t}));const $t=function t(e){const n=new Kt(e),r=T(Kt.prototype.request,n);return ot.extend(r,Kt.prototype,n,{allOwnKeys:!0}),ot.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(qt(e,n))},r}(gt);$t.Axios=Kt,$t.CanceledError=Lt,$t.CancelToken=Vt,$t.isCancel=Dt,$t.VERSION="1.4.0",$t.toFormData=ht,$t.AxiosError=it,$t.Cancel=$t.CanceledError,$t.all=function(t){return Promise.all(t)},$t.spread=function(t){return function(e){return t.apply(null,e)}},$t.isAxiosError=function(t){return ot.isObject(t)&&!0===t.isAxiosError},$t.mergeConfig=qt,$t.AxiosHeaders=jt,$t.formToJSON=t=>Rt(ot.isHTMLForm(t)?new FormData(t):t),$t.HttpStatusCode=Xt,$t.default=$t;var Yt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Wt=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return Yt()}try{return __global__||Yt()}finally{delete Object.prototype.__global__}}(),Zt=Symbol.for("verdocs-default-endpoint"),Qt=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},te=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://api.verdocs.com",this.baseURLv2="https://api-v2.verdocs.com",this.clientID="not-set",this.timeout=6e4,this.token=null,this.nextListenerId=0,this.sessionListeners=new Map,this.requestLoggerId=null,this.session=null,this.baseURL=(null==t?void 0:t.baseURL)||"https://api.verdocs.com",this.baseURLv2=(null==t?void 0:t.baseURLv2)||"https://api-v2.verdocs.com",this.timeout=(null==t?void 0:t.timeout)||6e4,this.environment=(null==t?void 0:t.environment)||"verdocs",this.sessionType=(null==t?void 0:t.sessionType)||"user",this.clientID=(null==t?void 0:t.clientID)||"not-set",this.api=$t.create({baseURL:this.baseURL,timeout:this.timeout}),v(this.api,{retries:0,retryDelay:v.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){Wt[Zt]=this},e.getDefault=function(){return Wt[Zt]||(Wt[Zt]=new e,window.console.debug("[JS_SDK] Created default endpoint",Wt[Zt])),Wt[Zt]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},e.prototype.getBaseURLv2=function(){return this.baseURLv2},e.prototype.getClientID=function(){return this.clientID},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getSession=function(){return this.session},e.prototype.setEnvironment=function(t){return this.environment=t,this},e.prototype.setSessionType=function(t){return this.sessionType=t,this},e.prototype.setBaseURL=function(t){return this.baseURL=t,this.api.defaults.baseURL=t,this},e.prototype.setBaseURLv2=function(t){return this.baseURLv2=t,this},e.prototype.setClientID=function(t){return this.clientID=t,this.api.defaults.headers.common["X-Client-ID"]=t,this},e.prototype.setTimeout=function(t){return this.timeout=t,this.api.defaults.timeout=t,this},e.prototype.logRequests=function(t){return t&&null===this.requestLoggerId?this.requestLoggerId=this.api.interceptors.request.use(Qt):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{r as T,te as V,o as a}
|