@verdocs/web-sdk 2.3.10 → 2.3.11
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-1adfba8c.js → TemplateStore-192c6cf1.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-b9ed9603.js → VerdocsEndpoint-33b643eb.js} +6 -6
- package/dist/cjs/interact.min-a61b43b3.js +12 -0
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/components/VerdocsEndpoint.js +6 -6
- package/dist/components/interact.min.js +2 -2
- package/dist/custom-elements.json +2067 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-09d1ae9f.js → TemplateStore-7149eda0.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-3add43eb.js → VerdocsEndpoint-7922d31f.js} +6 -6
- package/dist/esm/interact.min-6a7b19a1.js +10 -0
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_3.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +2 -2
- package/dist/esm/verdocs-field-textbox.entry.js +2 -2
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{TemplateStore-09d1ae9f.js → TemplateStore-7149eda0.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-3add43eb.js → VerdocsEndpoint-7922d31f.js} +1 -1
- package/dist/esm-es5/interact.min-6a7b19a1.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-dcb0e6ae.system.entry.js → p-0419a39f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b33ab87b.entry.js → p-0549358c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-532e4fc1.entry.js → p-05b3034f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5ba1045a.system.entry.js → p-06fb711b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-459510cf.entry.js → p-083bdbc6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-45bc9865.system.entry.js → p-0c157d55.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-87040b70.system.entry.js → p-14b08edd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0cf6b69a.system.js → p-19ff8f86.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4cec3d0.system.entry.js → p-1a3168af.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b63fb3e8.entry.js → p-1efd342e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5d1fecb5.system.js → p-1fdb236c.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3950200c.entry.js → p-2c47b92e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4e0b977.entry.js → p-2fe75327.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f5778ebb.entry.js → p-3019b350.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d8fc5f12.system.entry.js → p-345f88a3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-52cd4ee2.system.entry.js → p-38679b8e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-048cfdb5.system.entry.js → p-39f3f620.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3edde2fa.entry.js → p-3f5fb65b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b70ad4db.system.entry.js → p-3f837e30.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b4c4335f.system.entry.js → p-401a49cb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f07340cd.entry.js → p-47460aa0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f368f4f3.system.entry.js → p-4a1bc6e3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ce14c63.entry.js → p-4a3238f6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73cbe09b.entry.js → p-599fa850.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2fc54023.system.entry.js → p-59c44eee.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e429f3bd.js → p-5aee3e25.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13ae6d98.system.entry.js → p-5f434764.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-30fecb02.entry.js → p-6827df7b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-318a7887.entry.js → p-6a13105b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e7755198.entry.js → p-6b1735f4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ff80d211.system.entry.js → p-6d70fc87.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2aec486.system.entry.js → p-7144ab8e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c4140ec7.entry.js → p-73b9ef06.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-33077795.entry.js → p-7be5cb8c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-387580cd.system.entry.js → p-7cbe51d8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f7510858.system.entry.js → p-90d54d8a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-915883e6.js +1 -0
- package/dist/verdocs-web-sdk/{p-c50a3992.entry.js → p-974b4c02.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-76cadb98.system.entry.js → p-9c2bec77.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7bad61b5.system.entry.js → p-9dcb8b6c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13936429.system.entry.js → p-a59064f7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0bf08021.js → p-b101fae2.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a1ef2dd4.entry.js → p-ce00ee85.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e5cf9dd1.system.entry.js → p-d2cee107.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4749aeb.system.entry.js → p-d7dbeec3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0acae0f.system.entry.js → p-da1c0295.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4490750d.entry.js → p-dd277e69.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-c8135ff6.entry.js → p-e6b68ad5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-66507ccf.entry.js → p-ecb7ea02.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-eccbfc3a.entry.js → p-f3a1060a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-15b3184c.entry.js → p-f49cb84b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-315e20ac.system.entry.js → p-fa1621c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c9ad6362.entry.js → p-fdf0a9de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/interact.min-7c05ff8a.js +0 -12
- package/dist/esm/interact.min-ef5402f3.js +0 -10
- package/dist/esm-es5/interact.min-ef5402f3.js +0 -1
- package/dist/verdocs-web-sdk/p-999fbe79.js +0 -1
- package/dist/verdocs-web-sdk/p-fcd0a40a.system.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-
|
1
|
+
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-19ff8f86.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(){},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));
|
@@ -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=function(t,e,r){var o,s;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var u=(null==t?void 0:t.profile_id)||"BOGUS";if(!u)return{canPerform:!1,message:"Active session required"};var c=(null==r?void 0:r.profile_id)===u,a=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),l=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(s=null==r?void 0:r.is_public)&&void 0!==s&&s,h=[];switch(e){case"create_personal":h.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":h.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":c||(!l&&a||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":c||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(c?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(c?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":c?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(c?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return i(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},i=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))},s=function(t,e){return t.api.get("/templates/".concat(e)).then((function(t){return t.data}))},u=["name","is_personal","is_public","sender","description","roles","fields"],c=function(t,e,n){var r={timeout:12e4,onUploadProgress:function(t){var e=t.total||1,r=t.loaded||0;null==n||n(Math.floor(100*r/(e||1)),r,e||1)}};if(e.documents&&e.documents[0]instanceof File){var o=new FormData;return u.forEach((function(t){void 0!==e[t]&&o.append(t,e[t])})),e.documents.forEach((function(t){o.append("documents",t,t.name)})),t.api.post("/v2/templates",o,r).then((function(t){return t.data}))}return t.api.post("/v2/templates",e,r).then((function(t){return t.data}))},a=function(t,e,n){return t.api.put("/templates/".concat(e),n).then((function(t){return t.data}))},l=function(t,e){return t.api.delete("/templates/".concat(e)).then((function(t){return t.data}))};!function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(r||(r={}));var f,h,d,m,p,b,_=function(t,e){return void 0===e&&(e={}),n=void 0,r=void 0,i=function(){return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){s.label=u[1];break}if(6===u[0]&&s.label<o[1]){s.label=o[1],o=u;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(u);break}o[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,(function(){return[2,t.api.post("/templates/list",e).then((function(t){return t.data}))]}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(s,u)}c((i=i.apply(n,r||[])).next())}));var n,r,o,i};!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(f||(f={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(h||(h={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(d||(d={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(m||(m={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(p||(p={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(b||(b={}));const E=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 w(t){return!t.response&&!!t.code&&!["ERR_CANCELED","ECONNABORTED"].includes(t.code)&&(t=>!E.has(t&&t.code))(t)}const y=["get","head","options"],R=y.concat(["put","delete"]);function g(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function v(t){return!!t.config?.method&&g(t)&&-1!==R.indexOf(t.config.method)}function O(t){return w(t)||v(t)}const T={retries:3,retryCondition:O,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:()=>{}};function S(t,e){const n=function(t,e){return{...T,...e,...t["axios-retry"]}}(t,e||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),t["axios-retry"]=n,n}const A=(t,e)=>({requestInterceptorId:t.interceptors.request.use((t=>(S(t,e),t))),responseInterceptorId:t.interceptors.response.use(null,(async n=>{const{config:r}=n;if(!r)return Promise.reject(n);const o=S(r,e);if(await async function(t,e){const{retries:n,retryCondition:r}=t,o=(t.retryCount||0)<n&&r(e);if("object"==typeof o)try{return!1!==await o}catch(t){return!1}return o}(o,n)){o.retryCount+=1;const{retryDelay:e,shouldResetTimeout:i,onRetry:s}=o,u=e(o.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!i&&r.timeout&&o.lastRequestTime){const t=Date.now()-o.lastRequestTime,e=r.timeout-t-u;if(e<=0)return Promise.reject(n);r.timeout=e}return r.transformRequest=[t=>t],await s(o.retryCount,n,r),new Promise((e=>{setTimeout((()=>e(t(r))),u)}))}return Promise.reject(n)}))});function N(t,e){return function(){return t.apply(e,arguments)}}A.isNetworkError=w,A.isSafeRequestError=function(t){return!!t.config?.method&&g(t)&&-1!==y.indexOf(t.config.method)},A.isIdempotentRequestError=v,A.isNetworkOrIdempotentRequestError=O,A.exponentialDelay=function(t=0,e,n=100){const r=2**t*n;return r+.2*r*Math.random()},A.isRetryableError=g;const{toString:C}=Object.prototype,{getPrototypeOf:D}=Object,j=(L=Object.create(null),t=>{const e=C.call(t);return L[e]||(L[e]=e.slice(8,-1).toLowerCase())});var L;const P=t=>(t=t.toLowerCase(),e=>j(e)===t),U=t=>e=>typeof e===t,{isArray:I}=Array,F=U("undefined"),B=P("ArrayBuffer"),x=U("string"),k=U("function"),M=U("number"),q=t=>null!==t&&"object"==typeof t,H=t=>{if("object"!==j(t))return!1;const e=D(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},G=P("Date"),z=P("File"),J=P("Blob"),K=P("FileList"),V=P("URLSearchParams");function X(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),I(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 $(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 Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=t=>!F(t)&&t!==Y,Z=(Q="undefined"!=typeof Uint8Array&&D(Uint8Array),t=>Q&&t instanceof Q);var Q;const tt=P("HTMLFormElement"),et=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),nt=P("RegExp"),rt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};X(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},ot="abcdefghijklmnopqrstuvwxyz",it={DIGIT:"0123456789",ALPHA:ot,ALPHA_DIGIT:ot+ot.toUpperCase()+"0123456789"},st=P("AsyncFunction"),ut={isArray:I,isArrayBuffer:B,isBuffer:function(t){return null!==t&&!F(t)&&null!==t.constructor&&!F(t.constructor)&&k(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||k(t.append)&&("formdata"===(e=j(t))||"object"===e&&k(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&B(t.buffer),e},isString:x,isNumber:M,isBoolean:t=>!0===t||!1===t,isObject:q,isPlainObject:H,isUndefined:F,isDate:G,isFile:z,isBlob:J,isRegExp:nt,isFunction:k,isStream:t=>q(t)&&k(t.pipe),isURLSearchParams:V,isTypedArray:Z,isFileList:K,forEach:X,merge:function t(){const{caseless:e}=W(this)&&this||{},n={},r=(r,o)=>{const i=e&&$(n,o)||o;n[i]=H(n[i])&&H(r)?t(n[i],r):H(r)?t({},r):I(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&X(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(X(e,((e,r)=>{t[r]=n&&k(e)?N(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&&D(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:j,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(I(t))return t;let e=t.length;if(!M(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:tt,hasOwnProperty:et,hasOwnProp:et,reduceDescriptors:rt,freezeMethods:t=>{rt(t,((e,n)=>{if(k(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;k(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 I(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:$,global:Y,isContextDefined:W,ALPHABET:it,generateString:(t=16,e=it.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&k(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(q(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=I(t)?[]:{};return X(t,((t,e)=>{const i=n(t,r+1);!F(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:st,isThenable:t=>t&&(q(t)||k(t))&&k(t.then)&&k(t.catch)};function ct(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)}ut.inherits(ct,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:ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const at=ct.prototype,lt={};function ft(t){return ut.isPlainObject(t)||ut.isArray(t)}function ht(t){return ut.endsWith(t,"[]")?t.slice(0,-2):t}function dt(t,e,n){return t?t.concat(e).map((function(t,e){return t=ht(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=>{lt[t]={value:t}})),Object.defineProperties(ct,lt),Object.defineProperty(at,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,o,i)=>{const s=Object.create(at);return ut.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ct.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const mt=ut.toFlatObject(ut,{},null,(function(t){return/^is[A-Z]/.test(t)}));function pt(t,e,n){if(!ut.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ut.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ut.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ut.isSpecCompliantForm(e);if(!ut.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ut.isDate(t))return t.toISOString();if(!u&&ut.isBlob(t))throw new ct("Blob is not supported. Use a Buffer instead.");return ut.isArrayBuffer(t)||ut.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(ut.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ut.isArray(t)&&function(t){return ut.isArray(t)&&!t.some(ft)}(t)||(ut.isFileList(t)||ut.endsWith(n,"[]"))&&(u=ut.toArray(t)))return n=ht(n),u.forEach((function(t,r){!ut.isUndefined(t)&&null!==t&&e.append(!0===s?dt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ft(t)||(e.append(dt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(mt,{defaultVisitor:a,convertValue:c,isVisitable:ft});if(!ut.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ut.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ut.forEach(n,(function(n,i){!0===(!(ut.isUndefined(n)||null===n)&&o.call(e,n,ut.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function bt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function _t(t,e){this._pairs=[],t&&pt(t,this,e)}const Et=_t.prototype;function wt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yt(t,e,n){if(!e)return t;const r=n&&n.encode||wt,o=n&&n.serialize;let i;if(i=o?o(e,n):ut.isURLSearchParams(e)?e.toString():new _t(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,bt)}:bt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Rt{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){ut.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_t,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Tt=(St="undefined"!=typeof navigator&&navigator.product,Ot&&["ReactNative","NativeScript","NS"].indexOf(St)<0);var St;const At="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Nt={...Object.freeze({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserWebWorkerEnv:At,hasStandardBrowserEnv:Tt}),...vt};function Ct(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ut.isArray(r)?r.length:i,u?(r[i]=ut.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ut.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ut.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(ut.isFormData(t)&&ut.isFunction(t.entries)){const n={};return ut.forEachEntry(t,((t,r)=>{e(function(t){return ut.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Dt={transitional:gt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ut.isObject(t);if(o&&ut.isHTMLForm(t)&&(t=new FormData(t)),ut.isFormData(t))return r&&r?JSON.stringify(Ct(t)):t;if(ut.isArrayBuffer(t)||ut.isBuffer(t)||ut.isStream(t)||ut.isFile(t)||ut.isBlob(t))return t;if(ut.isArrayBufferView(t))return t.buffer;if(ut.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 pt(t,new Nt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Nt.isNode&&ut.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ut.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return pt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ut.isString(t))try{return(0,JSON.parse)(t),ut.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Dt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ut.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 ct.from(t,ct.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:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ut.forEach(["delete","get","head","post","put","patch"],(t=>{Dt.headers[t]={}}));const jt=ut.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"]),Lt=Symbol("internals");function Pt(t){return t&&String(t).trim().toLowerCase()}function Ut(t){return!1===t||null==t?t:ut.isArray(t)?t.map(Ut):String(t)}function It(t,e,n,r,o){return ut.isFunction(r)?r.call(this,e,n):(o&&(e=n),ut.isString(e)?ut.isString(r)?-1!==e.indexOf(r):ut.isRegExp(r)?r.test(e):void 0:void 0)}class Ft{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Pt(e);if(!o)throw new Error("header name must be a non-empty string");const i=ut.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ut(t))}const i=(t,e)=>ut.forEach(t,((t,n)=>o(t,n,e)));return ut.isPlainObject(t)||t instanceof this.constructor?i(t,e):ut.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]&&jt[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=Pt(t)){const n=ut.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(ut.isFunction(e))return e.call(this,t,n);if(ut.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pt(t)){const n=ut.findKey(this,t);return!(!n||void 0===this[n]||e&&!It(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Pt(t)){const o=ut.findKey(n,t);!o||e&&!It(0,n[o],o,e)||(delete n[o],r=!0)}}return ut.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&&!It(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ut.forEach(this,((r,o)=>{const i=ut.findKey(n,o);if(i)return e[i]=Ut(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]=Ut(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ut.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ut.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[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Pt(t);e[r]||(function(t,e){const n=ut.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 ut.isArray(t)?t.forEach(r):r(t),this}}function Bt(t,e){const n=this||Dt,r=e||n,o=Ft.from(r.headers);let i=r.data;return ut.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function kt(t,e,n){ct.call(this,null==t?"canceled":t,ct.ERR_CANCELED,e,n),this.name="CanceledError"}Ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ut.reduceDescriptors(Ft.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ut.freezeMethods(Ft),ut.inherits(kt,ct,{__CANCEL__:!0});const Mt=Nt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];ut.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ut.isString(r)&&s.push("path="+r),ut.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qt(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 Ht=Nt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=ut.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Gt(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 zt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Ft.from(t.headers).normalize();let i,s,{responseType:u,withXSRFToken:c}=t;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(ut.isFormData(r))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=qt(t.baseURL,t.url);function h(){if(!l)return;const r=Ft.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:u&&"text"!==u&&"json"!==u?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),yt(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new ct("Request aborted",ct.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new ct("Network Error",ct.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ct(e,(t.transitional||gt).clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,l)),l=null},Nt.hasStandardBrowserEnv&&(c&&ut.isFunction(c)&&(c=c(t)),c||!1!==c&&Ht(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Mt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&ut.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),ut.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),u&&"json"!==u&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",Gt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Gt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new kt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);d&&-1===Nt.protocols.indexOf(d)?n(new ct("Unsupported protocol "+d+":",ct.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};ut.forEach(zt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Jt=t=>`- ${t}`,Kt=t=>ut.isFunction(t)||null===t||!1===t,Vt=t=>{t=ut.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!Kt(n)&&(r=zt[(e=String(n)).toLowerCase()],void 0===r))throw new ct(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ct("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Jt).join("\n"):" "+Jt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function $t(t){return Xt(t),t.headers=Ft.from(t.headers),t.data=Bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Vt(t.adapter||Dt.adapter)(t).then((function(e){return Xt(t),e.data=Bt.call(t,t.transformResponse,e),e.headers=Ft.from(e.headers),e}),(function(e){return xt(e)||(Xt(t),e&&e.response&&(e.response.data=Bt.call(t,t.transformResponse,e.response),e.response.headers=Ft.from(e.response.headers))),Promise.reject(e)}))}const Yt=t=>t instanceof Ft?t.toJSON():t;function Wt(t,e){e=e||{};const n={};function r(t,e,n){return ut.isPlainObject(t)&&ut.isPlainObject(e)?ut.merge.call({caseless:n},t,e):ut.isPlainObject(e)?ut.merge({},e):ut.isArray(e)?e.slice():e}function o(t,e,n){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ut.isUndefined(e))return r(void 0,e)}function s(t,e){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Yt(t),Yt(e),!0)};return ut.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ut.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Zt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Zt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Qt={};Zt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ct(r(o," has been removed"+(e?" in "+e:"")),ct.ERR_DEPRECATED);return e&&!Qt[o]&&(Qt[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 te={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ct("options must be an object",ct.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 ct("option "+i+" must be "+n,ct.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ct("Unknown option "+i,ct.ERR_BAD_OPTION)}},validators:Zt},ee=te.validators;class ne{constructor(t){this.defaults=t,this.interceptors={request:new Rt,response:new Rt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Wt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&te.assertOptions(n,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),null!=r&&(ut.isFunction(r)?e.paramsSerializer={serialize:r}:te.assertOptions(r,{encode:ee.function,serialize:ee.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&ut.merge(o.common,o[e.method]);o&&ut.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ft.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=[$t.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=$t.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 yt(qt((t=Wt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ut.forEach(["delete","get","head","options"],(function(t){ne.prototype[t]=function(e,n){return this.request(Wt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ut.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Wt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ne.prototype[t]=e(),ne.prototype[t+"Form"]=e(!0)}));class re{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 kt(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 re((function(e){t=e})),cancel:t}}}const oe={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(oe).forEach((([t,e])=>{oe[e]=t}));const ie=function t(e){const n=new ne(e),r=N(ne.prototype.request,n);return ut.extend(r,ne.prototype,n,{allOwnKeys:!0}),ut.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Wt(e,n))},r}(Dt);ie.Axios=ne,ie.CanceledError=kt,ie.CancelToken=re,ie.isCancel=xt,ie.VERSION="1.6.2",ie.toFormData=pt,ie.AxiosError=ct,ie.Cancel=ie.CanceledError,ie.all=function(t){return Promise.all(t)},ie.spread=function(t){return function(e){return t.apply(null,e)}},ie.isAxiosError=function(t){return ut.isObject(t)&&!0===t.isAxiosError},ie.mergeConfig=Wt,ie.AxiosHeaders=Ft,ie.formToJSON=t=>Ct(ut.isHTMLForm(t)?new FormData(t):t),ie.getAdapter=Vt,ie.HttpStatusCode=oe,ie.default=ie;var se=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},ue=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 se()}try{return __global__||se()}finally{delete Object.prototype.__global__}}(),ce=Symbol.for("verdocs-default-endpoint"),ae=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},le=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://beta.verdocs.com"===window.location.origin?"https://stage-api.verdocs.com":"https://api.verdocs.com",this.clientID="not-set",this.timeout=6e4,this.token=null,this.nextListenerId=0,this.sessionListeners=new Map,this.requestLoggerId=null,this.session=null,this.baseURL=(null==t?void 0:t.baseURL)||"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=ie.create({baseURL:this.baseURL,timeout:this.timeout}),A(this.api,{retries:0,retryDelay:A.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){ue[ce]=this},e.getDefault=function(){return ue[ce]||(ue[ce]=new e,window.console.debug("[JS_SDK] Created default endpoint",ue[ce].baseURL)),ue[ce]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},e.prototype.getClientID=function(){return this.clientID},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getSession=function(){return this.session},e.prototype.setEnvironment=function(t){return this.environment=t,this},e.prototype.setSessionType=function(t){return this.sessionType=t,this},e.prototype.setBaseURL=function(t){return this.baseURL=t,this.api.defaults.baseURL=t,this},e.prototype.setClientID=function(t){return this.clientID=t,this.api.defaults.headers.common["X-Client-ID"]=t,this},e.prototype.setTimeout=function(t){return this.timeout=t,this.api.defaults.timeout=t,this},e.prototype.logRequests=function(t){return t&&null===this.requestLoggerId?this.requestLoggerId=this.api.interceptors.request.use(ae):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{f as T,le as V,h as a,c as b,o as c,l as d,s as g,_ as l,a as u}
|
1
|
+
import{d as t}from"./p-05788c2b.js";var e,n;!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(e||(e={})),function(t){t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(n||(n={}));var r,o=function(t,e,r){var o,s;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var u=(null==t?void 0:t.profile_id)||"BOGUS";if(!u)return{canPerform:!1,message:"Active session required"};var c=(null==r?void 0:r.profile_id)===u,a=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),l=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(s=null==r?void 0:r.is_public)&&void 0!==s&&s,h=[];switch(e){case"create_personal":h.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":h.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":c||(!l&&a||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":c||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(c?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(c?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":c?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(c?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return i(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},i=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))},s=function(t,e){return t.api.get("/templates/".concat(e)).then((function(t){return t.data}))},u=["name","is_personal","is_public","sender","description","roles","fields"],c=function(t,e,n){var r={timeout:12e4,onUploadProgress:function(t){var e=t.total||1,r=t.loaded||0;null==n||n(Math.floor(100*r/(e||1)),r,e||1)}};if(e.documents&&e.documents[0]instanceof File){var o=new FormData;return u.forEach((function(t){void 0!==e[t]&&o.append(t,e[t])})),e.documents.forEach((function(t){o.append("documents",t,t.name)})),t.api.post("/v2/templates",o,r).then((function(t){return t.data}))}return t.api.post("/v2/templates",e,r).then((function(t){return t.data}))},a=function(t,e,n){return t.api.put("/templates/".concat(e),n).then((function(t){return t.data}))},l=function(t,e){return t.api.delete("/templates/".concat(e)).then((function(t){return t.data}))};!function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(r||(r={}));var f,h,d,m,p,b,_=function(t,e){return void 0===e&&(e={}),n=void 0,r=void 0,i=function(){return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){s.label=u[1];break}if(6===u[0]&&s.label<o[1]){s.label=o[1],o=u;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(u);break}o[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,(function(){return[2,t.api.post("/templates/list",e).then((function(t){return t.data}))]}))},new((o=void 0)||(o=Promise))((function(t,e){function s(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(s,u)}c((i=i.apply(n,r||[])).next())}));var n,r,o,i};!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(f||(f={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(h||(h={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(d||(d={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(m||(m={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(p||(p={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(b||(b={}));const E=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 w(t){return!t.response&&!!t.code&&!["ERR_CANCELED","ECONNABORTED"].includes(t.code)&&(t=>!E.has(t&&t.code))(t)}const y=["get","head","options"],R=y.concat(["put","delete"]);function g(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function v(t){return!!t.config?.method&&g(t)&&-1!==R.indexOf(t.config.method)}function O(t){return w(t)||v(t)}const T={retries:3,retryCondition:O,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:()=>{}};function S(t,e){const n=function(t,e){return{...T,...e,...t["axios-retry"]}}(t,e||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),t["axios-retry"]=n,n}const A=(t,e)=>({requestInterceptorId:t.interceptors.request.use((t=>(S(t,e),t))),responseInterceptorId:t.interceptors.response.use(null,(async n=>{const{config:r}=n;if(!r)return Promise.reject(n);const o=S(r,e);if(await async function(t,e){const{retries:n,retryCondition:r}=t,o=(t.retryCount||0)<n&&r(e);if("object"==typeof o)try{return!1!==await o}catch(t){return!1}return o}(o,n)){o.retryCount+=1;const{retryDelay:e,shouldResetTimeout:i,onRetry:s}=o,u=e(o.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!i&&r.timeout&&o.lastRequestTime){const t=Date.now()-o.lastRequestTime,e=r.timeout-t-u;if(e<=0)return Promise.reject(n);r.timeout=e}return r.transformRequest=[t=>t],await s(o.retryCount,n,r),new Promise((e=>{setTimeout((()=>e(t(r))),u)}))}return Promise.reject(n)}))});function N(t,e){return function(){return t.apply(e,arguments)}}A.isNetworkError=w,A.isSafeRequestError=function(t){return!!t.config?.method&&g(t)&&-1!==y.indexOf(t.config.method)},A.isIdempotentRequestError=v,A.isNetworkOrIdempotentRequestError=O,A.exponentialDelay=function(t=0,e,n=100){const r=2**t*n;return r+.2*r*Math.random()},A.isRetryableError=g;const{toString:C}=Object.prototype,{getPrototypeOf:D}=Object,j=(L=Object.create(null),t=>{const e=C.call(t);return L[e]||(L[e]=e.slice(8,-1).toLowerCase())});var L;const P=t=>(t=t.toLowerCase(),e=>j(e)===t),U=t=>e=>typeof e===t,{isArray:I}=Array,F=U("undefined"),B=P("ArrayBuffer"),x=U("string"),k=U("function"),M=U("number"),q=t=>null!==t&&"object"==typeof t,H=t=>{if("object"!==j(t))return!1;const e=D(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},z=P("Date"),G=P("File"),J=P("Blob"),K=P("FileList"),V=P("URLSearchParams");function X(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),I(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 $(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 Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=t=>!F(t)&&t!==Y,Z=(Q="undefined"!=typeof Uint8Array&&D(Uint8Array),t=>Q&&t instanceof Q);var Q;const tt=P("HTMLFormElement"),et=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),nt=P("RegExp"),rt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};X(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},ot="abcdefghijklmnopqrstuvwxyz",it={DIGIT:"0123456789",ALPHA:ot,ALPHA_DIGIT:ot+ot.toUpperCase()+"0123456789"},st=P("AsyncFunction"),ut={isArray:I,isArrayBuffer:B,isBuffer:function(t){return null!==t&&!F(t)&&null!==t.constructor&&!F(t.constructor)&&k(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||k(t.append)&&("formdata"===(e=j(t))||"object"===e&&k(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&B(t.buffer),e},isString:x,isNumber:M,isBoolean:t=>!0===t||!1===t,isObject:q,isPlainObject:H,isUndefined:F,isDate:z,isFile:G,isBlob:J,isRegExp:nt,isFunction:k,isStream:t=>q(t)&&k(t.pipe),isURLSearchParams:V,isTypedArray:Z,isFileList:K,forEach:X,merge:function t(){const{caseless:e}=W(this)&&this||{},n={},r=(r,o)=>{const i=e&&$(n,o)||o;n[i]=H(n[i])&&H(r)?t(n[i],r):H(r)?t({},r):I(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&X(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(X(e,((e,r)=>{t[r]=n&&k(e)?N(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&&D(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:j,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(I(t))return t;let e=t.length;if(!M(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:tt,hasOwnProperty:et,hasOwnProp:et,reduceDescriptors:rt,freezeMethods:t=>{rt(t,((e,n)=>{if(k(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;k(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 I(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:$,global:Y,isContextDefined:W,ALPHABET:it,generateString:(t=16,e=it.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&k(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(q(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=I(t)?[]:{};return X(t,((t,e)=>{const i=n(t,r+1);!F(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:st,isThenable:t=>t&&(q(t)||k(t))&&k(t.then)&&k(t.catch)};function ct(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)}ut.inherits(ct,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:ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const at=ct.prototype,lt={};function ft(t){return ut.isPlainObject(t)||ut.isArray(t)}function ht(t){return ut.endsWith(t,"[]")?t.slice(0,-2):t}function dt(t,e,n){return t?t.concat(e).map((function(t,e){return t=ht(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=>{lt[t]={value:t}})),Object.defineProperties(ct,lt),Object.defineProperty(at,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,o,i)=>{const s=Object.create(at);return ut.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ct.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const mt=ut.toFlatObject(ut,{},null,(function(t){return/^is[A-Z]/.test(t)}));function pt(t,e,n){if(!ut.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ut.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ut.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ut.isSpecCompliantForm(e);if(!ut.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ut.isDate(t))return t.toISOString();if(!u&&ut.isBlob(t))throw new ct("Blob is not supported. Use a Buffer instead.");return ut.isArrayBuffer(t)||ut.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(ut.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ut.isArray(t)&&function(t){return ut.isArray(t)&&!t.some(ft)}(t)||(ut.isFileList(t)||ut.endsWith(n,"[]"))&&(u=ut.toArray(t)))return n=ht(n),u.forEach((function(t,r){!ut.isUndefined(t)&&null!==t&&e.append(!0===s?dt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ft(t)||(e.append(dt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(mt,{defaultVisitor:a,convertValue:c,isVisitable:ft});if(!ut.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ut.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ut.forEach(n,(function(n,i){!0===(!(ut.isUndefined(n)||null===n)&&o.call(e,n,ut.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function bt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function _t(t,e){this._pairs=[],t&&pt(t,this,e)}const Et=_t.prototype;function wt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yt(t,e,n){if(!e)return t;const r=n&&n.encode||wt,o=n&&n.serialize;let i;if(i=o?o(e,n):ut.isURLSearchParams(e)?e.toString():new _t(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,bt)}:bt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Rt{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){ut.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_t,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Tt=(St="undefined"!=typeof navigator&&navigator.product,Ot&&["ReactNative","NativeScript","NS"].indexOf(St)<0);var St;const At="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Nt={...Object.freeze({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserWebWorkerEnv:At,hasStandardBrowserEnv:Tt}),...vt};function Ct(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ut.isArray(r)?r.length:i,u?(r[i]=ut.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ut.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ut.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(ut.isFormData(t)&&ut.isFunction(t.entries)){const n={};return ut.forEachEntry(t,((t,r)=>{e(function(t){return ut.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Dt={transitional:gt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ut.isObject(t);if(o&&ut.isHTMLForm(t)&&(t=new FormData(t)),ut.isFormData(t))return r&&r?JSON.stringify(Ct(t)):t;if(ut.isArrayBuffer(t)||ut.isBuffer(t)||ut.isStream(t)||ut.isFile(t)||ut.isBlob(t))return t;if(ut.isArrayBufferView(t))return t.buffer;if(ut.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 pt(t,new Nt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Nt.isNode&&ut.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ut.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return pt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ut.isString(t))try{return(0,JSON.parse)(t),ut.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Dt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ut.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 ct.from(t,ct.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:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ut.forEach(["delete","get","head","post","put","patch"],(t=>{Dt.headers[t]={}}));const jt=ut.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"]),Lt=Symbol("internals");function Pt(t){return t&&String(t).trim().toLowerCase()}function Ut(t){return!1===t||null==t?t:ut.isArray(t)?t.map(Ut):String(t)}function It(t,e,n,r,o){return ut.isFunction(r)?r.call(this,e,n):(o&&(e=n),ut.isString(e)?ut.isString(r)?-1!==e.indexOf(r):ut.isRegExp(r)?r.test(e):void 0:void 0)}class Ft{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Pt(e);if(!o)throw new Error("header name must be a non-empty string");const i=ut.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ut(t))}const i=(t,e)=>ut.forEach(t,((t,n)=>o(t,n,e)));return ut.isPlainObject(t)||t instanceof this.constructor?i(t,e):ut.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]&&jt[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=Pt(t)){const n=ut.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(ut.isFunction(e))return e.call(this,t,n);if(ut.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pt(t)){const n=ut.findKey(this,t);return!(!n||void 0===this[n]||e&&!It(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Pt(t)){const o=ut.findKey(n,t);!o||e&&!It(0,n[o],o,e)||(delete n[o],r=!0)}}return ut.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&&!It(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ut.forEach(this,((r,o)=>{const i=ut.findKey(n,o);if(i)return e[i]=Ut(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]=Ut(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ut.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ut.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[Lt]=this[Lt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Pt(t);e[r]||(function(t,e){const n=ut.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 ut.isArray(t)?t.forEach(r):r(t),this}}function Bt(t,e){const n=this||Dt,r=e||n,o=Ft.from(r.headers);let i=r.data;return ut.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function kt(t,e,n){ct.call(this,null==t?"canceled":t,ct.ERR_CANCELED,e,n),this.name="CanceledError"}Ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ut.reduceDescriptors(Ft.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ut.freezeMethods(Ft),ut.inherits(kt,ct,{__CANCEL__:!0});const Mt=Nt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];ut.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ut.isString(r)&&s.push("path="+r),ut.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qt(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 Ht=Nt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=ut.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function zt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(u){const c=Date.now(),a=r[s];o||(o=c),n[i]=u,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const h=a&&c-a;return h?Math.round(1e3*f/h):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,c=r(u);n=i;const a={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};a[e?"download":"upload"]=!0,t(a)}}const Gt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Ft.from(t.headers).normalize();let i,s,{responseType:u,withXSRFToken:c}=t;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(ut.isFormData(r))if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const f=qt(t.baseURL,t.url);function h(){if(!l)return;const r=Ft.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ct("Request failed with status code "+n.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:u&&"text"!==u&&"json"!==u?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),yt(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new ct("Request aborted",ct.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new ct("Network Error",ct.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ct(e,(t.transitional||gt).clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,t,l)),l=null},Nt.hasStandardBrowserEnv&&(c&&ut.isFunction(c)&&(c=c(t)),c||!1!==c&&Ht(f))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Mt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&ut.forEach(o.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),ut.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),u&&"json"!==u&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",zt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",zt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new kt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(f);d&&-1===Nt.protocols.indexOf(d)?n(new ct("Unsupported protocol "+d+":",ct.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};ut.forEach(Gt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Jt=t=>`- ${t}`,Kt=t=>ut.isFunction(t)||null===t||!1===t,Vt=t=>{t=ut.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!Kt(n)&&(r=Gt[(e=String(n)).toLowerCase()],void 0===r))throw new ct(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ct("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(Jt).join("\n"):" "+Jt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function $t(t){return Xt(t),t.headers=Ft.from(t.headers),t.data=Bt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Vt(t.adapter||Dt.adapter)(t).then((function(e){return Xt(t),e.data=Bt.call(t,t.transformResponse,e),e.headers=Ft.from(e.headers),e}),(function(e){return xt(e)||(Xt(t),e&&e.response&&(e.response.data=Bt.call(t,t.transformResponse,e.response),e.response.headers=Ft.from(e.response.headers))),Promise.reject(e)}))}const Yt=t=>t instanceof Ft?t.toJSON():t;function Wt(t,e){e=e||{};const n={};function r(t,e,n){return ut.isPlainObject(t)&&ut.isPlainObject(e)?ut.merge.call({caseless:n},t,e):ut.isPlainObject(e)?ut.merge({},e):ut.isArray(e)?e.slice():e}function o(t,e,n){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ut.isUndefined(e))return r(void 0,e)}function s(t,e){return ut.isUndefined(e)?ut.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Yt(t),Yt(e),!0)};return ut.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ut.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Zt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Zt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Qt={};Zt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ct(r(o," has been removed"+(e?" in "+e:"")),ct.ERR_DEPRECATED);return e&&!Qt[o]&&(Qt[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 te={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ct("options must be an object",ct.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 ct("option "+i+" must be "+n,ct.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ct("Unknown option "+i,ct.ERR_BAD_OPTION)}},validators:Zt},ee=te.validators;class ne{constructor(t){this.defaults=t,this.interceptors={request:new Rt,response:new Rt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Wt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&te.assertOptions(n,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),null!=r&&(ut.isFunction(r)?e.paramsSerializer={serialize:r}:te.assertOptions(r,{encode:ee.function,serialize:ee.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&ut.merge(o.common,o[e.method]);o&&ut.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ft.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=[$t.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=$t.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 yt(qt((t=Wt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ut.forEach(["delete","get","head","options"],(function(t){ne.prototype[t]=function(e,n){return this.request(Wt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ut.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(Wt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ne.prototype[t]=e(),ne.prototype[t+"Form"]=e(!0)}));class re{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 kt(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 re((function(e){t=e})),cancel:t}}}const oe={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(oe).forEach((([t,e])=>{oe[e]=t}));const ie=function t(e){const n=new ne(e),r=N(ne.prototype.request,n);return ut.extend(r,ne.prototype,n,{allOwnKeys:!0}),ut.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Wt(e,n))},r}(Dt);ie.Axios=ne,ie.CanceledError=kt,ie.CancelToken=re,ie.isCancel=xt,ie.VERSION="1.6.2",ie.toFormData=pt,ie.AxiosError=ct,ie.Cancel=ie.CanceledError,ie.all=function(t){return Promise.all(t)},ie.spread=function(t){return function(e){return t.apply(null,e)}},ie.isAxiosError=function(t){return ut.isObject(t)&&!0===t.isAxiosError},ie.mergeConfig=Wt,ie.AxiosHeaders=Ft,ie.formToJSON=t=>Ct(ut.isHTMLForm(t)?new FormData(t):t),ie.getAdapter=Vt,ie.HttpStatusCode=oe,ie.default=ie;var se=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},ue=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 se()}try{return __global__||se()}finally{delete Object.prototype.__global__}}(),ce=Symbol.for("verdocs-default-endpoint"),ae=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},le=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://beta.verdocs.com"===window.location.origin?"https://stage-api.verdocs.com":"https://api.verdocs.com",this.clientID="not-set",this.timeout=6e4,this.token=null,this.nextListenerId=0,this.sessionListeners=new Map,this.requestLoggerId=null,this.session=null,this.baseURL=(null==t?void 0:t.baseURL)||this.baseURL,this.timeout=(null==t?void 0:t.timeout)||this.timeout,this.environment=(null==t?void 0:t.environment)||this.environment,this.sessionType=(null==t?void 0:t.sessionType)||this.sessionType,this.clientID=(null==t?void 0:t.clientID)||this.clientID,this.api=ie.create({baseURL:this.baseURL,timeout:this.timeout}),window.console.log("[JS_SDK] Initializing",this.baseURL,window.location.origin),A(this.api,{retries:0,retryDelay:A.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){ue[ce]=this},e.getDefault=function(){return ue[ce]||(ue[ce]=new e,window.console.debug("[JS_SDK] Created default endpoint",ue[ce].baseURL)),ue[ce]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},e.prototype.getClientID=function(){return this.clientID},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getSession=function(){return this.session},e.prototype.setEnvironment=function(t){return this.environment=t,this},e.prototype.setSessionType=function(t){return this.sessionType=t,this},e.prototype.setBaseURL=function(t){return this.baseURL=t,this.api.defaults.baseURL=t,this},e.prototype.setClientID=function(t){return this.clientID=t,this.api.defaults.headers.common["X-Client-ID"]=t,this},e.prototype.setTimeout=function(t){return this.timeout=t,this.api.defaults.timeout=t,this},e.prototype.logRequests=function(t){return t&&null===this.requestLoggerId?this.requestLoggerId=this.api.interceptors.request.use(ae):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{f as T,le as V,h as a,c as b,o as c,l as d,s as g,_ as l,a as u}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as i,h as s,H as t}from"./p-14b44491.js";import"./p-05788c2b.js";import{g as l}from"./p-3cd894ff.js";import{V as n}from"./p-0bf08021.js";import{g as o}from"./p-ebc4142c.js";import{V as r}from"./p-ed416acf.js";import{S as a}from"./p-7a1b2643.js";import{g as c,r as p}from"./p-29f64c27.js";import"./p-7648c449.js";import"./p-5a91bf23.js";const d=class{constructor(s){e(this,s),this.next=i(this,"next",7),this.sdkError=i(this,"sdkError",7),this.store=null,this.recipient=null,this.endpoint=n.getDefault(),this.envelopeId="",this.roleName="",this.isOpen=void 0,this.loading=!0,this.gettingLink=!0,this.link=""}async componentWillLoad(){var e,i,s,t,l,n;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");this.store=await o(this.endpoint,this.envelopeId,!0),this.loading=!1,this.gettingLink=!0,this.recipient=null===(s=null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.recipients)||void 0===s?void 0:s.find((e=>e.role_name===this.roleName)),this.getLink(this.recipient)}catch(e){console.log("[RECIPIENT_LINK] Error loading envelope",e),null===(t=this.sdkError)||void 0===t||t.emit(new a(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(n=e.response)||void 0===n?void 0:n.data))}}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.store.state})}copyLink(e){navigator.clipboard.writeText(e).then((()=>r("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e),r(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=!0,l(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=!1,this.link=e.link})).catch((e=>{this.gettingLink=!1,console.log("[RECIPIENT_LINK] Error getting link",e),r("Unable to get link: "+e.message,{style:"error"})}))}render(){return this.loading||!this.recipient?s(t,null):s(t,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"In-Person Signing Link"),s("div",{class:"summary-rows"},s("div",{class:"summary-recipient"},s("div",{class:"role-name"},this.recipient.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&s("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:()=>this.getLink(this.recipient)})),this.link&&s("div",{class:"link-wrapper"},s("div",{class:"link"},this.link),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),s("div",{class:"buttons"},s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};d.style='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';const m=class{constructor(s){e(this,s),this.another=i(this,"another",7),this.view=i(this,"view",7),this.next=i(this,"next",7),this.sdkError=i(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.envelopeId="",this.canSendAnother=!0,this.canView=!0,this.canDone=!0,this.isOpen=void 0,this.loading=!0,this.recipientStatusIcons=[],this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`,this.gettingLinks={},this.links={}}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start session, must be authenticated");this.store=await o(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[RECIPIENTS] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new a(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault(),null===(i=this.another)||void 0===i||i.emit({envelope:this.store.state})}handleView(e){var i;e.preventDefault(),null===(i=this.view)||void 0===i||i.emit({envelope:this.store.state})}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.store.state})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e),null===(i=this.sdkError)||void 0===i||i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:!0},l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},this.links={...this.links,[e.role_name]:i.link},this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},console.log("[RECIPIENTS] Error getting link",i),null===(s=this.sdkError)||void 0===s||s.emit(i)}))}render(){var e,i;return this.loading?s(t,null):s(t,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},((null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.recipients)||[]).map((e=>{const i=c(this.store.state),t=p(e,i),l=this.links[e.role_name],n=this.gettingLinks[e.role_name];return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},e.full_name," (",e.email||e.phone,")"),t&&!l&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:n,onClick:()=>this.getLink(e)})),l&&s("div",{class:"link-wrapper"},s("div",{class:"link"},l),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(l)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};m.style='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';export{d as verdocs_envelope_recipient_link,m as verdocs_envelope_recipient_summary}
|
1
|
+
import{r as e,c as i,h as s,H as t}from"./p-14b44491.js";import"./p-05788c2b.js";import{g as l}from"./p-3cd894ff.js";import{V as n}from"./p-b101fae2.js";import{g as o}from"./p-ebc4142c.js";import{V as r}from"./p-ed416acf.js";import{S as a}from"./p-7a1b2643.js";import{g as c,r as p}from"./p-29f64c27.js";import"./p-7648c449.js";import"./p-5a91bf23.js";const d=class{constructor(s){e(this,s),this.next=i(this,"next",7),this.sdkError=i(this,"sdkError",7),this.store=null,this.recipient=null,this.endpoint=n.getDefault(),this.envelopeId="",this.roleName="",this.isOpen=void 0,this.loading=!0,this.gettingLink=!0,this.link=""}async componentWillLoad(){var e,i,s,t,l,n;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");this.store=await o(this.endpoint,this.envelopeId,!0),this.loading=!1,this.gettingLink=!0,this.recipient=null===(s=null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.recipients)||void 0===s?void 0:s.find((e=>e.role_name===this.roleName)),this.getLink(this.recipient)}catch(e){console.log("[RECIPIENT_LINK] Error loading envelope",e),null===(t=this.sdkError)||void 0===t||t.emit(new a(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(n=e.response)||void 0===n?void 0:n.data))}}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.store.state})}copyLink(e){navigator.clipboard.writeText(e).then((()=>r("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e),r(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=!0,l(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=!1,this.link=e.link})).catch((e=>{this.gettingLink=!1,console.log("[RECIPIENT_LINK] Error getting link",e),r("Unable to get link: "+e.message,{style:"error"})}))}render(){return this.loading||!this.recipient?s(t,null):s(t,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"In-Person Signing Link"),s("div",{class:"summary-rows"},s("div",{class:"summary-recipient"},s("div",{class:"role-name"},this.recipient.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&s("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:()=>this.getLink(this.recipient)})),this.link&&s("div",{class:"link-wrapper"},s("div",{class:"link"},this.link),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),s("div",{class:"buttons"},s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};d.style='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';const m=class{constructor(s){e(this,s),this.another=i(this,"another",7),this.view=i(this,"view",7),this.next=i(this,"next",7),this.sdkError=i(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.envelopeId="",this.canSendAnother=!0,this.canView=!0,this.canDone=!0,this.isOpen=void 0,this.loading=!0,this.recipientStatusIcons=[],this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`,this.gettingLinks={},this.links={}}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start session, must be authenticated");this.store=await o(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[RECIPIENTS] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new a(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault(),null===(i=this.another)||void 0===i||i.emit({envelope:this.store.state})}handleView(e){var i;e.preventDefault(),null===(i=this.view)||void 0===i||i.emit({envelope:this.store.state})}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.store.state})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e),null===(i=this.sdkError)||void 0===i||i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:!0},l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},this.links={...this.links,[e.role_name]:i.link},this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},console.log("[RECIPIENTS] Error getting link",i),null===(s=this.sdkError)||void 0===s||s.emit(i)}))}render(){var e,i;return this.loading?s(t,null):s(t,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},((null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.recipients)||[]).map((e=>{const i=c(this.store.state),t=p(e,i),l=this.links[e.role_name],n=this.gettingLinks[e.role_name];return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},e.full_name," (",e.email||e.phone,")"),t&&!l&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:n,onClick:()=>this.getLink(e)})),l&&s("div",{class:"link-wrapper"},s("div",{class:"link"},l),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(l)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};m.style='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';export{d as verdocs_envelope_recipient_link,m as verdocs_envelope_recipient_summary}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{l(n.next(t))}catch(t){r(t)}}function s(t){try{l(n["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):o(t.value).then(a,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-2ccbcfeb.system.js","./p-54498887.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{l(n.next(t))}catch(t){r(t)}}function s(t){try{l(n["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):o(t.value).then(a,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-2ccbcfeb.system.js","./p-54498887.system.js","./p-19ff8f86.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,i,n,o,r,a,s,l;return{setters:[function(t){e=t.r;i=t.c;n=t.h;o=t.H},function(t){r=t.g},function(){},function(t){a=t.V},function(t){s=t.i},function(t){l=t.S}],execute:function(){var c=365*24*60*60;var d=7*24*60*60;var f=24*60*60;var p=60*60;var u=60;var h=function(t){if(t===undefined||t===null){return""}var e;if(typeof t==="string"||typeof t==="number"){e=new Date(t)}else if(typeof t==="object"){e=t}else{return""}var i=Math.floor(((new Date).getTime()-e.getTime())/1e3);if(i>=c){return Math.floor(i/c)+"Y"}if(i>=d){return Math.floor(i/d)+"W"}if(i>=f){return Math.floor(i/f)+"D"}if(i>=p){return Math.floor(i/p)+"H"}if(i>=u){return Math.floor(i/u)+"M"}return"".concat(i,"S")};var x='verdocs-activity-box{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:18px;min-width:300px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#33364b;-ms-flex-align:center;align-items:center;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif;background:#ffffff;padding:20px 20px 8px 20px}verdocs-activity-box .box-title{width:100%;display:-ms-flexbox;display:flex;color:#33364b;font-size:20px;font-weight:600;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin:0 0 20px 0;-ms-flex-align:center;align-items:center}verdocs-activity-box .box-title .count{margin:0 0 0 6px;font-weight:300}verdocs-activity-box .box-title verdocs-loader{margin:0 0 20px 0}@media screen and (max-width: 1200px){verdocs-activity-box .box-title{font-size:18px}verdocs-activity-box .box-title .count{display:none}}verdocs-activity-box .spacer{-ms-flex:1;flex:1}verdocs-activity-box .loading-placeholder{width:100%;height:62px;display:block;-ms-flex:0 0 62px;flex:0 0 62px;margin:0 0 10px 0;border-radius:6px;background-color:#f5f8f9}verdocs-activity-box .loading-placeholder .loading-placeholder-bg{height:62px;position:relative;background:#f5f8f9;-webkit-animation-duration:1.25s;animation-duration:1.25s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:loadingPlaceholderSwoop;animation-name:loadingPlaceholderSwoop;background:-webkit-gradient(linear, left top, right top, color-stop(10%, #f5f8f9), color-stop(18%, #eeeeee), color-stop(33%, #f5f8f9));background:linear-gradient(to right, #f5f8f9 10%, #eeeeee 18%, #f5f8f9 33%);background-size:800px 62px}verdocs-activity-box .activity-entry{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 62px;flex:0 0 62px;border-radius:6px;margin-bottom:10px;-ms-flex-direction:row;flex-direction:row;padding:0 16px 0 0;background:#f5f8f9;-ms-flex-align:center;align-items:center;border:1px solid #f5f8f9}verdocs-activity-box .activity-entry:hover{cursor:pointer;background:#f2f4f5;border:1px solid #ddd}verdocs-activity-box .activity-entry svg{width:32px;height:32px;margin-right:20px}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry svg{width:24px;height:24px;margin-right:15px}}verdocs-activity-box .activity-entry .title{-ms-flex:1;flex:1;color:black;font-size:16px;font-weight:500;margin-left:12px}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry .title{font-size:14px}}verdocs-activity-box .activity-entry .time-ago{height:24px;display:-ms-flexbox;display:flex;-ms-flex:0 0 24px;flex:0 0 24px;color:#7f8e92;font-size:16px;font-weight:500;padding-left:14px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-left:1px solid #d8e3e6}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry .time-ago{font-size:14px}}@-webkit-keyframes loadingPlaceholderSwoop{0%{background-position:-468px 0}100%{background-position:468px 0}}@keyframes loadingPlaceholderSwoop{0%{background-position:-468px 0}100%{background-position:468px 0}}';var v="https://verdocs-public-assets.s3.amazonaws.com/no-verdocs.png";var m=t("verdocs_activity_box",function(){function t(t){e(this,t);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.viewAll=i(this,"viewAll",7);this.endpoint=a.getDefault();this.items=5;this.view=undefined;this.header=undefined;this.title="";this.count=0;this.loading=true;this.entries=[]}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[ACTIVITIES] Must be authenticated");return[2]}this.loadActivity()}catch(n){console.log("[ACTIVITIES] Error with preview session",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new l(n.message,(e=n.response)===null||e===void 0?void 0:e.status,(i=n.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};t.prototype.handleItemsUpdated=function(){return this.loadActivity()};t.prototype.handleViewUpdated=function(){return this.loadActivity()};t.prototype.loadActivity=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:this.loading=true;return[4,r(this.endpoint,0)];case 1:t=i.sent();if(this.view==="action"){e="Action Required";this.entries=t.action_required.result;this.count=t.action_required.total}else if(this.view==="waiting"){e="Waiting on Others";this.entries=t.waiting_others.result;this.count=t.waiting_others.total}else if(this.view==="completed"){e="Completed";this.entries=t.completed.result;this.count=t.completed.total}this.title=this.header!==undefined?this.header:e;this.loading=false;return[2]}}))}))};t.prototype.render=function(){var t=this;if(this.loading){return n(o,{style:{minHeight:"300px"}},this.title&&n("div",{class:"box-title"},this.title," ",n("span",{class:"count"},"(0)")),s(0,this.items).map((function(){return n("div",{class:"loading-placeholder"},n("div",{class:"loading-placeholder-bg"}))})))}return n(o,null,this.title&&n("div",{class:"box-title"},this.title," ",n("span",{class:"count"},"(",this.count,")"),n("div",{class:"spacer"}),n("verdocs-button",{label:"View All",size:"small",onClick:function(){var e;return(e=t.viewAll)===null||e===void 0?void 0:e.emit({endpoint:t.endpoint,view:t.view})}})),this.count>0?this.entries.slice(0,Math.max(this.items,1)).map((function(e){return n("div",{class:"activity-entry",onClick:function(){var i;(i=t.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,entry:e})}},n("div",{class:"title"},e.name,n("br",null)," ",n("strong",null,e.recipient.name)),n("div",{class:"time-ago"},h(e.updated_at)))})):n("img",{src:v,alt:"No documents to show",style:{width:"190px",margin:"0 auto"}}))};Object.defineProperty(t,"watchers",{get:function(){return{items:["handleItemsUpdated"],view:["handleViewUpdated"]}},enumerable:false,configurable:true});return t}());m.style=x}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(s[0]===6&&i.label<r[1]){i.label=r[1];r=s;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(s);break}if(r[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-e2ff37fb.system.js","./p-54498887.system.js","./p-19ff8f86.system.js","./p-b1288daf.system.js","./p-05eb4fed.system.js","./p-b0bf091c.system.js","./p-1ba9f457.system.js","./p-2ccbcfeb.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,n,o,r,s,a,l,d,c;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H;r=e.a},function(e){s=e.i},function(){},function(e){a=e.V},function(e){l=e.u},function(e){d=e.g},function(e){c=e.g},function(){},function(){},function(){},function(){},function(){}],execute:function(){var u='verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;width:150px;height:15px;display:block;font-size:11px;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{cursor:inherit;width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}';var f='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var h=e("verdocs_field_textbox",function(){function e(e){t(this,e);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this.endpoint=a.getDefault();this.templateid="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.xscale=1;this.yscale=1;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.componentDidRender=function(){s.dynamicDrop(true);if(this.editable){s(this.el).resizable({edges:{top:false,bottom:false,left:true,right:true},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}};e.prototype.handleResizeStart=function(e){e.preventDefault();e.stopPropagation()};e.prototype.handleResize=function(e){var t=e.target.dataset,i=t.x,n=i===void 0?0:i,o=t.y,r=o===void 0?0:o,s=t.h,a=s===void 0?0:s;var l=e.rect,d=l.width,c=l.height;n=(parseFloat(n)||0)+e.deltaRect.left;r=(parseFloat(r)||0)+e.deltaRect.top;a=(parseFloat(a)||0)+e.deltaRect.height;Object.assign(e.target.style,{width:"".concat(d,"px"),height:"".concat(c,"px"),transform:"translate(".concat(n,"px, ").concat(r+a,"px)")});Object.assign(e.target.dataset,{x:n,y:r,h:a})};e.prototype.handleResizeEnd=function(e){var t=this;var i=__assign({},c(this.field));var n=e.target.style.transform.split("(")[1].split(")")[0].split(",").map(parseFloat),o=n[0],r=n[1];i.width=Math.round(parseFloat(e.target.style.width)/this.xscale);i.height=Math.round(parseFloat(e.target.style.height)/this.yscale);i.x=Math.round(i.x+o/this.xscale);i.y=Math.round(i.y-r/this.yscale);l(this.endpoint,this.templateid,this.field.name,{setting:i}).then((function(n){var o;console.log("update result",n);(o=t.settingsChanged)===null||o===void 0?void 0:o.emit({fieldName:t.field.name,settings:i,field:n});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((function(e){return console.log("Field update failed",e)}))};e.prototype.render=function(){var e=this;var t,i,r,s;var a=c(this.field);var l=(i=(t=this.disabled)!==null&&t!==void 0?t:a.disabled)!==null&&i!==void 0?i:false;var u=this.field["rgba"]||d(this.roleindex);var h=(a===null||a===void 0?void 0:a.result)||"";var p=a.width||150;var b=p/5;if(this.done){return n(o,{class:{done:this.done}},h)}return n(o,{class:{required:(r=this.field)===null||r===void 0?void 0:r.required,disabled:l,done:this.done},style:{backgroundColor:u}},n("input",{type:"text",name:this.field.name,placeholder:a===null||a===void 0?void 0:a.placeholder,tabIndex:a===null||a===void 0?void 0:a.order,value:h,disabled:l,required:(s=this.field)===null||s===void 0?void 0:s.required,ref:function(t){return e.inputEl=t},maxlength:b}),this.editable&&n("verdocs-button-panel",{icon:f,id:"verdocs-settings-panel-".concat(this.field.name)},n("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;console.log("here");(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'})))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());h.style=u}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,o){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o["throw"](t))}catch(t){r(t)}}function c(t){t.done?i(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];n=0}finally{o=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,o){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o["throw"](t))}catch(t){r(t)}}function c(t){t.done?i(t.value):n(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];n=0}finally{o=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-19ff8f86.system.js","./p-6e9af353.system.js","./p-b0bf091c.system.js","./p-9a5ff58c.system.js","./p-1ba9f457.system.js","./p-2ccbcfeb.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(t){"use strict";var e,i,o,n,r,a,s,c,p;return{setters:[function(t){e=t.r;i=t.c;o=t.h;n=t.H;r=t.a},function(){},function(t){a=t.V},function(t){s=t.g},function(t){c=t.t},function(t){p=t.c},function(){},function(){},function(){},function(){},function(){}],execute:function(){var l="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var d=t("verdocs_template_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=a.getDefault();this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,s(this.endpoint,this.templateId,this.documentId,this.pageNumber)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,o=e;i<o.length;i++){var n=o[i];var r=n.contentRect.width;t.renderedWidth=r;t.renderedHeight=t.virtualHeight*(r/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return o(n,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):o("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=l;var h='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var u=t("verdocs_toolbar_icon",function(){function t(t){e(this,t);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}t.prototype.componentDidLoad=function(){this.popperInstance=p(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};t.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};t.prototype.show=function(){var t,e;(t=this.tooltip)===null||t===void 0?void 0:t.setAttribute("data-show","");(e=this.popperInstance)===null||e===void 0?void 0:e.update().catch((function(){}))};t.prototype.hide=function(){var t;(t=this.tooltip)===null||t===void 0?void 0:t.removeAttribute("data-show")};t.prototype.render=function(){var t=this;return o(n,{class:{}},o("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return t.show()},onFocus:function(){return t.show()},onMouseLeave:function(){return t.hide()},onBlur:function(){return t.hide()},ref:function(e){return t.iconEl=e}}),o("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(e){return t.tooltip=e}},this.text,o("div",{"data-popper-arrow":"true",class:"arrow"})))};return t}());u.style=h}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as i,h as s,H as t}from"./p-14b44491.js";import{c as n}from"./p-5a91bf23.js";import{u as o}from"./p-29f64c27.js";import{r as l}from"./p-3cd894ff.js";import"./p-05788c2b.js";import{V as a}from"./p-0bf08021.js";import{g as d}from"./p-ebc4142c.js";import{F as r}from"./p-839f6f0d.js";import{V as c}from"./p-ed416acf.js";import{S as v}from"./p-7a1b2643.js";import{f as p}from"./p-c220af42.js";import"./p-7648c449.js";const h={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},w=class{constructor(s){e(this,s),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.store=null,this.endpoint=a.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.showRecipientDialog="",this.showCancelDialog=!1,this.loading=!0}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[SIDEBAR] Unable to start session, must be authenticated");this.store=await d(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[SIDEBAR] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new v(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){var i,s;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.status)}handleRecipientAction(e,i){var s,t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((()=>{c("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),c("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":c("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:null===(t=this.store)||void 0===t?void 0:t.state,event:i})}cancelEnvelope(){this.loading=!0,n(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),c("Envelope canceled",{style:"success"}),this.store=await d(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:null===(s=this.store)||void 0===s?void 0:s.state,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e),this.loading=!1,c("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,a,d,r,c,v;const p=[],h=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.histories)||[];p.push({icon:"pencil",message:"Envelope created.",date:new Date(null===(t=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===t?void 0:t.created_at)}),"complete"===(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status)&&p.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.updated_at)});const w=h.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(r=null===(d=this.store)||void 0===d?void 0:d.state)||void 0===r?void 0:r.status)||w||p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.canceled_at)}),h.forEach((e=>{var i;const s=null===(i=this.store.state)||void 0===i?void 0:i.recipients.find((i=>i.role_name===e.role_name)),t=(null==s?void 0:s.full_name)||"";switch(e.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":p.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":p.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":p.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":p.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:p.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":switch(e.event_detail){case"approver":p.push({icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)});break;default:p.push({icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:prepared":p.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?p.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&p.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":p.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":p.push("sms"===e.event_detail?{icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)});break;case"invitation:resent":p.push({icon:"mail",message:`Invitation was resent to ${t} ${"reminder"===e.event_detail?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":p.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":p.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e)}})),p.sort(((e,i)=>i.date.getTime()-e.date.getTime())),p}render(){var e,i,n,l,a,d,c,v,w,g,m,x,b,f,u,y,z,k,M,D,V,B,E,L,H;if(!this.store.state)return s(t,null);const S=this.endpoint.getSession(),_=o(S,this.store.state),$=this.prepareHistoryEntries(),I="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(l=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===l?void 0:l.status);return s(t,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),s("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),s("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},null===(d=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===d?void 0:d.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},p(new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.created_at),r)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},p(new Date(null===(g=null===(w=this.store)||void 0===w?void 0:w.state)||void 0===g?void 0:g.updated_at),r)),s("div",{class:"label"},"Status"),s("div",{class:"value"},null===(x=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===x?void 0:x.status),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(f=null===(b=this.store)||void 0===b?void 0:b.state)||void 0===f?void 0:f.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},null===(z=null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile)||void 0===z?void 0:z.first_name," ",null===(D=null===(M=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===M?void 0:M.profile)||void 0===D?void 0:D.last_name),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(E=null===(B=null===(V=this.store)||void 0===V?void 0:V.state)||void 0===B?void 0:B.profile)||void 0===E?void 0:E.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(H=null===(L=this.store)||void 0===L?void 0:L.state)||void 0===H?void 0:H.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-type"},e.role_name),s("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),_&&!I&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},e.full_name),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),_&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!I,disabled:I})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),$.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:h[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},p(e.date,r))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showManageDialog&&s("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.store.state})},onNext:()=>this.showManageDialog=!1}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=!1,this.cancelEnvelope()}}))}};w.style='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{w as verdocs_envelope_sidebar}
|
1
|
+
import{r as e,c as i,h as s,H as t}from"./p-14b44491.js";import{c as n}from"./p-5a91bf23.js";import{u as o}from"./p-29f64c27.js";import{r as l}from"./p-3cd894ff.js";import"./p-05788c2b.js";import{V as a}from"./p-b101fae2.js";import{g as d}from"./p-ebc4142c.js";import{F as r}from"./p-839f6f0d.js";import{V as c}from"./p-ed416acf.js";import{S as v}from"./p-7a1b2643.js";import{f as p}from"./p-c220af42.js";import"./p-7648c449.js";const h={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},w=class{constructor(s){e(this,s),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.store=null,this.endpoint=a.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.showRecipientDialog="",this.showCancelDialog=!1,this.loading=!0}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[SIDEBAR] Unable to start session, must be authenticated");this.store=await d(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[SIDEBAR] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new v(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){var i,s;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.status)}handleRecipientAction(e,i){var s,t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((()=>{c("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),c("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":c("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:null===(t=this.store)||void 0===t?void 0:t.state,event:i})}cancelEnvelope(){this.loading=!0,n(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),c("Envelope canceled",{style:"success"}),this.store=await d(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:null===(s=this.store)||void 0===s?void 0:s.state,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e),this.loading=!1,c("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,a,d,r,c,v;const p=[],h=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.histories)||[];p.push({icon:"pencil",message:"Envelope created.",date:new Date(null===(t=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===t?void 0:t.created_at)}),"complete"===(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status)&&p.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.updated_at)});const w=h.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(r=null===(d=this.store)||void 0===d?void 0:d.state)||void 0===r?void 0:r.status)||w||p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.canceled_at)}),h.forEach((e=>{var i;const s=null===(i=this.store.state)||void 0===i?void 0:i.recipients.find((i=>i.role_name===e.role_name)),t=(null==s?void 0:s.full_name)||"";switch(e.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":p.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":p.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":p.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":p.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:p.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":switch(e.event_detail){case"approver":p.push({icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)});break;default:p.push({icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:prepared":p.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?p.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&p.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":p.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":p.push("sms"===e.event_detail?{icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)});break;case"invitation:resent":p.push({icon:"mail",message:`Invitation was resent to ${t} ${"reminder"===e.event_detail?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":p.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":p.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e)}})),p.sort(((e,i)=>i.date.getTime()-e.date.getTime())),p}render(){var e,i,n,l,a,d,c,v,w,g,m,x,b,f,u,y,z,k,M,D,V,B,E,L,H;if(!this.store.state)return s(t,null);const S=this.endpoint.getSession(),_=o(S,this.store.state),$=this.prepareHistoryEntries(),I="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(l=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===l?void 0:l.status);return s(t,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),s("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),s("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},null===(d=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===d?void 0:d.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},p(new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.created_at),r)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},p(new Date(null===(g=null===(w=this.store)||void 0===w?void 0:w.state)||void 0===g?void 0:g.updated_at),r)),s("div",{class:"label"},"Status"),s("div",{class:"value"},null===(x=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===x?void 0:x.status),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(f=null===(b=this.store)||void 0===b?void 0:b.state)||void 0===f?void 0:f.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},null===(z=null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile)||void 0===z?void 0:z.first_name," ",null===(D=null===(M=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===M?void 0:M.profile)||void 0===D?void 0:D.last_name),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(E=null===(B=null===(V=this.store)||void 0===V?void 0:V.state)||void 0===B?void 0:B.profile)||void 0===E?void 0:E.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(H=null===(L=this.store)||void 0===L?void 0:L.state)||void 0===H?void 0:H.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-type"},e.role_name),s("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),_&&!I&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},e.full_name),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),_&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!I,disabled:I})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),$.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:h[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},p(e.date,r))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showManageDialog&&s("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.store.state})},onNext:()=>this.showManageDialog=!1}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=!1,this.cancelEnvelope()}}))}};w.style='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{w as verdocs_envelope_sidebar}
|