@verdocs/web-sdk 2.3.70 → 2.3.72

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.
Files changed (144) hide show
  1. package/dist/cjs/{TemplateStore-89072ea0.js → TemplateStore-ae59084b.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-8f298664.js → VerdocsEndpoint-f4ef9333.js} +5 -2
  3. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +6 -1
  15. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  27. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +5 -4
  28. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +4 -0
  29. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
  30. package/dist/components/VerdocsEndpoint.js +5 -2
  31. package/dist/components/verdocs-field-textbox2.js +5 -4
  32. package/dist/components/verdocs-template-document-page2.js +4 -0
  33. package/dist/components/verdocs-template-fields2.js +1 -1
  34. package/dist/custom-elements.json +2143 -0
  35. package/dist/docs.json +5 -5
  36. package/dist/esm/{TemplateStore-7fba801e.js → TemplateStore-99bf97f0.js} +1 -1
  37. package/dist/esm/{VerdocsEndpoint-56fa3371.js → VerdocsEndpoint-eab308f6.js} +5 -2
  38. package/dist/esm/ipc-test.entry.js +2 -2
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  41. package/dist/esm/verdocs-auth.entry.js +1 -1
  42. package/dist/esm/verdocs-build.entry.js +2 -2
  43. package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
  44. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  45. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  46. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  47. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  48. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  49. package/dist/esm/verdocs-field-attachment_15.entry.js +6 -1
  50. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  51. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  52. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  53. package/dist/esm/verdocs-search.entry.js +1 -1
  54. package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
  55. package/dist/esm/verdocs-settings.entry.js +1 -1
  56. package/dist/esm/verdocs-sign.entry.js +1 -1
  57. package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
  58. package/dist/esm/verdocs-template-star.entry.js +1 -1
  59. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  60. package/dist/esm/verdocs-view.entry.js +1 -1
  61. package/dist/esm/verdocs-web-sdk.js +1 -1
  62. package/dist/esm-es5/{TemplateStore-7fba801e.js → TemplateStore-99bf97f0.js} +1 -1
  63. package/dist/esm-es5/VerdocsEndpoint-eab308f6.js +1 -0
  64. package/dist/esm-es5/ipc-test.entry.js +1 -1
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  88. package/dist/types/components/templates/verdocs-template-document-page/verdocs-template-document-page.d.ts +1 -0
  89. package/dist/verdocs-web-sdk/{p-cf703fe4.entry.js → p-06618569.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-d7f90328.system.entry.js → p-0b0cc39b.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-ea80fcea.entry.js → p-0e4f5403.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/p-10310263.system.entry.js +1 -0
  93. package/dist/verdocs-web-sdk/{p-db5de7e8.entry.js → p-159aeaf2.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-80e69a68.entry.js → p-2d47c6af.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-9fc06f7b.entry.js → p-332141f2.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-d1092a62.system.entry.js → p-356e4c15.system.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-f2a169d8.entry.js → p-38ea0d20.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-26646a40.entry.js → p-3fa35da3.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-9d4a5fd8.entry.js → p-40f5b1c5.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-47c63cc7.js → p-45ecd6eb.js} +1 -1
  101. package/dist/verdocs-web-sdk/{p-116f7900.entry.js → p-501d9168.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-0abf0058.system.entry.js → p-58e85310.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-9054234f.entry.js → p-5ddc43f4.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-4861684b.entry.js → p-6a93295c.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/{p-17598002.system.entry.js → p-7519fe6e.system.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/{p-17bf98f2.system.entry.js → p-77c145b3.system.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-b6231fd3.system.entry.js → p-7b3dfc4b.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-4d98f194.system.entry.js → p-7e5a1766.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-508808d2.entry.js → p-84679597.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-d0a09719.entry.js → p-8a7324b6.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-997a4959.entry.js → p-90539070.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-151c33dd.system.entry.js → p-9a816526.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-77d3c570.entry.js → p-9d748d04.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-e13b21ca.system.entry.js → p-a50982c8.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-c80237f9.entry.js → p-a7907ccf.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-9ceff040.system.entry.js → p-a9b80271.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-8b0a5309.entry.js → p-ac042888.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-035a3ce2.entry.js → p-ac07d476.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-5050f8a2.system.entry.js → p-b0e0084b.system.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/p-b252cfb6.entry.js +1 -0
  121. package/dist/verdocs-web-sdk/{p-637187de.entry.js → p-b8063124.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-72f22ee9.system.entry.js → p-baf16d17.system.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-a16eba51.system.entry.js → p-bea26fb0.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-00e8cfa6.system.entry.js → p-bf8e6ba1.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-c118d024.system.entry.js → p-c5fd0435.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-d39e4a26.system.entry.js → p-c73e78c8.system.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-cff87d52.system.js → p-d0d9ac6d.system.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-ea96b41e.entry.js → p-d315d7ca.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-bb2ff79c.entry.js → p-d53aec0f.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/p-e04d8f5d.js +1 -0
  131. package/dist/verdocs-web-sdk/{p-e311d75f.system.entry.js → p-e0e99a5d.system.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-6384f444.system.entry.js → p-e3623a0c.system.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-d0bbe952.system.entry.js → p-e4b14b93.system.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  135. package/dist/verdocs-web-sdk/{p-04ac4336.system.entry.js → p-f0dfd635.system.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/p-f246348c.system.js +1 -0
  137. package/dist/verdocs-web-sdk/{p-3995b09b.system.entry.js → p-f3947f39.system.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  139. package/package.json +3 -3
  140. package/dist/esm-es5/VerdocsEndpoint-56fa3371.js +0 -1
  141. package/dist/verdocs-web-sdk/p-035f6b38.js +0 -1
  142. package/dist/verdocs-web-sdk/p-358ce165.system.entry.js +0 -1
  143. package/dist/verdocs-web-sdk/p-3efa7c26.entry.js +0 -1
  144. package/dist/verdocs-web-sdk/p-9bf2d124.system.js +0 -1
@@ -0,0 +1 @@
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.get("/templates/".concat(e)).then((function(t){return t.data}))},u=["name","is_personal","is_public","sender","description","roles","fields"],c=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){var o=new FormData;return u.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("/v2/templates",o,r).then((function(t){return t.data}))}return t.api.post("/v2/templates",e,r).then((function(t){return t.data}))},a=function(t,e,n){return t.api.put("/templates/".concat(e),n).then((function(t){return t.data}))},l=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 f,h,d,m,p,b,w=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 y(t,e){return function(){return t.apply(e,arguments)}}!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"}(f||(f={})),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"}(h||(h={})),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"}(d||(d={})),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"}(m||(m={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(p||(p={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(b||(b={}));const{toString:g}=Object.prototype,{getPrototypeOf:v}=Object,O=(_=Object.create(null),t=>{const e=g.call(t);return _[e]||(_[e]=e.slice(8,-1).toLowerCase())});var _;const S=t=>(t=t.toLowerCase(),e=>O(e)===t),R=t=>e=>typeof e===t,{isArray:E}=Array,j=R("undefined"),A=S("ArrayBuffer"),T=R("string"),N=R("function"),P=R("number"),x=t=>null!==t&&"object"==typeof t,F=t=>{if("object"!==O(t))return!1;const e=v(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},B=S("Date"),U=S("File"),D=S("Blob"),k=S("FileList"),C=S("URLSearchParams");function L(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),E(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 q(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 I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,M=t=>!j(t)&&t!==I,z=(J="undefined"!=typeof Uint8Array&&v(Uint8Array),t=>J&&t instanceof J);var J;const H=S("HTMLFormElement"),K=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),G=S("RegExp"),V=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};L(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},$="abcdefghijklmnopqrstuvwxyz",W={DIGIT:"0123456789",ALPHA:$,ALPHA_DIGIT:$+$.toUpperCase()+"0123456789"},X=S("AsyncFunction"),Z={isArray:E,isArrayBuffer:A,isBuffer:function(t){return null!==t&&!j(t)&&null!==t.constructor&&!j(t.constructor)&&N(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||N(t.append)&&("formdata"===(e=O(t))||"object"===e&&N(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&A(t.buffer),e},isString:T,isNumber:P,isBoolean:t=>!0===t||!1===t,isObject:x,isPlainObject:F,isUndefined:j,isDate:B,isFile:U,isBlob:D,isRegExp:G,isFunction:N,isStream:t=>x(t)&&N(t.pipe),isURLSearchParams:C,isTypedArray:z,isFileList:k,forEach:L,merge:function t(){const{caseless:e}=M(this)&&this||{},n={},r=(r,o)=>{const i=e&&q(n,o)||o;n[i]=F(n[i])&&F(r)?t(n[i],r):F(r)?t({},r):E(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&L(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(L(e,((e,r)=>{t[r]=n&&N(e)?y(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&&v(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:O,kindOfTest:S,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(E(t))return t;let e=t.length;if(!P(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:H,hasOwnProperty:K,hasOwnProp:K,reduceDescriptors:V,freezeMethods:t=>{V(t,((e,n)=>{if(N(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;N(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 E(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:q,global:I,isContextDefined:M,ALPHABET:W,generateString:(t=16,e=W.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&N(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(x(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=E(t)?[]:{};return L(t,((t,e)=>{const i=n(t,r+1);!j(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:X,isThenable:t=>t&&(x(t)||N(t))&&N(t.then)&&N(t.catch)};function Q(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)}Z.inherits(Q,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:Z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Y=Q.prototype,tt={};function et(t){return Z.isPlainObject(t)||Z.isArray(t)}function nt(t){return Z.endsWith(t,"[]")?t.slice(0,-2):t}function rt(t,e,n){return t?t.concat(e).map((function(t,e){return t=nt(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=>{tt[t]={value:t}})),Object.defineProperties(Q,tt),Object.defineProperty(Y,"isAxiosError",{value:!0}),Q.from=(t,e,n,r,o,i)=>{const s=Object.create(Y);return Z.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Q.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const ot=Z.toFlatObject(Z,{},null,(function(t){return/^is[A-Z]/.test(t)}));function it(t,e,n){if(!Z.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!Z.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Z.isSpecCompliantForm(e);if(!Z.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(Z.isDate(t))return t.toISOString();if(!u&&Z.isBlob(t))throw new Q("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(t)||Z.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(Z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(Z.isArray(t)&&function(t){return Z.isArray(t)&&!t.some(et)}(t)||(Z.isFileList(t)||Z.endsWith(n,"[]"))&&(u=Z.toArray(t)))return n=nt(n),u.forEach((function(t,r){!Z.isUndefined(t)&&null!==t&&e.append(!0===s?rt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!et(t)||(e.append(rt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(ot,{defaultVisitor:a,convertValue:c,isVisitable:et});if(!Z.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!Z.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Z.forEach(n,(function(n,i){!0===(!(Z.isUndefined(n)||null===n)&&o.call(e,n,Z.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function st(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function ut(t,e){this._pairs=[],t&&it(t,this,e)}const ct=ut.prototype;function at(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lt(t,e,n){if(!e)return t;const r=n&&n.encode||at,o=n&&n.serialize;let i;if(i=o?o(e,n):Z.isURLSearchParams(e)?e.toString():new ut(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}ct.append=function(t,e){this._pairs.push([t,e])},ct.toString=function(t){const e=t?function(e){return t.call(this,e,st)}:st;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class ft{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){Z.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const ht={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ut,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},mt="undefined"!=typeof window&&"undefined"!=typeof document,pt=(bt="undefined"!=typeof navigator&&navigator.product,mt&&["ReactNative","NativeScript","NS"].indexOf(bt)<0);var bt;const wt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,yt={...Object.freeze({__proto__:null,hasBrowserEnv:mt,hasStandardBrowserWebWorkerEnv:wt,hasStandardBrowserEnv:pt}),...dt};function gt(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&Z.isArray(r)?r.length:i,u?(r[i]=Z.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&Z.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&Z.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(Z.isFormData(t)&&Z.isFunction(t.entries)){const n={};return Z.forEachEntry(t,((t,r)=>{e(function(t){return Z.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const vt={transitional:ht,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=Z.isObject(t);if(o&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return r&&r?JSON.stringify(gt(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.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 it(t,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return yt.isNode&&Z.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=Z.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return it(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(Z.isString(t))try{return(0,JSON.parse)(t),Z.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||vt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&Z.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 Q.from(t,Q.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],(t=>{vt.headers[t]={}}));const Ot=Z.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"]),_t=Symbol("internals");function St(t){return t&&String(t).trim().toLowerCase()}function Rt(t){return!1===t||null==t?t:Z.isArray(t)?t.map(Rt):String(t)}function Et(t,e,n,r,o){return Z.isFunction(r)?r.call(this,e,n):(o&&(e=n),Z.isString(e)?Z.isString(r)?-1!==e.indexOf(r):Z.isRegExp(r)?r.test(e):void 0:void 0)}class jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=St(e);if(!o)throw new Error("header name must be a non-empty string");const i=Z.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Rt(t))}const i=(t,e)=>Z.forEach(t,((t,n)=>o(t,n,e)));return Z.isPlainObject(t)||t instanceof this.constructor?i(t,e):Z.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]&&Ot[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=St(t)){const n=Z.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(Z.isFunction(e))return e.call(this,t,n);if(Z.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=St(t)){const n=Z.findKey(this,t);return!(!n||void 0===this[n]||e&&!Et(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=St(t)){const o=Z.findKey(n,t);!o||e&&!Et(0,n[o],o,e)||(delete n[o],r=!0)}}return Z.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&&!Et(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return Z.forEach(this,((r,o)=>{const i=Z.findKey(n,o);if(i)return e[i]=Rt(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]=Rt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&Z.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[_t]=this[_t]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=St(t);e[r]||(function(t,e){const n=Z.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 Z.isArray(t)?t.forEach(r):r(t),this}}function At(t,e){const n=this||vt,r=e||n,o=jt.from(r.headers);let i=r.data;return Z.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Tt(t){return!(!t||!t.__CANCEL__)}function Nt(t,e,n){Q.call(this,null==t?"canceled":t,Q.ERR_CANCELED,e,n),this.name="CanceledError"}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(jt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),Z.freezeMethods(jt),Z.inherits(Nt,Q,{__CANCEL__:!0});const Pt=yt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];Z.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),Z.isString(r)&&s.push("path="+r),Z.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 xt(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 Ft=yt.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=Z.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Bt(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 Ut={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=jt.from(t.headers).normalize();let i,s,{responseType:u,withXSRFToken:c}=t;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(Z.isFormData(r))if(yt.hasStandardBrowserEnv||yt.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=xt(t.baseURL,t.url);function h(){if(!l)return;const r=jt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.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(),lt(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 Q("Request aborted",Q.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Q("Network Error",Q.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 Q(e,(t.transitional||ht).clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,t,l)),l=null},yt.hasStandardBrowserEnv&&(c&&Z.isFunction(c)&&(c=c(t)),c||!1!==c&&Ft(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Pt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&Z.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),Z.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),u&&"json"!==u&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",Bt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Bt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new Nt(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===yt.protocols.indexOf(d)?n(new Q("Unsupported protocol "+d+":",Q.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};Z.forEach(Ut,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Dt=t=>`- ${t}`,kt=t=>Z.isFunction(t)||null===t||!1===t,Ct=t=>{t=Z.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,!kt(n)&&(r=Ut[(e=String(n)).toLowerCase()],void 0===r))throw new Q(`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 Q("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Dt).join("\n"):" "+Dt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Lt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Nt(null,t)}function qt(t){return Lt(t),t.headers=jt.from(t.headers),t.data=At.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ct(t.adapter||vt.adapter)(t).then((function(e){return Lt(t),e.data=At.call(t,t.transformResponse,e),e.headers=jt.from(e.headers),e}),(function(e){return Tt(e)||(Lt(t),e&&e.response&&(e.response.data=At.call(t,t.transformResponse,e.response),e.response.headers=jt.from(e.response.headers))),Promise.reject(e)}))}const It=t=>t instanceof jt?t.toJSON():t;function Mt(t,e){e=e||{};const n={};function r(t,e,n){return Z.isPlainObject(t)&&Z.isPlainObject(e)?Z.merge.call({caseless:n},t,e):Z.isPlainObject(e)?Z.merge({},e):Z.isArray(e)?e.slice():e}function o(t,e,n){return Z.isUndefined(e)?Z.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!Z.isUndefined(e))return r(void 0,e)}function s(t,e){return Z.isUndefined(e)?Z.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(It(t),It(e),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);Z.isUndefined(s)&&i!==u||(n[r]=s)})),n}const zt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{zt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Jt={};zt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.5] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new Q(r(o," has been removed"+(e?" in "+e:"")),Q.ERR_DEPRECATED);return e&&!Jt[o]&&(Jt[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 Ht={assertOptions:function(t,e,n){if("object"!=typeof t)throw new Q("options must be an object",Q.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 Q("option "+i+" must be "+n,Q.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Q("Unknown option "+i,Q.ERR_BAD_OPTION)}},validators:zt},Kt=Ht.validators;class Gt{constructor(t){this.defaults=t,this.interceptors={request:new ft,response:new ft}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Mt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&Ht.assertOptions(n,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean)},!1),null!=r&&(Z.isFunction(r)?e.paramsSerializer={serialize:r}:Ht.assertOptions(r,{encode:Kt.function,serialize:Kt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&Z.merge(o.common,o[e.method]);o&&Z.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=jt.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let a;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!u){const t=[qt.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=qt.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 lt(xt((t=Mt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}Z.forEach(["delete","get","head","options"],(function(t){Gt.prototype[t]=function(e,n){return this.request(Mt(n||{},{method:t,url:e,data:(n||{}).data}))}})),Z.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Mt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Gt.prototype[t]=e(),Gt.prototype[t+"Form"]=e(!0)}));class Vt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Nt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Vt((function(e){t=e})),cancel:t}}}const $t={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($t).forEach((([t,e])=>{$t[e]=t}));const Wt=function t(e){const n=new Gt(e),r=y(Gt.prototype.request,n);return Z.extend(r,Gt.prototype,n,{allOwnKeys:!0}),Z.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Mt(e,n))},r}(vt);Wt.Axios=Gt,Wt.CanceledError=Nt,Wt.CancelToken=Vt,Wt.isCancel=Tt,Wt.VERSION="1.6.5",Wt.toFormData=it,Wt.AxiosError=Q,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=function(t){return function(e){return t.apply(null,e)}},Wt.isAxiosError=function(t){return Z.isObject(t)&&!0===t.isAxiosError},Wt.mergeConfig=Mt,Wt.AxiosHeaders=jt,Wt.formToJSON=t=>gt(Z.isHTMLForm(t)?new FormData(t):t),Wt.getAdapter=Ct,Wt.HttpStatusCode=$t,Wt.default=Wt;var Xt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Zt=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 Xt()}try{return __global__||Xt()}finally{delete Object.prototype.__global__}}(),Qt=Symbol.for("verdocs-default-endpoint"),Yt=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},te=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://beta.verdocs.com"===window.location.origin?"https://stage-api.verdocs.com":"https://api.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)||this.baseURL,this.timeout=(null==t?void 0:t.timeout)||this.timeout,this.environment=(null==t?void 0:t.environment)||this.environment,this.sessionType=(null==t?void 0:t.sessionType)||this.sessionType,this.clientID=(null==t?void 0:t.clientID)||this.clientID,this.api=Wt.create({baseURL:this.baseURL,timeout:this.timeout})}return e.prototype.setDefault=function(){Zt[Qt]=this},e.getDefault=function(){return Zt[Qt]||(Zt[Qt]=new e,window.console.debug("[JS_SDK] Created default endpoint",Zt[Qt].baseURL)),Zt[Qt]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},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.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(Yt):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{f as T,te as V,h as a,c as b,o as c,l as d,s as g,w as l,a as u}