@verdocs/web-sdk 2.3.0 → 2.3.1
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-6110ad1f.js → TemplateStore-d5dd1621.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-6441c5c0.js → VerdocsEndpoint-8495a05a.js} +8 -11
- 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 +3 -3
- 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 +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -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/templates/verdocs-template-create/verdocs-template-create.js +2 -2
- package/dist/components/VerdocsEndpoint.js +8 -11
- package/dist/components/verdocs-template-create2.js +2 -2
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-03608883.js → TemplateStore-18b6dbe3.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-6f42e6a8.js → VerdocsEndpoint-140b14d7.js} +8 -11
- 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 +3 -3
- 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 +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -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-03608883.js → TemplateStore-18b6dbe3.js} +1 -1
- package/dist/esm-es5/VerdocsEndpoint-140b14d7.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-3eb191fd.system.entry.js → p-0002c8d5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-99c10bba.system.entry.js → p-07432832.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-16724702.js +1 -0
- package/dist/verdocs-web-sdk/{p-3b96b2c9.entry.js → p-1bb86e1a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1831cb38.entry.js → p-1cd6f713.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8b1b3ffd.system.entry.js → p-1df623d7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e1dc1460.system.entry.js → p-23ff8991.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-82b74dc0.entry.js → p-2ec00680.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a5ce0030.entry.js → p-32f1c0a6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f80b83e7.entry.js → p-36f7c8c6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5c38d5cc.entry.js → p-38272a03.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-75541556.entry.js → p-3a8c1133.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8a80d243.system.entry.js → p-4aeea02f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c89bf71d.entry.js → p-4ddbb290.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-208fd2e2.js → p-571f4e12.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b88f9ff5.system.entry.js → p-576a4517.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7cbd2c3a.system.entry.js → p-59baf5ed.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-965ec85a.entry.js → p-5c2b1e35.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-87008226.system.entry.js → p-5cce8ddb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5ed0a61e.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-6653aa42.system.entry.js → p-65b96820.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-66b2899b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-fa0d27b1.entry.js → p-764045ab.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-19f8d4eb.system.entry.js → p-7db74d5e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-83225bcb.entry.js → p-853a8c73.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-947d60dc.system.entry.js → p-878edeb5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0494ee4f.system.entry.js → p-8ad78ada.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5dfefab6.entry.js → p-8b28f85b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5b70ff97.entry.js → p-8ceccd53.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-de82e80e.entry.js → p-a8533019.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7c3a05f6.system.entry.js → p-aca795cb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cdf1efe7.entry.js → p-acac85fc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-112cd2f5.entry.js → p-ad18bb44.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eea1dd87.entry.js → p-b10db51e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a2531ddc.entry.js → p-b2139ec5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1983855b.system.entry.js → p-be083d74.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d5e28045.system.entry.js → p-c01196f9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7d6f7f4b.system.entry.js → p-c48b67ab.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d841fd4b.entry.js → p-c58e4861.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a75490f4.system.entry.js → p-c7f6bb1d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-80540240.entry.js → p-d0865aca.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b4238a4c.system.entry.js → p-dc37ce85.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c37f1a93.entry.js → p-e4432f87.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b8732502.system.entry.js → p-e7481777.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f6c3da25.system.entry.js → p-ed2d0a49.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-262d513f.system.entry.js → p-f0b826a2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aaf87ce4.system.entry.js → p-f1aa1551.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dab1e29a.entry.js → p-f269c7c4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0ffb2c57.system.js → p-f83e5b8f.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-43d14a05.system.entry.js → p-fc6629e5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dceba864.system.entry.js → p-fc94492b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d01e5b64.entry.js → p-fff35c6b.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 -2059
- package/dist/esm-es5/VerdocsEndpoint-6f42e6a8.js +0 -1
- package/dist/verdocs-web-sdk/p-3a7fa389.js +0 -1
- package/dist/verdocs-web-sdk/p-4f08ceaf.system.js +0 -1
- package/dist/verdocs-web-sdk/p-8439bf7b.entry.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};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 canPerformTemplateAction=function(e,t,r){var n,i;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var o=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var s=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!o){return{canPerform:false,message:"Active session required"}}var a=(r===null||r===void 0?void 0:r.profile_id)===o;var u=(r===null||r===void 0?void 0:r.organization_id)===s;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var c=(i=r===null||r===void 0?void 0:r.is_public)!==null&&i!==void 0?i:false;var f=[];switch(t){case"create_personal":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!a){if(!l&&u||!c){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ)}}break;case"write":if(!a){f.push(TemplatePermissions.TEMPLATE_MEMBER_READ);f.push(TemplatePermissions.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_ORG)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_CREATE_PUBLIC);f.push(TemplatePermissions.TEMPLATE_CREATOR_VISIBILITY)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(a){f.push(TemplatePermissions.TEMPLATE_CREATOR_DELETE)}else{f.push(TemplatePermissions.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(hasRequiredPermissions(e,f)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(f.toString())}};var hasRequiredPermissions=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var __awaiter=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())}))};var __generator=undefined&&undefined.__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(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(r=0)),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 getTemplates=function(e,t){return e.api.post("/templates",{params:t}).then((function(e){return e.data}))};var getTemplate=function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))};var ALLOWED_CREATE_FIELDS=["name","is_personal","is_public","sender","description","roles","fields"];var createTemplate=function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){if(t.documents.length>10){throw new Error("createTemplate() has a maximum of 10 documents that can be attached.")}var i=new FormData;ALLOWED_CREATE_FIELDS.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/templates",t,n).then((function(e){return e.data}))}};var updateTemplate=function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))};var deleteTemplate=function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))};var SortOptions$1;(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$1||(SortOptions$1={}));var listTemplates=function(e,t){if(t===void 0){t={}}return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))};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)};var namespace="axios-retry";function isNetworkError(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return 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){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return isRetryableError(e)&&SAFE_HTTP_METHODS.indexOf(e.config.method)!==-1}function isIdempotentRequestError(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){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(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var DEFAULT_OPTIONS={retries:3,retryCondition:isNetworkOrIdempotentRequestError,retryDelay:noDelay,shouldResetTimeout:false,onRetry:function(){}};function getRequestOptions(e,t){return __assign(__assign(__assign({},DEFAULT_OPTIONS),t),e[namespace])}function setCurrentState(e,t){var r=getRequestOptions(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[namespace]=r;return r}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){return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);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]}}))}))}var axiosRetry=function(e,t){var r=e.interceptors.request.use((function(e){setCurrentState(e,t);return e}));var n=e.interceptors.response.use(null,(function(r){return __awaiter(void 0,void 0,void 0,(function(){var n,i,o,s,a,u,l,c;return __generator(this,(function(f){switch(f.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=setCurrentState(n,t);return[4,shouldRetry(i,r)];case 1:if(!f.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,s=i.shouldResetTimeout,a=i.onRetry;u=o(i.retryCount,r);fixConfig(e,n);if(!s&&n.timeout&&i.lastRequestTime){l=Date.now()-i.lastRequestTime;c=n.timeout-l-u;if(c<=0){return[2,Promise.reject(r)]}n.timeout=c}n.transformRequest=[function(e){return e}];return[4,a(i.retryCount,r,n)];case 2:f.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(n))}),u)}))];case 3:return[2,Promise.reject(r)]}}))}))}));return{requestInterceptorId:r,responseInterceptorId:n}};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){var o;if((o=t(r,i,e))!==false){n[i]=o||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$1={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$1.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$1.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$1.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$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.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$1.isArray(e)&&!e.some(isVisitable)}var predicates=utils$1.toFlatObject(utils$1,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function toFormData(e,t,r){if(!utils$1.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=utils$1.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!utils$1.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$1.isSpecCompliantForm(t);if(!utils$1.isFunction(i)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(utils$1.isDate(e)){return e.toISOString()}if(!u&&utils$1.isBlob(e)){throw new AxiosError("Blob is not supported. Use a Buffer instead.")}if(utils$1.isArrayBuffer(e)||utils$1.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$1.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(r,"[]"))&&(a=utils$1.toArray(e))){r=removeBrackets(r);a.forEach((function e(n,i){!(utils$1.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$1.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}f.push(e);utils$1.forEach(e,(function e(n,o){var s=!(utils$1.isUndefined(n)||n===null)&&i.call(t,n,utils$1.isString(o)?o.trim():o,r,d);if(s===true){p(n,r?r.concat(o):[o])}}));f.pop()}if(!utils$1.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$1.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$1.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 platform$1={isBrowser:true,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]};var hasBrowserEnv=typeof window!=="undefined"&&typeof document!=="undefined";var hasStandardBrowserEnv=function(e){return hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var hasStandardBrowserWebWorkerEnv=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var utils=Object.freeze({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,hasStandardBrowserEnv:hasStandardBrowserEnv});var platform=__assign(__assign({},utils),platform$1);function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(platform.isNode&&utils$1.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.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$1.isArray(n)?n.length:o;if(a){if(utils$1.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!s}if(!n[o]||!utils$1.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&utils$1.isArray(n[o])){n[o]=arrayToObject(n[o])}return!s}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){var r={};utils$1.forEachEntry(e,(function(e,n){t(parsePropPath(e),n,r,0)}));return r}return null}function stringifySafely(e,t,r){if(utils$1.isString(e)){try{(t||JSON.parse)(e);return utils$1.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$1.isObject(t);if(o&&utils$1.isHTMLForm(t)){t=new FormData(t)}var s=utils$1.isFormData(t);if(s){if(!i){return t}return i?JSON.stringify(formDataToJSON(t)):t}if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)){return t}if(utils$1.isArrayBufferView(t)){return t.buffer}if(utils$1.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$1.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$1.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, */*","Content-Type":undefined}}};utils$1.forEach(["delete","get","head","post","put","patch"],(function(e){defaults.headers[e]={}}));var ignoreDuplicateOf=utils$1.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$1.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$1.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!utils$1.isString(t))return;if(utils$1.isString(n)){return t.indexOf(n)!==-1}if(utils$1.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$1.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$1.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$1.forEach(e,(function(e,r){return i(e,r,t)}))};if(utils$1.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(utils$1.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$1.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return parseTokens(n)}if(utils$1.isFunction(t)){return t.call(this,n,r)}if(utils$1.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$1.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$1.findKey(r,e);if(i&&(!t||matchHeaderValue(r,r[i],i,t))){delete r[i];n=true}}}if(utils$1.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$1.forEach(this,(function(n,i){var o=utils$1.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$1.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&utils$1.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$1.isArray(e)?e.forEach(i):i(e);return this};return e}();AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));utils$1.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$1.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$1.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.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var s=[e+"="+encodeURIComponent(t)];utils$1.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());utils$1.isString(n)&&s.push("path="+n);utils$1.isString(i)&&s.push("domain="+i);o===true&&s.push("secure");document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};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.hasStandardBrowserEnv?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$1.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,a=e.withXSRFToken;var u;function l(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var c;if(utils$1.isFormData(i)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((c=o.getContentType())!==false){var f=c?c.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=f[0],p=f.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"";var m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(E+":"+m))}var v=buildFullPath(e.baseURL,e.url);h.open(e.method.toUpperCase(),buildURL(v,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function T(){if(!h){return}var t=AxiosHeaders.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!s||s==="text"||s==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};settle((function e(t){r(t);l()}),(function e(t){n(t);l()}),o);h=null}if("onloadend"in h){h.onloadend=T}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(T)}}h.onabort=function t(){if(!h){return}n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,h));h=null};h.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,h));h=null};if(platform.hasStandardBrowserEnv){a&&utils$1.isFunction(a)&&(a=a(e));if(a||a!==false&&isURLSameOrigin(v)){var y=e.xsrfHeaderName&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);if(y){o.set(e.xsrfHeaderName,y)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){utils$1.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!utils$1.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(s&&s!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",progressEventReducer(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new CanceledError(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var R=parseProtocol(v);if(R&&platform.protocols.indexOf(R)===-1){n(new AxiosError("Unsupported protocol "+R+":",AxiosError.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$1.forEach(knownAdapters,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var renderReason=function(e){return"- ".concat(e)};var isResolvedHandle=function(e){return utils$1.isFunction(e)||e===null||e===false};var adapters={getAdapter:function(e){e=utils$1.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var s=void 0;n=r;if(!isResolvedHandle(r)){n=knownAdapters[(s=String(r)).toLowerCase()];if(n===undefined){throw new AxiosError("Unknown adapter '".concat(s,"'"))}}if(n){break}i[s||"#"+o]=n}if(!n){var a=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?a.length>1?"since :\n"+a.map(renderReason).join("\n"):" "+renderReason(a[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}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$1.isPlainObject(e)&&utils$1.isPlainObject(t)){return utils$1.merge.call({caseless:r},e,t)}else if(utils$1.isPlainObject(t)){return utils$1.merge({},t)}else if(utils$1.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!utils$1.isUndefined(t)){return n(e,t,r)}else if(!utils$1.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}}function s(e,t){if(!utils$1.isUndefined(t)){return n(undefined,t)}else if(!utils$1.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,withXSRFToken: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$1.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var s=u[o]||i;var l=s(e[o],t[o],o);utils$1.isUndefined(l)&&s!==a||(r[o]=l)}));return r}var VERSION="1.6.2";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$1.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=i&&utils$1.merge(i.common,i[t.method]);i&&utils$1.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$1.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$1.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$1.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$1.extend(r,Axios.prototype,t,{allOwnKeys:true});utils$1.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$1.isHTMLForm(e)?new FormData(e):e)};axios.getAdapter=adapters.getAdapter;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,createTemplate as b,canPerformTemplateAction as c,deleteTemplate as d,getTemplates as e,getTemplate as g,listTemplates as l,updateTemplate as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as t}from"./p-05788c2b.js";var e,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"}(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={}));var r,o=function(t,e,r){var o,s;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var u=(null==t?void 0:t.profile_id)||"BOGUS";if(!u)return{canPerform:!1,message:"Active session required"};var c=(null==r?void 0:r.profile_id)===u,a=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),l=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(s=null==r?void 0:r.is_public)&&void 0!==s&&s,h=[];switch(e){case"create_personal":h.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":h.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":c||(!l&&a||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":c||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(c?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(c?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":c?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(c?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return i(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},i=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))},s=function(t,e){return t.api.post("/templates",{params:e}).then((function(t){return t.data}))},u=function(t,e){return t.api.get("/templates/".concat(e)).then((function(t){return t.data}))},c=["name","is_personal","is_public","sender","description","roles","fields"],a=function(t,e,n){var r={timeout:12e4,onUploadProgress:function(t){var e=t.total||1,r=t.loaded||0;null==n||n(Math.floor(100*r/(e||1)),r,e||1)}};if(e.documents&&e.documents[0]instanceof File){if(e.documents.length>10)throw new Error("createTemplate() has a maximum of 10 documents that can be attached.");var o=new FormData;return c.forEach((function(t){void 0!==e[t]&&o.append(t,e[t])})),e.documents.forEach((function(t){o.append("documents",t,t.name)})),t.api.post("/templates",o,r).then((function(t){return t.data}))}return t.api.post("/templates",e,r).then((function(t){return t.data}))},l=function(t,e,n){return t.api.put("/templates/".concat(e),n).then((function(t){return t.data}))},f=function(t,e){return t.api.delete("/templates/".concat(e)).then((function(t){return t.data}))};!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"}(r||(r={}));var h,d,m,p,b,E,_=function(t,e){return void 0===e&&(e={}),n=void 0,r=void 0,i=function(){return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){s.label=u[1];break}if(6===u[0]&&s.label<o[1]){s.label=o[1],o=u;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(u);break}o[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,(function(){return[2,t.api.post("/templates/list",e).then((function(t){return t.data}))]}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(s,u)}c((i=i.apply(n,r||[])).next())}));var n,r,o,i};!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"}(h||(h={})),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"}(d||(d={})),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"}(m||(m={})),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"}(p||(p={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(b||(b={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(E||(E={}));const w=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 y(t){return!t.response&&!!t.code&&!["ERR_CANCELED","ECONNABORTED"].includes(t.code)&&(t=>!w.has(t&&t.code))(t)}const R=["get","head","options"],g=R.concat(["put","delete"]);function v(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function O(t){return!!t.config?.method&&v(t)&&-1!==g.indexOf(t.config.method)}function T(t){return y(t)||O(t)}const S={retries:3,retryCondition:T,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:()=>{}};function A(t,e){const n=function(t,e){return{...S,...e,...t["axios-retry"]}}(t,e||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),t["axios-retry"]=n,n}const N=(t,e)=>({requestInterceptorId:t.interceptors.request.use((t=>(A(t,e),t))),responseInterceptorId:t.interceptors.response.use(null,(async n=>{const{config:r}=n;if(!r)return Promise.reject(n);const o=A(r,e);if(await async function(t,e){const{retries:n,retryCondition:r}=t,o=(t.retryCount||0)<n&&r(e);if("object"==typeof o)try{return!1!==await o}catch(t){return!1}return o}(o,n)){o.retryCount+=1;const{retryDelay:e,shouldResetTimeout:i,onRetry:s}=o,u=e(o.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),!i&&r.timeout&&o.lastRequestTime){const t=Date.now()-o.lastRequestTime,e=r.timeout-t-u;if(e<=0)return Promise.reject(n);r.timeout=e}return r.transformRequest=[t=>t],await s(o.retryCount,n,r),new Promise((e=>{setTimeout((()=>e(t(r))),u)}))}return Promise.reject(n)}))});function C(t,e){return function(){return t.apply(e,arguments)}}N.isNetworkError=y,N.isSafeRequestError=function(t){return!!t.config?.method&&v(t)&&-1!==R.indexOf(t.config.method)},N.isIdempotentRequestError=O,N.isNetworkOrIdempotentRequestError=T,N.exponentialDelay=function(t=0,e,n=100){const r=2**t*n;return r+.2*r*Math.random()},N.isRetryableError=v;const{toString:D}=Object.prototype,{getPrototypeOf:j}=Object,L=(P=Object.create(null),t=>{const e=D.call(t);return P[e]||(P[e]=e.slice(8,-1).toLowerCase())});var P;const U=t=>(t=t.toLowerCase(),e=>L(e)===t),I=t=>e=>typeof e===t,{isArray:F}=Array,B=I("undefined"),x=U("ArrayBuffer"),k=I("string"),M=I("function"),q=I("number"),H=t=>null!==t&&"object"==typeof t,G=t=>{if("object"!==L(t))return!1;const e=j(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},z=U("Date"),J=U("File"),K=U("Blob"),V=U("FileList"),X=U("URLSearchParams");function $(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),F(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 Y(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 W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Z=t=>!B(t)&&t!==W,Q=(tt="undefined"!=typeof Uint8Array&&j(Uint8Array),t=>tt&&t instanceof tt);var tt;const et=U("HTMLFormElement"),nt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),rt=U("RegExp"),ot=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},it="abcdefghijklmnopqrstuvwxyz",st={DIGIT:"0123456789",ALPHA:it,ALPHA_DIGIT:it+it.toUpperCase()+"0123456789"},ut=U("AsyncFunction"),ct={isArray:F,isArrayBuffer:x,isBuffer:function(t){return null!==t&&!B(t)&&null!==t.constructor&&!B(t.constructor)&&M(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||M(t.append)&&("formdata"===(e=L(t))||"object"===e&&M(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&x(t.buffer),e},isString:k,isNumber:q,isBoolean:t=>!0===t||!1===t,isObject:H,isPlainObject:G,isUndefined:B,isDate:z,isFile:J,isBlob:K,isRegExp:rt,isFunction:M,isStream:t=>H(t)&&M(t.pipe),isURLSearchParams:X,isTypedArray:Q,isFileList:V,forEach:$,merge:function t(){const{caseless:e}=Z(this)&&this||{},n={},r=(r,o)=>{const i=e&&Y(n,o)||o;n[i]=G(n[i])&&G(r)?t(n[i],r):G(r)?t({},r):F(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&$(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>($(e,((e,r)=>{t[r]=n&&M(e)?C(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&&j(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:L,kindOfTest:U,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(F(t))return t;let e=t.length;if(!q(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:et,hasOwnProperty:nt,hasOwnProp:nt,reduceDescriptors:ot,freezeMethods:t=>{ot(t,((e,n)=>{if(M(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;M(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 F(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:Y,global:W,isContextDefined:Z,ALPHABET:st,generateString:(t=16,e=st.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&M(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(H(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=F(t)?[]:{};return $(t,((t,e)=>{const i=n(t,r+1);!B(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:ut,isThenable:t=>t&&(H(t)||M(t))&&M(t.then)&&M(t.catch)};function at(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)}ct.inherits(at,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:ct.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const lt=at.prototype,ft={};function ht(t){return ct.isPlainObject(t)||ct.isArray(t)}function dt(t){return ct.endsWith(t,"[]")?t.slice(0,-2):t}function mt(t,e,n){return t?t.concat(e).map((function(t,e){return t=dt(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=>{ft[t]={value:t}})),Object.defineProperties(at,ft),Object.defineProperty(lt,"isAxiosError",{value:!0}),at.from=(t,e,n,r,o,i)=>{const s=Object.create(lt);return ct.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),at.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const pt=ct.toFlatObject(ct,{},null,(function(t){return/^is[A-Z]/.test(t)}));function bt(t,e,n){if(!ct.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ct.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ct.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ct.isSpecCompliantForm(e);if(!ct.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ct.isDate(t))return t.toISOString();if(!u&&ct.isBlob(t))throw new at("Blob is not supported. Use a Buffer instead.");return ct.isArrayBuffer(t)||ct.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(ct.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ct.isArray(t)&&function(t){return ct.isArray(t)&&!t.some(ht)}(t)||(ct.isFileList(t)||ct.endsWith(n,"[]"))&&(u=ct.toArray(t)))return n=dt(n),u.forEach((function(t,r){!ct.isUndefined(t)&&null!==t&&e.append(!0===s?mt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ht(t)||(e.append(mt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(pt,{defaultVisitor:a,convertValue:c,isVisitable:ht});if(!ct.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ct.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ct.forEach(n,(function(n,i){!0===(!(ct.isUndefined(n)||null===n)&&o.call(e,n,ct.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function Et(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function _t(t,e){this._pairs=[],t&&bt(t,this,e)}const wt=_t.prototype;function yt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rt(t,e,n){if(!e)return t;const r=n&&n.encode||yt,o=n&&n.serialize;let i;if(i=o?o(e,n):ct.isURLSearchParams(e)?e.toString():new _t(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}wt.append=function(t,e){this._pairs.push([t,e])},wt.toString=function(t){const e=t?function(e){return t.call(this,e,Et)}:Et;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class gt{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){ct.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ot={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_t,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Tt="undefined"!=typeof window&&"undefined"!=typeof document,St=(At="undefined"!=typeof navigator&&navigator.product,Tt&&["ReactNative","NativeScript","NS"].indexOf(At)<0);var At;const Nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ct={...Object.freeze({__proto__:null,hasBrowserEnv:Tt,hasStandardBrowserWebWorkerEnv:Nt,hasStandardBrowserEnv:St}),...Ot};function Dt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ct.isArray(r)?r.length:i,u?(r[i]=ct.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ct.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ct.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(ct.isFormData(t)&&ct.isFunction(t.entries)){const n={};return ct.forEachEntry(t,((t,r)=>{e(function(t){return ct.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const jt={transitional:vt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ct.isObject(t);if(o&&ct.isHTMLForm(t)&&(t=new FormData(t)),ct.isFormData(t))return r&&r?JSON.stringify(Dt(t)):t;if(ct.isArrayBuffer(t)||ct.isBuffer(t)||ct.isStream(t)||ct.isFile(t)||ct.isBlob(t))return t;if(ct.isArrayBufferView(t))return t.buffer;if(ct.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 bt(t,new Ct.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Ct.isNode&&ct.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ct.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return bt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ct.isString(t))try{return(0,JSON.parse)(t),ct.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||jt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ct.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 at.from(t,at.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:Ct.classes.FormData,Blob:Ct.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ct.forEach(["delete","get","head","post","put","patch"],(t=>{jt.headers[t]={}}));const Lt=ct.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"]),Pt=Symbol("internals");function Ut(t){return t&&String(t).trim().toLowerCase()}function It(t){return!1===t||null==t?t:ct.isArray(t)?t.map(It):String(t)}function Ft(t,e,n,r,o){return ct.isFunction(r)?r.call(this,e,n):(o&&(e=n),ct.isString(e)?ct.isString(r)?-1!==e.indexOf(r):ct.isRegExp(r)?r.test(e):void 0:void 0)}class Bt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Ut(e);if(!o)throw new Error("header name must be a non-empty string");const i=ct.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=It(t))}const i=(t,e)=>ct.forEach(t,((t,n)=>o(t,n,e)));return ct.isPlainObject(t)||t instanceof this.constructor?i(t,e):ct.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]&&Lt[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=Ut(t)){const n=ct.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(ct.isFunction(e))return e.call(this,t,n);if(ct.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ut(t)){const n=ct.findKey(this,t);return!(!n||void 0===this[n]||e&&!Ft(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Ut(t)){const o=ct.findKey(n,t);!o||e&&!Ft(0,n[o],o,e)||(delete n[o],r=!0)}}return ct.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&&!Ft(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ct.forEach(this,((r,o)=>{const i=ct.findKey(n,o);if(i)return e[i]=It(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]=It(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ct.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ct.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[Pt]=this[Pt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Ut(t);e[r]||(function(t,e){const n=ct.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 ct.isArray(t)?t.forEach(r):r(t),this}}function xt(t,e){const n=this||jt,r=e||n,o=Bt.from(r.headers);let i=r.data;return ct.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function kt(t){return!(!t||!t.__CANCEL__)}function Mt(t,e,n){at.call(this,null==t?"canceled":t,at.ERR_CANCELED,e,n),this.name="CanceledError"}Bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ct.reduceDescriptors(Bt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ct.freezeMethods(Bt),ct.inherits(Mt,at,{__CANCEL__:!0});const qt=Ct.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];ct.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ct.isString(r)&&s.push("path="+r),ct.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ht(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 Gt=Ct.hasStandardBrowserEnv?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=ct.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function zt(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 Jt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Bt.from(t.headers).normalize();let i,s,{responseType:u,withXSRFToken:c}=t;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(ct.isFormData(r))if(Ct.hasStandardBrowserEnv||Ct.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=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 f=Ht(t.baseURL,t.url);function h(){if(!l)return;const r=Bt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new at("Request failed with status code "+n.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:u&&"text"!==u&&"json"!==u?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),Rt(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new at("Request aborted",at.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new at("Network Error",at.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new at(e,(t.transitional||vt).clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,t,l)),l=null},Ct.hasStandardBrowserEnv&&(c&&ct.isFunction(c)&&(c=c(t)),c||!1!==c&&Gt(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&qt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&ct.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),ct.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),u&&"json"!==u&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",zt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",zt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new Mt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);d&&-1===Ct.protocols.indexOf(d)?n(new at("Unsupported protocol "+d+":",at.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};ct.forEach(Jt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Kt=t=>`- ${t}`,Vt=t=>ct.isFunction(t)||null===t||!1===t,Xt=t=>{t=ct.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!Vt(n)&&(r=Jt[(e=String(n)).toLowerCase()],void 0===r))throw new at(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new at("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Kt).join("\n"):" "+Kt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function $t(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Mt(null,t)}function Yt(t){return $t(t),t.headers=Bt.from(t.headers),t.data=xt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Xt(t.adapter||jt.adapter)(t).then((function(e){return $t(t),e.data=xt.call(t,t.transformResponse,e),e.headers=Bt.from(e.headers),e}),(function(e){return kt(e)||($t(t),e&&e.response&&(e.response.data=xt.call(t,t.transformResponse,e.response),e.response.headers=Bt.from(e.response.headers))),Promise.reject(e)}))}const Wt=t=>t instanceof Bt?t.toJSON():t;function Zt(t,e){e=e||{};const n={};function r(t,e,n){return ct.isPlainObject(t)&&ct.isPlainObject(e)?ct.merge.call({caseless:n},t,e):ct.isPlainObject(e)?ct.merge({},e):ct.isArray(e)?e.slice():e}function o(t,e,n){return ct.isUndefined(e)?ct.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ct.isUndefined(e))return r(void 0,e)}function s(t,e){return ct.isUndefined(e)?ct.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,withXSRFToken: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(Wt(t),Wt(e),!0)};return ct.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ct.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Qt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Qt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const te={};Qt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new at(r(o," has been removed"+(e?" in "+e:"")),at.ERR_DEPRECATED);return e&&!te[o]&&(te[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 ee={assertOptions:function(t,e,n){if("object"!=typeof t)throw new at("options must be an object",at.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 at("option "+i+" must be "+n,at.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new at("Unknown option "+i,at.ERR_BAD_OPTION)}},validators:Qt},ne=ee.validators;class re{constructor(t){this.defaults=t,this.interceptors={request:new gt,response:new gt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Zt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ee.assertOptions(n,{silentJSONParsing:ne.transitional(ne.boolean),forcedJSONParsing:ne.transitional(ne.boolean),clarifyTimeoutError:ne.transitional(ne.boolean)},!1),null!=r&&(ct.isFunction(r)?e.paramsSerializer={serialize:r}:ee.assertOptions(r,{encode:ne.function,serialize:ne.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&ct.merge(o.common,o[e.method]);o&&ct.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Bt.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=[Yt.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=Yt.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 Rt(Ht((t=Zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ct.forEach(["delete","get","head","options"],(function(t){re.prototype[t]=function(e,n){return this.request(Zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ct.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}re.prototype[t]=e(),re.prototype[t+"Form"]=e(!0)}));class oe{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 Mt(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 oe((function(e){t=e})),cancel:t}}}const ie={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(ie).forEach((([t,e])=>{ie[e]=t}));const se=function t(e){const n=new re(e),r=C(re.prototype.request,n);return ct.extend(r,re.prototype,n,{allOwnKeys:!0}),ct.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Zt(e,n))},r}(jt);se.Axios=re,se.CanceledError=Mt,se.CancelToken=oe,se.isCancel=kt,se.VERSION="1.6.2",se.toFormData=bt,se.AxiosError=at,se.Cancel=se.CanceledError,se.all=function(t){return Promise.all(t)},se.spread=function(t){return function(e){return t.apply(null,e)}},se.isAxiosError=function(t){return ct.isObject(t)&&!0===t.isAxiosError},se.mergeConfig=Zt,se.AxiosHeaders=Bt,se.formToJSON=t=>Dt(ct.isHTMLForm(t)?new FormData(t):t),se.getAdapter=Xt,se.HttpStatusCode=ie,se.default=se;var ue=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},ce=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 ue()}try{return __global__||ue()}finally{delete Object.prototype.__global__}}(),ae=Symbol.for("verdocs-default-endpoint"),le=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},fe=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=se.create({baseURL:this.baseURL,timeout:this.timeout}),N(this.api,{retries:0,retryDelay:N.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){ce[ae]=this},e.getDefault=function(){return ce[ae]||(ce[ae]=new e,window.console.debug("[JS_SDK] Created default endpoint",ce[ae])),ce[ae]},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(le):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{h as T,fe as V,d as a,a as b,o as c,f as d,s as e,u as g,_ as l,l as u}
|
@@ -1 +0,0 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};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(){var r=this;e({T:void 0,a:void 0});var n;(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"})(n||(n={}));var i;(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"})(i||(i={}));var o=e("c",(function(e,t,r){var n,o;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(n=r===null||r===void 0?void 0:r.is_personal)!==null&&n!==void 0?n:false;var d=(o=r===null||r===void 0?void 0:r.is_public)!==null&&o!==void 0?o:false;var p=[];switch(t){case"create_personal":p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":p.push(i.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!d){p.push(i.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){p.push(i.TEMPLATE_MEMBER_READ);p.push(i.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_ORG)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){p.push(i.TEMPLATE_CREATOR_CREATE_PUBLIC);p.push(i.TEMPLATE_CREATOR_VISIBILITY)}else{p.push(i.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){p.push(i.TEMPLATE_CREATOR_DELETE)}else{p.push(i.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(a(e,p)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(p.toString())}}));var a=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var s=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var u=undefined&&undefined.__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(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),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 c=e("e",(function(e,t){return e.api.post("/templates",{params:t}).then((function(e){return e.data}))}));var f=e("g",(function(e,t){return e.api.get("/templates/".concat(t)).then((function(e){return e.data}))}));var l=["name","is_personal","is_public","sender","description","roles","fields"];var d=e("b",(function(e,t,r){var n={timeout:12e4,onUploadProgress:function(e){var t=e.total||1;var n=e.loaded||0;r===null||r===void 0?void 0:r(Math.floor(n*100/(t||1)),n,t||1)}};if(t.documents&&t.documents[0]instanceof File){if(t.documents.length>10){throw new Error("createTemplate() has a maximum of 10 documents that can be attached.")}var i=new FormData;l.forEach((function(e){if(t[e]!==undefined){i.append(e,t[e])}}));t.documents.forEach((function(e){i.append("documents",e,e.name)}));return e.api.post("/templates",i,n).then((function(e){return e.data}))}else{return e.api.post("/templates",t,n).then((function(e){return e.data}))}}));var p=e("u",(function(e,t,r){return e.api.put("/templates/".concat(t),r).then((function(e){return e.data}))}));var h=e("d",(function(e,t){return e.api.delete("/templates/".concat(t)).then((function(e){return e.data}))}));var v;(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"})(v||(v={}));var E=e("l",(function(e,t){if(t===void 0){t={}}return s(void 0,void 0,void 0,(function(){return u(this,(function(r){return[2,e.api.post("/templates/list",t).then((function(e){return e.data}))]}))}))}));var m;(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"})(m||(m=e("T",{})));var _;(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"})(_||(_=e("a",{})));var R;(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"})(R||(R={}));var y;(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"})(y||(y={}));var T;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(T||(T={}));var g;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(g||(g={}));var b=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 A=function(e){return!b.has(e&&e.code)};var O="axios-retry";function w(e){var t=["ERR_CANCELED","ECONNABORTED"];if(e.response){return false}if(!e.code){return false}if(t.includes(e.code)){return false}return A(e)}var S=["get","head","options"];var L=S.concat(["put","delete"]);function C(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function N(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return C(e)&&S.indexOf(e.config.method)!==-1}function I(e){var t;if(!((t=e.config)===null||t===void 0?void 0:t.method)){return false}return C(e)&&L.indexOf(e.config.method)!==-1}function P(e){return w(e)||I(e)}function D(){return 0}function U(e,t,r){if(e===void 0){e=0}if(t===void 0){t=undefined}if(r===void 0){r=100}var n=Math.pow(2,e)*r;var i=n*.2*Math.random();return n+i}var M={retries:3,retryCondition:P,retryDelay:D,shouldResetTimeout:false,onRetry:function(){}};function B(e,t){return __assign(__assign(__assign({},M),t),e[O])}function j(e,t){var r=B(e,t||{});r.retryCount=r.retryCount||0;r.lastRequestTime=r.lastRequestTime||Date.now();e[O]=r;return r}function x(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 F(e,t){return s(this,void 0,void 0,(function(){var r,n,i,o,a;return u(this,(function(s){switch(s.label){case 0:r=e.retries,n=e.retryCondition;i=(e.retryCount||0)<r&&n(t);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]}}))}))}var k=function(e,t){var n=e.interceptors.request.use((function(e){j(e,t);return e}));var i=e.interceptors.response.use(null,(function(n){return s(r,void 0,void 0,(function(){var r,i,o,a,s,c,f,l;return u(this,(function(u){switch(u.label){case 0:r=n.config;if(!r){return[2,Promise.reject(n)]}i=j(r,t);return[4,F(i,n)];case 1:if(!u.sent())return[3,3];i.retryCount+=1;o=i.retryDelay,a=i.shouldResetTimeout,s=i.onRetry;c=o(i.retryCount,n);x(e,r);if(!a&&r.timeout&&i.lastRequestTime){f=Date.now()-i.lastRequestTime;l=r.timeout-f-c;if(l<=0){return[2,Promise.reject(n)]}r.timeout=l}r.transformRequest=[function(e){return e}];return[4,s(i.retryCount,n,r)];case 2:u.sent();return[2,new Promise((function(t){setTimeout((function(){return t(e(r))}),c)}))];case 3:return[2,Promise.reject(n)]}}))}))}));return{requestInterceptorId:n,responseInterceptorId:i}};k.isNetworkError=w;k.isSafeRequestError=N;k.isIdempotentRequestError=I;k.isNetworkOrIdempotentRequestError=P;k.exponentialDelay=U;k.isRetryableError=C;function q(e,t){return function r(){return e.apply(t,arguments)}}var G=Object.prototype.toString;var V=Object.getPrototypeOf;var z=function(e){return function(t){var r=G.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var H=function(e){e=e.toLowerCase();return function(t){return z(t)===e}};var J=function(e){return function(t){return typeof t===e}};var K=Array.isArray;var W=J("undefined");function Y(e){return e!==null&&!W(e)&&e.constructor!==null&&!W(e.constructor)&&Q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var X=H("ArrayBuffer");function Z(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&X(e.buffer)}return t}var $=J("string");var Q=J("function");var ee=J("number");var te=function(e){return e!==null&&typeof e==="object"};var re=function(e){return e===true||e===false};var ne=function(e){if(z(e)!=="object"){return false}var t=V(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var ie=H("Date");var oe=H("File");var ae=H("Blob");var se=H("FileList");var ue=function(e){return te(e)&&Q(e.pipe)};var ce=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||Q(e.append)&&((t=z(e))==="formdata"||t==="object"&&Q(e.toString)&&e.toString()==="[object FormData]"))};var fe=H("URLSearchParams");var le=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function de(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(K(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 pe(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 he=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var ve=function(e){return!W(e)&&e!==he};function Ee(){var e=(ve(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&pe(t,n)||n;if(ne(t[i])&&ne(r)){t[i]=Ee(t[i],r)}else if(ne(r)){t[i]=Ee({},r)}else if(K(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&de(arguments[n],r)}return t}var me=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;de(t,(function(t,n){if(r&&Q(t)){e[n]=q(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var _e=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var Re=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 ye=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&&V(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var Te=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 ge=function(e){if(!e)return null;if(K(e))return e;var t=e.length;if(!ee(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var be=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&V(Uint8Array));var Ae=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 Oe=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var we=H("HTMLFormElement");var Se=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var Le=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var Ce=H("RegExp");var Ne=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};de(r,(function(r,i){var o;if((o=t(r,i,e))!==false){n[i]=o||r}}));Object.defineProperties(e,n)};var Ie=function(e){Ne(e,(function(t,r){if(Q(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!Q(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 Pe=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};K(e)?n(e):n(String(e).split(t));return r};var De=function(){};var Ue=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Me="abcdefghijklmnopqrstuvwxyz";var Be="0123456789";var je={DIGIT:Be,ALPHA:Me,ALPHA_DIGIT:Me+Me.toUpperCase()+Be};var xe=function(e,t){if(e===void 0){e=16}if(t===void 0){t=je.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function Fe(e){return!!(e&&Q(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var ke=function(e){var t=new Array(10);var r=function(e,n){if(te(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=K(e)?[]:{};de(e,(function(e,t){var o=r(e,n+1);!W(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var qe=H("AsyncFunction");var Ge=function(e){return e&&(te(e)||Q(e))&&Q(e.then)&&Q(e.catch)};var Ve={isArray:K,isArrayBuffer:X,isBuffer:Y,isFormData:ce,isArrayBufferView:Z,isString:$,isNumber:ee,isBoolean:re,isObject:te,isPlainObject:ne,isUndefined:W,isDate:ie,isFile:oe,isBlob:ae,isRegExp:Ce,isFunction:Q,isStream:ue,isURLSearchParams:fe,isTypedArray:be,isFileList:se,forEach:de,merge:Ee,extend:me,trim:le,stripBOM:_e,inherits:Re,toFlatObject:ye,kindOf:z,kindOfTest:H,endsWith:Te,toArray:ge,forEachEntry:Ae,matchAll:Oe,isHTMLForm:we,hasOwnProperty:Le,hasOwnProp:Le,reduceDescriptors:Ne,freezeMethods:Ie,toObjectSet:Pe,toCamelCase:Se,noop:De,toFiniteNumber:Ue,findKey:pe,global:he,isContextDefined:ve,ALPHABET:je,generateString:xe,isSpecCompliantForm:Fe,toJSONObject:ke,isAsyncFn:qe,isThenable:Ge};function ze(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)}Ve.inherits(ze,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:Ve.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var He=ze.prototype;var Je={};["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){Je[e]={value:e}}));Object.defineProperties(ze,Je);Object.defineProperty(He,"isAxiosError",{value:true});ze.from=function(e,t,r,n,i,o){var a=Object.create(He);Ve.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));ze.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var Ke=null;function We(e){return Ve.isPlainObject(e)||Ve.isArray(e)}function Ye(e){return Ve.endsWith(e,"[]")?e.slice(0,-2):e}function Xe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ye(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Ze(e){return Ve.isArray(e)&&!e.some(We)}var $e=Ve.toFlatObject(Ve,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Qe(e,t,r){if(!Ve.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=Ve.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!Ve.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&&Ve.isSpecCompliantForm(t);if(!Ve.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(Ve.isDate(e)){return e.toISOString()}if(!u&&Ve.isBlob(e)){throw new ze("Blob is not supported. Use a Buffer instead.")}if(Ve.isArrayBuffer(e)||Ve.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(Ve.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(Ve.isArray(e)&&Ze(e)||(Ve.isFileList(e)||Ve.endsWith(r,"[]"))&&(s=Ve.toArray(e))){r=Ye(r);s.forEach((function e(n,i){!(Ve.isUndefined(n)||n===null)&&t.append(a===true?Xe([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(We(e)){return true}t.append(Xe(i,r,o),c(e));return false}var l=[];var d=Object.assign($e,{defaultVisitor:f,convertValue:c,isVisitable:We});function p(e,r){if(Ve.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);Ve.forEach(e,(function e(n,o){var a=!(Ve.isUndefined(n)||n===null)&&i.call(t,n,Ve.isString(o)?o.trim():o,r,d);if(a===true){p(n,r?r.concat(o):[o])}}));l.pop()}if(!Ve.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function et(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 tt(e,t){this._pairs=[];e&&Qe(e,this,t)}var rt=tt.prototype;rt.append=function e(t,r){this._pairs.push([t,r])};rt.toString=function e(t){var r=t?function(e){return t.call(this,e,et)}:et;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function nt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function it(e,t,r){if(!t){return e}var n=r&&r.encode||nt;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=Ve.isURLSearchParams(t)?t.toString():new tt(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 ot=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){Ve.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var at={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var st=typeof URLSearchParams!=="undefined"?URLSearchParams:tt;var ut=typeof FormData!=="undefined"?FormData:null;var ct=typeof Blob!=="undefined"?Blob:null;var ft={isBrowser:true,classes:{URLSearchParams:st,FormData:ut,Blob:ct},protocols:["http","https","file","blob","url","data"]};var lt=typeof window!=="undefined"&&typeof document!=="undefined";var dt=function(e){return lt&&["ReactNative","NativeScript","NS"].indexOf(e)<0}(typeof navigator!=="undefined"&&navigator.product);var pt=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var ht=Object.freeze({__proto__:null,hasBrowserEnv:lt,hasStandardBrowserWebWorkerEnv:pt,hasStandardBrowserEnv:dt});var vt=__assign(__assign({},ht),ft);function Et(e,t){return Qe(e,new vt.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){if(vt.isNode&&Ve.isBuffer(e)){this.append(t,e.toString("base64"));return false}return n.defaultVisitor.apply(this,arguments)}},t))}function mt(e){return Ve.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function _t(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 Rt(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&Ve.isArray(n)?n.length:o;if(s){if(Ve.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!Ve.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&Ve.isArray(n[o])){n[o]=_t(n[o])}return!a}if(Ve.isFormData(e)&&Ve.isFunction(e.entries)){var r={};Ve.forEachEntry(e,(function(e,n){t(mt(e),n,r,0)}));return r}return null}function yt(e,t,r){if(Ve.isString(e)){try{(t||JSON.parse)(e);return Ve.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var Tt={transitional:at,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=Ve.isObject(t);if(o&&Ve.isHTMLForm(t)){t=new FormData(t)}var a=Ve.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(Rt(t)):t}if(Ve.isArrayBuffer(t)||Ve.isBuffer(t)||Ve.isStream(t)||Ve.isFile(t)||Ve.isBlob(t)){return t}if(Ve.isArrayBufferView(t)){return t.buffer}if(Ve.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 Et(t,this.formSerializer).toString()}if((s=Ve.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Qe(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return yt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||Tt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&Ve.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 ze.from(e,ze.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:vt.classes.FormData,Blob:vt.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};Ve.forEach(["delete","get","head","post","put","patch"],(function(e){Tt.headers[e]={}}));var gt=Ve.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 bt=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]&>[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 At=Symbol("internals");function Ot(e){return e&&String(e).trim().toLowerCase()}function wt(e){if(e===false||e==null){return e}return Ve.isArray(e)?e.map(wt):String(e)}function St(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 Lt=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Ct(e,t,r,n,i){if(Ve.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Ve.isString(t))return;if(Ve.isString(n)){return t.indexOf(n)!==-1}if(Ve.isRegExp(n)){return n.test(t)}}function Nt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function It(e,t){var r=Ve.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 Pt=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=Ot(t);if(!i){throw new Error("header name must be a non-empty string")}var o=Ve.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=wt(e)}}var o=function(e,t){return Ve.forEach(e,(function(e,r){return i(e,r,t)}))};if(Ve.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(Ve.isString(e)&&(e=e.trim())&&!Lt(e)){o(bt(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=Ot(e);if(e){var r=Ve.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return St(n)}if(Ve.isFunction(t)){return t.call(this,n,r)}if(Ve.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=Ot(e);if(e){var r=Ve.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Ct(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=Ot(e);if(e){var i=Ve.findKey(r,e);if(i&&(!t||Ct(r,r[i],i,t))){delete r[i];n=true}}}if(Ve.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||Ct(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};Ve.forEach(this,(function(n,i){var o=Ve.findKey(r,i);if(o){t[o]=wt(n);delete t[i];return}var a=e?Nt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=wt(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);Ve.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&Ve.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[At]=this[At]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=Ot(e);if(!r[t]){It(n,e);r[t]=true}}Ve.isArray(e)?e.forEach(i):i(e);return this};return e}();Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ve.reduceDescriptors(Pt.prototype,(function(e,t){var r=e.value;var n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}));Ve.freezeMethods(Pt);function Dt(e,t){var r=this||Tt;var n=t||r;var i=Pt.from(n.headers);var o=n.data;Ve.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Ut(e){return!!(e&&e.__CANCEL__)}function Mt(e,t,r){ze.call(this,e==null?"canceled":e,ze.ERR_CANCELED,t,r);this.name="CanceledError"}Ve.inherits(Mt,ze,{__CANCEL__:true});function Bt(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new ze("Request failed with status code "+r.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var jt=vt.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];Ve.isNumber(r)&&a.push("expires="+new Date(r).toGMTString());Ve.isString(n)&&a.push("path="+n);Ve.isString(i)&&a.push("domain="+i);o===true&&a.push("secure");document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function xt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ft(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function kt(e,t){if(e&&!xt(t)){return Ft(e,t)}return t}var qt=vt.hasStandardBrowserEnv?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=Ve.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Gt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vt(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 d=0;while(l!==i){d+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var p=f&&c-f;return p?Math.round(d*1e3/p):undefined}}function zt(e,t){var r=0;var n=Vt(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 Ht=typeof XMLHttpRequest!=="undefined";var Jt=Ht&&function(e){return new Promise((function t(r,n){var i=e.data;var o=Pt.from(e.headers).normalize();var a=e.responseType,s=e.withXSRFToken;var u;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(u)}if(e.signal){e.signal.removeEventListener("abort",u)}}var f;if(Ve.isFormData(i)){if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv){o.setContentType(false)}else if((f=o.getContentType())!==false){var l=f?f.split(";").map((function(e){return e.trim()})).filter(Boolean):[],d=l[0],p=l.slice(1);o.setContentType(__spreadArray([d||"multipart/form-data"],p,true).join("; "))}}var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"";var E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+E))}var m=kt(e.baseURL,e.url);h.open(e.method.toUpperCase(),it(m,e.params,e.paramsSerializer),true);h.timeout=e.timeout;function _(){if(!h){return}var t=Pt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?h.responseText:h.response;var o={data:i,status:h.status,statusText:h.statusText,headers:t,config:e,request:h};Bt((function e(t){r(t);c()}),(function e(t){n(t);c()}),o);h=null}if("onloadend"in h){h.onloadend=_}else{h.onreadystatechange=function e(){if(!h||h.readyState!==4){return}if(h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)){return}setTimeout(_)}}h.onabort=function t(){if(!h){return}n(new ze("Request aborted",ze.ECONNABORTED,e,h));h=null};h.onerror=function t(){n(new ze("Network Error",ze.ERR_NETWORK,e,h));h=null};h.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||at;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new ze(r,i.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,e,h));h=null};if(vt.hasStandardBrowserEnv){s&&Ve.isFunction(s)&&(s=s(e));if(s||s!==false&&qt(m)){var R=e.xsrfHeaderName&&e.xsrfCookieName&&jt.read(e.xsrfCookieName);if(R){o.set(e.xsrfHeaderName,R)}}}i===undefined&&o.setContentType(null);if("setRequestHeader"in h){Ve.forEach(o.toJSON(),(function e(t,r){h.setRequestHeader(r,t)}))}if(!Ve.isUndefined(e.withCredentials)){h.withCredentials=!!e.withCredentials}if(a&&a!=="json"){h.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){h.addEventListener("progress",zt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&h.upload){h.upload.addEventListener("progress",zt(e.onUploadProgress))}if(e.cancelToken||e.signal){u=function(t){if(!h){return}n(!t||t.type?new Mt(null,e,h):t);h.abort();h=null};e.cancelToken&&e.cancelToken.subscribe(u);if(e.signal){e.signal.aborted?u():e.signal.addEventListener("abort",u)}}var y=Gt(m);if(y&&vt.protocols.indexOf(y)===-1){n(new ze("Unsupported protocol "+y+":",ze.ERR_BAD_REQUEST,e));return}h.send(i||null)}))};var Kt={http:Ke,xhr:Jt};Ve.forEach(Kt,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Wt=function(e){return"- ".concat(e)};var Yt=function(e){return Ve.isFunction(e)||e===null||e===false};var Xt={getAdapter:function(e){e=Ve.isArray(e)?e:[e];var t=e.length;var r;var n;var i={};for(var o=0;o<t;o++){r=e[o];var a=void 0;n=r;if(!Yt(r)){n=Kt[(a=String(r)).toLowerCase()];if(n===undefined){throw new ze("Unknown adapter '".concat(a,"'"))}}if(n){break}i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=e[0],r=e[1];return"adapter ".concat(t," ")+(r===false?"is not supported by the environment":"is not available in the build")}));var u=t?s.length>1?"since :\n"+s.map(Wt).join("\n"):" "+Wt(s[0]):"as no adapter specified";throw new ze("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n},adapters:Kt};function Zt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new Mt(null,e)}}function $t(e){Zt(e);e.headers=Pt.from(e.headers);e.data=Dt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Xt.getAdapter(e.adapter||Tt.adapter);return t(e).then((function t(r){Zt(e);r.data=Dt.call(e,e.transformResponse,r);r.headers=Pt.from(r.headers);return r}),(function t(r){if(!Ut(r)){Zt(e);if(r&&r.response){r.response.data=Dt.call(e,e.transformResponse,r.response);r.response.headers=Pt.from(r.response.headers)}}return Promise.reject(r)}))}var Qt=function(e){return e instanceof Pt?e.toJSON():e};function er(e,t){t=t||{};var r={};function n(e,t,r){if(Ve.isPlainObject(e)&&Ve.isPlainObject(t)){return Ve.merge.call({caseless:r},e,t)}else if(Ve.isPlainObject(t)){return Ve.merge({},t)}else if(Ve.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!Ve.isUndefined(t)){return n(e,t,r)}else if(!Ve.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!Ve.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!Ve.isUndefined(t)){return n(undefined,t)}else if(!Ve.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,withXSRFToken: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)}};Ve.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);Ve.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var tr="1.6.2";var rr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){rr[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var nr={};rr.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+tr+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new ze(i(n," has been removed"+(r?" in "+r:"")),ze.ERR_DEPRECATED)}if(r&&!nr[n]){nr[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 ir(e,t,r){if(typeof e!=="object"){throw new ze("options must be an object",ze.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 ze("option "+o+" must be "+u,ze.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new ze("Unknown option "+o,ze.ERR_BAD_OPTION)}}}var or={assertOptions:ir,validators:rr};var ar=or.validators;var sr=function(){function e(e){this.defaults=e;this.interceptors={request:new ot,response:new ot}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=er(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){or.assertOptions(r,{silentJSONParsing:ar.transitional(ar.boolean),forcedJSONParsing:ar.transitional(ar.boolean),clarifyTimeoutError:ar.transitional(ar.boolean)},false)}if(n!=null){if(Ve.isFunction(n)){t.paramsSerializer={serialize:n}}else{or.assertOptions(n,{encode:ar.function,serialize:ar.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=i&&Ve.merge(i.common,i[t.method]);i&&Ve.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=Pt.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 d=[$t.bind(this),undefined];d.unshift.apply(d,a);d.push.apply(d,u);l=d.length;c=Promise.resolve(t);while(f<l){c=c.then(d[f++],d[f++])}return c}l=a.length;var p=t;f=0;while(f<l){var h=a[f++];var v=a[f++];try{p=h(p)}catch(e){v.call(this,e);break}}try{c=$t.call(this,p)}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=er(this.defaults,e);var t=kt(e.baseURL,e.url);return it(t,e.params,e.paramsSerializer)};return e}();Ve.forEach(["delete","get","head","options"],(function e(t){sr.prototype[t]=function(e,r){return this.request(er(r||{},{method:t,url:e,data:(r||{}).data}))}}));Ve.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(er(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}sr.prototype[t]=r();sr.prototype[t+"Form"]=r(true)}));var ur=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 Mt(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 cr(e){return function t(r){return e.apply(null,r)}}function fr(e){return Ve.isObject(e)&&e.isAxiosError===true}var lr={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(lr).forEach((function(e){var t=e[0],r=e[1];lr[r]=t}));function dr(e){var t=new sr(e);var r=q(sr.prototype.request,t);Ve.extend(r,sr.prototype,t,{allOwnKeys:true});Ve.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return dr(er(e,r))};return r}var pr=dr(Tt);pr.Axios=sr;pr.CanceledError=Mt;pr.CancelToken=ur;pr.isCancel=Ut;pr.VERSION=tr;pr.toFormData=Qe;pr.AxiosError=ze;pr.Cancel=pr.CanceledError;pr.all=function e(t){return Promise.all(t)};pr.spread=cr;pr.isAxiosError=fr;pr.mergeConfig=er;pr.AxiosHeaders=Pt;pr.formToJSON=function(e){return Rt(Ve.isHTMLForm(e)?new FormData(e):e)};pr.getAdapter=Xt.getAdapter;pr.HttpStatusCode=lr;pr.default=pr;var hr=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var vr=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 hr()}try{if(!__global__)return hr();return __global__}finally{delete Object.prototype.__global__}}();var Er=Symbol.for("verdocs-default-endpoint");var mr=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 _r=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=pr.create({baseURL:this.baseURL,timeout:this.timeout});k(this.api,{retries:0,retryDelay:k.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){vr[Er]=this};e.getDefault=function(){if(!vr[Er]){vr[Er]=new e;window.console.debug("[JS_SDK] Created default endpoint",vr[Er])}return vr[Er]};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(mr)}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 e,c as i,h as t,H as s,F as o}from"./p-14b44491.js";import{e as n,t as a,u as l,f as r,h as d,i as h}from"./p-5a91bf23.js";import{R as c}from"./p-05788c2b.js";import{e as p,a as u,b as v}from"./p-3cd894ff.js";import{V as g}from"./p-3a7fa389.js";import{i as m,a as f}from"./p-e8ce0b6f.js";import{f as x,i as b}from"./p-5e808a0b.js";import{a as w,u as y,b as k,r as S,c as N}from"./p-ee159b14.js";import{a as I}from"./p-839f6f0d.js";import{V as G}from"./p-ed416acf.js";import{S as j}from"./p-7a1b2643.js";import{f as F}from"./p-c220af42.js";import"./p-7d5dbd9a.js";import"./p-aa124212.js";const z=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],R=[{id:"print",label:"Print"},{id:"download",label:"Download"}],_=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.envelope=null,this.roleNames=[],this.sortedRecipients=[],this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.submitting=!1,this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new g({sessionType:"signing"})}async componentWillRender(){var e,i,t,s,o,l,r;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await n(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),this.envelope=await a(this.endpoint,this.envelopeId),this.sortedRecipients=[...this.envelope.recipients],this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence)),this.roleNames=this.sortedRecipients.map((e=>e.role_name)),this.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=this.roleNames.findIndex((e=>e==this.roleId)),this.recipientIndex>-1?(this.recipient=this.sortedRecipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),this.checkRecipientFields(),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope})}catch(e){console.log("Error with signing session",e),null===(o=this.sdkError)||void 0===o||o.emit(new j(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(r=e.response)||void 0===r?void 0:r.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new j("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new j("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new j("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){this.submitting=!0,p(this.endpoint,this.envelopeId,this.roleId,!0).then((()=>{var e;this.nextButtonLabel="Next",this.recipient.agreed=!0,this.submitting=!1,this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),this.submitting=!1,null===(i=this.sdkError)||void 0===i||i.emit(new j(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":G("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=!0;const e=await u(this.endpoint,this.envelopeId,this.roleId);console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"}),this.submitting=!1,this.isDone=!0}break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":w(this.endpoint,this.envelope,this.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e),this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,y(t),this.checkRecipientFields())}))}saveFieldChange(e,i){console.log("[SIGN] updateRecipientFieldValue",e),l(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(o=this.sdkError)||void 0===o||o.emit(new j(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(a=e.response)||void 0===a?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":if(!i.detail)return;const l=await(await fetch(i.detail)).blob();return(o=this.endpoint,"initial",n=l,a=new FormData,a.append("initial",n,"initial"),o.api.post("/initials",a).then((function(e){return e.data}))).then((async i=>{const t=await d(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":if(!i.detail)return;console.log("Creating signature blob",i.detail);const h=await(await fetch(i.detail)).blob();return console.log("Created signature blob",h),function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,h).then((async i=>{console.log("Signature update result",i);const t=await r(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)})).catch((e=>{console.warn("Error updating signature",e)}));case"date":const c=i.target.getAttribute("iso"),p=F(new Date(c),I);if("1970-12-31"!==p)return this.saveFieldChange(e.name,{prepared:!1,value:p});break;case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var o,n,a}isFieldValid(e){var i,t,s,o,n,a,l;const{required:r=!1}=e,{result:d="",value:h="",base64:c=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return f(d);case"phone":return m(d);default:return!r||""!==d}case"signature":case"initial":return!r||""!==c;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!r||""!==d;case"dropdown":return!r||""!==h;case"checkbox_group":const p=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!r||p>=((null===(o=e.settings)||void 0===o?void 0:o.minimum_checked)||0)&&p<=((null===(n=e.settings)||void 0===n?void 0:n.maximum_checked)||999);case"radio_button_group":return!r||((null===(l=null===(a=e.settings)||void 0===a?void 0:a.options)||void 0===l?void 0:l.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e;if(this.nextSubmits){try{this.submitting=!0;const e=await v(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",e),this.recipient.status="submitted",this.showDone=!0,this.isDone=!0}catch(e){console.log("[SIGN] Error submitting",e)}return void(this.submitting=!1)}const i=this.recipient.fields.filter((e=>e.required));let t=i.findIndex((e=>e.name===this.focusedField))+1;t>=i.length&&(t=0);let s=i[t],o=0;if(o<i.length&&["signature","initial"].includes(s.type)&&"signed"===(null===(e=s.settings)||void 0===e?void 0:e.result)&&(o++,t++,t>=i.length&&(t=0),s=i[t]),o>=i.length&&(s=null),s){const e=N(s),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=s.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits||(this.nextSubmits=!0)):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var o;s.addEventListener("input",(e=>{console.log("[SIGN] onfieldInput",e.detail,e.target.value),e.target.name.includes("checkbox_group")||e.target.name.includes("radio_button_group")?(console.log("CB",e.target),this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))):this.checkRecipientFields()})),s.addEventListener("attached",(async e=>{console.log("[SIGN] onAttached",e.detail,e.target.value);const t=await h(this.endpoint,this.envelopeId,this.roleId,i.name,e.detail);console.log("upload result",t),this.checkRecipientFields()})),s.addEventListener("removed",(e=>{console.log("[SIGN] onRemoved",e.detail,e.target.value)})),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("page",e.pageNumber),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?x(this.recipient.full_name):""),s.setAttribute("name",(null===(o=this.recipient)||void 0===o?void 0:o.full_name)||"")}handlePageRendered(e){const i=e.detail,t=k(this.roleNames,this.recipient.role_name);this.recipient.fields.filter((e=>e.page===i.pageNumber)).filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=S(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),this.sortedRecipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status===c.INVITED||e.status===c.OPENED||e.status===c.PENDING))).forEach((e=>{const t=k(this.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=S(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))}))})),this.checkRecipientFields()}render(){return this.envelope?this.isDone?t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,{class:{agreed:this.agreed}},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?R:z,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(this.envelope.documents||[]).map((e=>{const i=b(1,e.page_numbers);return t(o,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)),!this.agreed&&t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("ul",null,t("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",t("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),t("li",null,"Agree to Verdocs"," ",t("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",t("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),"."))))):t(s,null,t("verdocs-loader",null))}};_.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}';export{_ as verdocs_sign}
|