@verdocs/web-sdk 1.16.5 → 2.0.0
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-50096591.js → TemplateStore-cd05c035.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-9aec53cd.js → VerdocsEndpoint-2ff96f90.js} +25 -0
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popper-9def2535.js → popper-d7adcfc6.js} +6 -12
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +71 -15
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/{verdocs-button-panel_3.cjs.entry.js → verdocs-button-panel_2.cjs.entry.js} +3 -20
- package/dist/cjs/{verdocs-checkbox_4.cjs.entry.js → verdocs-checkbox_5.cjs.entry.js} +21 -3
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-summary.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-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +89 -82
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.css +5 -0
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +20 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +62 -14
- package/dist/components/VerdocsEndpoint.js +25 -0
- package/dist/components/popper.js +6 -12
- package/dist/components/verdocs-auth.js +79 -17
- package/dist/components/verdocs-status-indicator2.js +88 -81
- package/dist/components/verdocs-text-input2.js +5 -3
- package/dist/custom-elements.json +1894 -0
- package/dist/docs.json +24 -13
- package/dist/esm/{TemplateStore-bc248c04.js → TemplateStore-dcfb68c3.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-f65843b9.js → VerdocsEndpoint-e447b318.js} +25 -0
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popper-bfa25c7f.js → popper-15e448b4.js} +6 -12
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +71 -15
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/{verdocs-button-panel_3.entry.js → verdocs-button-panel_2.entry.js} +4 -20
- package/dist/esm/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +21 -4
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-summary.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-pagination_3.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +89 -82
- package/dist/esm/verdocs-template-attachments_2.entry.js +2 -2
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/esm/verdocs-template-fields_4.entry.js +2 -2
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{TemplateStore-bc248c04.js → TemplateStore-dcfb68c3.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-f65843b9.js → VerdocsEndpoint-e447b318.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.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 -0
- package/dist/esm-es5/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-summary.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-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.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-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_2.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-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.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/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.d.ts +4 -0
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +7 -1
- package/dist/types/components.d.ts +8 -0
- package/dist/verdocs-web-sdk/{p-0dec6856.entry.js → p-006dd4da.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ea3fe3d.entry.js → p-0378a336.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-93a1f0c7.entry.js → p-0527ab90.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f78860a.system.entry.js → p-065babe0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-004ec0ae.entry.js → p-0df85bd4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3ad53326.system.entry.js → p-118a14fe.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-189606f5.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-592f4249.entry.js → p-1ade993c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2f20c091.entry.js → p-1f592fb0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-223e5517.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3add7514.system.entry.js → p-25fdc669.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8c8e0f2b.system.entry.js → p-26417803.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3422705a.entry.js → p-268fe01c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4cc14862.entry.js → p-2a130b90.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f03d1e3b.entry.js → p-2b404e29.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3443e511.system.entry.js → p-2b7b500b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-36d42438.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-80149a45.entry.js → p-3e9c4c8a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad4d8802.system.entry.js → p-434dd9d9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-52300880.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-98bd4b4f.entry.js → p-5255e6f7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-70812806.system.entry.js → p-57e55966.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9a582e91.entry.js → p-59e55e05.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-92a36e56.system.entry.js → p-5fd70b07.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-c1c252b5.system.entry.js → p-6995a8d8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e54ac802.system.entry.js → p-6a67a872.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2985bb3e.system.entry.js → p-6c60927e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-df1b0ed6.system.entry.js → p-787289cc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84ed9bf2.system.entry.js → p-78b7499c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1d2c9b8a.system.entry.js → p-80ead6ca.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-282e1d70.entry.js → p-81bfb9ee.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a3698582.system.entry.js → p-87232ec1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2dfb0c4.entry.js → p-899f9d42.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-45cda07e.entry.js → p-9044fd88.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0bc0e0e1.system.entry.js → p-90565aa6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3c889a0a.entry.js → p-90a11750.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7589ac5e.system.entry.js → p-9488e048.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b78a0d6a.system.entry.js → p-9c25c1d4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d8f1b3af.system.js → p-a4129b09.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-a8cf70dd.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d0910a5d.entry.js → p-a8eb011c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-818941f3.system.entry.js → p-abfb25bc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd40e5ab.system.entry.js → p-ac58a89b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ce0362cd.system.entry.js → p-b42c686d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6d442326.system.entry.js → p-b49887e6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-79ddf1a7.entry.js → p-b7b48889.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5fcd1f65.system.entry.js → p-b8036fd4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e72313cc.entry.js → p-bdea2ff9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0ec1235.entry.js → p-be8ff081.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-23046e75.system.entry.js → p-c0e4c58b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-86652c3f.system.entry.js → p-c212eac2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2a1f413b.system.entry.js → p-c2eb64ad.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8ff6e046.entry.js → p-c7cebd38.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-004e9c9b.entry.js → p-c893c9e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e591fe98.entry.js → p-c8a1de2c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d240bf31.entry.js → p-d278b481.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-50b62a6f.entry.js → p-d3f3c09a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9a8d5562.entry.js → p-d583e91b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3fa63a12.system.js → p-d808a494.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-69462ccd.js → p-e06d9588.js} +1 -1
- package/dist/verdocs-web-sdk/p-e4b3e134.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1071b04a.system.entry.js → p-e63f1a46.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f8a8798.system.entry.js → p-e9c00342.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-130f3a72.entry.js → p-ea5cec2d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-eddc727f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-2526d836.js → p-ee6f2dd3.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +8 -8
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-32eed336.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4ab54e29.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4ed347fe.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6d6b57c4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d5c75638.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e0005281.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fcf2a8ed.entry.js +0 -1
- /package/dist/esm-es5/{popper-bfa25c7f.js → popper-15e448b4.js} +0 -0
- /package/dist/verdocs-web-sdk/{p-9d707f6e.js → p-7c0dcd00.js} +0 -0
- /package/dist/verdocs-web-sdk/{p-5e0c6e7c.system.js → p-9a5ff58c.system.js} +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{r as i,c as e,h as t,H as s,a as o}from"./p-6d3e0994.js";import{i as r}from"./p-7291906c.js";import{f as n}from"./p-ae4c9e4a.js";import{c as l}from"./p-
|
1
|
+
import{r as i,c as e,h as t,H as s,a as o}from"./p-6d3e0994.js";import{i as r}from"./p-7291906c.js";import{f as n}from"./p-ae4c9e4a.js";import{c as l}from"./p-7c0dcd00.js";import"./p-eab67c09.js";import"./p-72c63106.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-35841b7c.js";import"./p-4fe4e161.js";const a=({page:i,selected:e,onClick:s})=>{let o;return o="first"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>':"last"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>':String(i+1),t("div",{class:"page-button "+(i===e?"selected":""),onClick:()=>s(i),innerHTML:o})},c=class{constructor(t){i(this,t),this.selectPage=e(this,"selectPage",7),this.selectedPage=0,this.itemCount=1,this.perPage=10}handleSelectPage(i){var e;this.selectedPage=i,null===(e=this.selectPage)||void 0===e||e.emit({selectedPage:i})}render(){const i=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0,e=Math.max(0,this.selectedPage-2),o=Math.min(i,5);return t(s,null,this.selectedPage>0&&t(a,{page:"first",selected:this.selectedPage,onClick:()=>this.handleSelectPage(0)}),e>0&&t("div",{class:"ellipsis"},"..."),r(e,o-e).map((i=>t(a,{page:i,selected:this.selectedPage,onClick:i=>this.handleSelectPage(+i)}))),o<i&&t("div",{class:"ellipsis"},"..."),this.selectedPage<i-1&&t(a,{page:"last",selected:this.selectedPage,onClick:()=>this.handleSelectPage(i-1)}))}get el(){return o(this)}};c.style='verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';const d=class{constructor(t){i(this,t),this.optionSelected=e(this,"optionSelected",7),this.clickListenerSymbol=new AbortController,this.options=[],this.label="Filter",this.value="",this.placeholder="Select...",this.open=void 0}componentDidLoad(){this.popper=l(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]}),window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})}disconnectedCallback(){this.clickListenerSymbol.abort()}clickListener(i){i.target!=this.el&&!this.el.contains(i.target)&&this.hide()}handleSelectOption(i,e){i.stopPropagation(),this.optionSelected.emit(e),this.value=e.value,this.hide()}showDropdown(){var i,e;this.open=!0,this.dropdownMenu.setAttribute("data-show",""),this.dropdownMenu.removeAttribute("aria-hidden"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!0}]}))).catch((()=>{})),null===(e=this.popper)||void 0===e||e.update().catch((()=>{}))}handleHideDropdown(i){var e,t;"button"===(null===(e=null==i?void 0:i.target)||void 0===e?void 0:e.localName)&&"arrow"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.className)||this.hide()}toggleDropdown(i){i.stopPropagation(),this.open?this.hide():this.showDropdown()}hide(){var i;this.open=!1,this.dropdownMenu.removeAttribute("data-show"),this.dropdownMenu.setAttribute("aria-hidden","true"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!1}]}))).catch((()=>{}))}render(){var i,e,o;const r=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===this.value)),l=null===(e=this.options)||void 0===e?void 0:e.reduce(((i,e)=>i.label.length>e.label.length?i:e)),a=`${n((null==l?void 0:l.label)||"FILLER","14px Inter, Barlow, sans-serif")+n(this.label,"14px Inter, Barlow, sans-serif")+40}px`;return t(s,{class:{open:!!this.open},style:{minWidth:a,display:"inline-block"}},t("div",{class:"control",onClick:i=>this.toggleDropdown(i),onBlur:i=>this.handleHideDropdown(i)},t("div",{class:"title",ref:i=>this.dropdownButton=i},t("span",{class:"prefix"},this.label,":"),r?r.label:this.placeholder),t("div",{style:{flex:"1"}}),t("div",{class:"separator"}),t("div",{class:"arrow",innerHTML:'<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>',"aria-label":"Open Menu"})),t("div",{class:"items","aria-hidden":!this.open,ref:i=>this.dropdownMenu=i,style:{minWidth:a}},null===(o=this.options)||void 0===o?void 0:o.map((i=>i.label?t("button",{onClick:e=>this.handleSelectOption(e,i),class:"option "+(i.value===this.value?"selected":""),disabled:i.disabled},i.label):t("div",{class:"separator"})))))}get el(){return o(this)}};d.style='verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:#4c56cb3f}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';const p={border:"3px solid rgba(255, 255, 255, 0.3)",borderTopColor:"#fff"},h={border:"3px solid rgba(0, 0, 0, 0.3)",borderTopColor:"#333"},f=class{constructor(e){i(this,e),this.size=32,this.mode="light"}render(){return t(s,{style:{width:`${this.size}px`,height:`${this.size}px`,flex:`0 0 ${this.size}px`,..."light"===this.mode?p:h}})}};f.style="verdocs-spinner{display:inline-block;border-radius:50%;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}@keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";export{c as verdocs_pagination,d as verdocs_quick_filter,f as verdocs_spinner}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-6d3e0994.js";import"./p-05788c2b.js";import{V as s}from"./p-69462ccd.js";import{b as o}from"./p-6570268f.js";var r=function(e){return t=void 0,i=void 0,o=function(){return function(e,t){var i,s,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(a){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(n=0)),n;)try{if(i=1,s&&(o=2&c[0]?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!((o=(o=n.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){n=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(6===c[0]&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],s=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((s=void 0)||(s=Promise))((function(e,r){function n(e){try{a(o.next(e))}catch(e){r(e)}}function c(e){try{a(o.throw(e))}catch(e){r(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,c)}a((o=o.apply(t,i||[])).next())}));var t,i,s,o};const n=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=s.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};n.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';const c='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>',a=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=s.getDefault(),this.type="recent",this.options=void 0,this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",r(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",r(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",o(this.endpoint,{is_starred:!0}).then((e=>this.starred=e)).catch(e)}}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};a.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';const l=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=s.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};l.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_quick_functions,a as verdocs_search_activity,l as verdocs_search_box}
|
1
|
+
import{r as e,c as t,h as i}from"./p-6d3e0994.js";import"./p-05788c2b.js";import{V as s}from"./p-e06d9588.js";import{b as o}from"./p-6570268f.js";var r=function(e){return t=void 0,i=void 0,o=function(){return function(e,t){var i,s,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(a){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(n=0)),n;)try{if(i=1,s&&(o=2&c[0]?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!((o=(o=n.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){n=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(6===c[0]&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],s=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((s=void 0)||(s=Promise))((function(e,r){function n(e){try{a(o.next(e))}catch(e){r(e)}}function c(e){try{a(o.throw(e))}catch(e){r(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,c)}a((o=o.apply(t,i||[])).next())}));var t,i,s,o};const n=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=s.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};n.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';const c='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>',a=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=s.getDefault(),this.type="recent",this.options=void 0,this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",r(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",r(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",o(this.endpoint,{is_starred:!0}).then((e=>this.starred=e)).catch(e)}}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};a.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';const l=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=s.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};l.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_quick_functions,a as verdocs_search_activity,l as verdocs_search_box}
|
@@ -1 +1 @@
|
|
1
|
-
var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e("T",void 0);var r;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(r||(r={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i=e("c",(function(e,t,r){var i,a;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=(i=r===null||r===void 0?void 0:r.is_personal)!==null&&i!==void 0?i:false;var p=(a=r===null||r===void 0?void 0:r.is_public)!==null&&a!==void 0?a:false;var d=[];switch(t){case"create_personal":d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":d.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!p){d.push(n.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){d.push(n.TEMPLATE_MEMBER_READ);d.push(n.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_ORG)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);d.push(n.TEMPLATE_CREATOR_VISIBILITY)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){d.push(n.TEMPLATE_CREATOR_DELETE)}else{d.push(n.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(o(e,d)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(d.toString())}}));var o=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var a;(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"})(a||(a=e("T",{})));var s;(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"})(s||(s={}));var u;(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"})(u||(u={}));var c;(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"})(c||(c={}));var f;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(f||(f={}));var l;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(l||(l={}));var p=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 d=function(e){return!p.has(e&&e.code)};function h(e,t,r,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){r(e);return}if(s.done){t(u)}else{Promise.resolve(u).then(n,i)}}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(undefined)}))}}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){v(Object(r),true).forEach((function(t){_(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function _(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var R="axios-retry";function y(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&d(e)}var T=["get","head","options"];var g=T.concat(["put","delete"]);function b(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function A(e){if(!e.config){return false}return b(e)&&T.indexOf(e.config.method)!==-1}function O(e){if(!e.config){return false}return b(e)&&g.indexOf(e.config.method)!==-1}function S(e){return y(e)||O(e)}function w(){return 0}function L(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function C(e){var t=e[R]||{};t.retryCount=t.retryCount||0;e[R]=t;return t}function N(e,t){return m(m({},t),e[R])}function P(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 I(e,t,r,n){return D.apply(this,arguments)}function D(){D=E((function(e,t,r,n){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}));return D.apply(this,arguments)}function M(e,t){e.interceptors.request.use((function(e){var t=C(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=E((function(r){var n,i,o,a,s,u,c,f,l,p,d,h,E,v,m,_;return __generator(this,(function(R){switch(R.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=N(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?S:s,c=i.retryDelay,f=c===void 0?w:c,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;E=C(n);return[4,I(a,u,E,r)];case 1:if(R.sent()){E.retryCount+=1;v=f(E.retryCount,r);P(e,n);if(!p&&n.timeout&&E.lastRequestTime){m=Date.now()-E.lastRequestTime;_=n.timeout-m-v;if(_<=0){return[2,Promise.reject(r)]}n.timeout=_}n.transformRequest=[function(e){return e}];h(E.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),v)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}M.isNetworkError=y;M.isSafeRequestError=A;M.isIdempotentRequestError=O;M.isNetworkOrIdempotentRequestError=S;M.exponentialDelay=L;M.isRetryableError=b;function B(e,t){return function r(){return e.apply(t,arguments)}}var U=Object.prototype.toString;var j=Object.getPrototypeOf;var x=function(e){return function(t){var r=U.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var F=function(e){e=e.toLowerCase();return function(t){return x(t)===e}};var k=function(e){return function(t){return typeof t===e}};var q=Array.isArray;var G=k("undefined");function V(e){return e!==null&&!G(e)&&e.constructor!==null&&!G(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z=F("ArrayBuffer");function H(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&z(e.buffer)}return t}var J=k("string");var K=k("function");var W=k("number");var Y=function(e){return e!==null&&typeof e==="object"};var X=function(e){return e===true||e===false};var Z=function(e){if(x(e)!=="object"){return false}var t=j(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var $=F("Date");var Q=F("File");var ee=F("Blob");var te=F("FileList");var re=function(e){return Y(e)&&K(e.pipe)};var ne=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||K(e.append)&&((t=x(e))==="formdata"||t==="object"&&K(e.toString)&&e.toString()==="[object FormData]"))};var ie=F("URLSearchParams");var oe=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ae(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(q(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 se(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 ue=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var ce=function(e){return!G(e)&&e!==ue};function fe(){var e=(ce(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&se(t,n)||n;if(Z(t[i])&&Z(r)){t[i]=fe(t[i],r)}else if(Z(r)){t[i]=fe({},r)}else if(q(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&ae(arguments[n],r)}return t}var le=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;ae(t,(function(t,n){if(r&&K(t)){e[n]=B(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var pe=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var de=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 he=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var Ee=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 ve=function(e){if(!e)return null;if(q(e))return e;var t=e.length;if(!W(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var me=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&j(Uint8Array));var _e=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 Re=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ye=F("HTMLFormElement");var Te=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ge=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var be=F("RegExp");var Ae=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};ae(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var Oe=function(e){Ae(e,(function(t,r){if(K(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!K(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 Se=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};q(e)?n(e):n(String(e).split(t));return r};var we=function(){};var Le=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Ce="abcdefghijklmnopqrstuvwxyz";var Ne="0123456789";var Pe={DIGIT:Ne,ALPHA:Ce,ALPHA_DIGIT:Ce+Ce.toUpperCase()+Ne};var Ie=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Pe.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function De(e){return!!(e&&K(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Me=function(e){var t=new Array(10);var r=function(e,n){if(Y(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=q(e)?[]:{};ae(e,(function(e,t){var o=r(e,n+1);!G(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var Be=F("AsyncFunction");var Ue=function(e){return e&&(Y(e)||K(e))&&K(e.then)&&K(e.catch)};var je={isArray:q,isArrayBuffer:z,isBuffer:V,isFormData:ne,isArrayBufferView:H,isString:J,isNumber:W,isBoolean:X,isObject:Y,isPlainObject:Z,isUndefined:G,isDate:$,isFile:Q,isBlob:ee,isRegExp:be,isFunction:K,isStream:re,isURLSearchParams:ie,isTypedArray:me,isFileList:te,forEach:ae,merge:fe,extend:le,trim:oe,stripBOM:pe,inherits:de,toFlatObject:he,kindOf:x,kindOfTest:F,endsWith:Ee,toArray:ve,forEachEntry:_e,matchAll:Re,isHTMLForm:ye,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:Ae,freezeMethods:Oe,toObjectSet:Se,toCamelCase:Te,noop:we,toFiniteNumber:Le,findKey:se,global:ue,isContextDefined:ce,ALPHABET:Pe,generateString:Ie,isSpecCompliantForm:De,toJSONObject:Me,isAsyncFn:Be,isThenable:Ue};function xe(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}je.inherits(xe,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Fe=xe.prototype;var ke={};["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){ke[e]={value:e}}));Object.defineProperties(xe,ke);Object.defineProperty(Fe,"isAxiosError",{value:true});xe.from=function(e,t,r,n,i,o){var a=Object.create(Fe);je.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));xe.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var qe=null;function Ge(e){return je.isPlainObject(e)||je.isArray(e)}function Ve(e){return je.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ve(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function He(e){return je.isArray(e)&&!e.some(Ge)}var Je=je.toFlatObject(je,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Ke(e,t,r){if(!je.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!je.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&je.isSpecCompliantForm(t);if(!je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(je.isDate(e)){return e.toISOString()}if(!u&&je.isBlob(e)){throw new xe("Blob is not supported. Use a Buffer instead.")}if(je.isArrayBuffer(e)||je.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(je.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(je.isArray(e)&&He(e)||(je.isFileList(e)||je.endsWith(r,"[]"))&&(s=je.toArray(e))){r=Ve(r);s.forEach((function e(n,i){!(je.isUndefined(n)||n===null)&&t.append(a===true?ze([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Ge(e)){return true}t.append(ze(i,r,o),c(e));return false}var l=[];var p=Object.assign(Je,{defaultVisitor:f,convertValue:c,isVisitable:Ge});function d(e,r){if(je.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);je.forEach(e,(function e(n,o){var a=!(je.isUndefined(n)||n===null)&&i.call(t,n,je.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!je.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function We(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 Ye(e,t){this._pairs=[];e&&Ke(e,this,t)}var Xe=Ye.prototype;Xe.append=function e(t,r){this._pairs.push([t,r])};Xe.toString=function e(t){var r=t?function(e){return t.call(this,e,We)}:We;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $e(e,t,r){if(!t){return e}var n=r&&r.encode||Ze;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=je.isURLSearchParams(t)?t.toString():new Ye(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 Qe=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){je.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var et={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var tt=typeof URLSearchParams!=="undefined"?URLSearchParams:Ye;var rt=typeof FormData!=="undefined"?FormData:null;var nt=typeof Blob!=="undefined"?Blob:null;var it=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var ot=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var at={isBrowser:true,classes:{URLSearchParams:tt,FormData:rt,Blob:nt},isStandardBrowserEnv:it,isStandardBrowserWebWorkerEnv:ot,protocols:["http","https","file","blob","url","data"]};function st(e,t){return Ke(e,new at.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function ut(e){return je.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function ct(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 ft(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&je.isArray(n)?n.length:o;if(s){if(je.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!je.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&je.isArray(n[o])){n[o]=ct(n[o])}return!a}if(je.isFormData(e)&&je.isFunction(e.entries)){var r={};je.forEachEntry(e,(function(e,n){t(ut(e),n,r,0)}));return r}return null}var lt={"Content-Type":undefined};function pt(e,t,r){if(je.isString(e)){try{(t||JSON.parse)(e);return je.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var dt={transitional:et,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=je.isObject(t);if(o&&je.isHTMLForm(t)){t=new FormData(t)}var a=je.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(ft(t)):t}if(je.isArrayBuffer(t)||je.isBuffer(t)||je.isStream(t)||je.isFile(t)||je.isBlob(t)){return t}if(je.isArrayBufferView(t)){return t.buffer}if(je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return st(t,this.formSerializer).toString()}if((s=je.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Ke(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return pt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||dt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&je.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw xe.from(e,xe.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:at.classes.FormData,Blob:at.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};je.forEach(["delete","get","head"],(function e(t){dt.headers[t]={}}));je.forEach(["post","put","patch"],(function e(t){dt.headers[t]=je.merge(lt)}));var ht=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Et=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]&&ht[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 vt=Symbol("internals");function mt(e){return e&&String(e).trim().toLowerCase()}function _t(e){if(e===false||e==null){return e}return je.isArray(e)?e.map(_t):String(e)}function Rt(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var yt=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Tt(e,t,r,n,i){if(je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!je.isString(t))return;if(je.isString(n)){return t.indexOf(n)!==-1}if(je.isRegExp(n)){return n.test(t)}}function gt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function bt(e,t){var r=je.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var At=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=mt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=je.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=_t(e)}}var o=function(e,t){return je.forEach(e,(function(e,r){return i(e,r,t)}))};if(je.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(je.isString(e)&&(e=e.trim())&&!yt(e)){o(Et(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=mt(e);if(e){var r=je.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return Rt(n)}if(je.isFunction(t)){return t.call(this,n,r)}if(je.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=mt(e);if(e){var r=je.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Tt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=mt(e);if(e){var i=je.findKey(r,e);if(i&&(!t||Tt(r,r[i],i,t))){delete r[i];n=true}}}if(je.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Tt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};je.forEach(this,(function(n,i){var o=je.findKey(r,i);if(o){t[o]=_t(n);delete t[i];return}var a=e?gt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=_t(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);je.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&je.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[vt]=this[vt]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=mt(e);if(!r[t]){bt(n,e);r[t]=true}}je.isArray(e)?e.forEach(i):i(e);return this};return e}();At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.freezeMethods(At.prototype);je.freezeMethods(At);function Ot(e,t){var r=this||dt;var n=t||r;var i=At.from(n.headers);var o=n.data;je.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function St(e){return!!(e&&e.__CANCEL__)}function wt(e,t,r){xe.call(this,e==null?"canceled":e,xe.ERR_CANCELED,t,r);this.name="CanceledError"}je.inherits(wt,xe,{__CANCEL__:true});function Lt(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new xe("Request failed with status code "+r.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Ct=at.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(je.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(je.isString(i)){s.push("path="+i)}if(je.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function Nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function It(e,t){if(e&&!Nt(t)){return Pt(e,t)}return t}var Dt=at.isStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=je.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Mt(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Bt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function Ut(e,t){var r=0;var n=Bt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var jt=typeof XMLHttpRequest!=="undefined";var xt=jt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=At.from(e.headers).normalize();var a=e.responseType;var s;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(s)}if(e.signal){e.signal.removeEventListener("abort",s)}}if(je.isFormData(i)){if(at.isStandardBrowserEnv||at.isStandardBrowserWebWorkerEnv){o.setContentType(false)}else{o.setContentType("multipart/form-data;",false)}}var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"";var l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+l))}var p=It(e.baseURL,e.url);c.open(e.method.toUpperCase(),$e(p,e.params,e.paramsSerializer),true);c.timeout=e.timeout;function d(){if(!c){return}var t=At.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?c.responseText:c.response;var o={data:i,status:c.status,statusText:c.statusText,headers:t,config:e,request:c};Lt((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);c=null}if("onloadend"in c){c.onloadend=d}else{c.onreadystatechange=function e(){if(!c||c.readyState!==4){return}if(c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}c.onabort=function t(){if(!c){return}n(new xe("Request aborted",xe.ECONNABORTED,e,c));c=null};c.onerror=function t(){n(new xe("Network Error",xe.ERR_NETWORK,e,c));c=null};c.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||et;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new xe(r,i.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,c));c=null};if(at.isStandardBrowserEnv){var h=(e.withCredentials||Dt(p))&&e.xsrfCookieName&&Ct.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in c){je.forEach(o.toJSON(),(function e(t,r){c.setRequestHeader(r,t)}))}if(!je.isUndefined(e.withCredentials)){c.withCredentials=!!e.withCredentials}if(a&&a!=="json"){c.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){c.addEventListener("progress",Ut(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&c.upload){c.upload.addEventListener("progress",Ut(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!c){return}n(!t||t.type?new wt(null,e,c):t);c.abort();c=null};e.cancelToken&&e.cancelToken.subscribe(s);if(e.signal){e.signal.aborted?s():e.signal.addEventListener("abort",s)}}var E=Mt(p);if(E&&at.protocols.indexOf(E)===-1){n(new xe("Unsupported protocol "+E+":",xe.ERR_BAD_REQUEST,e));return}c.send(i||null)}))};var Ft={http:qe,xhr:xt};je.forEach(Ft,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var kt={getAdapter:function(e){e=je.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=je.isString(r)?Ft[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new xe("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(je.hasOwnProp(Ft,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!je.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:Ft};function qt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new wt(null,e)}}function Gt(e){qt(e);e.headers=At.from(e.headers);e.data=Ot.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=kt.getAdapter(e.adapter||dt.adapter);return t(e).then((function t(r){qt(e);r.data=Ot.call(e,e.transformResponse,r);r.headers=At.from(r.headers);return r}),(function t(r){if(!St(r)){qt(e);if(r&&r.response){r.response.data=Ot.call(e,e.transformResponse,r.response);r.response.headers=At.from(r.response.headers)}}return Promise.reject(r)}))}var Vt=function(e){return e instanceof At?e.toJSON():e};function zt(e,t){t=t||{};var r={};function n(e,t,r){if(je.isPlainObject(e)&&je.isPlainObject(t)){return je.merge.call({caseless:r},e,t)}else if(je.isPlainObject(t)){return je.merge({},t)}else if(je.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!je.isUndefined(t)){return n(e,t,r)}else if(!je.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!je.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!je.isUndefined(t)){return n(undefined,t)}else if(!je.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(Vt(e),Vt(t),true)}};je.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);je.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Ht="1.4.0";var Jt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Jt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Kt={};Jt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Ht+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new xe(i(n," has been removed"+(r?" in "+r:"")),xe.ERR_DEPRECATED)}if(r&&!Kt[n]){Kt[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 Wt(e,t,r){if(typeof e!=="object"){throw new xe("options must be an object",xe.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 xe("option "+o+" must be "+u,xe.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new xe("Unknown option "+o,xe.ERR_BAD_OPTION)}}}var Yt={assertOptions:Wt,validators:Jt};var Xt=Yt.validators;var Zt=function(){function e(e){this.defaults=e;this.interceptors={request:new Qe,response:new Qe}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=zt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Yt.assertOptions(r,{silentJSONParsing:Xt.transitional(Xt.boolean),forcedJSONParsing:Xt.transitional(Xt.boolean),clarifyTimeoutError:Xt.transitional(Xt.boolean)},false)}if(n!=null){if(je.isFunction(n)){t.paramsSerializer={serialize:n}}else{Yt.assertOptions(n,{encode:Xt.function,serialize:Xt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&je.merge(i.common,i[t.method]);o&&je.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=At.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[Gt.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var E=a[f++];try{d=h(d)}catch(e){E.call(this,e);break}}try{c=Gt.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=zt(this.defaults,e);var t=It(e.baseURL,e.url);return $e(t,e.params,e.paramsSerializer)};return e}();je.forEach(["delete","get","head","options"],(function e(t){Zt.prototype[t]=function(e,r){return this.request(zt(r||{},{method:t,url:e,data:(r||{}).data}))}}));je.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Zt.prototype[t]=r();Zt.prototype[t+"Form"]=r(true)}));var $t=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 wt(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 Qt(e){return function t(r){return e.apply(null,r)}}function er(e){return je.isObject(e)&&e.isAxiosError===true}var tr={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(tr).forEach((function(e){var t=e[0],r=e[1];tr[r]=t}));function rr(e){var t=new Zt(e);var r=B(Zt.prototype.request,t);je.extend(r,Zt.prototype,t,{allOwnKeys:true});je.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return rr(zt(e,r))};return r}var nr=rr(dt);nr.Axios=Zt;nr.CanceledError=wt;nr.CancelToken=$t;nr.isCancel=St;nr.VERSION=Ht;nr.toFormData=Ke;nr.AxiosError=xe;nr.Cancel=nr.CanceledError;nr.all=function e(t){return Promise.all(t)};nr.spread=Qt;nr.isAxiosError=er;nr.mergeConfig=zt;nr.AxiosHeaders=At;nr.formToJSON=function(e){return ft(je.isHTMLForm(e)?new FormData(e):e)};nr.HttpStatusCode=tr;nr.default=nr;var ir=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var or=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 ir()}try{if(!__global__)return ir();return __global__}finally{delete Object.prototype.__global__}}();var ar=Symbol.for("verdocs-default-endpoint");var sr=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 ur=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="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=(e===null||e===void 0?void 0:e.baseURL)||"https://api.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=nr.create({baseURL:this.baseURL,timeout:this.timeout});M(this.api,{retries:0,retryDelay:M.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){or[ar]=this};e.getDefault=function(){if(!or[ar]){or[ar]=new e;window.console.debug("[JS_SDK] Created default endpoint",or[ar])}return or[ar]};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(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.api.defaults.baseURL=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(sr)}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
|
+
var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e("T",void 0);var r;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(r||(r={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i=e("c",(function(e,t,r){var i,a;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=(i=r===null||r===void 0?void 0:r.is_personal)!==null&&i!==void 0?i:false;var p=(a=r===null||r===void 0?void 0:r.is_public)!==null&&a!==void 0?a:false;var d=[];switch(t){case"create_personal":d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":d.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!p){d.push(n.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){d.push(n.TEMPLATE_MEMBER_READ);d.push(n.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_ORG)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);d.push(n.TEMPLATE_CREATOR_VISIBILITY)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){d.push(n.TEMPLATE_CREATOR_DELETE)}else{d.push(n.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(o(e,d)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(d.toString())}}));var o=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var a;(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"})(a||(a=e("T",{})));var s;(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"})(s||(s={}));var u;(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"})(u||(u={}));var c;(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"})(c||(c={}));var f;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(f||(f={}));var l;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(l||(l={}));var p=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 d=function(e){return!p.has(e&&e.code)};function h(e,t,r,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){r(e);return}if(s.done){t(u)}else{Promise.resolve(u).then(n,i)}}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(undefined)}))}}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){v(Object(r),true).forEach((function(t){R(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function R(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var _="axios-retry";function y(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&d(e)}var T=["get","head","options"];var g=T.concat(["put","delete"]);function b(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function A(e){if(!e.config){return false}return b(e)&&T.indexOf(e.config.method)!==-1}function O(e){if(!e.config){return false}return b(e)&&g.indexOf(e.config.method)!==-1}function S(e){return y(e)||O(e)}function w(){return 0}function L(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function C(e){var t=e[_]||{};t.retryCount=t.retryCount||0;e[_]=t;return t}function N(e,t){return m(m({},t),e[_])}function P(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 I(e,t,r,n){return D.apply(this,arguments)}function D(){D=E((function(e,t,r,n){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}));return D.apply(this,arguments)}function U(e,t){e.interceptors.request.use((function(e){var t=C(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=E((function(r){var n,i,o,a,s,u,c,f,l,p,d,h,E,v,m,R;return __generator(this,(function(_){switch(_.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=N(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?S:s,c=i.retryDelay,f=c===void 0?w:c,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;E=C(n);return[4,I(a,u,E,r)];case 1:if(_.sent()){E.retryCount+=1;v=f(E.retryCount,r);P(e,n);if(!p&&n.timeout&&E.lastRequestTime){m=Date.now()-E.lastRequestTime;R=n.timeout-m-v;if(R<=0){return[2,Promise.reject(r)]}n.timeout=R}n.transformRequest=[function(e){return e}];h(E.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),v)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}U.isNetworkError=y;U.isSafeRequestError=A;U.isIdempotentRequestError=O;U.isNetworkOrIdempotentRequestError=S;U.exponentialDelay=L;U.isRetryableError=b;function M(e,t){return function r(){return e.apply(t,arguments)}}var B=Object.prototype.toString;var j=Object.getPrototypeOf;var x=function(e){return function(t){var r=B.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var F=function(e){e=e.toLowerCase();return function(t){return x(t)===e}};var k=function(e){return function(t){return typeof t===e}};var q=Array.isArray;var G=k("undefined");function V(e){return e!==null&&!G(e)&&e.constructor!==null&&!G(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z=F("ArrayBuffer");function H(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&z(e.buffer)}return t}var J=k("string");var K=k("function");var W=k("number");var Y=function(e){return e!==null&&typeof e==="object"};var X=function(e){return e===true||e===false};var Z=function(e){if(x(e)!=="object"){return false}var t=j(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var $=F("Date");var Q=F("File");var ee=F("Blob");var te=F("FileList");var re=function(e){return Y(e)&&K(e.pipe)};var ne=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||K(e.append)&&((t=x(e))==="formdata"||t==="object"&&K(e.toString)&&e.toString()==="[object FormData]"))};var ie=F("URLSearchParams");var oe=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ae(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(q(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 se(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 ue=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var ce=function(e){return!G(e)&&e!==ue};function fe(){var e=(ce(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&se(t,n)||n;if(Z(t[i])&&Z(r)){t[i]=fe(t[i],r)}else if(Z(r)){t[i]=fe({},r)}else if(q(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&ae(arguments[n],r)}return t}var le=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;ae(t,(function(t,n){if(r&&K(t)){e[n]=M(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var pe=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var de=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 he=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var Ee=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 ve=function(e){if(!e)return null;if(q(e))return e;var t=e.length;if(!W(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var me=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&j(Uint8Array));var Re=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 _e=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ye=F("HTMLFormElement");var Te=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ge=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var be=F("RegExp");var Ae=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};ae(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var Oe=function(e){Ae(e,(function(t,r){if(K(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!K(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 Se=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};q(e)?n(e):n(String(e).split(t));return r};var we=function(){};var Le=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Ce="abcdefghijklmnopqrstuvwxyz";var Ne="0123456789";var Pe={DIGIT:Ne,ALPHA:Ce,ALPHA_DIGIT:Ce+Ce.toUpperCase()+Ne};var Ie=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Pe.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function De(e){return!!(e&&K(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Ue=function(e){var t=new Array(10);var r=function(e,n){if(Y(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=q(e)?[]:{};ae(e,(function(e,t){var o=r(e,n+1);!G(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var Me=F("AsyncFunction");var Be=function(e){return e&&(Y(e)||K(e))&&K(e.then)&&K(e.catch)};var je={isArray:q,isArrayBuffer:z,isBuffer:V,isFormData:ne,isArrayBufferView:H,isString:J,isNumber:W,isBoolean:X,isObject:Y,isPlainObject:Z,isUndefined:G,isDate:$,isFile:Q,isBlob:ee,isRegExp:be,isFunction:K,isStream:re,isURLSearchParams:ie,isTypedArray:me,isFileList:te,forEach:ae,merge:fe,extend:le,trim:oe,stripBOM:pe,inherits:de,toFlatObject:he,kindOf:x,kindOfTest:F,endsWith:Ee,toArray:ve,forEachEntry:Re,matchAll:_e,isHTMLForm:ye,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:Ae,freezeMethods:Oe,toObjectSet:Se,toCamelCase:Te,noop:we,toFiniteNumber:Le,findKey:se,global:ue,isContextDefined:ce,ALPHABET:Pe,generateString:Ie,isSpecCompliantForm:De,toJSONObject:Ue,isAsyncFn:Me,isThenable:Be};function xe(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}je.inherits(xe,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Fe=xe.prototype;var ke={};["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){ke[e]={value:e}}));Object.defineProperties(xe,ke);Object.defineProperty(Fe,"isAxiosError",{value:true});xe.from=function(e,t,r,n,i,o){var a=Object.create(Fe);je.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));xe.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var qe=null;function Ge(e){return je.isPlainObject(e)||je.isArray(e)}function Ve(e){return je.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ve(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function He(e){return je.isArray(e)&&!e.some(Ge)}var Je=je.toFlatObject(je,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Ke(e,t,r){if(!je.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!je.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&je.isSpecCompliantForm(t);if(!je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(je.isDate(e)){return e.toISOString()}if(!u&&je.isBlob(e)){throw new xe("Blob is not supported. Use a Buffer instead.")}if(je.isArrayBuffer(e)||je.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(je.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(je.isArray(e)&&He(e)||(je.isFileList(e)||je.endsWith(r,"[]"))&&(s=je.toArray(e))){r=Ve(r);s.forEach((function e(n,i){!(je.isUndefined(n)||n===null)&&t.append(a===true?ze([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Ge(e)){return true}t.append(ze(i,r,o),c(e));return false}var l=[];var p=Object.assign(Je,{defaultVisitor:f,convertValue:c,isVisitable:Ge});function d(e,r){if(je.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);je.forEach(e,(function e(n,o){var a=!(je.isUndefined(n)||n===null)&&i.call(t,n,je.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!je.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function We(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 Ye(e,t){this._pairs=[];e&&Ke(e,this,t)}var Xe=Ye.prototype;Xe.append=function e(t,r){this._pairs.push([t,r])};Xe.toString=function e(t){var r=t?function(e){return t.call(this,e,We)}:We;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $e(e,t,r){if(!t){return e}var n=r&&r.encode||Ze;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=je.isURLSearchParams(t)?t.toString():new Ye(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 Qe=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){je.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var et={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var tt=typeof URLSearchParams!=="undefined"?URLSearchParams:Ye;var rt=typeof FormData!=="undefined"?FormData:null;var nt=typeof Blob!=="undefined"?Blob:null;var it=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var ot=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var at={isBrowser:true,classes:{URLSearchParams:tt,FormData:rt,Blob:nt},isStandardBrowserEnv:it,isStandardBrowserWebWorkerEnv:ot,protocols:["http","https","file","blob","url","data"]};function st(e,t){return Ke(e,new at.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function ut(e){return je.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function ct(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 ft(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&je.isArray(n)?n.length:o;if(s){if(je.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!je.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&je.isArray(n[o])){n[o]=ct(n[o])}return!a}if(je.isFormData(e)&&je.isFunction(e.entries)){var r={};je.forEachEntry(e,(function(e,n){t(ut(e),n,r,0)}));return r}return null}var lt={"Content-Type":undefined};function pt(e,t,r){if(je.isString(e)){try{(t||JSON.parse)(e);return je.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var dt={transitional:et,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=je.isObject(t);if(o&&je.isHTMLForm(t)){t=new FormData(t)}var a=je.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(ft(t)):t}if(je.isArrayBuffer(t)||je.isBuffer(t)||je.isStream(t)||je.isFile(t)||je.isBlob(t)){return t}if(je.isArrayBufferView(t)){return t.buffer}if(je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return st(t,this.formSerializer).toString()}if((s=je.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Ke(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return pt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||dt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&je.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw xe.from(e,xe.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:at.classes.FormData,Blob:at.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};je.forEach(["delete","get","head"],(function e(t){dt.headers[t]={}}));je.forEach(["post","put","patch"],(function e(t){dt.headers[t]=je.merge(lt)}));var ht=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Et=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]&&ht[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 vt=Symbol("internals");function mt(e){return e&&String(e).trim().toLowerCase()}function Rt(e){if(e===false||e==null){return e}return je.isArray(e)?e.map(Rt):String(e)}function _t(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var yt=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Tt(e,t,r,n,i){if(je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!je.isString(t))return;if(je.isString(n)){return t.indexOf(n)!==-1}if(je.isRegExp(n)){return n.test(t)}}function gt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function bt(e,t){var r=je.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var At=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=mt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=je.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Rt(e)}}var o=function(e,t){return je.forEach(e,(function(e,r){return i(e,r,t)}))};if(je.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(je.isString(e)&&(e=e.trim())&&!yt(e)){o(Et(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=mt(e);if(e){var r=je.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return _t(n)}if(je.isFunction(t)){return t.call(this,n,r)}if(je.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=mt(e);if(e){var r=je.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Tt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=mt(e);if(e){var i=je.findKey(r,e);if(i&&(!t||Tt(r,r[i],i,t))){delete r[i];n=true}}}if(je.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Tt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};je.forEach(this,(function(n,i){var o=je.findKey(r,i);if(o){t[o]=Rt(n);delete t[i];return}var a=e?gt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Rt(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);je.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&je.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[vt]=this[vt]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=mt(e);if(!r[t]){bt(n,e);r[t]=true}}je.isArray(e)?e.forEach(i):i(e);return this};return e}();At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.freezeMethods(At.prototype);je.freezeMethods(At);function Ot(e,t){var r=this||dt;var n=t||r;var i=At.from(n.headers);var o=n.data;je.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function St(e){return!!(e&&e.__CANCEL__)}function wt(e,t,r){xe.call(this,e==null?"canceled":e,xe.ERR_CANCELED,t,r);this.name="CanceledError"}je.inherits(wt,xe,{__CANCEL__:true});function Lt(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new xe("Request failed with status code "+r.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Ct=at.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(je.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(je.isString(i)){s.push("path="+i)}if(je.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function Nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function It(e,t){if(e&&!Nt(t)){return Pt(e,t)}return t}var Dt=at.isStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=je.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Ut(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Mt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function Bt(e,t){var r=0;var n=Mt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var jt=typeof XMLHttpRequest!=="undefined";var xt=jt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=At.from(e.headers).normalize();var a=e.responseType;var s;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(s)}if(e.signal){e.signal.removeEventListener("abort",s)}}if(je.isFormData(i)){if(at.isStandardBrowserEnv||at.isStandardBrowserWebWorkerEnv){o.setContentType(false)}else{o.setContentType("multipart/form-data;",false)}}var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"";var l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+l))}var p=It(e.baseURL,e.url);c.open(e.method.toUpperCase(),$e(p,e.params,e.paramsSerializer),true);c.timeout=e.timeout;function d(){if(!c){return}var t=At.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?c.responseText:c.response;var o={data:i,status:c.status,statusText:c.statusText,headers:t,config:e,request:c};Lt((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);c=null}if("onloadend"in c){c.onloadend=d}else{c.onreadystatechange=function e(){if(!c||c.readyState!==4){return}if(c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}c.onabort=function t(){if(!c){return}n(new xe("Request aborted",xe.ECONNABORTED,e,c));c=null};c.onerror=function t(){n(new xe("Network Error",xe.ERR_NETWORK,e,c));c=null};c.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||et;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new xe(r,i.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,c));c=null};if(at.isStandardBrowserEnv){var h=(e.withCredentials||Dt(p))&&e.xsrfCookieName&&Ct.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in c){je.forEach(o.toJSON(),(function e(t,r){c.setRequestHeader(r,t)}))}if(!je.isUndefined(e.withCredentials)){c.withCredentials=!!e.withCredentials}if(a&&a!=="json"){c.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){c.addEventListener("progress",Bt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&c.upload){c.upload.addEventListener("progress",Bt(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!c){return}n(!t||t.type?new wt(null,e,c):t);c.abort();c=null};e.cancelToken&&e.cancelToken.subscribe(s);if(e.signal){e.signal.aborted?s():e.signal.addEventListener("abort",s)}}var E=Ut(p);if(E&&at.protocols.indexOf(E)===-1){n(new xe("Unsupported protocol "+E+":",xe.ERR_BAD_REQUEST,e));return}c.send(i||null)}))};var Ft={http:qe,xhr:xt};je.forEach(Ft,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var kt={getAdapter:function(e){e=je.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=je.isString(r)?Ft[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new xe("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(je.hasOwnProp(Ft,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!je.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:Ft};function qt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new wt(null,e)}}function Gt(e){qt(e);e.headers=At.from(e.headers);e.data=Ot.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=kt.getAdapter(e.adapter||dt.adapter);return t(e).then((function t(r){qt(e);r.data=Ot.call(e,e.transformResponse,r);r.headers=At.from(r.headers);return r}),(function t(r){if(!St(r)){qt(e);if(r&&r.response){r.response.data=Ot.call(e,e.transformResponse,r.response);r.response.headers=At.from(r.response.headers)}}return Promise.reject(r)}))}var Vt=function(e){return e instanceof At?e.toJSON():e};function zt(e,t){t=t||{};var r={};function n(e,t,r){if(je.isPlainObject(e)&&je.isPlainObject(t)){return je.merge.call({caseless:r},e,t)}else if(je.isPlainObject(t)){return je.merge({},t)}else if(je.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!je.isUndefined(t)){return n(e,t,r)}else if(!je.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!je.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!je.isUndefined(t)){return n(undefined,t)}else if(!je.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(Vt(e),Vt(t),true)}};je.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);je.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Ht="1.4.0";var Jt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Jt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Kt={};Jt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Ht+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new xe(i(n," has been removed"+(r?" in "+r:"")),xe.ERR_DEPRECATED)}if(r&&!Kt[n]){Kt[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 Wt(e,t,r){if(typeof e!=="object"){throw new xe("options must be an object",xe.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 xe("option "+o+" must be "+u,xe.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new xe("Unknown option "+o,xe.ERR_BAD_OPTION)}}}var Yt={assertOptions:Wt,validators:Jt};var Xt=Yt.validators;var Zt=function(){function e(e){this.defaults=e;this.interceptors={request:new Qe,response:new Qe}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=zt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Yt.assertOptions(r,{silentJSONParsing:Xt.transitional(Xt.boolean),forcedJSONParsing:Xt.transitional(Xt.boolean),clarifyTimeoutError:Xt.transitional(Xt.boolean)},false)}if(n!=null){if(je.isFunction(n)){t.paramsSerializer={serialize:n}}else{Yt.assertOptions(n,{encode:Xt.function,serialize:Xt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&je.merge(i.common,i[t.method]);o&&je.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=At.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[Gt.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var E=a[f++];try{d=h(d)}catch(e){E.call(this,e);break}}try{c=Gt.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=zt(this.defaults,e);var t=It(e.baseURL,e.url);return $e(t,e.params,e.paramsSerializer)};return e}();je.forEach(["delete","get","head","options"],(function e(t){Zt.prototype[t]=function(e,r){return this.request(zt(r||{},{method:t,url:e,data:(r||{}).data}))}}));je.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Zt.prototype[t]=r();Zt.prototype[t+"Form"]=r(true)}));var $t=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 wt(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 Qt(e){return function t(r){return e.apply(null,r)}}function er(e){return je.isObject(e)&&e.isAxiosError===true}var tr={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(tr).forEach((function(e){var t=e[0],r=e[1];tr[r]=t}));function rr(e){var t=new Zt(e);var r=M(Zt.prototype.request,t);je.extend(r,Zt.prototype,t,{allOwnKeys:true});je.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return rr(zt(e,r))};return r}var nr=rr(dt);nr.Axios=Zt;nr.CanceledError=wt;nr.CancelToken=$t;nr.isCancel=St;nr.VERSION=Ht;nr.toFormData=Ke;nr.AxiosError=xe;nr.Cancel=nr.CanceledError;nr.all=function e(t){return Promise.all(t)};nr.spread=Qt;nr.isAxiosError=er;nr.mergeConfig=zt;nr.AxiosHeaders=At;nr.formToJSON=function(e){return ft(je.isHTMLForm(e)?new FormData(e):e)};nr.HttpStatusCode=tr;nr.default=nr;var ir=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var or=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 ir()}try{if(!__global__)return ir();return __global__}finally{delete Object.prototype.__global__}}();var ar=Symbol.for("verdocs-default-endpoint");var sr=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 ur=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=nr.create({baseURL:this.baseURL,timeout:this.timeout});U(this.api,{retries:0,retryDelay:U.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){or[ar]=this};e.getDefault=function(){if(!or[ar]){or[ar]=new e;window.console.debug("[JS_SDK] Created default endpoint",or[ar])}return or[ar]};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(sr)}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 +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,i,s,u,c,a=function(t,e,r){var o,i;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var s=(null==t?void 0:t.profile_id)||"BOGUS";if(!s)return{canPerform:!1,message:"Active session required"};var u=(null==r?void 0:r.profile_id)===s,c=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),a=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(i=null==r?void 0:r.is_public)&&void 0!==i&&i,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":u||(!a&&c||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":u||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(u?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(u?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":u?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(u?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return l(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},l=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))};!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(r||(r={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(o||(o={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(i||(i={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(s||(s={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(u||(u={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(c||(c={}));const f=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function h(t,e,n,r,o,i,s){try{var u=t[i](s),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){h(i,r,o,s,u,"next",t)}function u(t){h(i,r,o,s,u,"throw",t)}s(void 0)}))}}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){b(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&(t=>!f.has(t&&t.code))(t)}var _=["get","head","options"],w=_.concat(["put","delete"]);function y(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function R(t){return!!t.config&&y(t)&&-1!==w.indexOf(t.config.method)}function g(t){return E(t)||R(t)}function v(){return 0}function O(t){var e=t["axios-retry"]||{};return e.retryCount=e.retryCount||0,t["axios-retry"]=e,e}function T(){return(T=d((function*(t,e,n,r){var o=n.retryCount<t&&e(r);if("object"==typeof o)try{return!1!==(yield o)}catch(t){return!1}return o}))).apply(this,arguments)}function S(t,e){t.interceptors.request.use((t=>(O(t).lastRequestTime=Date.now(),t))),t.interceptors.response.use(null,function(){var n=d((function*(n){var{config:r}=n;if(!r)return Promise.reject(n);var{retries:o=3,retryCondition:i=g,retryDelay:s=v,shouldResetTimeout:u=!1,onRetry:c=(()=>{})}=function(t,e){return p(p({},e),t["axios-retry"])}(r,e),a=O(r);if(yield function(t,e,n,r){return T.apply(this,arguments)}(o,i,a,n)){a.retryCount+=1;var l=s(a.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!u&&r.timeout&&a.lastRequestTime){var f=Date.now()-a.lastRequestTime,h=r.timeout-f-l;if(h<=0)return Promise.reject(n);r.timeout=h}return r.transformRequest=[t=>t],c(a.retryCount,n,r),new Promise((e=>setTimeout((()=>e(t(r))),l)))}return Promise.reject(n)}));return function(t){return n.apply(this,arguments)}}())}function A(t,e){return function(){return t.apply(e,arguments)}}S.isNetworkError=E,S.isSafeRequestError=function(t){return!!t.config&&y(t)&&-1!==_.indexOf(t.config.method)},S.isIdempotentRequestError=R,S.isNetworkOrIdempotentRequestError=g,S.exponentialDelay=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=100*Math.pow(2,t),n=.2*e*Math.random();return e+n},S.isRetryableError=y;const{toString:N}=Object.prototype,{getPrototypeOf:j}=Object,C=(D=Object.create(null),t=>{const e=N.call(t);return D[e]||(D[e]=e.slice(8,-1).toLowerCase())});var D;const P=t=>(t=t.toLowerCase(),e=>C(e)===t),L=t=>e=>typeof e===t,{isArray:U}=Array,I=L("undefined"),F=P("ArrayBuffer"),B=L("string"),x=L("function"),k=L("number"),M=t=>null!==t&&"object"==typeof t,q=t=>{if("object"!==C(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)},H=P("Date"),z=P("File"),G=P("Blob"),J=P("FileList"),K=P("URLSearchParams");function V(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),U(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 X(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 $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Y=t=>!I(t)&&t!==$,W=(Z="undefined"!=typeof Uint8Array&&j(Uint8Array),t=>Z&&t instanceof Z);var Z;const Q=P("HTMLFormElement"),tt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),et=P("RegExp"),nt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};V(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},rt="abcdefghijklmnopqrstuvwxyz",ot={DIGIT:"0123456789",ALPHA:rt,ALPHA_DIGIT:rt+rt.toUpperCase()+"0123456789"},it=P("AsyncFunction"),st={isArray:U,isArrayBuffer:F,isBuffer:function(t){return null!==t&&!I(t)&&null!==t.constructor&&!I(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||x(t.append)&&("formdata"===(e=C(t))||"object"===e&&x(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&F(t.buffer),e},isString:B,isNumber:k,isBoolean:t=>!0===t||!1===t,isObject:M,isPlainObject:q,isUndefined:I,isDate:H,isFile:z,isBlob:G,isRegExp:et,isFunction:x,isStream:t=>M(t)&&x(t.pipe),isURLSearchParams:K,isTypedArray:W,isFileList:J,forEach:V,merge:function t(){const{caseless:e}=Y(this)&&this||{},n={},r=(r,o)=>{const i=e&&X(n,o)||o;n[i]=q(n[i])&&q(r)?t(n[i],r):q(r)?t({},r):U(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&V(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(V(e,((e,r)=>{t[r]=n&&x(e)?A(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:C,kindOfTest:P,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(U(t))return t;let e=t.length;if(!k(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:Q,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:nt,freezeMethods:t=>{nt(t,((e,n)=>{if(x(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;x(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 U(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:X,global:$,isContextDefined:Y,ALPHABET:ot,generateString:(t=16,e=ot.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&x(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(M(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=U(t)?[]:{};return V(t,((t,e)=>{const i=n(t,r+1);!I(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:it,isThenable:t=>t&&(M(t)||x(t))&&x(t.then)&&x(t.catch)};function ut(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)}st.inherits(ut,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:st.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ct=ut.prototype,at={};function lt(t){return st.isPlainObject(t)||st.isArray(t)}function ft(t){return st.endsWith(t,"[]")?t.slice(0,-2):t}function ht(t,e,n){return t?t.concat(e).map((function(t,e){return t=ft(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=>{at[t]={value:t}})),Object.defineProperties(ut,at),Object.defineProperty(ct,"isAxiosError",{value:!0}),ut.from=(t,e,n,r,o,i)=>{const s=Object.create(ct);return st.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ut.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const dt=st.toFlatObject(st,{},null,(function(t){return/^is[A-Z]/.test(t)}));function mt(t,e,n){if(!st.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=st.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!st.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&st.isSpecCompliantForm(e);if(!st.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(st.isDate(t))return t.toISOString();if(!u&&st.isBlob(t))throw new ut("Blob is not supported. Use a Buffer instead.");return st.isArrayBuffer(t)||st.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(st.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(st.isArray(t)&&function(t){return st.isArray(t)&&!t.some(lt)}(t)||(st.isFileList(t)||st.endsWith(n,"[]"))&&(u=st.toArray(t)))return n=ft(n),u.forEach((function(t,r){!st.isUndefined(t)&&null!==t&&e.append(!0===s?ht([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!lt(t)||(e.append(ht(o,n,i),c(t)),!1)}const l=[],f=Object.assign(dt,{defaultVisitor:a,convertValue:c,isVisitable:lt});if(!st.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!st.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),st.forEach(n,(function(n,i){!0===(!(st.isUndefined(n)||null===n)&&o.call(e,n,st.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function pt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&mt(t,this,e)}const Et=bt.prototype;function _t(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wt(t,e,n){if(!e)return t;const r=n&&n.encode||_t,o=n&&n.serialize;let i;if(i=o?o(e,n):st.isURLSearchParams(e)?e.toString():new bt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,pt)}:pt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class yt{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){st.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Rt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:bt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function vt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&st.isArray(r)?r.length:i,u?(r[i]=st.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&st.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&st.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(st.isFormData(t)&&st.isFunction(t.entries)){const n={};return st.forEachEntry(t,((t,r)=>{e(function(t){return st.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Ot={"Content-Type":void 0},Tt={transitional:Rt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=st.isObject(t);if(o&&st.isHTMLForm(t)&&(t=new FormData(t)),st.isFormData(t))return r&&r?JSON.stringify(vt(t)):t;if(st.isArrayBuffer(t)||st.isBuffer(t)||st.isStream(t)||st.isFile(t)||st.isBlob(t))return t;if(st.isArrayBufferView(t))return t.buffer;if(st.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 mt(t,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=st.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return mt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(st.isString(t))try{return(0,JSON.parse)(t),st.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Tt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&st.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 ut.from(t,ut.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:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};st.forEach(["delete","get","head"],(function(t){Tt.headers[t]={}})),st.forEach(["post","put","patch"],(function(t){Tt.headers[t]=st.merge(Ot)}));const St=st.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"]),At=Symbol("internals");function Nt(t){return t&&String(t).trim().toLowerCase()}function jt(t){return!1===t||null==t?t:st.isArray(t)?t.map(jt):String(t)}function Ct(t,e,n,r,o){return st.isFunction(r)?r.call(this,e,n):(o&&(e=n),st.isString(e)?st.isString(r)?-1!==e.indexOf(r):st.isRegExp(r)?r.test(e):void 0:void 0)}class Dt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Nt(e);if(!o)throw new Error("header name must be a non-empty string");const i=st.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=jt(t))}const i=(t,e)=>st.forEach(t,((t,n)=>o(t,n,e)));return st.isPlainObject(t)||t instanceof this.constructor?i(t,e):st.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]&&St[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=Nt(t)){const n=st.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(st.isFunction(e))return e.call(this,t,n);if(st.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Nt(t)){const n=st.findKey(this,t);return!(!n||void 0===this[n]||e&&!Ct(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Nt(t)){const o=st.findKey(n,t);!o||e&&!Ct(0,n[o],o,e)||(delete n[o],r=!0)}}return st.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&&!Ct(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return st.forEach(this,((r,o)=>{const i=st.findKey(n,o);if(i)return e[i]=jt(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]=jt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return st.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&st.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[At]=this[At]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Nt(t);e[r]||(function(t,e){const n=st.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 st.isArray(t)?t.forEach(r):r(t),this}}function Pt(t,e){const n=this||Tt,r=e||n,o=Dt.from(r.headers);let i=r.data;return st.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Lt(t){return!(!t||!t.__CANCEL__)}function Ut(t,e,n){ut.call(this,null==t?"canceled":t,ut.ERR_CANCELED,e,n),this.name="CanceledError"}Dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),st.freezeMethods(Dt.prototype),st.freezeMethods(Dt),st.inherits(Ut,ut,{__CANCEL__:!0});const It=gt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),st.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),st.isString(r)&&s.push("path="+r),st.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ft(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 Bt=gt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=st.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function xt(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 kt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Dt.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}st.isFormData(r)&&(gt.isStandardBrowserEnv||gt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const a=Ft(t.baseURL,t.url);function l(){if(!c)return;const r=Dt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),wt(a,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new ut("Request aborted",ut.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new ut("Network Error",ut.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ut(e,(t.transitional||Rt).clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,c)),c=null},gt.isStandardBrowserEnv){const e=(t.withCredentials||Bt(a))&&t.xsrfCookieName&&It.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&st.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),st.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",xt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",xt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Ut(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(a);f&&-1===gt.protocols.indexOf(f)?n(new ut("Unsupported protocol "+f+":",ut.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};st.forEach(kt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function Mt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function qt(t){return Mt(t),t.headers=Dt.from(t.headers),t.data=Pt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=st.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=st.isString(n)?kt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new ut(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(st.hasOwnProp(kt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!st.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||Tt.adapter)(t).then((function(e){return Mt(t),e.data=Pt.call(t,t.transformResponse,e),e.headers=Dt.from(e.headers),e}),(function(e){return Lt(e)||(Mt(t),e&&e.response&&(e.response.data=Pt.call(t,t.transformResponse,e.response),e.response.headers=Dt.from(e.response.headers))),Promise.reject(e)}))}const Ht=t=>t instanceof Dt?t.toJSON():t;function zt(t,e){e=e||{};const n={};function r(t,e,n){return st.isPlainObject(t)&&st.isPlainObject(e)?st.merge.call({caseless:n},t,e):st.isPlainObject(e)?st.merge({},e):st.isArray(e)?e.slice():e}function o(t,e,n){return st.isUndefined(e)?st.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!st.isUndefined(e))return r(void 0,e)}function s(t,e){return st.isUndefined(e)?st.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Ht(t),Ht(e),!0)};return st.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);st.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Gt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Gt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Jt={};Gt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.4.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ut(r(o," has been removed"+(e?" in "+e:"")),ut.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 Kt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ut("options must be an object",ut.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 ut("option "+i+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ut("Unknown option "+i,ut.ERR_BAD_OPTION)}},validators:Gt},Vt=Kt.validators;class Xt{constructor(t){this.defaults=t,this.interceptors={request:new yt,response:new yt}}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;let i;void 0!==n&&Kt.assertOptions(n,{silentJSONParsing:Vt.transitional(Vt.boolean),forcedJSONParsing:Vt.transitional(Vt.boolean),clarifyTimeoutError:Vt.transitional(Vt.boolean)},!1),null!=r&&(st.isFunction(r)?e.paramsSerializer={serialize:r}:Kt.assertOptions(r,{encode:Vt.function,serialize:Vt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&st.merge(o.common,o[e.method]),i&&st.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Dt.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 wt(Ft((t=zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}st.forEach(["delete","get","head","options"],(function(t){Xt.prototype[t]=function(e,n){return this.request(zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),st.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}))}}Xt.prototype[t]=e(),Xt.prototype[t+"Form"]=e(!0)}));class $t{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 Ut(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 $t((function(e){t=e})),cancel:t}}}const Yt={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(Yt).forEach((([t,e])=>{Yt[e]=t}));const Wt=function t(e){const n=new Xt(e),r=A(Xt.prototype.request,n);return st.extend(r,Xt.prototype,n,{allOwnKeys:!0}),st.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(zt(e,n))},r}(Tt);Wt.Axios=Xt,Wt.CanceledError=Ut,Wt.CancelToken=$t,Wt.isCancel=Lt,Wt.VERSION="1.4.0",Wt.toFormData=mt,Wt.AxiosError=ut,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 st.isObject(t)&&!0===t.isAxiosError},Wt.mergeConfig=zt,Wt.AxiosHeaders=Dt,Wt.formToJSON=t=>vt(st.isHTMLForm(t)?new FormData(t):t),Wt.HttpStatusCode=Yt,Wt.default=Wt;var Zt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Qt=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 Zt()}try{return __global__||Zt()}finally{delete Object.prototype.__global__}}(),te=Symbol.for("verdocs-default-endpoint"),ee=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},ne=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="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)||"https://api.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=Wt.create({baseURL:this.baseURL,timeout:this.timeout}),S(this.api,{retries:0,retryDelay:S.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){Qt[te]=this},e.getDefault=function(){return Qt[te]||(Qt[te]=new e,window.console.debug("[JS_SDK] Created default endpoint",Qt[te])),Qt[te]},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.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(ee):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{r as T,ne as V,a as c}
|
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,i,s,u,c,a=function(t,e,r){var o,i;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var s=(null==t?void 0:t.profile_id)||"BOGUS";if(!s)return{canPerform:!1,message:"Active session required"};var u=(null==r?void 0:r.profile_id)===s,c=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),a=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(i=null==r?void 0:r.is_public)&&void 0!==i&&i,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":u||(!a&&c||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":u||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(u?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(u?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":u?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(u?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return l(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},l=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))};!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(r||(r={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(o||(o={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(i||(i={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(s||(s={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(u||(u={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(c||(c={}));const f=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function h(t,e,n,r,o,i,s){try{var u=t[i](s),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){h(i,r,o,s,u,"next",t)}function u(t){h(i,r,o,s,u,"throw",t)}s(void 0)}))}}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){b(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&(t=>!f.has(t&&t.code))(t)}var _=["get","head","options"],w=_.concat(["put","delete"]);function y(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function v(t){return!!t.config&&y(t)&&-1!==w.indexOf(t.config.method)}function R(t){return E(t)||v(t)}function g(){return 0}function O(t){var e=t["axios-retry"]||{};return e.retryCount=e.retryCount||0,t["axios-retry"]=e,e}function T(){return(T=d((function*(t,e,n,r){var o=n.retryCount<t&&e(r);if("object"==typeof o)try{return!1!==(yield o)}catch(t){return!1}return o}))).apply(this,arguments)}function S(t,e){t.interceptors.request.use((t=>(O(t).lastRequestTime=Date.now(),t))),t.interceptors.response.use(null,function(){var n=d((function*(n){var{config:r}=n;if(!r)return Promise.reject(n);var{retries:o=3,retryCondition:i=R,retryDelay:s=g,shouldResetTimeout:u=!1,onRetry:c=(()=>{})}=function(t,e){return p(p({},e),t["axios-retry"])}(r,e),a=O(r);if(yield function(t,e,n,r){return T.apply(this,arguments)}(o,i,a,n)){a.retryCount+=1;var l=s(a.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!u&&r.timeout&&a.lastRequestTime){var f=Date.now()-a.lastRequestTime,h=r.timeout-f-l;if(h<=0)return Promise.reject(n);r.timeout=h}return r.transformRequest=[t=>t],c(a.retryCount,n,r),new Promise((e=>setTimeout((()=>e(t(r))),l)))}return Promise.reject(n)}));return function(t){return n.apply(this,arguments)}}())}function A(t,e){return function(){return t.apply(e,arguments)}}S.isNetworkError=E,S.isSafeRequestError=function(t){return!!t.config&&y(t)&&-1!==_.indexOf(t.config.method)},S.isIdempotentRequestError=v,S.isNetworkOrIdempotentRequestError=R,S.exponentialDelay=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=100*Math.pow(2,t),n=.2*e*Math.random();return e+n},S.isRetryableError=y;const{toString:N}=Object.prototype,{getPrototypeOf:j}=Object,C=(D=Object.create(null),t=>{const e=N.call(t);return D[e]||(D[e]=e.slice(8,-1).toLowerCase())});var D;const P=t=>(t=t.toLowerCase(),e=>C(e)===t),L=t=>e=>typeof e===t,{isArray:U}=Array,I=L("undefined"),F=P("ArrayBuffer"),B=L("string"),x=L("function"),k=L("number"),M=t=>null!==t&&"object"==typeof t,q=t=>{if("object"!==C(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)},H=P("Date"),z=P("File"),G=P("Blob"),J=P("FileList"),K=P("URLSearchParams");function V(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),U(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 X(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 $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Y=t=>!I(t)&&t!==$,W=(Z="undefined"!=typeof Uint8Array&&j(Uint8Array),t=>Z&&t instanceof Z);var Z;const Q=P("HTMLFormElement"),tt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),et=P("RegExp"),nt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};V(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},rt="abcdefghijklmnopqrstuvwxyz",ot={DIGIT:"0123456789",ALPHA:rt,ALPHA_DIGIT:rt+rt.toUpperCase()+"0123456789"},it=P("AsyncFunction"),st={isArray:U,isArrayBuffer:F,isBuffer:function(t){return null!==t&&!I(t)&&null!==t.constructor&&!I(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||x(t.append)&&("formdata"===(e=C(t))||"object"===e&&x(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&F(t.buffer),e},isString:B,isNumber:k,isBoolean:t=>!0===t||!1===t,isObject:M,isPlainObject:q,isUndefined:I,isDate:H,isFile:z,isBlob:G,isRegExp:et,isFunction:x,isStream:t=>M(t)&&x(t.pipe),isURLSearchParams:K,isTypedArray:W,isFileList:J,forEach:V,merge:function t(){const{caseless:e}=Y(this)&&this||{},n={},r=(r,o)=>{const i=e&&X(n,o)||o;n[i]=q(n[i])&&q(r)?t(n[i],r):q(r)?t({},r):U(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&V(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(V(e,((e,r)=>{t[r]=n&&x(e)?A(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:C,kindOfTest:P,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(U(t))return t;let e=t.length;if(!k(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:Q,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:nt,freezeMethods:t=>{nt(t,((e,n)=>{if(x(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;x(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 U(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:X,global:$,isContextDefined:Y,ALPHABET:ot,generateString:(t=16,e=ot.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&x(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(M(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=U(t)?[]:{};return V(t,((t,e)=>{const i=n(t,r+1);!I(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:it,isThenable:t=>t&&(M(t)||x(t))&&x(t.then)&&x(t.catch)};function ut(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)}st.inherits(ut,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:st.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ct=ut.prototype,at={};function lt(t){return st.isPlainObject(t)||st.isArray(t)}function ft(t){return st.endsWith(t,"[]")?t.slice(0,-2):t}function ht(t,e,n){return t?t.concat(e).map((function(t,e){return t=ft(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=>{at[t]={value:t}})),Object.defineProperties(ut,at),Object.defineProperty(ct,"isAxiosError",{value:!0}),ut.from=(t,e,n,r,o,i)=>{const s=Object.create(ct);return st.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ut.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const dt=st.toFlatObject(st,{},null,(function(t){return/^is[A-Z]/.test(t)}));function mt(t,e,n){if(!st.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=st.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!st.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&st.isSpecCompliantForm(e);if(!st.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(st.isDate(t))return t.toISOString();if(!u&&st.isBlob(t))throw new ut("Blob is not supported. Use a Buffer instead.");return st.isArrayBuffer(t)||st.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(st.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(st.isArray(t)&&function(t){return st.isArray(t)&&!t.some(lt)}(t)||(st.isFileList(t)||st.endsWith(n,"[]"))&&(u=st.toArray(t)))return n=ft(n),u.forEach((function(t,r){!st.isUndefined(t)&&null!==t&&e.append(!0===s?ht([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!lt(t)||(e.append(ht(o,n,i),c(t)),!1)}const l=[],f=Object.assign(dt,{defaultVisitor:a,convertValue:c,isVisitable:lt});if(!st.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!st.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),st.forEach(n,(function(n,i){!0===(!(st.isUndefined(n)||null===n)&&o.call(e,n,st.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function pt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&mt(t,this,e)}const Et=bt.prototype;function _t(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wt(t,e,n){if(!e)return t;const r=n&&n.encode||_t,o=n&&n.serialize;let i;if(i=o?o(e,n):st.isURLSearchParams(e)?e.toString():new bt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,pt)}:pt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class yt{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){st.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:bt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function gt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&st.isArray(r)?r.length:i,u?(r[i]=st.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&st.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&st.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(st.isFormData(t)&&st.isFunction(t.entries)){const n={};return st.forEachEntry(t,((t,r)=>{e(function(t){return st.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Ot={"Content-Type":void 0},Tt={transitional:vt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=st.isObject(t);if(o&&st.isHTMLForm(t)&&(t=new FormData(t)),st.isFormData(t))return r&&r?JSON.stringify(gt(t)):t;if(st.isArrayBuffer(t)||st.isBuffer(t)||st.isStream(t)||st.isFile(t)||st.isBlob(t))return t;if(st.isArrayBufferView(t))return t.buffer;if(st.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 mt(t,new Rt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=st.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return mt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(st.isString(t))try{return(0,JSON.parse)(t),st.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Tt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&st.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 ut.from(t,ut.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:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};st.forEach(["delete","get","head"],(function(t){Tt.headers[t]={}})),st.forEach(["post","put","patch"],(function(t){Tt.headers[t]=st.merge(Ot)}));const St=st.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"]),At=Symbol("internals");function Nt(t){return t&&String(t).trim().toLowerCase()}function jt(t){return!1===t||null==t?t:st.isArray(t)?t.map(jt):String(t)}function Ct(t,e,n,r,o){return st.isFunction(r)?r.call(this,e,n):(o&&(e=n),st.isString(e)?st.isString(r)?-1!==e.indexOf(r):st.isRegExp(r)?r.test(e):void 0:void 0)}class Dt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Nt(e);if(!o)throw new Error("header name must be a non-empty string");const i=st.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=jt(t))}const i=(t,e)=>st.forEach(t,((t,n)=>o(t,n,e)));return st.isPlainObject(t)||t instanceof this.constructor?i(t,e):st.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]&&St[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=Nt(t)){const n=st.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(st.isFunction(e))return e.call(this,t,n);if(st.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Nt(t)){const n=st.findKey(this,t);return!(!n||void 0===this[n]||e&&!Ct(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Nt(t)){const o=st.findKey(n,t);!o||e&&!Ct(0,n[o],o,e)||(delete n[o],r=!0)}}return st.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&&!Ct(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return st.forEach(this,((r,o)=>{const i=st.findKey(n,o);if(i)return e[i]=jt(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]=jt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return st.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&st.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[At]=this[At]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Nt(t);e[r]||(function(t,e){const n=st.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 st.isArray(t)?t.forEach(r):r(t),this}}function Pt(t,e){const n=this||Tt,r=e||n,o=Dt.from(r.headers);let i=r.data;return st.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Lt(t){return!(!t||!t.__CANCEL__)}function Ut(t,e,n){ut.call(this,null==t?"canceled":t,ut.ERR_CANCELED,e,n),this.name="CanceledError"}Dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),st.freezeMethods(Dt.prototype),st.freezeMethods(Dt),st.inherits(Ut,ut,{__CANCEL__:!0});const It=Rt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),st.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),st.isString(r)&&s.push("path="+r),st.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ft(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 Bt=Rt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=st.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function xt(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 kt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Dt.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}st.isFormData(r)&&(Rt.isStandardBrowserEnv||Rt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const a=Ft(t.baseURL,t.url);function l(){if(!c)return;const r=Dt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),wt(a,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new ut("Request aborted",ut.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new ut("Network Error",ut.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ut(e,(t.transitional||vt).clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,c)),c=null},Rt.isStandardBrowserEnv){const e=(t.withCredentials||Bt(a))&&t.xsrfCookieName&&It.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&st.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),st.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",xt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",xt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Ut(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(a);f&&-1===Rt.protocols.indexOf(f)?n(new ut("Unsupported protocol "+f+":",ut.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};st.forEach(kt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function Mt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function qt(t){return Mt(t),t.headers=Dt.from(t.headers),t.data=Pt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=st.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=st.isString(n)?kt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new ut(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(st.hasOwnProp(kt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!st.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||Tt.adapter)(t).then((function(e){return Mt(t),e.data=Pt.call(t,t.transformResponse,e),e.headers=Dt.from(e.headers),e}),(function(e){return Lt(e)||(Mt(t),e&&e.response&&(e.response.data=Pt.call(t,t.transformResponse,e.response),e.response.headers=Dt.from(e.response.headers))),Promise.reject(e)}))}const Ht=t=>t instanceof Dt?t.toJSON():t;function zt(t,e){e=e||{};const n={};function r(t,e,n){return st.isPlainObject(t)&&st.isPlainObject(e)?st.merge.call({caseless:n},t,e):st.isPlainObject(e)?st.merge({},e):st.isArray(e)?e.slice():e}function o(t,e,n){return st.isUndefined(e)?st.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!st.isUndefined(e))return r(void 0,e)}function s(t,e){return st.isUndefined(e)?st.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Ht(t),Ht(e),!0)};return st.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);st.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Gt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Gt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Jt={};Gt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.4.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ut(r(o," has been removed"+(e?" in "+e:"")),ut.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 Kt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ut("options must be an object",ut.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 ut("option "+i+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ut("Unknown option "+i,ut.ERR_BAD_OPTION)}},validators:Gt},Vt=Kt.validators;class Xt{constructor(t){this.defaults=t,this.interceptors={request:new yt,response:new yt}}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;let i;void 0!==n&&Kt.assertOptions(n,{silentJSONParsing:Vt.transitional(Vt.boolean),forcedJSONParsing:Vt.transitional(Vt.boolean),clarifyTimeoutError:Vt.transitional(Vt.boolean)},!1),null!=r&&(st.isFunction(r)?e.paramsSerializer={serialize:r}:Kt.assertOptions(r,{encode:Vt.function,serialize:Vt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&st.merge(o.common,o[e.method]),i&&st.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Dt.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 wt(Ft((t=zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}st.forEach(["delete","get","head","options"],(function(t){Xt.prototype[t]=function(e,n){return this.request(zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),st.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}))}}Xt.prototype[t]=e(),Xt.prototype[t+"Form"]=e(!0)}));class $t{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 Ut(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 $t((function(e){t=e})),cancel:t}}}const Yt={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(Yt).forEach((([t,e])=>{Yt[e]=t}));const Wt=function t(e){const n=new Xt(e),r=A(Xt.prototype.request,n);return st.extend(r,Xt.prototype,n,{allOwnKeys:!0}),st.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(zt(e,n))},r}(Tt);Wt.Axios=Xt,Wt.CanceledError=Ut,Wt.CancelToken=$t,Wt.isCancel=Lt,Wt.VERSION="1.4.0",Wt.toFormData=mt,Wt.AxiosError=ut,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 st.isObject(t)&&!0===t.isAxiosError},Wt.mergeConfig=zt,Wt.AxiosHeaders=Dt,Wt.formToJSON=t=>gt(st.isHTMLForm(t)?new FormData(t):t),Wt.HttpStatusCode=Yt,Wt.default=Wt;var Zt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Qt=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 Zt()}try{return __global__||Zt()}finally{delete Object.prototype.__global__}}(),te=Symbol.for("verdocs-default-endpoint"),ee=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},ne=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=Wt.create({baseURL:this.baseURL,timeout:this.timeout}),S(this.api,{retries:0,retryDelay:S.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){Qt[te]=this},e.getDefault=function(){return Qt[te]||(Qt[te]=new e,window.console.debug("[JS_SDK] Created default endpoint",Qt[te])),Qt[te]},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(ee):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{r as T,ne as V,a as c}
|