@pontive/pontkit-core 1.1.2 → 1.1.3
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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/index.js +72 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +286 -311
- package/dist/index.mjs.map +1 -1
- package/dist/service/http/fetch.d.ts +9 -0
- package/dist/service/http/user/index.d.ts +7 -2
- package/dist/types/core/index.d.ts +12 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2716,7 +2716,7 @@
|
|
|
2716
2716
|
${this._cachedChildren}
|
|
2717
2717
|
</div>
|
|
2718
2718
|
</div>
|
|
2719
|
-
`:h}};Fi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Fi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Fi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Fi([p("pont-modal")],exports.PontModal);const ki="pont-account-settings-card-header-container",gn="pont-account-settings-card-title",$t="pont-account-settings-input-label pont-shrink-0 md:pont-block",Ni="pont-account-settings-card-container";class xP extends Error{constructor(t,r,n){super(t),this.name="ApiError",this.status=r,this.data=n}}async function Re(e,t={}){var b;const{token:r,headers:n,...o}=t,i=J$(),s=i==null?void 0:i.apiBaseUrl
|
|
2719
|
+
`:h}};Fi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Fi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Fi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Fi([p("pont-modal")],exports.PontModal);const ki="pont-account-settings-card-header-container",gn="pont-account-settings-card-title",$t="pont-account-settings-input-label pont-shrink-0 md:pont-block",Ni="pont-account-settings-card-container";class xP extends Error{constructor(t,r,n){super(t),this.name="ApiError",this.status=r,this.data=n}}const OP="/mgmt/v1";async function Re(e,t={}){var v,b;const{token:r,headers:n,...o}=t,i=J$(),s=((v=i==null?void 0:i.apiBaseUrl)==null?void 0:v.replace(/\/+$/,""))??"",d={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};n&&(n instanceof Headers?n.forEach((w,_)=>{d[_]=w}):Array.isArray(n)?n.forEach(([w,_])=>{d[w]=_}):Object.assign(d,n));const c=await fetch(`${s}${OP}${e}`,{...o,headers:d});let m=null;try{m=await c.json()}catch{}if(!c.ok){const w=(b=m==null?void 0:m.error)==null?void 0:b.message;throw new xP(w||c.statusText||"Something went wrong",c.status,m)}return m}async function RP(){return Re("/me",{method:"GET",token:Oe()})}async function Mi(e){return Re("/me",{method:"PATCH",body:JSON.stringify(e),token:Oe()})}async function IP(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/members${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe()})}async function AP(e,t,r){const n=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await Re(n,{method:"PUT",token:Oe(),headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}async function TP(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await Re(r,{method:"DELETE",token:Oe(),headers:{"Content-Type":"application/json"}})}async function DP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return Re(r,{method:"POST",token:Oe(),headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function LP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return Re(r,{method:"POST",token:Oe(),headers:{"Content-Type":"application/json"}})}async function FP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/cancel`;return Re(r,{method:"POST",token:Oe(),headers:{"Content-Type":"application/json"}})}async function kP(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.status&&r.append("status",t.status),t.expired!==void 0&&r.append("expired",t.expired.toString()),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/invitations${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe()})}async function ul(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),n=`/roles${r?`?${r}`:""}`;return Re(n,{method:"GET",token:Oe()})}var NP=Object.defineProperty,MP=Object.getOwnPropertyDescriptor,nt=(e,t,r,n)=>{for(var o=n>1?void 0:n?MP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&NP(t,r,o),o};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=rt.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this.formData={avatar:"",email:"",phone:""},this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Mi({picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch{this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const n=t.firstElementChild;n&&n.hasAttribute("data-state")&&(this._attachAttributeObserver(n),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const n of r)if(n.type==="attributes"&&n.attributeName==="data-state"){const o=t.getAttribute("data-state");o==="open"?this.openAvatarEditor():o==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderDisplayRow(t,r,n){const o=this.layout===rt.COLUMN;return l`
|
|
2720
2720
|
<div
|
|
2721
2721
|
class=${Vt("pont-account-settings-display-row",o?"":"pont-grid pont-account-settings-account-grid pont-items-center")}
|
|
2722
2722
|
>
|
|
@@ -2937,7 +2937,7 @@
|
|
|
2937
2937
|
</pont-card-content>
|
|
2938
2938
|
</div>
|
|
2939
2939
|
</pont-card>
|
|
2940
|
-
`}createRenderRoot(){return this}};nt([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);nt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);nt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);nt([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);nt([a({type:String})],exports.PontAccountInfo.prototype,"otpVariant",2);nt([a({type:Number})],exports.PontAccountInfo.prototype,"otpLength",2);nt([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingEmail",2);nt([g()],exports.PontAccountInfo.prototype,"isVerifyingEmail",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingPhone",2);nt([g()],exports.PontAccountInfo.prototype,"isVerifyingPhone",2);nt([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);nt([g()],exports.PontAccountInfo.prototype,"isMobile",2);nt([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);nt([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);nt([g()],exports.PontAccountInfo.prototype,"formData",2);nt([pt({context:In,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=nt([p("pont-account-info")],exports.PontAccountInfo);var
|
|
2940
|
+
`}createRenderRoot(){return this}};nt([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);nt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);nt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);nt([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);nt([a({type:String})],exports.PontAccountInfo.prototype,"otpVariant",2);nt([a({type:Number})],exports.PontAccountInfo.prototype,"otpLength",2);nt([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingEmail",2);nt([g()],exports.PontAccountInfo.prototype,"isVerifyingEmail",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingPhone",2);nt([g()],exports.PontAccountInfo.prototype,"isVerifyingPhone",2);nt([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);nt([g()],exports.PontAccountInfo.prototype,"isMobile",2);nt([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);nt([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);nt([g()],exports.PontAccountInfo.prototype,"formData",2);nt([pt({context:In,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=nt([p("pont-account-info")],exports.PontAccountInfo);var BP=Object.defineProperty,UP=Object.getOwnPropertyDescriptor,Ie=(e,t,r,n)=>{for(var o=n>1?void 0:n?UP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&BP(t,r,o),o};exports.PontLocationInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=rt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r,n,o;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const i=await Mi({address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=i.address)==null?void 0:r.locality)??"",zoneInfo:i.zoneinfo??""},this.isEditing=!1}catch(i){console.error("Failed to update location info",i);let s="Failed to update location information. Please try again.";if(i instanceof Error&&"status"in i){const d=i;s=((o=(n=d.data)==null?void 0:n.error)==null?void 0:o.message)??d.message??s}else i instanceof Error&&(s=i.message);hl(s)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.locationInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r){return this.layout===rt.ROW?l`
|
|
2941
2941
|
<div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
|
|
2942
2942
|
<pont-typography-p
|
|
2943
2943
|
><div
|
|
@@ -3094,7 +3094,7 @@
|
|
|
3094
3094
|
${this.isEditing?this.renderFooter():null}
|
|
3095
3095
|
</div>
|
|
3096
3096
|
</pont-card>
|
|
3097
|
-
`}};Ie([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Ie([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Ie([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Ie([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Ie([pt({context:In,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Ie([g()],exports.PontLocationInfo.prototype,"isEditing",2);Ie([g()],exports.PontLocationInfo.prototype,"isSaving",2);Ie([g()],exports.PontLocationInfo.prototype,"formData",2);Ie([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Ie([p("pont-location-info")],exports.PontLocationInfo);var
|
|
3097
|
+
`}};Ie([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Ie([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Ie([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Ie([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Ie([pt({context:In,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Ie([g()],exports.PontLocationInfo.prototype,"isEditing",2);Ie([g()],exports.PontLocationInfo.prototype,"isSaving",2);Ie([g()],exports.PontLocationInfo.prototype,"formData",2);Ie([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Ie([p("pont-location-info")],exports.PontLocationInfo);var jP=Object.defineProperty,qP=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var o=n>1?void 0:n?qP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&jP(t,r,o),o};exports.PontPersonalInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=rt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData=this.personal,this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi({username:this.formData.username,given_name:this.formData.first,middle_name:this.formData.middle,family_name:this.formData.last,nickname:this.formData.nickname,gender:this.formData.gender,profile:this.formData.bio});this.personal={username:n.username??"",first:n.given_name??"",middle:n.middle_name??"",last:n.family_name??"",nickname:n.nickname??"",gender:n.gender??"",bio:n.profile??""},this.isEditing=!1}catch(n){console.error("Failed to update personal info",n);let o="Failed to update personal information. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}handleEdit(){this.isSaving||(this.formData={...this.personal},this.errors={},this.isEditing=!0)}handleCancel(){this.isEditing=!1,this.errors={}}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}createRenderRoot(){return this}renderControl(t){return t==="gender"?l`
|
|
3098
3098
|
<pont-select
|
|
3099
3099
|
.value=${this.formData.gender}
|
|
3100
3100
|
?disabled=${this.isSaving}
|
|
@@ -3243,7 +3243,7 @@
|
|
|
3243
3243
|
${this.isEditing?this.renderFooter():null}
|
|
3244
3244
|
</div>
|
|
3245
3245
|
</pont-card>
|
|
3246
|
-
`}};Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);Ae([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);Ae([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);Ae([pt({context:In,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);Ae([g()],exports.PontPersonalInfo.prototype,"isEditing",2);Ae([g()],exports.PontPersonalInfo.prototype,"isSaving",2);Ae([g()],exports.PontPersonalInfo.prototype,"formData",2);Ae([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=Ae([p("pont-personal-info")],exports.PontPersonalInfo);var
|
|
3246
|
+
`}};Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);Ae([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);Ae([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);Ae([pt({context:In,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);Ae([g()],exports.PontPersonalInfo.prototype,"isEditing",2);Ae([g()],exports.PontPersonalInfo.prototype,"isSaving",2);Ae([g()],exports.PontPersonalInfo.prototype,"formData",2);Ae([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=Ae([p("pont-personal-info")],exports.PontPersonalInfo);var zP=Object.defineProperty,VP=Object.getOwnPropertyDescriptor,Te=(e,t,r,n)=>{for(var o=n>1?void 0:n?VP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&zP(t,r,o),o};exports.PontUrlsInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=rt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={website:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi({website:this.formData.website});this.URLsInfo={website:n.website??""},this.isEditing=!1}catch(n){console.error("Failed to update URLs info",n);let o="Failed to update website. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.URLsInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r,n=!1){return this.layout===rt.ROW?l`
|
|
3247
3247
|
<div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
|
|
3248
3248
|
<pont-typography-p
|
|
3249
3249
|
><div
|
|
@@ -3392,7 +3392,7 @@
|
|
|
3392
3392
|
${this.isEditing?this.renderFooter():null}
|
|
3393
3393
|
</div>
|
|
3394
3394
|
</pont-card>
|
|
3395
|
-
`}};Te([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Te([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Te([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Te([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Te([pt({context:In,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Te([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Te([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Te([g()],exports.PontUrlsInfo.prototype,"formData",2);Te([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Te([p("pont-urls-info")],exports.PontUrlsInfo);var
|
|
3395
|
+
`}};Te([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Te([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Te([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Te([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Te([pt({context:In,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Te([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Te([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Te([g()],exports.PontUrlsInfo.prototype,"formData",2);Te([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Te([p("pont-urls-info")],exports.PontUrlsInfo);var HP=Object.defineProperty,GP=Object.getOwnPropertyDescriptor,Ot=(e,t,r,n)=>{for(var o=n>1?void 0:n?GP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&HP(t,r,o),o};exports.Profile=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.sidebarDisplayType=Ve.REGULAR,this.mode=sr==null?void 0:sr.PAGE,this.widgetsLayout=rt.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,n,o;return l`
|
|
3396
3396
|
<div class="pont-account-settings-section-stack">
|
|
3397
3397
|
<pont-account-info
|
|
3398
3398
|
.content=${(t=this.content)==null?void 0:t.account}
|
|
@@ -3418,11 +3418,11 @@
|
|
|
3418
3418
|
.layout=${this.widgetsLayout}
|
|
3419
3419
|
></pont-urls-info>
|
|
3420
3420
|
</div>
|
|
3421
|
-
`}};Ot([a({type:Object})],exports.Profile.prototype,"account",2);Ot([a({type:Object})],exports.Profile.prototype,"personal",2);Ot([a({type:Object})],exports.Profile.prototype,"location",2);Ot([a({type:Object})],exports.Profile.prototype,"urls",2);Ot([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);Ot([a({type:Object}),a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);Ot([a({type:String})],exports.Profile.prototype,"orientation",2);Ot([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);Ot([a({type:String})],exports.Profile.prototype,"mode",2);Ot([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);Ot([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);Ot([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=Ot([p("pont-profile")],exports.Profile);const Nn={vertical:"pont-account-settings-sidebar-vertical",horizontal:"pont-account-settings-sidebar-horizontal",horizontalBurger:"pont-account-settings-sidebar-horizontal-burger"},
|
|
3421
|
+
`}};Ot([a({type:Object})],exports.Profile.prototype,"account",2);Ot([a({type:Object})],exports.Profile.prototype,"personal",2);Ot([a({type:Object})],exports.Profile.prototype,"location",2);Ot([a({type:Object})],exports.Profile.prototype,"urls",2);Ot([a({type:Boolean})],exports.Profile.prototype,"showAvatarMenu",2);Ot([a({type:Object}),a({attribute:!1})],exports.Profile.prototype,"modalIcon",2);Ot([a({type:String})],exports.Profile.prototype,"orientation",2);Ot([a({type:String})],exports.Profile.prototype,"sidebarDisplayType",2);Ot([a({type:String})],exports.Profile.prototype,"mode",2);Ot([a({type:String})],exports.Profile.prototype,"widgetsLayout",2);Ot([a({type:Function})],exports.Profile.prototype,"toggleAvatarMenu",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarChange",2);Ot([a({type:Function})],exports.Profile.prototype,"onAvatarRemove",2);Ot([a({type:Object})],exports.Profile.prototype,"content",2);exports.Profile=Ot([p("pont-profile")],exports.Profile);const Nn={vertical:"pont-account-settings-sidebar-vertical",horizontal:"pont-account-settings-sidebar-horizontal",horizontalBurger:"pont-account-settings-sidebar-horizontal-burger"},KP="pont-account-settings-sidebar-burger-button pont-rounded-lg pont-cursor-pointer",WP="mobile-sidebar-drawer pont-account-settings-sidebar-mobile-drawer pont-transform pont-transition-all pont-duration-300 pont-ease-in-out",YP="mobile-sidebar-overlay pont-account-settings-sidebar-mobile-overlay pont-transition-opacity pont-duration-300 pont-ease-in-out";/**
|
|
3422
3422
|
* @license
|
|
3423
3423
|
* Copyright 2021 Google LLC
|
|
3424
3424
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3425
|
-
*/const Lh=Eo(class extends Ei{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(Zu(e),this.key=t),r}});var
|
|
3425
|
+
*/const Lh=Eo(class extends Ei{constructor(){super(...arguments),this.key=h}render(e,t){return this.key=e,t}update(e,[t,r]){return t!==this.key&&(Zu(e),this.key=t),r}});var QP=Object.defineProperty,ZP=Object.getOwnPropertyDescriptor,Zr=(e,t,r,n)=>{for(var o=n>1?void 0:n?ZP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&QP(t,r,o),o};let gr=class extends f{constructor(){super(...arguments),this.orientation=Rr.HORIZONTAL,this.displayType=Ve.REGULAR,this.mode=sr.PAGE,this.config={showIcons:!0},this.activeTab=me.PROFILE,this.isMenuOpen=!1}get isBurger(){return this.displayType===Ve.BURGER}get isVertical(){return this.orientation===Rr.VERTICAL}get isModal(){return this.mode===sr.MODAL}get sidebarKey(){return`${this.orientation}|${this.displayType}`}createRenderRoot(){return this}toggleMenu(){const e=this.closest('div[role="tab"]');e&&e.classList.toggle("pont-rotate-0"),this.isMenuOpen=!this.isMenuOpen,this.requestUpdate()}renderTabs(e){return Lh(this.sidebarKey,l`
|
|
3426
3426
|
<pont-tabs-list
|
|
3427
3427
|
data-burger=${this.isBurger}
|
|
3428
3428
|
data-orientation=${e?"vertical":"horizontal"}
|
|
@@ -3437,7 +3437,7 @@
|
|
|
3437
3437
|
`)}renderWatermark(){return l`<pont-watermark custom-id="pont-watermark"></pont-watermark>`}renderBurger(){return l`
|
|
3438
3438
|
<div class="pont-flex pont-justify-between pont-w-full">
|
|
3439
3439
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
3440
|
-
<div class="${
|
|
3440
|
+
<div class="${KP}" @click=${this.toggleMenu}>
|
|
3441
3441
|
${vP()}
|
|
3442
3442
|
</div>
|
|
3443
3443
|
<pont-typography-h part="burger-title-label" level="h3"
|
|
@@ -3458,7 +3458,7 @@
|
|
|
3458
3458
|
`}renderMobileDrawer(){return l`
|
|
3459
3459
|
<div
|
|
3460
3460
|
part="mobile-drawer"
|
|
3461
|
-
class="${Vt(
|
|
3461
|
+
class="${Vt(WP,this.isMenuOpen?"pont-translate-x-0 pont-opacity-100":"pont-translate-x-[-100%] pont-opacity-0")}"
|
|
3462
3462
|
>
|
|
3463
3463
|
<div class="pont-account-settings-sidebar-mobile-body">
|
|
3464
3464
|
<div class="pont-account-settings-sidebar-tab-list">
|
|
@@ -3481,7 +3481,7 @@
|
|
|
3481
3481
|
</div>
|
|
3482
3482
|
</div>
|
|
3483
3483
|
<div
|
|
3484
|
-
class="${
|
|
3484
|
+
class="${YP} ${this.isMenuOpen?"pont-block pont-opacity-100":"pont-hidden pont-opacity-0"}"
|
|
3485
3485
|
@click=${this.toggleMenu}
|
|
3486
3486
|
></div>
|
|
3487
3487
|
`}getSidebarContainerClass(){return this.isBurger&&this.isModal?Nn.horizontalBurger:this.isModal&&this.isVertical?`${Nn.vertical} pont-account-settings-sidebar-modal-margin`:this.isVertical?Nn.vertical:Nn.horizontal}render(){const e=!this.isVertical&&!this.isBurger;return l`
|
|
@@ -3499,7 +3499,7 @@
|
|
|
3499
3499
|
</div>
|
|
3500
3500
|
|
|
3501
3501
|
${this.isBurger?this.renderMobileDrawer():null}
|
|
3502
|
-
`}};Zr([a({type:String})],gr.prototype,"orientation",2);Zr([a({type:String})],gr.prototype,"displayType",2);Zr([a({type:String})],gr.prototype,"mode",2);Zr([a({type:Object})],gr.prototype,"config",2);Zr([a({type:String})],gr.prototype,"activeTab",2);Zr([g()],gr.prototype,"isMenuOpen",2);gr=Zr([p("pont-profile-sidebar")],gr);function Fh(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function ml(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Nh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Mh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Fh,window.__pontCoreSdk.closeAccountSettingsModal=ml,window.__pontCoreSdk.openMemberManagementModal=kh,window.__pontCoreSdk.closeMemberManagementModal=Nh,window.__pontCoreSdk.setLocales=Mh);var
|
|
3502
|
+
`}};Zr([a({type:String})],gr.prototype,"orientation",2);Zr([a({type:String})],gr.prototype,"displayType",2);Zr([a({type:String})],gr.prototype,"mode",2);Zr([a({type:Object})],gr.prototype,"config",2);Zr([a({type:String})],gr.prototype,"activeTab",2);Zr([g()],gr.prototype,"isMenuOpen",2);gr=Zr([p("pont-profile-sidebar")],gr);function Fh(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function ml(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Nh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Mh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Fh,window.__pontCoreSdk.closeAccountSettingsModal=ml,window.__pontCoreSdk.openMemberManagementModal=kh,window.__pontCoreSdk.closeMemberManagementModal=Nh,window.__pontCoreSdk.setLocales=Mh);var JP=Object.defineProperty,qt=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&JP(t,r,o),o};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.mobileDisplay=Ve.REGULAR,this.mode=sr.PAGE,this.widgetsLayout=rt.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=me.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const n=(i=r.target.files)==null?void 0:i[0];if(!n)return;const o=new FileReader;o.onload=()=>{this.account.avatar=o.result,this.requestUpdate()},o.readAsDataURL(n)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,n=this.querySelector("pont-account-info"),o=this.querySelector("pont-card");n!=null&&n.contains(r)||o!=null&&o.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===sr.MODAL}get isVerticalOrientation(){return this.orientation===Rr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Rr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ve.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ve.REGULAR:Ve.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(Pw,this.isModal?Sw:Cw,this.isModal?$w:ww,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=tt.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await RP(),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(n){console.error("[pont-account-settings] Failed loading user:",n)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<hc.xs?"xs":t<hc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
|
|
3503
3503
|
<div class="pont-account-settings-watermark-container">
|
|
3504
3504
|
<pont-watermark custom-id="pont-watermark"></pont-watermark>
|
|
3505
3505
|
</div>
|
|
@@ -3566,7 +3566,7 @@
|
|
|
3566
3566
|
${this.renderMainContent()}
|
|
3567
3567
|
</div>
|
|
3568
3568
|
</pont-modal>
|
|
3569
|
-
`:this.renderMainContent():h:l``}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([pt({context:Qr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:In}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var
|
|
3569
|
+
`:this.renderMainContent():h:l``}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([pt({context:Qr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:In}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var XP=Object.defineProperty,t1=Object.getOwnPropertyDescriptor,Bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?t1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&XP(t,r,o),o};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
|
|
3570
3570
|
Loading security settings...
|
|
3571
3571
|
</div>`:l`
|
|
3572
3572
|
<div class="pont-account-settings-security-panel">
|
|
@@ -3607,11 +3607,11 @@
|
|
|
3607
3607
|
</pont-button>
|
|
3608
3608
|
</pont-empty>
|
|
3609
3609
|
</div>
|
|
3610
|
-
`}createRenderRoot(){return this}};Bh([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=Bh([p("pont-security-settings")],exports.PontSecuritySettings);var
|
|
3610
|
+
`}createRenderRoot(){return this}};Bh([a({type:Boolean})],exports.PontSecuritySettings.prototype,"loading",2);exports.PontSecuritySettings=Bh([p("pont-security-settings")],exports.PontSecuritySettings);var e1=Object.defineProperty,r1=Object.getOwnPropertyDescriptor,Bi=(e,t,r,n)=>{for(var o=n>1?void 0:n?r1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&e1(t,r,o),o};exports.PontDivider=class extends f{constructor(){super(...arguments),this.seed=wt()}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontDivider.TAG}-${this.seed}`}render(){return l`
|
|
3611
3611
|
<pont-field-separator id="${this.rootId}" part="${exports.PontDivider.PARTS.root}">
|
|
3612
3612
|
${this.label??h}
|
|
3613
3613
|
</pont-field-separator>
|
|
3614
|
-
`}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${et}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Bi([a({type:String})],exports.PontDivider.prototype,"seed",2);Bi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Bi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Bi([p("pont-divider")],exports.PontDivider);var
|
|
3614
|
+
`}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${et}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Bi([a({type:String})],exports.PontDivider.prototype,"seed",2);Bi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Bi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Bi([p("pont-divider")],exports.PontDivider);var o1=Object.defineProperty,gl=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&o1(t,r,o),o};const $l=class $l extends f{constructor(){super(...arguments),this.totalPages=1,this.currentPage=1,this.hideGoTo=!1}createRenderRoot(){return this}get visiblePages(){if(this.totalPages<=0)return[];if(this.totalPages<=3)return Array.from({length:this.totalPages},(r,n)=>n+1);let t=Math.max(1,this.currentPage-1);return t+2>this.totalPages&&(t=this.totalPages-2),[t,t+1,t+2]}goTo(t){this.totalPages<=0||t===this.currentPage||t<1||t>this.totalPages||this.dispatchEvent(new CustomEvent("page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){const t=this.totalPages,r=this.currentPage,n=t>0,o=!n||r<=1,i=!n||r>=t,s=n?this.visiblePages:[];return l`
|
|
3615
3615
|
<nav
|
|
3616
3616
|
class="pont-flex pont-flex-wrap pont-items-center pont-justify-center pont-gap-1"
|
|
3617
3617
|
aria-label="Pagination"
|
|
@@ -3703,7 +3703,7 @@
|
|
|
3703
3703
|
:host {
|
|
3704
3704
|
display: block;
|
|
3705
3705
|
}
|
|
3706
|
-
`;let zr=$l;gl([a({type:Number})],zr.prototype,"totalPages");gl([a({type:Number})],zr.prototype,"currentPage");gl([a({type:Boolean})],zr.prototype,"hideGoTo");customElements.define("pont-paginator",zr);class
|
|
3706
|
+
`;let zr=$l;gl([a({type:Number})],zr.prototype,"totalPages");gl([a({type:Number})],zr.prototype,"currentPage");gl([a({type:Boolean})],zr.prototype,"hideGoTo");customElements.define("pont-paginator",zr);class n1 extends f{createRenderRoot(){return this}generateBlockProps(t){switch(t){case"total-members":case"active-members":return{title:"Active Members",content:"100",icon:yP};case"pending-invites":return{title:"Pending Invites",content:"8",icon:Th};case"inactive-members":return{title:"Inactive Members",content:"1",icon:_P}}}statisticBlock({title:t,content:r,icon:n}){return l` <pont-card>
|
|
3707
3707
|
<pont-card-header>
|
|
3708
3708
|
<div class="pont-statistic-block-header">
|
|
3709
3709
|
<pont-typography-muted>${t}</pont-typography-muted>
|
|
@@ -3720,7 +3720,7 @@
|
|
|
3720
3720
|
${this.statisticBlock(this.generateBlockProps("pending-invites"))}
|
|
3721
3721
|
${this.statisticBlock(this.generateBlockProps("inactive-members"))}
|
|
3722
3722
|
</div>
|
|
3723
|
-
`}}customElements.define("pont-monitoring-cards",
|
|
3723
|
+
`}}customElements.define("pont-monitoring-cards",n1);var i1=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,Yt=(e,t,r,n)=>{for(var o=n>1?void 0:n?s1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&i1(t,r,o),o};let Bt=class extends f{constructor(){super(...arguments),this.drawerId="pont-member-invite",this.organizationId="",this.emails=[],this.roles=[],this.availableRoles=[],this.expiryDays="7",this.customMessage="",this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await ul(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onEmailsChange(e){this.emails=e,this.errors={...this.errors,emails:void 0}}onRolesChange(e){this.roles=e,this.errors={...this.errors,roles:void 0}}handleExpiryInput(e){this.expiryDays=e.target.value}handleMessageInput(e){this.customMessage=e.target.value}async handleSend(){var r;const e={};if(this.emails.length===0&&(e.emails="Please enter at least one email address."),this.roles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}const t={emails:this.emails,roles:this.roles,invited_by:(r=tt.getAuthenticatedUser())==null?void 0:r.sub,message:this.customMessage||void 0};this.isLoading=!0;try{const n=await DP(this.organizationId,t);this.emails=[],this.roles=[],this.expiryDays="7",this.customMessage="",this.errors={},window.dispatchEvent(new CustomEvent("invite-members-success",{detail:{organizationId:this.organizationId,response:n}})),this.close()}catch(n){console.error("Failed to send invites:",n),this.errors={...this.errors,emails:"Failed to send invites. Please try again."}}finally{this.isLoading=!1}}render(){return l`
|
|
3724
3724
|
<pont-sidedrawer
|
|
3725
3725
|
id=${this.drawerId}
|
|
3726
3726
|
side="right"
|
|
@@ -3859,7 +3859,7 @@
|
|
|
3859
3859
|
</div>
|
|
3860
3860
|
</div>
|
|
3861
3861
|
</pont-sidedrawer>
|
|
3862
|
-
`}};Yt([a({type:String})],Bt.prototype,"drawerId",2);Yt([a({type:String})],Bt.prototype,"organizationId",2);Yt([g()],Bt.prototype,"emails",2);Yt([g()],Bt.prototype,"roles",2);Yt([g()],Bt.prototype,"availableRoles",2);Yt([g()],Bt.prototype,"expiryDays",2);Yt([g()],Bt.prototype,"customMessage",2);Yt([g()],Bt.prototype,"errors",2);Yt([g()],Bt.prototype,"open",2);Yt([g()],Bt.prototype,"isLoading",2);Yt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Yt([p("pont-invite-members-form")],Bt);var
|
|
3862
|
+
`}};Yt([a({type:String})],Bt.prototype,"drawerId",2);Yt([a({type:String})],Bt.prototype,"organizationId",2);Yt([g()],Bt.prototype,"emails",2);Yt([g()],Bt.prototype,"roles",2);Yt([g()],Bt.prototype,"availableRoles",2);Yt([g()],Bt.prototype,"expiryDays",2);Yt([g()],Bt.prototype,"customMessage",2);Yt([g()],Bt.prototype,"errors",2);Yt([g()],Bt.prototype,"open",2);Yt([g()],Bt.prototype,"isLoading",2);Yt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Yt([p("pont-invite-members-form")],Bt);var a1=Object.defineProperty,l1=Object.getOwnPropertyDescriptor,De=(e,t,r,n)=>{for(var o=n>1?void 0:n?l1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&a1(t,r,o),o};let se=class extends f{constructor(){super(...arguments),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.selectedRoles=[],this.availableRoles=[],this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(n=>n.key)),this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}updated(e){e.has("member")&&this.member&&(console.log(this.member),this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await ul(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onRolesChange(e){this.selectedRoles=e,this.errors={...this.errors,roles:void 0}}async handleSave(){var r;const e={};if(this.selectedRoles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}if(!((r=this.member)!=null&&r.user.id)){console.error("User ID is required");return}const t={roles:this.selectedRoles};this.isLoading=!0;try{const n=await AP(this.organizationId,this.member.user.id,t);console.log("Member roles updated successfully:",n),this.errors={},window.dispatchEvent(new CustomEvent("update-members-role",{detail:{organizationId:this.organizationId,userId:this.member.user.id,roles:this.selectedRoles,response:n},bubbles:!0,composed:!0})),this.close()}catch(n){console.error("Failed to update member roles:",n),this.errors={...this.errors,roles:"Failed to update member roles. Please try again."}}finally{this.isLoading=!1}}render(){var e;return l`
|
|
3863
3863
|
<pont-sidedrawer
|
|
3864
3864
|
id=${this.drawerId}
|
|
3865
3865
|
side="right"
|
|
@@ -3955,7 +3955,7 @@
|
|
|
3955
3955
|
</div>
|
|
3956
3956
|
</div>
|
|
3957
3957
|
</pont-sidedrawer>
|
|
3958
|
-
`}};De([a({type:String})],se.prototype,"drawerId",2);De([a({type:String})],se.prototype,"organizationId",2);De([a({type:Object})],se.prototype,"member",2);De([g()],se.prototype,"selectedRoles",2);De([g()],se.prototype,"availableRoles",2);De([g()],se.prototype,"errors",2);De([g()],se.prototype,"open",2);De([g()],se.prototype,"isLoading",2);De([g()],se.prototype,"isLoadingRoles",2);se=De([p("pont-manage-roles-form")],se);var
|
|
3958
|
+
`}};De([a({type:String})],se.prototype,"drawerId",2);De([a({type:String})],se.prototype,"organizationId",2);De([a({type:Object})],se.prototype,"member",2);De([g()],se.prototype,"selectedRoles",2);De([g()],se.prototype,"availableRoles",2);De([g()],se.prototype,"errors",2);De([g()],se.prototype,"open",2);De([g()],se.prototype,"isLoading",2);De([g()],se.prototype,"isLoadingRoles",2);se=De([p("pont-manage-roles-form")],se);var d1=Object.defineProperty,c1=Object.getOwnPropertyDescriptor,le=(e,t,r,n)=>{for(var o=n>1?void 0:n?c1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&d1(t,r,o),o};let Gt=class extends f{constructor(){super(...arguments),this.open=!1,this.title="",this.warningText="",this.confirmLabel="Confirm",this.cancelLabel="Cancel",this.variant="default",this.isLoading=!1}createRenderRoot(){return this}handleClose(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-closed",{bubbles:!0})))}handleCancel(){var e;this.isLoading||(this.open=!1,(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("modal-cancelled",{bubbles:!0})))}async handleConfirm(){var e;if(!this.isLoading)try{this.isLoading=!0;const t=(e=this.onConfirm)==null?void 0:e.call(this);t instanceof Promise&&await t,this.open=!1,this.dispatchEvent(new CustomEvent("modal-confirmed",{bubbles:!0}))}catch(t){console.error("Action failed:",t),this.dispatchEvent(new CustomEvent("modal-error",{bubbles:!0,detail:{error:t}}))}finally{this.isLoading=!1}}render(){return l`
|
|
3959
3959
|
<pont-modal
|
|
3960
3960
|
part="no_min_width"
|
|
3961
3961
|
.isOpen=${this.open}
|
|
@@ -4003,7 +4003,7 @@
|
|
|
4003
4003
|
</div>
|
|
4004
4004
|
</div>
|
|
4005
4005
|
</pont-modal>
|
|
4006
|
-
`}};le([a({type:Boolean})],Gt.prototype,"open",2);le([a({type:String})],Gt.prototype,"title",2);le([a({attribute:!1})],Gt.prototype,"description",2);le([a({type:String})],Gt.prototype,"warningText",2);le([a({type:String})],Gt.prototype,"confirmLabel",2);le([a({type:String})],Gt.prototype,"cancelLabel",2);le([a({type:String})],Gt.prototype,"variant",2);le([g()],Gt.prototype,"isLoading",2);le([a({attribute:!1})],Gt.prototype,"onConfirm",2);le([a({attribute:!1})],Gt.prototype,"onCancel",2);Gt=le([p("pont-members-action-modal")],Gt);var
|
|
4006
|
+
`}};le([a({type:Boolean})],Gt.prototype,"open",2);le([a({type:String})],Gt.prototype,"title",2);le([a({attribute:!1})],Gt.prototype,"description",2);le([a({type:String})],Gt.prototype,"warningText",2);le([a({type:String})],Gt.prototype,"confirmLabel",2);le([a({type:String})],Gt.prototype,"cancelLabel",2);le([a({type:String})],Gt.prototype,"variant",2);le([g()],Gt.prototype,"isLoading",2);le([a({attribute:!1})],Gt.prototype,"onConfirm",2);le([a({attribute:!1})],Gt.prototype,"onCancel",2);Gt=le([p("pont-members-action-modal")],Gt);var p1=Object.defineProperty,h1=Object.getOwnPropertyDescriptor,de=(e,t,r,n)=>{for(var o=n>1?void 0:n?h1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&p1(t,r,o),o};let Kt=class extends f{constructor(){super(...arguments),this.members=[],this.membersLoading=!1,this.searchTerm="",this.memberFilters={roles:[]},this.availableRoles=[],this.membersPage=1,this.membersTotalPages=0,this.membersTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchMembersSearchChange(e){this.dispatchEvent(new CustomEvent("members-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleMembersSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchMembersSearchChange(this.searchTerm)},300)}handleMembersPageChange(e){this.dispatchEvent(new CustomEvent("members-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("members-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("members-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("members-filter-change",{detail:{roles:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("members-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("members-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchMemberAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}filterData(e,t){return t.trim()?e.filter(r=>Object.values(r).some(n=>typeof n=="string"?n.toLowerCase().includes(t.toLowerCase()):!1)):e}transformMemberWithName(e){var t,r,n,o;return{...e,name:((t=e.user)==null?void 0:t.name)||((r=e.user)==null?void 0:r.email)||"Unknown User",email:((n=e.user)==null?void 0:n.email)||"",avatar_url:((o=e.user)==null?void 0:o.picture)||""}}getSelectedFiltersDisplay(){var t;const e=[];return(t=this.memberFilters.roles)!=null&&t.length&&this.memberFilters.roles.forEach(r=>{var o;const n=((o=this.availableRoles.find(i=>i.value===r))==null?void 0:o.label)||r;e.push({name:"roles",value:r,label:n})}),e}getMemberTableConfig(e){const t={name:(o,i)=>{var d,c,m,v;if(e)return l`
|
|
4007
4007
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
4008
4008
|
<pont-skeleton
|
|
4009
4009
|
class="pont-h-10 pont-w-10 pont-rounded-full"
|
|
@@ -4198,7 +4198,7 @@
|
|
|
4198
4198
|
</div>
|
|
4199
4199
|
</div>
|
|
4200
4200
|
`}
|
|
4201
|
-
`}};de([a({attribute:!1})],Kt.prototype,"members",2);de([a({type:Boolean,attribute:!1})],Kt.prototype,"membersLoading",2);de([a({type:String})],Kt.prototype,"searchTerm",2);de([a({type:Object,attribute:!1})],Kt.prototype,"memberFilters",2);de([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);de([a({type:Number})],Kt.prototype,"membersPage",2);de([a({type:Number})],Kt.prototype,"membersTotalPages",2);de([a({type:Number})],Kt.prototype,"membersTotal",2);de([a({type:Number})],Kt.prototype,"rowsPerPage",2);de([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=de([p("pont-member-management-members-panel")],Kt);var
|
|
4201
|
+
`}};de([a({attribute:!1})],Kt.prototype,"members",2);de([a({type:Boolean,attribute:!1})],Kt.prototype,"membersLoading",2);de([a({type:String})],Kt.prototype,"searchTerm",2);de([a({type:Object,attribute:!1})],Kt.prototype,"memberFilters",2);de([a({type:Array,attribute:!1})],Kt.prototype,"availableRoles",2);de([a({type:Number})],Kt.prototype,"membersPage",2);de([a({type:Number})],Kt.prototype,"membersTotalPages",2);de([a({type:Number})],Kt.prototype,"membersTotal",2);de([a({type:Number})],Kt.prototype,"rowsPerPage",2);de([g()],Kt.prototype,"_searchDebounceTimer",2);Kt=de([p("pont-member-management-members-panel")],Kt);var u1=Object.defineProperty,m1=Object.getOwnPropertyDescriptor,Qt=(e,t,r,n)=>{for(var o=n>1?void 0:n?m1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&u1(t,r,o),o};let Ut=class extends f{constructor(){super(...arguments),this.invitations=[],this.invitationsLoading=!1,this.searchTerm="",this.invitationFilters={roles:[],status:[]},this.availableRoles=[],this.statusOptions=[],this.invitationsPage=1,this.invitationsTotalPages=0,this.invitationsTotal=0,this.rowsPerPage=5}createRenderRoot(){return this}dispatchInvitationsSearchChange(e){this.dispatchEvent(new CustomEvent("invitations-search-change",{detail:{searchTerm:e},bubbles:!0,composed:!0}))}handleInvitationsSearchChange(e){const t=e.target;this.searchTerm=t.value,this._searchDebounceTimer&&window.clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=window.setTimeout(()=>{this._searchDebounceTimer=void 0,this.dispatchInvitationsSearchChange(this.searchTerm)},300)}handleInvitationsPageChange(e){this.dispatchEvent(new CustomEvent("invitations-page-change",{detail:{page:e.detail.page},bubbles:!0,composed:!0}))}handleRowsPerPageChange(e){const t=parseInt(e.target.value,10);this.dispatchEvent(new CustomEvent("invitations-rows-per-page-change",{detail:{rowsPerPage:t},bubbles:!0,composed:!0}))}handleRefresh(){this.dispatchEvent(new CustomEvent("invitations-refresh",{bubbles:!0,composed:!0}))}handleRolesChange(e){this.dispatchEvent(new CustomEvent("invitations-filter-change",{detail:{roles:e.detail.selected,status:this.invitationFilters.status},bubbles:!0,composed:!0}))}handleStatusChange(e){this.dispatchEvent(new CustomEvent("invitations-filter-change",{detail:{...this.invitationFilters,status:e.detail.selected},bubbles:!0,composed:!0}))}clearFilters(){this.dispatchEvent(new CustomEvent("invitations-clear-filters",{bubbles:!0,composed:!0}))}removeFilter(e){this.dispatchEvent(new CustomEvent("invitations-remove-filter",{detail:{filterValue:e},bubbles:!0,composed:!0}))}dispatchInvitationAction(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}getSelectedFiltersDisplay(){var t,r;const e=[];return(t=this.invitationFilters.roles)!=null&&t.length&&this.invitationFilters.roles.forEach(n=>{var i;const o=((i=this.availableRoles.find(s=>s.value===n))==null?void 0:i.label)||n;e.push({name:"roles",value:n,label:o})}),(r=this.invitationFilters.status)!=null&&r.length&&this.invitationFilters.status.forEach(n=>{var i;const o=((i=this.statusOptions.find(s=>s.value===n))==null?void 0:i.label)||n;e.push({name:"status",value:n,label:o})}),e}getInvitationTableConfig(e){const t={invitee_email:o=>e?l`
|
|
4202
4202
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
4203
4203
|
<pont-skeleton
|
|
4204
4204
|
class="pont-h-10 pont-w-10 pont-rounded-full"
|
|
@@ -4406,7 +4406,7 @@
|
|
|
4406
4406
|
</div>
|
|
4407
4407
|
</div>
|
|
4408
4408
|
`}
|
|
4409
|
-
`}};Qt([a({attribute:!1})],Ut.prototype,"invitations",2);Qt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Qt([a({type:String})],Ut.prototype,"searchTerm",2);Qt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Qt([a({type:Number})],Ut.prototype,"invitationsPage",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Qt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Qt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Qt([p("pont-member-management-invitations-panel")],Ut);var or=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(or||{});function m1(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Mn="2026-08-05T10:00:00Z",Bn="2026-08-04T10:00:00Z",g1=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:Mn,last_active_at:Mn,created_at:Mn,updated_at:Mn,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Bn,last_active_at:Bn,created_at:Bn,updated_at:Bn,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function f1(e){let t=[...g1];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(m=>d.includes(m.key)))}const r=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,o=(r-1)*n,i=o+n;return{data:t.slice(o,i),object:"list",pagination:{page:r,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}const v1=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function b1(e){let t=[...v1];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(m=>m.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(m=>m.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const n=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,i=(n-1)*o,s=i+o;return{data:t.slice(i,s),object:"list",pagination:{page:n,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}var y1=Object.defineProperty,V=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&y1(t,r,o),o};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=m1({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await ul(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,n,o){try{this.membersLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=f1(i):d=await RP(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,n,o){try{this.invitationsLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=b1(i):c=await FP(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(n=>n!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(n=>n!==r),status:this.invitationFilters.status.filter(n=>n!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var n,o;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
|
|
4409
|
+
`}};Qt([a({attribute:!1})],Ut.prototype,"invitations",2);Qt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Qt([a({type:String})],Ut.prototype,"searchTerm",2);Qt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Qt([a({type:Number})],Ut.prototype,"invitationsPage",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Qt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Qt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Qt([p("pont-member-management-invitations-panel")],Ut);var or=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(or||{});function g1(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Mn="2026-08-05T10:00:00Z",Bn="2026-08-04T10:00:00Z",f1=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:Mn,last_active_at:Mn,created_at:Mn,updated_at:Mn,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Bn,last_active_at:Bn,created_at:Bn,updated_at:Bn,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function v1(e){let t=[...f1];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(m=>d.includes(m.key)))}const r=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,o=(r-1)*n,i=o+n;return{data:t.slice(o,i),object:"list",pagination:{page:r,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}const b1=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function y1(e){let t=[...b1];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(m=>m.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(m=>m.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const n=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,i=(n-1)*o,s=i+o;return{data:t.slice(i,s),object:"list",pagination:{page:n,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}var _1=Object.defineProperty,V=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&_1(t,r,o),o};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=g1({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await ul(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,n,o){try{this.membersLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=v1(i):d=await IP(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,n,o){try{this.invitationsLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=y1(i):c=await kP(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(n=>n!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(n=>n!==r),status:this.invitationFilters.status.filter(n=>n!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var n,o;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
|
|
4410
4410
|
<p part="description">
|
|
4411
4411
|
Are you sure you want to suspend
|
|
4412
4412
|
<span part="highlight-name"
|
|
@@ -4422,19 +4422,19 @@
|
|
|
4422
4422
|
>
|
|
4423
4423
|
from this organization?
|
|
4424
4424
|
</p>
|
|
4425
|
-
`,confirmLabel:"Remove User",variant:"danger",warningText:"This member will be permanently removed from the organization and will immediately lose access to all projects, billing, and shared resources. They will need to be re-invited to regain access.",onConfirm:async()=>{await
|
|
4425
|
+
`,confirmLabel:"Remove User",variant:"danger",warningText:"This member will be permanently removed from the organization and will immediately lose access to all projects, billing, and shared resources. They will need to be re-invited to regain access.",onConfirm:async()=>{await TP(this.organizationId,r.user.id),this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}})}handleResendInvitation(t){const r=t.detail;this.openActionModal({title:"Resend Invitation",description:l`
|
|
4426
4426
|
<p part="description">
|
|
4427
4427
|
Are you sure you want to resend this invitation to
|
|
4428
4428
|
<span part="highlight-name">${r.invitee_email}</span>
|
|
4429
4429
|
?
|
|
4430
4430
|
</p>
|
|
4431
|
-
`,confirmLabel:"Resend",variant:"default",onConfirm:async()=>{await
|
|
4431
|
+
`,confirmLabel:"Resend",variant:"default",onConfirm:async()=>{await LP(this.organizationId,r.id),this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}})}handleCancelInvitation(t){const r=t.detail;this.openActionModal({title:"Cancel Invitation",description:l`
|
|
4432
4432
|
<p part="description">
|
|
4433
4433
|
Are you sure you want to cancel the invitation for
|
|
4434
4434
|
<span part="highlight-name">${r.invitee_email}</span>
|
|
4435
4435
|
?
|
|
4436
4436
|
</p>
|
|
4437
|
-
`,confirmLabel:"Cancel Invitation",variant:"danger",warningText:"This invitation will be permanently revoked and the recipient will lose access to join the organization.",onConfirm:async()=>{await
|
|
4437
|
+
`,confirmLabel:"Cancel Invitation",variant:"danger",warningText:"This invitation will be permanently revoked and the recipient will lose access to join the organization.",onConfirm:async()=>{await FP(this.organizationId,r.id),this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}})}renderContent(){return l`
|
|
4438
4438
|
<div class="pont-member-management-shell">
|
|
4439
4439
|
<div>
|
|
4440
4440
|
<div class="pont-flex pont-flex-col pont-gap-8 pont-w-full">
|
|
@@ -4569,7 +4569,7 @@
|
|
|
4569
4569
|
>
|
|
4570
4570
|
${this.renderContent()}
|
|
4571
4571
|
</pont-modal>
|
|
4572
|
-
`:h:this.renderContent()}createRenderRoot(){return this}}V([a({type:String})],j.prototype,"mode");V([a({type:String})],j.prototype,"title");V([a({type:String})],j.prototype,"description");V([a({type:String})],j.prototype,"organizationId");V([g()],j.prototype,"isOpen");V([g()],j.prototype,"monitoringFlag");V([g()],j.prototype,"membersSearchTerm");V([g()],j.prototype,"invitationsSearchTerm");V([g()],j.prototype,"members");V([g()],j.prototype,"invitations");V([g()],j.prototype,"membersLoading");V([g()],j.prototype,"invitationsLoading");V([g()],j.prototype,"useMockData");V([g()],j.prototype,"membersPage");V([g()],j.prototype,"membersTotalPages");V([g()],j.prototype,"invitationsPage");V([g()],j.prototype,"invitationsTotalPages");V([g()],j.prototype,"membersTotal");V([g()],j.prototype,"invitationsTotal");V([g()],j.prototype,"rowsPerPage");V([a({type:String})],j.prototype,"inviteDrawerId");V([g()],j.prototype,"availableRoles");V([g()],j.prototype,"isLoadingRoles");V([g()],j.prototype,"memberFilters");V([g()],j.prototype,"invitationFilters");V([g()],j.prototype,"selectedMember");V([g()],j.prototype,"actionModalOpen");V([g()],j.prototype,"actionModalConfig");V([a({type:String})],j.prototype,"manageRolesDrawerId");customElements.define("pont-member-management",j);var
|
|
4572
|
+
`:h:this.renderContent()}createRenderRoot(){return this}}V([a({type:String})],j.prototype,"mode");V([a({type:String})],j.prototype,"title");V([a({type:String})],j.prototype,"description");V([a({type:String})],j.prototype,"organizationId");V([g()],j.prototype,"isOpen");V([g()],j.prototype,"monitoringFlag");V([g()],j.prototype,"membersSearchTerm");V([g()],j.prototype,"invitationsSearchTerm");V([g()],j.prototype,"members");V([g()],j.prototype,"invitations");V([g()],j.prototype,"membersLoading");V([g()],j.prototype,"invitationsLoading");V([g()],j.prototype,"useMockData");V([g()],j.prototype,"membersPage");V([g()],j.prototype,"membersTotalPages");V([g()],j.prototype,"invitationsPage");V([g()],j.prototype,"invitationsTotalPages");V([g()],j.prototype,"membersTotal");V([g()],j.prototype,"invitationsTotal");V([g()],j.prototype,"rowsPerPage");V([a({type:String})],j.prototype,"inviteDrawerId");V([g()],j.prototype,"availableRoles");V([g()],j.prototype,"isLoadingRoles");V([g()],j.prototype,"memberFilters");V([g()],j.prototype,"invitationFilters");V([g()],j.prototype,"selectedMember");V([g()],j.prototype,"actionModalOpen");V([g()],j.prototype,"actionModalConfig");V([a({type:String})],j.prototype,"manageRolesDrawerId");customElements.define("pont-member-management",j);var w1=Object.defineProperty,$1=Object.getOwnPropertyDescriptor,Ui=(e,t,r,n)=>{for(var o=n>1?void 0:n?$1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&w1(t,r,o),o};exports.PreviewComponent=class extends f{constructor(){super(...arguments),this.loading=!1,this.renderSpec=null,this.branding=Uo}createRenderRoot(){return this}render(){return l`
|
|
4573
4573
|
${this.loading?l`<div class="pont-p-8 pont-text-center">Loading...</div>`:l`
|
|
4574
4574
|
<pont-provider>
|
|
4575
4575
|
<signed-out>
|
|
@@ -4581,13 +4581,13 @@
|
|
|
4581
4581
|
</signed-out>
|
|
4582
4582
|
</pont-provider>
|
|
4583
4583
|
`}
|
|
4584
|
-
`}};Ui([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Ui([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Ui([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Ui([p("pont-preview")],exports.PreviewComponent);var
|
|
4584
|
+
`}};Ui([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Ui([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Ui([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Ui([p("pont-preview")],exports.PreviewComponent);var P1=Object.defineProperty,C1=Object.getOwnPropertyDescriptor,ji=(e,t,r,n)=>{for(var o=n>1?void 0:n?C1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&P1(t,r,o),o};exports.PontSignIn=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signin-flow-passkey"),this.tryRemoveFallback()}catch(t){console.error("[pont-signin] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
|
|
4585
4585
|
.renderSpec=${this.renderSpec}
|
|
4586
4586
|
.branding=${this.branding}
|
|
4587
|
-
></pont-layout>`:l``}};ji([pt({context:cl,subscribe:!0})],exports.PontSignIn.prototype,"renderSpec",2);ji([pt({context:On,subscribe:!0})],exports.PontSignIn.prototype,"branding",2);ji([pt({context:pl,subscribe:!0})],exports.PontSignIn.prototype,"locales",2);exports.PontSignIn=ji([p("pont-signin")],exports.PontSignIn);var
|
|
4587
|
+
></pont-layout>`:l``}};ji([pt({context:cl,subscribe:!0})],exports.PontSignIn.prototype,"renderSpec",2);ji([pt({context:On,subscribe:!0})],exports.PontSignIn.prototype,"branding",2);ji([pt({context:pl,subscribe:!0})],exports.PontSignIn.prototype,"locales",2);exports.PontSignIn=ji([p("pont-signin")],exports.PontSignIn);var S1=Object.defineProperty,E1=Object.getOwnPropertyDescriptor,qi=(e,t,r,n)=>{for(var o=n>1?void 0:n?E1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&S1(t,r,o),o};exports.PontSignUp=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signup-flow"),this.tryRemoveFallback()}catch(t){console.error("[pont-signup] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
|
|
4588
4588
|
.renderSpec=${this.renderSpec}
|
|
4589
4589
|
.branding=${this.branding}
|
|
4590
|
-
></pont-layout>`:l``}};qi([pt({context:cl,subscribe:!0})],exports.PontSignUp.prototype,"renderSpec",2);qi([pt({context:On,subscribe:!0})],exports.PontSignUp.prototype,"branding",2);qi([pt({context:pl,subscribe:!0})],exports.PontSignUp.prototype,"locales",2);exports.PontSignUp=qi([p("pont-signup")],exports.PontSignUp);var
|
|
4590
|
+
></pont-layout>`:l``}};qi([pt({context:cl,subscribe:!0})],exports.PontSignUp.prototype,"renderSpec",2);qi([pt({context:On,subscribe:!0})],exports.PontSignUp.prototype,"branding",2);qi([pt({context:pl,subscribe:!0})],exports.PontSignUp.prototype,"locales",2);exports.PontSignUp=qi([p("pont-signup")],exports.PontSignUp);var x1=Object.defineProperty,Le=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&x1(t,r,o),o};class zi extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:n}=this.user||{};return l`
|
|
4591
4591
|
<div
|
|
4592
4592
|
class=${Vt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
|
|
4593
4593
|
>
|
|
@@ -4700,7 +4700,7 @@
|
|
|
4700
4700
|
</pont-dropdown-menu-group>
|
|
4701
4701
|
</pont-dropdown-menu-content>
|
|
4702
4702
|
</pont-dropdown-menu>
|
|
4703
|
-
`}_navigate(t){console.log("Navigate to:",t),window.location.href=t}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(n){console.error("[pont-nav-user] menu item click handler failed",n)}}}Le([a({type:String})],Fe.prototype,"accountSettingsPath");Le([a({attribute:!1})],Fe.prototype,"menuItems");Le([pt({context:Qr,subscribe:!0}),a({attribute:!1})],Fe.prototype,"auth");Le([g()],Fe.prototype,"user");Le([g()],Fe.prototype,"signedIn");Le([g()],Fe.prototype,"isLoading");Le([g()],Fe.prototype,"_itemStates");Le([g()],Fe.prototype,"_subMenuOpen");customElements.define("pont-nav-user",Fe);var
|
|
4703
|
+
`}_navigate(t){console.log("Navigate to:",t),window.location.href=t}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(n){console.error("[pont-nav-user] menu item click handler failed",n)}}}Le([a({type:String})],Fe.prototype,"accountSettingsPath");Le([a({attribute:!1})],Fe.prototype,"menuItems");Le([pt({context:Qr,subscribe:!0}),a({attribute:!1})],Fe.prototype,"auth");Le([g()],Fe.prototype,"user");Le([g()],Fe.prototype,"signedIn");Le([g()],Fe.prototype,"isLoading");Le([g()],Fe.prototype,"_itemStates");Le([g()],Fe.prototype,"_subMenuOpen");customElements.define("pont-nav-user",Fe);var O1=Object.defineProperty,R1=Object.getOwnPropertyDescriptor,Uh=(e,t,r,n)=>{for(var o=n>1?void 0:n?R1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&O1(t,r,o),o};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Uh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Uh([p("pont-hint")],exports.PontHint);var I1=Object.defineProperty,A1=Object.getOwnPropertyDescriptor,ke=(e,t,r,n)=>{for(var o=n>1?void 0:n?A1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&I1(t,r,o),o};const T1=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;exports.MultiEmailInput=class extends f{constructor(){super(...arguments),this.label="",this.value=[],this.placeholder="Enter email addresses",this.disabled=!1,this.maxEmails=50,this.className="",this.inputValue="",this.error=null}createRenderRoot(){return this}validateEmail(t){return T1.test(t.trim())}addEmails(t){const r=[],n=[];for(const o of t){const i=o.trim();i&&(this.validateEmail(i)?!this.value.includes(i)&&!r.includes(i)&&r.push(i):n.push(i))}if(r.length>0){const o=[...this.value,...r].slice(0,this.maxEmails);this.value=o,this.inputValue="",this.error=null,o.length>=this.maxEmails&&(this.error=`Maximum ${this.maxEmails} emails allowed`),this.notifyChange(o)}n.length>0&&(this.error=`Invalid email${n.length>1?"s":""}: ${n.join(", ")}`)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("emails-changed",{detail:{emails:t},bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.error&&this.inputValue!==""&&(this.error=null),["Enter",",",";"," "].includes(t.key)){t.preventDefault(),this.inputValue.trim()&&this.addEmails([this.inputValue]);return}if(t.key==="Backspace"&&!this.inputValue&&this.value.length>0){const r=this.value.slice(0,-1);this.value=r,this.error=null,this.notifyChange(r)}}handlePaste(t){var o;t.preventDefault();const n=(((o=t.clipboardData)==null?void 0:o.getData("text"))??"").split(/[;,\n\s]+/).map(i=>i.trim()).filter(Boolean);this.addEmails(n)}handleBlur(){this.inputValue.trim()&&this.addEmails([this.inputValue])}removeEmail(t){const r=this.value.filter(n=>n!==t);this.value=r,this.error=null,this.notifyChange(r)}render(){const t=this.disabled||this.value.length>=this.maxEmails;return l`
|
|
4704
4704
|
<div class="pont-space-y-2 ${this.className}">
|
|
4705
4705
|
${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
|
|
4706
4706
|
|
|
@@ -4753,7 +4753,7 @@
|
|
|
4753
4753
|
</pont-typography-muted>`}
|
|
4754
4754
|
`}
|
|
4755
4755
|
</div>
|
|
4756
|
-
`}};ke([a({type:String})],exports.MultiEmailInput.prototype,"label",2);ke([a({type:Array})],exports.MultiEmailInput.prototype,"value",2);ke([a({attribute:!1})],exports.MultiEmailInput.prototype,"onChange",2);ke([a({type:String})],exports.MultiEmailInput.prototype,"placeholder",2);ke([a({type:Boolean})],exports.MultiEmailInput.prototype,"disabled",2);ke([a({type:Number})],exports.MultiEmailInput.prototype,"maxEmails",2);ke([a({type:String})],exports.MultiEmailInput.prototype,"className",2);ke([g()],exports.MultiEmailInput.prototype,"inputValue",2);ke([g()],exports.MultiEmailInput.prototype,"error",2);exports.MultiEmailInput=ke([p("pont-multi-email-input")],exports.MultiEmailInput);var
|
|
4756
|
+
`}};ke([a({type:String})],exports.MultiEmailInput.prototype,"label",2);ke([a({type:Array})],exports.MultiEmailInput.prototype,"value",2);ke([a({attribute:!1})],exports.MultiEmailInput.prototype,"onChange",2);ke([a({type:String})],exports.MultiEmailInput.prototype,"placeholder",2);ke([a({type:Boolean})],exports.MultiEmailInput.prototype,"disabled",2);ke([a({type:Number})],exports.MultiEmailInput.prototype,"maxEmails",2);ke([a({type:String})],exports.MultiEmailInput.prototype,"className",2);ke([g()],exports.MultiEmailInput.prototype,"inputValue",2);ke([g()],exports.MultiEmailInput.prototype,"error",2);exports.MultiEmailInput=ke([p("pont-multi-email-input")],exports.MultiEmailInput);var D1=Object.defineProperty,L1=Object.getOwnPropertyDescriptor,Zt=(e,t,r,n)=>{for(var o=n>1?void 0:n?L1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&D1(t,r,o),o};exports.BadgeSelector=class extends f{constructor(){super(...arguments),this.options=[],this.value=[],this.placeholder="Search roles...",this.label="",this.disabled=!1,this.className="",this.inputValue="",this.isOpen=!1,this.highlightedIndex=-1,this.blurTimeout=null,this.dropdownRef=null}createRenderRoot(){return this}get filteredOptions(){if(!this.inputValue.trim())return this.options;const t=this.inputValue.toLowerCase().trim();return this.options.filter(r=>r.label.toLowerCase().includes(t)||r.value.toLowerCase().includes(t))}get maxReached(){return this.maxSelections!=null&&this.value.length>=this.maxSelections}isOptionDisabled(t){return this.disabled||t.disabled||this.maxReached&&!this.value.includes(t.value)}handleInput(t){this.inputValue=t.target.value,this.isOpen=!0,this.highlightedIndex=-1}handleInputClick(){var t;this.disabled||this.maxReached||this.options.length===0||this.isOpen||(this.isOpen=!0,this.highlightedIndex=-1,this.clearBlurTimeout(),(t=this.querySelector("input"))==null||t.focus())}handleKeyDown(t){if(!this.isOpen){if(t.key==="ArrowDown"||t.key==="ArrowUp"){this.isOpen=!0,this.highlightedIndex=-1,t.preventDefault();return}t.key==="Backspace"&&!this.inputValue&&this.value.length>0&&(this.removeLast(),t.preventDefault());return}const r=this.filteredOptions;switch(t.key){case"ArrowDown":t.preventDefault(),this.highlightedIndex=Math.min(this.highlightedIndex+1,r.length-1);break;case"ArrowUp":t.preventDefault(),this.highlightedIndex=Math.max(this.highlightedIndex-1,-1);break;case"Enter":t.preventDefault(),this.highlightedIndex>=0&&this.highlightedIndex<r.length&&this.selectOption(r[this.highlightedIndex]);break;case"Escape":this.isOpen=!1,this.highlightedIndex=-1;break;case"Backspace":!this.inputValue&&this.value.length>0&&(t.preventDefault(),this.removeLast());break}}selectOption(t){if(!this.isOptionDisabled(t)){if(!this.value.includes(t.value)){const r=[...this.value,t.value];this.value=r,this.notifyChange(r)}this.inputValue="",this.isOpen=!1,this.highlightedIndex=-1}}removeLast(){if(this.value.length===0)return;const t=this.value.slice(0,-1);this.value=t,this.notifyChange(t)}removeBadge(t){const r=this.value.filter(n=>n!==t);this.value=r,this.notifyChange(r)}handleFocus(){!this.disabled&&this.options.length>0&&!this.maxReached&&(this.isOpen=!0,this.highlightedIndex=-1),this.clearBlurTimeout()}handleBlur(){this.blurTimeout=window.setTimeout(()=>{this.isOpen=!1,this.highlightedIndex=-1},200)}handleOptionMouseDown(t){this.clearBlurTimeout(),this.selectOption(t)}clearBlurTimeout(){this.blurTimeout&&(clearTimeout(this.blurTimeout),this.blurTimeout=null)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("badge-selector-change",{detail:{values:t},bubbles:!0,composed:!0}))}render(){const t=this.disabled||this.maxReached;return l`
|
|
4757
4757
|
<div class="pont-space-y-2 ${this.className}">
|
|
4758
4758
|
${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
|
|
4759
4759
|
|
|
@@ -4823,7 +4823,7 @@
|
|
|
4823
4823
|
</div>
|
|
4824
4824
|
`:h}
|
|
4825
4825
|
</div>
|
|
4826
|
-
`}};Zt([a({type:Array})],exports.BadgeSelector.prototype,"options",2);Zt([a({type:Array})],exports.BadgeSelector.prototype,"value",2);Zt([a({attribute:!1})],exports.BadgeSelector.prototype,"onChange",2);Zt([a({type:String})],exports.BadgeSelector.prototype,"placeholder",2);Zt([a({type:String})],exports.BadgeSelector.prototype,"label",2);Zt([a({type:Boolean})],exports.BadgeSelector.prototype,"disabled",2);Zt([a({type:Number})],exports.BadgeSelector.prototype,"maxSelections",2);Zt([a({type:String})],exports.BadgeSelector.prototype,"className",2);Zt([g()],exports.BadgeSelector.prototype,"inputValue",2);Zt([g()],exports.BadgeSelector.prototype,"isOpen",2);Zt([g()],exports.BadgeSelector.prototype,"highlightedIndex",2);exports.BadgeSelector=Zt([p("pont-badge-selector")],exports.BadgeSelector);var
|
|
4826
|
+
`}};Zt([a({type:Array})],exports.BadgeSelector.prototype,"options",2);Zt([a({type:Array})],exports.BadgeSelector.prototype,"value",2);Zt([a({attribute:!1})],exports.BadgeSelector.prototype,"onChange",2);Zt([a({type:String})],exports.BadgeSelector.prototype,"placeholder",2);Zt([a({type:String})],exports.BadgeSelector.prototype,"label",2);Zt([a({type:Boolean})],exports.BadgeSelector.prototype,"disabled",2);Zt([a({type:Number})],exports.BadgeSelector.prototype,"maxSelections",2);Zt([a({type:String})],exports.BadgeSelector.prototype,"className",2);Zt([g()],exports.BadgeSelector.prototype,"inputValue",2);Zt([g()],exports.BadgeSelector.prototype,"isOpen",2);Zt([g()],exports.BadgeSelector.prototype,"highlightedIndex",2);exports.BadgeSelector=Zt([p("pont-badge-selector")],exports.BadgeSelector);var F1=Object.defineProperty,k1=Object.getOwnPropertyDescriptor,Jr=(e,t,r,n)=>{for(var o=n>1?void 0:n?k1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&F1(t,r,o),o};exports.PontSideDrawer=class extends f{constructor(){super(),this.inplace=!1,this.side="left",this.open=!1,this.closeOnOverlay=!0,this._cachedChildren=[],this._mounted=!1,this._handleOpen=this._handleOpen.bind(this),this._handleClose=this._handleClose.bind(this)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t))),window.addEventListener("open-sidedrawer",this._handleOpen),window.addEventListener("close-sidedrawer",this._handleClose),document.addEventListener("open-sidedrawer",this._handleOpen),document.addEventListener("close-sidedrawer",this._handleClose),this._mounted=!0}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-sidedrawer",this._handleOpen),window.removeEventListener("close-sidedrawer",this._handleClose),document.removeEventListener("open-sidedrawer",this._handleOpen),document.removeEventListener("close-sidedrawer",this._handleClose),this._mounted=!1}_handleOpen(t){const r=(t==null?void 0:t.detail)||{},n=r.drawer_id??r.id,o=this.drawer_id??this.id;o&&(n&&n!==o||(r.side&&(r.side==="left"||r.side==="right")&&(this.side=r.side),this.open=!0,this.dispatchEvent(new CustomEvent("sidedrawer-opened",{bubbles:!0,detail:{id:o}}))))}_handleClose(t){const r=(t==null?void 0:t.detail)||{},n=r.drawer_id??r.id,o=this.drawer_id??this.id;o&&(n&&n!==o||(this.open=!1,this.dispatchEvent(new CustomEvent("sidedrawer-closed",{bubbles:!0,detail:{id:o}}))))}_onOverlayClick(){this.closeOnOverlay&&this._handleClose()}render(){const t=this.side==="right"?"pont-sidedrawer-right":"pont-sidedrawer-left";return l`
|
|
4827
4827
|
<div
|
|
4828
4828
|
part="overlay"
|
|
4829
4829
|
class="pont-sidedrawer-overlay ${this.inplace?"inplace":""} ${this.open?"open":"closed"}"
|
|
@@ -4839,7 +4839,7 @@
|
|
|
4839
4839
|
${this._cachedChildren}
|
|
4840
4840
|
</div>
|
|
4841
4841
|
</aside>
|
|
4842
|
-
`}};Jr([a({type:String})],exports.PontSideDrawer.prototype,"drawer_id",2);Jr([a({type:Boolean})],exports.PontSideDrawer.prototype,"inplace",2);Jr([a({type:String})],exports.PontSideDrawer.prototype,"side",2);Jr([a({type:Boolean,reflect:!0})],exports.PontSideDrawer.prototype,"open",2);Jr([a({type:Boolean})],exports.PontSideDrawer.prototype,"closeOnOverlay",2);Jr([g()],exports.PontSideDrawer.prototype,"_mounted",2);exports.PontSideDrawer=Jr([p("pont-sidedrawer")],exports.PontSideDrawer);var
|
|
4842
|
+
`}};Jr([a({type:String})],exports.PontSideDrawer.prototype,"drawer_id",2);Jr([a({type:Boolean})],exports.PontSideDrawer.prototype,"inplace",2);Jr([a({type:String})],exports.PontSideDrawer.prototype,"side",2);Jr([a({type:Boolean,reflect:!0})],exports.PontSideDrawer.prototype,"open",2);Jr([a({type:Boolean})],exports.PontSideDrawer.prototype,"closeOnOverlay",2);Jr([g()],exports.PontSideDrawer.prototype,"_mounted",2);exports.PontSideDrawer=Jr([p("pont-sidedrawer")],exports.PontSideDrawer);var N1=Object.defineProperty,M1=Object.getOwnPropertyDescriptor,Tn=(e,t,r,n)=>{for(var o=n>1?void 0:n?M1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&N1(t,r,o),o};exports.PontMultiSelectFilter=class extends f{constructor(){super(...arguments),this.options=[],this.selected=[],this.placeholder="Filter…",this.label="Filter"}_handleToggle(t){const r=this.selected.includes(t)?this.selected.filter(n=>n!==t):[...this.selected,t];this.dispatchEvent(new CustomEvent("change",{detail:{selected:r},bubbles:!0,composed:!0}))}render(){return this.options.filter(r=>this.selected.includes(r.value)).map(r=>r.label).join(", ")||this.placeholder,l`
|
|
4843
4843
|
<pont-dropdown-menu>
|
|
4844
4844
|
<pont-dropdown-menu-trigger as-child>
|
|
4845
4845
|
<pont-button variant="outline" size="default">
|
|
@@ -4871,7 +4871,7 @@
|
|
|
4871
4871
|
</pont-dropdown-menu-group>
|
|
4872
4872
|
</pont-dropdown-menu-content>
|
|
4873
4873
|
</pont-dropdown-menu>
|
|
4874
|
-
`}createRenderRoot(){return this}};Tn([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);Tn([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);Tn([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);Tn([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=Tn([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);const no={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Use Passkey"},io={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Use"},so={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},
|
|
4874
|
+
`}createRenderRoot(){return this}};Tn([a({type:Array})],exports.PontMultiSelectFilter.prototype,"options",2);Tn([a({type:Array})],exports.PontMultiSelectFilter.prototype,"selected",2);Tn([a({type:String})],exports.PontMultiSelectFilter.prototype,"placeholder",2);Tn([a({type:String})],exports.PontMultiSelectFilter.prototype,"label",2);exports.PontMultiSelectFilter=Tn([p("pont-multi-select-filter")],exports.PontMultiSelectFilter);const no={variant:"secondary",size:"default",content:"label",iconAlign:"start",label:"Use Passkey"},io={variant:"outline",size:"default",content:"icon-label",iconAlign:"start",prompt:"Use"},so={variant:"default",size:"default",content:"label",iconAlign:"end",label:"Submit"},B1={apple:"Apple",discord:"Discord",facebook:"Facebook",github:"GitHub",google:"Google",linkedin:"LinkedIn",meta:"Meta",microsoft:"Microsoft",x:"X"},U1={apple:U`<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />`,discord:U`<path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />`,facebook:U`<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" />`,github:U`<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />`,google:U`<path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z" />`,linkedin:U`<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />`,meta:U`<path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" />`,microsoft:U`<path d="M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z" />`,x:U`<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.763l7.726-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77z" />`};var j1=Object.defineProperty,q1=Object.getOwnPropertyDescriptor,Jt=(e,t,r,n)=>{for(var o=n>1?void 0:n?q1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&j1(t,r,o),o};exports.PontPasskeyButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.variant=no.variant,this.size=no.size,this.content=no.content,this.iconAlign=no.iconAlign,this._label=no.label,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await tt.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.SUCCESS_EVENT,{detail:{id:this.rootId,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontPasskeyButton.ERROR_EVENT,{detail:{id:this.rootId,event:this.event,message:r},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:no.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasskeyButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontPasskeyButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
|
|
4875
4875
|
<pont-spinner
|
|
4876
4876
|
id="${this.iconId}"
|
|
4877
4877
|
part="${exports.PontPasskeyButton.PARTS.icon}"
|
|
@@ -4912,7 +4912,7 @@
|
|
|
4912
4912
|
${this.content.includes("label")?this.label:h}
|
|
4913
4913
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
4914
4914
|
</pont-button>
|
|
4915
|
-
`}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${et}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Jt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Jt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Jt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Jt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Jt([p("pont-passkey-button")],exports.PontPasskeyButton);var
|
|
4915
|
+
`}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${et}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Jt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Jt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Jt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Jt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Jt([p("pont-passkey-button")],exports.PontPasskeyButton);var z1=Object.defineProperty,V1=Object.getOwnPropertyDescriptor,Lt=(e,t,r,n)=>{for(var o=n>1?void 0:n?V1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&z1(t,r,o),o};exports.PontProviderButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.design=new Rn(this),this.variant=io.variant,this.size=io.size,this.content=io.content,this.iconAlign=io.iconAlign,this._prompt=io.prompt,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontProviderButton.CLICK_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await tt.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontProviderButton.SUCCESS_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontProviderButton.ERROR_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,message:r},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get _provider(){return!this.provider&&this.design.active?"google":this.provider}get prompt(){return this._prompt}set prompt(t){const r=this._prompt;this._prompt=t.length?t:io.prompt,this.requestUpdate("prompt",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontProviderButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontProviderButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
|
|
4916
4916
|
<pont-spinner
|
|
4917
4917
|
id="${this.iconId}"
|
|
4918
4918
|
part="${exports.PontProviderButton.PARTS.icon}"
|
|
@@ -4927,9 +4927,9 @@
|
|
|
4927
4927
|
fill="currentColor"
|
|
4928
4928
|
class="simple-icons simple-icons-${this._provider} ${t}"
|
|
4929
4929
|
>
|
|
4930
|
-
${
|
|
4930
|
+
${U1[this._provider]}
|
|
4931
4931
|
</svg>
|
|
4932
|
-
`:h}render(){const t=
|
|
4932
|
+
`:h}render(){const t=B1[this._provider],r=this.label??l`${this.prompt} ${t}`;return l`
|
|
4933
4933
|
<pont-button
|
|
4934
4934
|
id="${this.rootId}"
|
|
4935
4935
|
part="${exports.PontProviderButton.PARTS.root}"
|
|
@@ -4944,7 +4944,7 @@
|
|
|
4944
4944
|
${this.content.includes("label")?r:h}
|
|
4945
4945
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
4946
4946
|
</pont-button>
|
|
4947
|
-
`}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${et}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var
|
|
4947
|
+
`}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${et}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var H1=Object.defineProperty,G1=Object.getOwnPropertyDescriptor,ce=(e,t,r,n)=>{for(var o=n>1?void 0:n?G1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&H1(t,r,o),o};exports.PontSubmitButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.variant=so.variant,this.size=so.size,this.content=so.content,this.iconAlign=so.iconAlign,this._label=so.label,this._handleClick=()=>{this.isDisabled||this.dispatchEvent(new CustomEvent(exports.PontSubmitButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:so.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontSubmitButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontSubmitButton.ICON}`}get isDisabled(){return this.disabled||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.loading?l`
|
|
4948
4948
|
<pont-spinner
|
|
4949
4949
|
id="${this.iconId}"
|
|
4950
4950
|
part="${exports.PontSubmitButton.PARTS.icon}"
|
|
@@ -4983,7 +4983,7 @@
|
|
|
4983
4983
|
${this.content.includes("label")?this.label:h}
|
|
4984
4984
|
${this.iconAlign==="end"?this._renderIcon():h}
|
|
4985
4985
|
</pont-button>
|
|
4986
|
-
`}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${et}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};ce([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ce([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ce([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ce([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ce([p("pont-submit-button")],exports.PontSubmitButton);var
|
|
4986
|
+
`}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${et}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};ce([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ce([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ce([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ce([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ce([p("pont-submit-button")],exports.PontSubmitButton);var K1=Object.defineProperty,W1=Object.getOwnPropertyDescriptor,z=(e,t,r,n)=>{for(var o=n>1?void 0:n?W1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&K1(t,r,o),o};exports.PontPasswordField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=qe.name,this._label=qe.label,this.variant=qe.variant,this.rules=qe.rules,this.validation=qe.validation,this._forgotLabel=qe.forgotLabel,this._invalid=!1,this._errors=[],this._value="",this._loading=!1,this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontPasswordField.INPUT_SELECTORS} input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPasswordField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._errors=[],this._value="",this._dirty=!1},this._handleForgotClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,forgotId:r,forgotEvent:n}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_CLICK_EVENT,{detail:{id:t,forgotId:r,event:n},bubbles:!0,composed:!0}));try{if(n){const o=await tt.processLoginflowEvent({event:n});this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_SUCCESS_EVENT,{detail:{id:t,forgotId:r,event:n,result:o},bubbles:!0,composed:!0}))}}catch(o){const i=o instanceof Error?o.message:String(o);this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_ERROR_EVENT,{detail:{id:t,forgotId:r,event:n,message:i},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get _defaultInputId(){return`${this.rootId}-${exports.PontPasswordField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:qe.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:qe.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}get forgotLabel(){return this._forgotLabel}set forgotLabel(t){const r=this._forgotLabel;this._forgotLabel=t.length?t:qe.forgotLabel,this.requestUpdate("forgotLabel",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasswordField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPasswordField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPasswordField.MARK}`}get forgotId(){return`${this.rootId}-${exports.PontPasswordField.FORGOT}`}get descriptionId(){return`${this.rootId}-${exports.PontPasswordField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPasswordField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get isDisabled(){return this.disabled||this._loading}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPasswordField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success","Valid password.")}_onValidateError(t,r,n){this._invalid=!0,this._errors=n!=null&&n.length?n:[r],this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;if(n&&t.length>n)return this._onValidateError("maxlength",this.maxlengthError),!1;let o=!0;const i=[];for(const s of this.rules)(s.name?exports.PontPasswordField.RULE_PATTERNS[s.name]:new RegExp(s.pattern)).test(t)||(o=!1,s.error&&i.push(s.error));if(!o){const s=i.length?i.join(" "):this.formatError;return this._onValidateError("format",s,i),!1}return this._onValidateSuccess(),!0}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
4987
4987
|
<span
|
|
4988
4988
|
id="${this.markId}"
|
|
4989
4989
|
part="${exports.PontPasswordField.PARTS.mark}"
|
|
@@ -5057,7 +5057,7 @@
|
|
|
5057
5057
|
</pont-field-description>
|
|
5058
5058
|
`:h}
|
|
5059
5059
|
</pont-field>
|
|
5060
|
-
`}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${et}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};z([a({type:String})],exports.PontPasswordField.prototype,"seed",2);z([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);z([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);z([a({type:String})],exports.PontPasswordField.prototype,"name",1);z([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);z([a({type:String})],exports.PontPasswordField.prototype,"label",1);z([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);z([a({type:String})],exports.PontPasswordField.prototype,"description",2);z([a({type:String})],exports.PontPasswordField.prototype,"variant",2);z([a({type:String})],exports.PontPasswordField.prototype,"mark",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);z([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);z([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);z([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);z([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);z([a({type:String})],exports.PontPasswordField.prototype,"validation",2);z([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);z([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);z([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);z([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);z([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);z([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);z([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);z([g()],exports.PontPasswordField.prototype,"_invalid",2);z([g()],exports.PontPasswordField.prototype,"_errors",2);z([g()],exports.PontPasswordField.prototype,"_value",2);z([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=z([p("pont-password-field")],exports.PontPasswordField);const Ft=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Ne=e=>`Please enter a valid ${e.toLowerCase()}.`,jo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,qo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,ao={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Ft("Email"),formatError:Ne("Email")},lo={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Ft("Phone"),formatError:Ne("Phone")},co={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Ft("Username"),minlengthError:jo("Username"),maxlengthError:qo("Username"),formatError:Ne("Username")},po={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Ft("Name"),minlengthError:jo("Name"),maxlengthError:qo("Name"),formatError:Ne("Name")},Qo={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Ft("Identifier")},qe={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Ft("Password"),minlengthError:jo("Password"),maxlengthError:qo("Password"),formatError:Ne("Password"),forgotLabel:"Forgot your password?"},ze={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Ft("Confirm Password"),matchError:"Passwords do not match."};var
|
|
5060
|
+
`}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${et}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};z([a({type:String})],exports.PontPasswordField.prototype,"seed",2);z([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);z([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);z([a({type:String})],exports.PontPasswordField.prototype,"name",1);z([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);z([a({type:String})],exports.PontPasswordField.prototype,"label",1);z([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);z([a({type:String})],exports.PontPasswordField.prototype,"description",2);z([a({type:String})],exports.PontPasswordField.prototype,"variant",2);z([a({type:String})],exports.PontPasswordField.prototype,"mark",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);z([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);z([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);z([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);z([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);z([a({type:String})],exports.PontPasswordField.prototype,"validation",2);z([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);z([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);z([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);z([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);z([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);z([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);z([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);z([g()],exports.PontPasswordField.prototype,"_invalid",2);z([g()],exports.PontPasswordField.prototype,"_errors",2);z([g()],exports.PontPasswordField.prototype,"_value",2);z([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=z([p("pont-password-field")],exports.PontPasswordField);const Ft=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Ne=e=>`Please enter a valid ${e.toLowerCase()}.`,jo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,qo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,ao={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Ft("Email"),formatError:Ne("Email")},lo={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Ft("Phone"),formatError:Ne("Phone")},co={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Ft("Username"),minlengthError:jo("Username"),maxlengthError:qo("Username"),formatError:Ne("Username")},po={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Ft("Name"),minlengthError:jo("Name"),maxlengthError:qo("Name"),formatError:Ne("Name")},Qo={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Ft("Identifier")},qe={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Ft("Password"),minlengthError:jo("Password"),maxlengthError:qo("Password"),formatError:Ne("Password"),forgotLabel:"Forgot your password?"},ze={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Ft("Confirm Password"),matchError:"Passwords do not match."};var Y1=Object.defineProperty,Q1=Object.getOwnPropertyDescriptor,it=(e,t,r,n)=>{for(var o=n>1?void 0:n?Q1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Y1(t,r,o),o};exports.PontConfirmField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=ze.name,this._label=ze.label,this.variant=ze.variant,this.pair=ze.pair,this.validation=ze.validation,this._matchError=ze.matchError,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontConfirmField.INPUT_SELECTORS} input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontConfirmField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontConfirmField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:ze.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ze.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get matchError(){return this._matchError}set matchError(t){const r=this._matchError;this._matchError=t.length?t:ze.matchError,this.requestUpdate("matchError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontConfirmField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontConfirmField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontConfirmField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontConfirmField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontConfirmField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get pairValue(){const r=(this._form??document).querySelector(this.pair);return r?r.value:""}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontConfirmField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this,c={selector:this.pair,value:this.pairValue};this.dispatchEvent(new CustomEvent(exports.PontConfirmField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,pair:c,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid confirm.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):t!==this.pairValue?(this._onValidateError("match",this.matchError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
5061
5061
|
<span
|
|
5062
5062
|
id="${this.markId}"
|
|
5063
5063
|
part="${exports.PontConfirmField.PARTS.mark}"
|
|
@@ -5119,7 +5119,7 @@
|
|
|
5119
5119
|
</pont-field-description>
|
|
5120
5120
|
`:h}
|
|
5121
5121
|
</pont-field>
|
|
5122
|
-
`}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${et}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;it([a({type:String})],exports.PontConfirmField.prototype,"seed",2);it([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);it([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);it([a({type:String})],exports.PontConfirmField.prototype,"name",1);it([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);it([a({type:String})],exports.PontConfirmField.prototype,"label",1);it([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);it([a({type:String})],exports.PontConfirmField.prototype,"description",2);it([a({type:String})],exports.PontConfirmField.prototype,"variant",2);it([a({type:String})],exports.PontConfirmField.prototype,"mark",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);it([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);it([a({type:String})],exports.PontConfirmField.prototype,"pair",2);it([a({type:String})],exports.PontConfirmField.prototype,"validation",2);it([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);it([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);it([g()],exports.PontConfirmField.prototype,"_invalid",2);it([g()],exports.PontConfirmField.prototype,"_error",2);it([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=it([p("pont-confirm-field")],exports.PontConfirmField);var
|
|
5122
|
+
`}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${et}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;it([a({type:String})],exports.PontConfirmField.prototype,"seed",2);it([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);it([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);it([a({type:String})],exports.PontConfirmField.prototype,"name",1);it([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);it([a({type:String})],exports.PontConfirmField.prototype,"label",1);it([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);it([a({type:String})],exports.PontConfirmField.prototype,"description",2);it([a({type:String})],exports.PontConfirmField.prototype,"variant",2);it([a({type:String})],exports.PontConfirmField.prototype,"mark",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);it([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);it([a({type:String})],exports.PontConfirmField.prototype,"pair",2);it([a({type:String})],exports.PontConfirmField.prototype,"validation",2);it([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);it([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);it([g()],exports.PontConfirmField.prototype,"_invalid",2);it([g()],exports.PontConfirmField.prototype,"_error",2);it([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=it([p("pont-confirm-field")],exports.PontConfirmField);var Z1=Object.defineProperty,J1=Object.getOwnPropertyDescriptor,ut=(e,t,r,n)=>{for(var o=n>1?void 0:n?J1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Z1(t,r,o),o};exports.PontEmailField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=ao.name,this._label=ao.label,this.pattern=ao.pattern,this.validation=ao.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontEmailField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontEmailField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontEmailField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:ao.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ao.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEmailField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontEmailField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontEmailField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontEmailField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontEmailField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontEmailField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontEmailField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid email.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
5123
5123
|
<span
|
|
5124
5124
|
id="${this.markId}"
|
|
5125
5125
|
part="${exports.PontEmailField.PARTS.mark}"
|
|
@@ -5169,7 +5169,7 @@
|
|
|
5169
5169
|
</pont-field-description>
|
|
5170
5170
|
`:h}
|
|
5171
5171
|
</pont-field>
|
|
5172
|
-
`}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${et}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;ut([a({type:String})],exports.PontEmailField.prototype,"seed",2);ut([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);ut([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);ut([a({type:String})],exports.PontEmailField.prototype,"name",1);ut([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);ut([a({type:String})],exports.PontEmailField.prototype,"label",1);ut([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);ut([a({type:String})],exports.PontEmailField.prototype,"description",2);ut([a({type:String})],exports.PontEmailField.prototype,"mark",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);ut([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);ut([a({type:String})],exports.PontEmailField.prototype,"pattern",2);ut([a({type:String})],exports.PontEmailField.prototype,"validation",2);ut([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);ut([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);ut([g()],exports.PontEmailField.prototype,"_invalid",2);ut([g()],exports.PontEmailField.prototype,"_error",2);ut([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=ut([p("pont-email-field")],exports.PontEmailField);var
|
|
5172
|
+
`}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${et}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;ut([a({type:String})],exports.PontEmailField.prototype,"seed",2);ut([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);ut([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);ut([a({type:String})],exports.PontEmailField.prototype,"name",1);ut([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);ut([a({type:String})],exports.PontEmailField.prototype,"label",1);ut([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);ut([a({type:String})],exports.PontEmailField.prototype,"description",2);ut([a({type:String})],exports.PontEmailField.prototype,"mark",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);ut([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);ut([a({type:String})],exports.PontEmailField.prototype,"pattern",2);ut([a({type:String})],exports.PontEmailField.prototype,"validation",2);ut([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);ut([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);ut([g()],exports.PontEmailField.prototype,"_invalid",2);ut([g()],exports.PontEmailField.prototype,"_error",2);ut([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=ut([p("pont-email-field")],exports.PontEmailField);var X1=Object.defineProperty,t0=Object.getOwnPropertyDescriptor,yt=(e,t,r,n)=>{for(var o=n>1?void 0:n?t0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&X1(t,r,o),o};exports.PontIdentifierField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=Qo.name,this.identifiers=Qo.identifiers,this.design=new Rn(this),this.validation=Qo.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontIdentifierField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontIdentifierField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontIdentifierField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:Qo.name,this.requestUpdate("name",r)}get _identifiers(){return this.identifiers.length===0&&this.design.active?["email","username","phone"]:this.identifiers}get _defaultLabel(){const t=this._identifiers;if(t.length===0)return Qo.label;let r=t[0];if(t.length>1){const n=t.slice(0,-1).join(", "),o=t.length>2?", or ":" or ",i=t.slice(-1)[0];r=n+o+i}return r.charAt(0).toUpperCase()+r.slice(1)}get label(){return this._label??this._defaultLabel}set label(t){const r=this.label;this._label=t||void 0,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontIdentifierField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontIdentifierField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontIdentifierField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontIdentifierField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontIdentifierField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}get _type(){const t=this._identifiers.join();return t==="email"?"email":t==="phone"?"tel":"text"}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontIdentifierField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,identifiers:d,value:c}=this;this.dispatchEvent(new CustomEvent(exports.PontIdentifierField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,identifiers:d,value:c,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid identifier.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
5173
5173
|
<span
|
|
5174
5174
|
id="${this.markId}"
|
|
5175
5175
|
part="${exports.PontIdentifierField.PARTS.mark}"
|
|
@@ -5219,7 +5219,7 @@
|
|
|
5219
5219
|
</pont-field-description>
|
|
5220
5220
|
`:h}
|
|
5221
5221
|
</pont-field>
|
|
5222
|
-
`}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${et}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;yt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);yt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);yt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);yt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);yt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);yt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);yt([g()],exports.PontIdentifierField.prototype,"_invalid",2);yt([g()],exports.PontIdentifierField.prototype,"_error",2);yt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=yt([p("pont-identifier-field")],exports.PontIdentifierField);var
|
|
5222
|
+
`}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${et}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;yt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);yt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);yt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);yt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);yt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);yt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);yt([g()],exports.PontIdentifierField.prototype,"_invalid",2);yt([g()],exports.PontIdentifierField.prototype,"_error",2);yt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=yt([p("pont-identifier-field")],exports.PontIdentifierField);var e0=Object.defineProperty,r0=Object.getOwnPropertyDescriptor,Z=(e,t,r,n)=>{for(var o=n>1?void 0:n?r0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&e0(t,r,o),o};exports.PontNameField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=po.name,this._label=po.label,this.pattern=po.pattern,this.validation=po.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontNameField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontNameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontNameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:po.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:po.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontNameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontNameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontNameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontNameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontNameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().replace(/\s+/g," ")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontNameField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontNameField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid name.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;return n&&t.length>n?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern,"u").test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
5223
5223
|
<span
|
|
5224
5224
|
id="${this.markId}"
|
|
5225
5225
|
part="${exports.PontNameField.PARTS.mark}"
|
|
@@ -5269,7 +5269,7 @@
|
|
|
5269
5269
|
</pont-field-description>
|
|
5270
5270
|
`:h}
|
|
5271
5271
|
</pont-field>
|
|
5272
|
-
`}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${et}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;Z([a({type:String})],exports.PontNameField.prototype,"seed",2);Z([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);Z([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);Z([a({type:String})],exports.PontNameField.prototype,"name",1);Z([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);Z([a({type:String})],exports.PontNameField.prototype,"label",1);Z([a({type:String})],exports.PontNameField.prototype,"placeholder",2);Z([a({type:String})],exports.PontNameField.prototype,"description",2);Z([a({type:String})],exports.PontNameField.prototype,"mark",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);Z([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"required",2);Z([a({type:Number})],exports.PontNameField.prototype,"minlength",1);Z([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);Z([a({type:String})],exports.PontNameField.prototype,"pattern",2);Z([a({type:String})],exports.PontNameField.prototype,"validation",2);Z([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);Z([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);Z([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);Z([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);Z([g()],exports.PontNameField.prototype,"_invalid",2);Z([g()],exports.PontNameField.prototype,"_error",2);Z([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=Z([p("pont-name-field")],exports.PontNameField);var
|
|
5272
|
+
`}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${et}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;Z([a({type:String})],exports.PontNameField.prototype,"seed",2);Z([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);Z([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);Z([a({type:String})],exports.PontNameField.prototype,"name",1);Z([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);Z([a({type:String})],exports.PontNameField.prototype,"label",1);Z([a({type:String})],exports.PontNameField.prototype,"placeholder",2);Z([a({type:String})],exports.PontNameField.prototype,"description",2);Z([a({type:String})],exports.PontNameField.prototype,"mark",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);Z([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"required",2);Z([a({type:Number})],exports.PontNameField.prototype,"minlength",1);Z([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);Z([a({type:String})],exports.PontNameField.prototype,"pattern",2);Z([a({type:String})],exports.PontNameField.prototype,"validation",2);Z([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);Z([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);Z([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);Z([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);Z([g()],exports.PontNameField.prototype,"_invalid",2);Z([g()],exports.PontNameField.prototype,"_error",2);Z([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=Z([p("pont-name-field")],exports.PontNameField);var o0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,mt=(e,t,r,n)=>{for(var o=n>1?void 0:n?n0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&o0(t,r,o),o};exports.PontPhoneField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=lo.name,this._label=lo.label,this.pattern=lo.pattern,this.validation=lo.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontPhoneField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPhoneField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontPhoneField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:lo.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:lo.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPhoneField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPhoneField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPhoneField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontPhoneField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPhoneField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).replace(/\s/g,"")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPhoneField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPhoneField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid phone.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
5273
5273
|
<span
|
|
5274
5274
|
id="${this.markId}"
|
|
5275
5275
|
part="${exports.PontPhoneField.PARTS.mark}"
|
|
@@ -5319,7 +5319,7 @@
|
|
|
5319
5319
|
</pont-field-description>
|
|
5320
5320
|
`:h}
|
|
5321
5321
|
</pont-field>
|
|
5322
|
-
`}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${et}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;mt([a({type:String})],exports.PontPhoneField.prototype,"seed",2);mt([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);mt([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);mt([a({type:String})],exports.PontPhoneField.prototype,"name",1);mt([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);mt([a({type:String})],exports.PontPhoneField.prototype,"label",1);mt([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.PontPhoneField.prototype,"description",2);mt([a({type:String})],exports.PontPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);mt([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);mt([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);mt([a({type:String})],exports.PontPhoneField.prototype,"validation",2);mt([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);mt([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);mt([g()],exports.PontPhoneField.prototype,"_invalid",2);mt([g()],exports.PontPhoneField.prototype,"_error",2);mt([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=mt([p("pont-phone-field")],exports.PontPhoneField);var
|
|
5322
|
+
`}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${et}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;mt([a({type:String})],exports.PontPhoneField.prototype,"seed",2);mt([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);mt([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);mt([a({type:String})],exports.PontPhoneField.prototype,"name",1);mt([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);mt([a({type:String})],exports.PontPhoneField.prototype,"label",1);mt([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.PontPhoneField.prototype,"description",2);mt([a({type:String})],exports.PontPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);mt([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);mt([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);mt([a({type:String})],exports.PontPhoneField.prototype,"validation",2);mt([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);mt([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);mt([g()],exports.PontPhoneField.prototype,"_invalid",2);mt([g()],exports.PontPhoneField.prototype,"_error",2);mt([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=mt([p("pont-phone-field")],exports.PontPhoneField);var i0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,J=(e,t,r,n)=>{for(var o=n>1?void 0:n?s0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&i0(t,r,o),o};exports.PontUsernameField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=co.name,this._label=co.label,this.pattern=co.pattern,this.validation=co.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontUsernameField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontUsernameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontUsernameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:co.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:co.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontUsernameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontUsernameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontUsernameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontUsernameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontUsernameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontUsernameField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontUsernameField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid username.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;return n&&t.length>n?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
|
|
5323
5323
|
<span
|
|
5324
5324
|
id="${this.markId}"
|
|
5325
5325
|
part="${exports.PontUsernameField.PARTS.mark}"
|
|
@@ -5369,7 +5369,7 @@
|
|
|
5369
5369
|
</pont-field-description>
|
|
5370
5370
|
`:h}
|
|
5371
5371
|
</pont-field>
|
|
5372
|
-
`}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${et}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;J([a({type:String})],exports.PontUsernameField.prototype,"seed",2);J([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);J([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);J([a({type:String})],exports.PontUsernameField.prototype,"name",1);J([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);J([a({type:String})],exports.PontUsernameField.prototype,"label",1);J([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);J([a({type:String})],exports.PontUsernameField.prototype,"description",2);J([a({type:String})],exports.PontUsernameField.prototype,"mark",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);J([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);J([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);J([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);J([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);J([a({type:String})],exports.PontUsernameField.prototype,"validation",2);J([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);J([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);J([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);J([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);J([g()],exports.PontUsernameField.prototype,"_invalid",2);J([g()],exports.PontUsernameField.prototype,"_error",2);J([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=J([p("pont-username-field")],exports.PontUsernameField);const ns={label:"Link",service:"auth"};var
|
|
5372
|
+
`}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${et}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;J([a({type:String})],exports.PontUsernameField.prototype,"seed",2);J([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);J([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);J([a({type:String})],exports.PontUsernameField.prototype,"name",1);J([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);J([a({type:String})],exports.PontUsernameField.prototype,"label",1);J([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);J([a({type:String})],exports.PontUsernameField.prototype,"description",2);J([a({type:String})],exports.PontUsernameField.prototype,"mark",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);J([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);J([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);J([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);J([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);J([a({type:String})],exports.PontUsernameField.prototype,"validation",2);J([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);J([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);J([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);J([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);J([g()],exports.PontUsernameField.prototype,"_invalid",2);J([g()],exports.PontUsernameField.prototype,"_error",2);J([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=J([p("pont-username-field")],exports.PontUsernameField);const ns={label:"Link",service:"auth"};var a0=Object.defineProperty,l0=Object.getOwnPropertyDescriptor,Me=(e,t,r,n)=>{for(var o=n>1?void 0:n?l0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&a0(t,r,o),o};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=wt(),this._label=ns.label,this.service=ns.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:n,event:o}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:n,event:o},bubbles:!0,composed:!0}));try{if(o&&n==="auth"){const i=await tt.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:o,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:o,message:s},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ns.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
|
|
5373
5373
|
<div id="${this.rootId}" part="${exports.PontLink.PARTS.root}">
|
|
5374
5374
|
${(t=this.prompt)!=null&&t.length?l`
|
|
5375
5375
|
<p id="${this.promptId}" part="${exports.PontLink.PARTS.prompt}">
|
|
@@ -5393,7 +5393,7 @@
|
|
|
5393
5393
|
* @license
|
|
5394
5394
|
* Copyright 2020 Google LLC
|
|
5395
5395
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5396
|
-
*/const jh=Symbol.for(""),
|
|
5396
|
+
*/const jh=Symbol.for(""),d0=e=>{if((e==null?void 0:e.r)===jh)return e==null?void 0:e._$litStatic$},c0=e=>({_$litStatic$:e,r:jh}),Rc=new Map,p0=e=>(t,...r)=>{const n=r.length;let o,i;const s=[],d=[];let c,m=0,v=!1;for(;m<n;){for(c=t[m];m<n&&(i=r[m],(o=d0(i))!==void 0);)c+=o+t[++m],v=!0;m!==n&&d.push(i),s.push(c),m++}if(m===n&&s.push(t[n]),v){const b=s.join("$$lit$$");(t=Rc.get(b))===void 0&&(s.raw=s,Rc.set(b,t=s)),r=d}return e(t,...r)},is=p0(l);var h0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,_t=(e,t,r,n)=>{for(var o=n>1?void 0:n?u0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&h0(t,r,o),o};exports.PontOtp=class extends jt{constructor(){super(...arguments),this.excludeFromForm=!1,this.required=!1,this.requiredError="Code is required.",this.incompleteError="Please enter the complete verification code.",this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="code",this.name="",this.disabled=!1,this.autoSubmit=!1,this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this._invalid=!1,this._error="",this._value="",this.handleComplete=async t=>{if(this._value=t,this.autoSubmit&&this.event){const r={};r[this.dataKey]=t;try{await tt.processLoginflowEvent({event:this.event,data:r})}finally{this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event})}return}this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:null})},this.handleFocus=()=>{this.emit("pont-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("pont-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=async()=>{if(this.resendEvent)try{await tt.processLoginflowEvent({event:this.resendEvent})}finally{this.emit("pont-otp:resend",{id:this.id,event:this.resendEvent})}}}get _containerElement(){return this.querySelector(`pont-input-otp[part=${this.id?this.id:"otp"}]`)}get isFormField(){return!this.excludeFromForm}createRenderRoot(){return this}get value(){return this._value}validate(){const t=this._value.trim();return this.required&&!t?(this._invalid=!0,this._error=this.requiredError,!1):t.length!==this.length?(this._invalid=!0,this._error=this.incompleteError,!1):(this._invalid=!1,this._error="",!0)}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,n=(s,d)=>Array.from({length:d-s},(c,m)=>`<pont-input-otp-slot index="${s+m}"></pont-input-otp-slot>`).join(""),o=s=>`<pont-input-otp-group>${s}</pont-input-otp-group>`,i="<pont-input-otp-separator></pont-input-otp-separator>";if(t==="simple"){const s=Math.ceil(r/2);return o(n(0,s))+i+o(n(s,r))}if(t==="with_separator"){const s=Math.ceil(r/3);return o(n(0,s))+i+o(n(s,s*2))+i+o(n(s*2,r))}return t==="with_spacing"?Array.from({length:r},(s,d)=>o(`<pont-input-otp-slot index="${d}"></pont-input-otp-slot>`)).join(""):o(n(0,r))}render(){const t=this.variant||"digits_only";return is`
|
|
5397
5397
|
<pont-field ?disabled=${this.disabled} ?invalid=${this._invalid}>
|
|
5398
5398
|
<pont-input-otp
|
|
5399
5399
|
part=${this.id?this.id:"otp"}
|
|
@@ -5408,7 +5408,7 @@
|
|
|
5408
5408
|
.onBlur=${this.handleBlur}
|
|
5409
5409
|
.onChange=${r=>this._value=r}
|
|
5410
5410
|
>
|
|
5411
|
-
${
|
|
5411
|
+
${c0(this.buildOTPContentHTML())}
|
|
5412
5412
|
</pont-input-otp>
|
|
5413
5413
|
${this._invalid?is`
|
|
5414
5414
|
<pont-field-error
|
|
@@ -5429,7 +5429,7 @@
|
|
|
5429
5429
|
</pont-button>
|
|
5430
5430
|
</div>
|
|
5431
5431
|
`:h}
|
|
5432
|
-
`}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${et}-${exports.PontOtp.ROOT}`;_t([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"required",2);_t([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);_t([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);_t([a()],exports.PontOtp.prototype,"variant",2);_t([a({type:Number})],exports.PontOtp.prototype,"length",2);_t([a({type:Number})],exports.PontOtp.prototype,"timeout",2);_t([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);_t([a()],exports.PontOtp.prototype,"name",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);_t([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);_t([a()],exports.PontOtp.prototype,"event",2);_t([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);_t([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);_t([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);_t([a()],exports.PontOtp.prototype,"id",2);_t([g()],exports.PontOtp.prototype,"_invalid",2);_t([g()],exports.PontOtp.prototype,"_error",2);_t([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=_t([p("pont-otp")],exports.PontOtp);const Un={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var
|
|
5432
|
+
`}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${et}-${exports.PontOtp.ROOT}`;_t([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"required",2);_t([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);_t([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);_t([a()],exports.PontOtp.prototype,"variant",2);_t([a({type:Number})],exports.PontOtp.prototype,"length",2);_t([a({type:Number})],exports.PontOtp.prototype,"timeout",2);_t([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);_t([a()],exports.PontOtp.prototype,"name",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);_t([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);_t([a()],exports.PontOtp.prototype,"event",2);_t([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);_t([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);_t([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);_t([a()],exports.PontOtp.prototype,"id",2);_t([g()],exports.PontOtp.prototype,"_invalid",2);_t([g()],exports.PontOtp.prototype,"_error",2);_t([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=_t([p("pont-otp")],exports.PontOtp);const Un={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var m0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,yr=(e,t,r,n)=>{for(var o=n>1?void 0:n?g0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&m0(t,r,o),o};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=wt(),this.duration=Un.duration,this.resend_event=Un.resend_event,this.resend_button_label=Un.resend_button_label,this.count_down_text=Un.count_down_text,this._remaining=0,this._handleResendClick=()=>{tt.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
|
|
5433
5433
|
<div part=${exports.PontOtpResend.PARTS.root} id=${this.rootId}>
|
|
5434
5434
|
${t?l`
|
|
5435
5435
|
<pont-typography-muted
|
|
@@ -5449,14 +5449,14 @@
|
|
|
5449
5449
|
</pont-button>
|
|
5450
5450
|
`}
|
|
5451
5451
|
</div>
|
|
5452
|
-
`}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${et}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};yr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);yr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);yr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);yr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);yr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);yr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);yr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=yr([p("pont-otp-resend")],exports.PontOtpResend);const
|
|
5452
|
+
`}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${et}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};yr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);yr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);yr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);yr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);yr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);yr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);yr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=yr([p("pont-otp-resend")],exports.PontOtpResend);const f0=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],v0=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var b0=Object.defineProperty,y0=Object.getOwnPropertyDescriptor,Dn=(e,t,r,n)=>{for(var o=n>1?void 0:n?y0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&b0(t,r,o),o};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=wt(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,m=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,m,c,v);try{const b=await tt.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w})}finally{this._setLoading(!1,r,m,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(f0.map(n=>n.TAG).join(", "))).filter(n=>typeof n.isFormField>"u"?!0:n.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=v0.map(n=>n.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(n=>n!==t).forEach(n=>t.appendChild(n))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,n,o,i){r.forEach((d,c)=>{d.disabled=t?!0:n[c]}),o.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
|
|
5453
5453
|
<form
|
|
5454
5454
|
id="${this.rootId}"
|
|
5455
5455
|
part="${exports.PontForm.PARTS.root}"
|
|
5456
5456
|
@submit=${this._handleSubmit}
|
|
5457
5457
|
@reset=${this._handleReset}
|
|
5458
5458
|
></form>
|
|
5459
|
-
`}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${et}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Dn([a({type:String})],exports.PontForm.prototype,"seed",2);Dn([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Dn([p("pont-form")],exports.PontForm);var
|
|
5459
|
+
`}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${et}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Dn([a({type:String})],exports.PontForm.prototype,"seed",2);Dn([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Dn([p("pont-form")],exports.PontForm);var _0=Object.defineProperty,w0=Object.getOwnPropertyDescriptor,kt=(e,t,r,n)=>{for(var o=n>1?void 0:n?w0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&_0(t,r,o),o};exports.PontProviderField=class extends f{constructor(){super(...arguments),this.seed=wt(),this.providers=[],this.overrides=[],this.design=new Rn(this)}static get parts(){const t=this._ROOT,r=`${t}-${this._BUTTON}`;return{root:t,button:r}}createRenderRoot(){return this}get rootId(){return this.customId??`${et}-${exports.PontProviderField.parts.root}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontProviderField._BUTTON}`}get columns(){const t=this._providers.length;return t<3?"one":t%3===0?"three":t===5?"two-three":t===7?"three-four":"four"}get _providers(){return this.providers.length===0&&this.design.active?[...exports.PontProviderField.DESIGN_PROVIDERS]:[...new Set(this.providers)]}get _overrides(){return this.overrides.filter((t,r,n)=>r===n.findIndex(o=>o.provider===t.provider))}_renderButton(t){const r=`signin_with_oauth(${t.provider})`,n=t.content??this.content??(this._providers.length>2?"icon":void 0);return l`
|
|
5460
5460
|
<pont-provider-button
|
|
5461
5461
|
id="${this.buttonId}"
|
|
5462
5462
|
part="${exports.PontProviderField.parts.button}"
|
|
@@ -5481,7 +5481,7 @@
|
|
|
5481
5481
|
>
|
|
5482
5482
|
${this._providers.map(r=>this._renderButton(t.find(n=>n.provider===r)??{provider:r}))}
|
|
5483
5483
|
</pont-field>
|
|
5484
|
-
`}};exports.PontProviderField._ROOT="provider-field";exports.PontProviderField._BUTTON="button";exports.PontProviderField.DESIGN_PROVIDERS=["google","apple","github"];kt([a({type:String})],exports.PontProviderField.prototype,"seed",2);kt([a({attribute:"custom-id",type:String})],exports.PontProviderField.prototype,"customId",2);kt([a({type:Array})],exports.PontProviderField.prototype,"providers",2);kt([a({type:String})],exports.PontProviderField.prototype,"content",2);kt([a({type:String})],exports.PontProviderField.prototype,"variant",2);kt([a({type:String})],exports.PontProviderField.prototype,"size",2);kt([a({type:String})],exports.PontProviderField.prototype,"prompt",2);kt([a({attribute:"icon-align",type:String})],exports.PontProviderField.prototype,"iconAlign",2);kt([a({type:String})],exports.PontProviderField.prototype,"label",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"disabled",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"loading",2);kt([a({type:String})],exports.PontProviderField.prototype,"event",2);kt([a({type:Array})],exports.PontProviderField.prototype,"overrides",2);exports.PontProviderField=kt([p("pont-provider-field")],exports.PontProviderField);const
|
|
5484
|
+
`}};exports.PontProviderField._ROOT="provider-field";exports.PontProviderField._BUTTON="button";exports.PontProviderField.DESIGN_PROVIDERS=["google","apple","github"];kt([a({type:String})],exports.PontProviderField.prototype,"seed",2);kt([a({attribute:"custom-id",type:String})],exports.PontProviderField.prototype,"customId",2);kt([a({type:Array})],exports.PontProviderField.prototype,"providers",2);kt([a({type:String})],exports.PontProviderField.prototype,"content",2);kt([a({type:String})],exports.PontProviderField.prototype,"variant",2);kt([a({type:String})],exports.PontProviderField.prototype,"size",2);kt([a({type:String})],exports.PontProviderField.prototype,"prompt",2);kt([a({attribute:"icon-align",type:String})],exports.PontProviderField.prototype,"iconAlign",2);kt([a({type:String})],exports.PontProviderField.prototype,"label",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"disabled",2);kt([a({type:Boolean})],exports.PontProviderField.prototype,"loading",2);kt([a({type:String})],exports.PontProviderField.prototype,"event",2);kt([a({type:Array})],exports.PontProviderField.prototype,"overrides",2);exports.PontProviderField=kt([p("pont-provider-field")],exports.PontProviderField);const $0={identifier:""};var P0=Object.defineProperty,C0=Object.getOwnPropertyDescriptor,Ln=(e,t,r,n)=>{for(var o=n>1?void 0:n?C0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&P0(t,r,o),o};exports.PontEditIdentifier=class extends f{constructor(){super(...arguments),this.seed=wt(),this.identifier=$0.identifier,this.event="",this._handleClick=()=>{tt.processLoginflowEvent({event:this.event})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEditIdentifier.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontEditIdentifier.ICON}`}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){return l`
|
|
5485
5485
|
<div>
|
|
5486
5486
|
<pont-typography-p>${this.identifier}</pont-typography-p>
|
|
5487
5487
|
<div class="pont-flex pont-items-center">
|
|
@@ -5490,14 +5490,14 @@
|
|
|
5490
5490
|
>
|
|
5491
5491
|
</div>
|
|
5492
5492
|
</div>
|
|
5493
|
-
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${et}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Ln([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Ln([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Ln([p("pont-edit-identifier")],exports.PontEditIdentifier);function
|
|
5494
|
-
]))+`;he.KANJI=new RegExp(r,"g"),he.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),he.BYTE=new RegExp(n,"g"),he.NUMERIC=new RegExp(e,"g"),he.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return he.testKanji=function(c){return o.test(c)},he.testNumeric=function(c){return i.test(c)},he.testAlphanumeric=function(c){return s.test(c)},he}var Vc;function to(){return Vc||(Vc=1,(function(e){const t=zh(),r=Vh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return n(i)}catch{return s}}})(vs)),vs}var Hc;function
|
|
5495
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),n.put(i,13)}},Cs=r,Cs}var Ss={exports:{}},Zc;function
|
|
5496
|
-
Suggested mode is: `+t.toString(R));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new n(S);case t.KANJI:return new i(S);case t.BYTE:return new o(S)}}e.fromArray=function(D){return D.reduce(function(L,R){return typeof R=="string"?L.push(x(R,null)):R.data&&L.push(x(R.data,R.mode)),L},[])},e.fromString=function(D,L){const R=b(D,d.isKanjiModeEnabled()),K=C(R),O=P(K,L),A=c.find_path(O.map,"start","end"),T=[];for(let E=1;E<A.length-1;E++)T.push(O.table[A[E]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(_s)),_s}var Xc;function
|
|
5493
|
+
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${et}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Ln([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Ln([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Ln([p("pont-edit-identifier")],exports.PontEditIdentifier);function S0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ho={},ss,Ic;function E0(){return Ic||(Ic=1,ss=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ss}var as={},rr={},Ac;function Xr(){if(Ac)return rr;Ac=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return rr.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},rr.getSymbolTotalCodewords=function(n){return t[n]},rr.getBCHDigit=function(r){let n=0;for(;r!==0;)n++,r>>>=1;return n},rr.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},rr.isKanjiModeEnabled=function(){return typeof e<"u"},rr.toSJIS=function(n){return e(n)},rr}var ls={},Tc;function fl(){return Tc||(Tc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(ls)),ls}var ds,Dc;function x0(){if(Dc)return ds;Dc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let n=0;n<r;n++)this.putBit((t>>>r-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ds=e,ds}var cs,Lc;function O0(){if(Lc)return cs;Lc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,n,o){const i=t*this.size+r;this.data[i]=n,o&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,n){this.data[t*this.size+r]^=n},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},cs=e,cs}var ps={},Fc;function R0(){return Fc||(Fc=1,(function(e){const t=Xr().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const o=Math.floor(n/7)+2,i=t(n),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,d=[i-7];for(let c=1;c<o-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(n){const o=[],i=e.getRowColCoords(n),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||o.push([i[d],i[c]]);return o}})(ps)),ps}var hs={},kc;function I0(){if(kc)return hs;kc=1;const e=Xr().getSymbolSize,t=7;return hs.getPositions=function(n){const o=e(n);return[[0,0],[o-t,0],[0,o-t]]},hs}var us={},Nc;function A0(){return Nc||(Nc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const i=o.size;let s=0,d=0,c=0,m=null,v=null;for(let b=0;b<i;b++){d=c=0,m=v=null;for(let w=0;w<i;w++){let _=o.get(b,w);_===m?d++:(d>=5&&(s+=t.N1+(d-5)),m=_,d=1),_=o.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(o){const i=o.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const m=o.get(d,c)+o.get(d,c+1)+o.get(d+1,c)+o.get(d+1,c+1);(m===4||m===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const i=o.size;let s=0,d=0,c=0;for(let m=0;m<i;m++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|o.get(m,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|o.get(v,m),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let c=0;c<s;c++)i+=o.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(n,o,i){switch(n){case e.Patterns.PATTERN000:return(o+i)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(o+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return o*i%2+o*i%3===0;case e.Patterns.PATTERN110:return(o*i%2+o*i%3)%2===0;case e.Patterns.PATTERN111:return(o*i%3+(o+i)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(o,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(o,c,d))},e.getBestMask=function(o,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let m=0;m<s;m++){i(m),e.applyMask(m,o);const v=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(m,o),v<c&&(c=v,d=m)}return d}})(us)),us}var jn={},Mc;function qh(){if(Mc)return jn;Mc=1;const e=fl(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return jn.getBlocksCount=function(o,i){switch(i){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},jn.getTotalCodewordsCount=function(o,i){switch(i){case e.L:return r[(o-1)*4+0];case e.M:return r[(o-1)*4+1];case e.Q:return r[(o-1)*4+2];case e.H:return r[(o-1)*4+3];default:return}},jn}var ms={},Zo={},Bc;function T0(){if(Bc)return Zo;Bc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let n=1;for(let o=0;o<255;o++)e[o]=n,t[n]=o,n<<=1,n&256&&(n^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Zo.log=function(n){if(n<1)throw new Error("log("+n+")");return t[n]},Zo.exp=function(n){return e[n]},Zo.mul=function(n,o){return n===0||o===0?0:e[t[n]+t[o]]},Zo}var Uc;function D0(){return Uc||(Uc=1,(function(e){const t=T0();e.mul=function(n,o){const i=new Uint8Array(n.length+o.length-1);for(let s=0;s<n.length;s++)for(let d=0;d<o.length;d++)i[s+d]^=t.mul(n[s],o[d]);return i},e.mod=function(n,o){let i=new Uint8Array(n);for(;i.length-o.length>=0;){const s=i[0];for(let c=0;c<o.length;c++)i[c]^=t.mul(o[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let i=0;i<n;i++)o=e.mul(o,new Uint8Array([1,t.exp(i)]));return o}})(ms)),ms}var gs,jc;function L0(){if(jc)return gs;jc=1;const e=D0();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(n.length+this.degree);o.set(n);const i=e.mod(o,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},gs=t,gs}var fs={},vs={},bs={},qc;function zh(){return qc||(qc=1,bs.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),bs}var he={},zc;function Vh(){if(zc)return he;zc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
|
|
5494
|
+
]))+`;he.KANJI=new RegExp(r,"g"),he.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),he.BYTE=new RegExp(n,"g"),he.NUMERIC=new RegExp(e,"g"),he.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return he.testKanji=function(c){return o.test(c)},he.testNumeric=function(c){return i.test(c)},he.testAlphanumeric=function(c){return s.test(c)},he}var Vc;function to(){return Vc||(Vc=1,(function(e){const t=zh(),r=Vh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return n(i)}catch{return s}}})(vs)),vs}var Hc;function F0(){return Hc||(Hc=1,(function(e){const t=Xr(),r=qh(),n=fl(),o=to(),i=zh(),s=7973,d=t.getBCHDigit(s);function c(w,_,C){for(let P=1;P<=40;P++)if(_<=e.getCapacity(P,C,w))return P}function m(w,_){return o.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const x=m(P.mode,_);C+=x+P.getBitsLength()}),C}function b(w,_){for(let C=1;C<=40;C++)if(v(w,C)<=e.getCapacity(C,_,o.MIXED))return C}e.from=function(_,C){return i.isValid(_)?parseInt(_,10):C},e.getCapacity=function(_,C,P){if(!i.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=o.BYTE);const x=t.getSymbolTotalCodewords(_),S=r.getTotalCodewordsCount(_,C),D=(x-S)*8;if(P===o.MIXED)return D;const L=D-m(P,_);switch(P){case o.NUMERIC:return Math.floor(L/10*3);case o.ALPHANUMERIC:return Math.floor(L/11*2);case o.KANJI:return Math.floor(L/13);case o.BYTE:default:return Math.floor(L/8)}},e.getBestVersionForData=function(_,C){let P;const x=n.from(C,n.M);if(Array.isArray(_)){if(_.length>1)return b(_,x);if(_.length===0)return 1;P=_[0]}else P=_;return c(P.mode,P.getLength(),x)},e.getEncodedBits=function(_){if(!i.isValid(_)||_<7)throw new Error("Invalid QR Code version");let C=_<<12;for(;t.getBCHDigit(C)-d>=0;)C^=s<<t.getBCHDigit(C)-d;return _<<12|C}})(fs)),fs}var ys={},Gc;function k0(){if(Gc)return ys;Gc=1;const e=Xr(),t=1335,r=21522,n=e.getBCHDigit(t);return ys.getEncodedBits=function(i,s){const d=i.bit<<3|s;let c=d<<10;for(;e.getBCHDigit(c)-n>=0;)c^=t<<e.getBCHDigit(c)-n;return(d<<10|c)^r},ys}var _s={},ws,Kc;function N0(){if(Kc)return ws;Kc=1;const e=to();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let o,i,s;for(o=0;o+3<=this.data.length;o+=3)i=this.data.substr(o,3),s=parseInt(i,10),n.put(s,10);const d=this.data.length-o;d>0&&(i=this.data.substr(o),s=parseInt(i,10),n.put(s,d*3+1))},ws=t,ws}var $s,Wc;function M0(){if(Wc)return $s;Wc=1;const e=to(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=e.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[i]),6)},$s=r,$s}var Ps,Yc;function B0(){if(Yc)return Ps;Yc=1;const e=to();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(n){return n*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let n=0,o=this.data.length;n<o;n++)r.put(this.data[n],8)},Ps=t,Ps}var Cs,Qc;function U0(){if(Qc)return Cs;Qc=1;const e=to(),t=Xr();function r(n){this.mode=e.KANJI,this.data=n}return r.getBitsLength=function(o){return o*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let o;for(o=0;o<this.data.length;o++){let i=t.toSJIS(this.data[o]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
5495
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),n.put(i,13)}},Cs=r,Cs}var Ss={exports:{}},Zc;function j0(){return Zc||(Zc=1,(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},s={};s[n]=0;var d=t.PriorityQueue.make();d.push(n,0);for(var c,m,v,b,w,_,C,P,x;!d.empty();){c=d.pop(),m=c.value,b=c.cost,w=r[m]||{};for(v in w)w.hasOwnProperty(v)&&(_=w[v],C=b+_,P=s[v],x=typeof s[v]>"u",(x||P>C)&&(s[v]=C,d.push(v,C),i[v]=m))}if(typeof o<"u"&&typeof s[o]>"u"){var S=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ss)),Ss.exports}var Jc;function q0(){return Jc||(Jc=1,(function(e){const t=to(),r=N0(),n=M0(),o=B0(),i=U0(),s=Vh(),d=Xr(),c=j0();function m(S){return unescape(encodeURIComponent(S)).length}function v(S,D,L){const R=[];let K;for(;(K=S.exec(L))!==null;)R.push({data:K[0],index:K.index,mode:D,length:K[0].length});return R}function b(S){const D=v(s.NUMERIC,t.NUMERIC,S),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,S);let R,K;return d.isKanjiModeEnabled()?(R=v(s.BYTE,t.BYTE,S),K=v(s.KANJI,t.KANJI,S)):(R=v(s.BYTE_KANJI,t.BYTE,S),K=[]),D.concat(L,R,K).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(S,D){switch(D){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return n.getBitsLength(S);case t.KANJI:return i.getBitsLength(S);case t.BYTE:return o.getBitsLength(S)}}function _(S){return S.reduce(function(D,L){const R=D.length-1>=0?D[D.length-1]:null;return R&&R.mode===L.mode?(D[D.length-1].data+=L.data,D):(D.push(L),D)},[])}function C(S){const D=[];for(let L=0;L<S.length;L++){const R=S[L];switch(R.mode){case t.NUMERIC:D.push([R,{data:R.data,mode:t.ALPHANUMERIC,length:R.length},{data:R.data,mode:t.BYTE,length:R.length}]);break;case t.ALPHANUMERIC:D.push([R,{data:R.data,mode:t.BYTE,length:R.length}]);break;case t.KANJI:D.push([R,{data:R.data,mode:t.BYTE,length:m(R.data)}]);break;case t.BYTE:D.push([{data:R.data,mode:t.BYTE,length:m(R.data)}])}}return D}function P(S,D){const L={},R={start:{}};let K=["start"];for(let O=0;O<S.length;O++){const A=S[O],T=[];for(let E=0;E<A.length;E++){const N=A[E],F=""+O+E;T.push(F),L[F]={node:N,lastCount:0},R[F]={};for(let $=0;$<K.length;$++){const k=K[$];L[k]&&L[k].node.mode===N.mode?(R[k][F]=w(L[k].lastCount+N.length,N.mode)-w(L[k].lastCount,N.mode),L[k].lastCount+=N.length):(L[k]&&(L[k].lastCount=N.length),R[k][F]=w(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,D))}}K=T}for(let O=0;O<K.length;O++)R[K[O]].end=0;return{map:R,table:L}}function x(S,D){let L;const R=t.getBestModeForData(S);if(L=t.from(D,R),L!==t.BYTE&&L.bit<R.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(L)+`.
|
|
5496
|
+
Suggested mode is: `+t.toString(R));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new n(S);case t.KANJI:return new i(S);case t.BYTE:return new o(S)}}e.fromArray=function(D){return D.reduce(function(L,R){return typeof R=="string"?L.push(x(R,null)):R.data&&L.push(x(R.data,R.mode)),L},[])},e.fromString=function(D,L){const R=b(D,d.isKanjiModeEnabled()),K=C(R),O=P(K,L),A=c.find_path(O.map,"start","end"),T=[];for(let E=1;E<A.length-1;E++)T.push(O.table[A[E]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(_s)),_s}var Xc;function z0(){if(Xc)return as;Xc=1;const e=Xr(),t=fl(),r=x0(),n=O0(),o=R0(),i=I0(),s=A0(),d=qh(),c=L0(),m=F0(),v=k0(),b=to(),w=q0();function _(O,A){const T=O.size,E=i.getPositions(A);for(let N=0;N<E.length;N++){const F=E[N][0],$=E[N][1];for(let k=-1;k<=7;k++)if(!(F+k<=-1||T<=F+k))for(let M=-1;M<=7;M++)$+M<=-1||T<=$+M||(k>=0&&k<=6&&(M===0||M===6)||M>=0&&M<=6&&(k===0||k===6)||k>=2&&k<=4&&M>=2&&M<=4?O.set(F+k,$+M,!0,!0):O.set(F+k,$+M,!1,!0))}}function C(O){const A=O.size;for(let T=8;T<A-8;T++){const E=T%2===0;O.set(T,6,E,!0),O.set(6,T,E,!0)}}function P(O,A){const T=o.getPositions(A);for(let E=0;E<T.length;E++){const N=T[E][0],F=T[E][1];for(let $=-2;$<=2;$++)for(let k=-2;k<=2;k++)$===-2||$===2||k===-2||k===2||$===0&&k===0?O.set(N+$,F+k,!0,!0):O.set(N+$,F+k,!1,!0)}}function x(O,A){const T=O.size,E=m.getEncodedBits(A);let N,F,$;for(let k=0;k<18;k++)N=Math.floor(k/3),F=k%3+T-8-3,$=(E>>k&1)===1,O.set(N,F,$,!0),O.set(F,N,$,!0)}function S(O,A,T){const E=O.size,N=v.getEncodedBits(A,T);let F,$;for(F=0;F<15;F++)$=(N>>F&1)===1,F<6?O.set(F,8,$,!0):F<8?O.set(F+1,8,$,!0):O.set(E-15+F,8,$,!0),F<8?O.set(8,E-F-1,$,!0):F<9?O.set(8,15-F-1+1,$,!0):O.set(8,15-F-1,$,!0);O.set(E-8,8,1,!0)}function D(O,A){const T=O.size;let E=-1,N=T-1,F=7,$=0;for(let k=T-1;k>0;k-=2)for(k===6&&k--;;){for(let M=0;M<2;M++)if(!O.isReserved(N,k-M)){let Xt=!1;$<A.length&&(Xt=(A[$]>>>F&1)===1),O.set(N,k-M,Xt),F--,F===-1&&($++,F=7)}if(N+=E,N<0||T<=N){N-=E,E=-E;break}}}function L(O,A,T){const E=new r;T.forEach(function(M){E.put(M.mode.bit,4),E.put(M.getLength(),b.getCharCountIndicator(M.mode,O)),M.write(E)});const N=e.getSymbolTotalCodewords(O),F=d.getTotalCodewordsCount(O,A),$=(N-F)*8;for(E.getLengthInBits()+4<=$&&E.put(0,4);E.getLengthInBits()%8!==0;)E.putBit(0);const k=($-E.getLengthInBits())/8;for(let M=0;M<k;M++)E.put(M%2?17:236,8);return R(E,O,A)}function R(O,A,T){const E=e.getSymbolTotalCodewords(A),N=d.getTotalCodewordsCount(A,T),F=E-N,$=d.getBlocksCount(A,T),k=E%$,M=$-k,Xt=Math.floor(E/$),pe=Math.floor(F/$),Fn=pe+1,eo=Xt-pe,$r=new c(eo);let ro=0;const It=new Array($),Pl=new Array($);let Gi=0;const Gh=new Uint8Array(O.buffer);for(let oo=0;oo<$;oo++){const Wi=oo<M?pe:Fn;It[oo]=Gh.slice(ro,ro+Wi),Pl[oo]=$r.encode(It[oo]),ro+=Wi,Gi=Math.max(Gi,Wi)}const Ki=new Uint8Array(E);let Cl=0,Be,Ue;for(Be=0;Be<Gi;Be++)for(Ue=0;Ue<$;Ue++)Be<It[Ue].length&&(Ki[Cl++]=It[Ue][Be]);for(Be=0;Be<eo;Be++)for(Ue=0;Ue<$;Ue++)Ki[Cl++]=Pl[Ue][Be];return Ki}function K(O,A,T,E){let N;if(Array.isArray(O))N=w.fromArray(O);else if(typeof O=="string"){let Xt=A;if(!Xt){const pe=w.rawSplit(O);Xt=m.getBestVersionForData(pe,T)}N=w.fromString(O,Xt||40)}else throw new Error("Invalid data");const F=m.getBestVersionForData(N,T);if(!F)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=F;else if(A<F)throw new Error(`
|
|
5497
5497
|
The chosen QR Code version cannot contain this amount of data.
|
|
5498
5498
|
Minimum version required to store current data is: `+F+`.
|
|
5499
|
-
`);const $=L(A,T,N),k=e.getSymbolSize(A),M=new n(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&x(M,A),D(M,$),isNaN(E)&&(E=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(E,M),S(M,T,E),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:E,segments:N}}return as.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let E=t.M,N,F;return typeof T<"u"&&(E=t.from(T.errorCorrectionLevel,t.M),N=m.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),K(A,N,E,F)},as}var Es={},xs={},tp;function Hh(){return tp||(tp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){const i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){const s=o.modules.size,d=o.modules.data,c=e.getScale(s,i),m=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<m;w++)for(let _=0;_<m;_++){let C=(w*m+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<m-v&&_<m-v){const x=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[x*s+S]?1:0]}n[C++]=P.r,n[C++]=P.g,n[C++]=P.b,n[C]=P.a}}})(xs)),xs}var ep;function
|
|
5500
|
-
`;return typeof d=="function"&&d(null,x),x},Os}var op;function
|
|
5499
|
+
`);const $=L(A,T,N),k=e.getSymbolSize(A),M=new n(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&x(M,A),D(M,$),isNaN(E)&&(E=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(E,M),S(M,T,E),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:E,segments:N}}return as.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let E=t.M,N,F;return typeof T<"u"&&(E=t.from(T.errorCorrectionLevel,t.M),N=m.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),K(A,N,E,F)},as}var Es={},xs={},tp;function Hh(){return tp||(tp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){const i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){const s=o.modules.size,d=o.modules.data,c=e.getScale(s,i),m=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<m;w++)for(let _=0;_<m;_++){let C=(w*m+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<m-v&&_<m-v){const x=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[x*s+S]?1:0]}n[C++]=P.r,n[C++]=P.g,n[C++]=P.b,n[C]=P.a}}})(xs)),xs}var ep;function V0(){return ep||(ep=1,(function(e){const t=Hh();function r(o,i,s){o.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,d){let c=d,m=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(m=n()),c=t.getOptions(c);const v=t.getImageWidth(i.modules.size,c),b=m.getContext("2d"),w=b.createImageData(v,v);return t.qrToImageData(w.data,i,c),r(b,m,v),b.putImageData(w,0,0),m},e.renderToDataURL=function(i,s,d){let c=d;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const m=e.render(i,s,c),v=c.type||"image/png",b=c.rendererOpts||{};return m.toDataURL(v,b.quality)}})(Es)),Es}var Os={},rp;function H0(){if(rp)return Os;rp=1;const e=Hh();function t(o,i){const s=o.a/255,d=i+'="'+o.hex+'"';return s<1?d+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':d}function r(o,i,s){let d=o+i;return typeof s<"u"&&(d+=" "+s),d}function n(o,i,s){let d="",c=0,m=!1,v=0;for(let b=0;b<o.length;b++){const w=Math.floor(b%i),_=Math.floor(b/i);!w&&!m&&(m=!0),o[b]?(v++,b>0&&w>0&&o[b-1]||(d+=m?r("M",w+s,.5+_+s):r("m",c,0),c=0,m=!1),w+1<i&&o[b+1]||(d+=r("h",v),v=0)):c++}return d}return Os.render=function(i,s,d){const c=e.getOptions(s),m=i.modules.size,v=i.modules.data,b=m+c.margin*2,w=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+b+"v"+b+'H0z"/>':"",_="<path "+t(c.color.dark,"stroke")+' d="'+n(v,m,c.margin)+'"/>',C='viewBox="0 0 '+b+" "+b+'"',x='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+C+' shape-rendering="crispEdges">'+w+_+`</svg>
|
|
5500
|
+
`;return typeof d=="function"&&d(null,x),x},Os}var op;function G0(){if(op)return ho;op=1;const e=E0(),t=z0(),r=V0(),n=H0();function o(i,s,d,c,m){const v=[].slice.call(arguments,1),b=v.length,w=typeof v[b-1]=="function";if(!w&&!e())throw new Error("Callback required as last argument");if(w){if(b<2)throw new Error("Too few arguments provided");b===2?(m=d,d=s,s=c=void 0):b===3&&(s.getContext&&typeof m>"u"?(m=c,c=void 0):(m=c,c=d,d=s,s=void 0))}else{if(b<1)throw new Error("Too few arguments provided");return b===1?(d=s,s=c=void 0):b===2&&!s.getContext&&(c=d,d=s,s=void 0),new Promise(function(_,C){try{const P=t.create(d,c);_(i(P,s,c))}catch(P){C(P)}})}try{const _=t.create(d,c);m(null,i(_,s,c))}catch(_){m(_)}}return ho.create=t.create,ho.toCanvas=o.bind(null,r.render),ho.toDataURL=o.bind(null,r.renderToDataURL),ho.toString=o.bind(null,function(i,s,d){return n.render(i,d)}),ho}var K0=G0();const W0=S0(K0),qn={url:"",timeout:10,reappearButtonText:"Show QR Code",errorCorrection:"M"};var Y0=Object.defineProperty,Q0=Object.getOwnPropertyDescriptor,Je=(e,t,r,n)=>{for(var o=n>1?void 0:n?Q0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Y0(t,r,o),o};exports.PontQrCode=class extends f{constructor(){super(...arguments),this.seed=wt(),this.url=qn.url,this.timeout=qn.timeout,this.reappearButtonText=qn.reappearButtonText,this.disabled=!1,this.errorCorrection=qn.errorCorrection,this._obscured=!1,this._canvasElement=null,this._handleReappear=()=>{this.disabled||(this._obscured=!1,this._clearTimer(),this._startTimer(),this.emit("pont-qr:reappear",{id:this.rootId,url:this.url}))}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontQrCode.TAG}-${this.seed}`}get canvasId(){return`${this.rootId}-${exports.PontQrCode.QR_CANVAS}`}get overlayId(){return`${this.rootId}-${exports.PontQrCode.OVERLAY}`}get reappearButtonId(){return`${this.rootId}-${exports.PontQrCode.REAPPEAR_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startTimer()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}firstUpdated(){const t=this.querySelector(`#${this.canvasId}`);t&&(this._canvasElement=t,this._renderQR())}updated(t){(t.has("url")||t.has("errorCorrection"))&&(this._renderQR(),this._obscured=!1,this._clearTimer(),this._startTimer()),t.has("timeout")&&(this._clearTimer(),this._startTimer())}_startTimer(){this.timeout<=0||(this._clearTimer(),this._timer=window.setTimeout(()=>{this._obscured=!0,this._timer=void 0,this.emit("pont-qr:obscured",{id:this.rootId,url:this.url})},this.timeout*1e3))}_clearTimer(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}_renderQR(){if(!this._canvasElement||!this.url)return;const t=getComputedStyle(this),r=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-width"))||200,n=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-height"))||200;this._canvasElement.width=r,this._canvasElement.height=n;const o={errorCorrectionLevel:this.errorCorrection};W0.toCanvas(this._canvasElement,this.url,o,i=>{i&&(console.warn("QR generation failed:",i),this.emit("pont-qr:error",{error:i,url:this.url}))})}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this._obscured&&!this.disabled;return l`
|
|
5501
5501
|
<div
|
|
5502
5502
|
part=${exports.PontQrCode.PARTS.root}
|
|
5503
5503
|
id=${this.rootId}
|
|
@@ -5530,7 +5530,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5530
5530
|
`:h}
|
|
5531
5531
|
</div>
|
|
5532
5532
|
</div>
|
|
5533
|
-
`}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${et}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};Je([a({type:String})],exports.PontQrCode.prototype,"seed",2);Je([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);Je([a({type:String})],exports.PontQrCode.prototype,"url",2);Je([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);Je([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);Je([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);Je([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);Je([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=Je([p("pont-qr-code")],exports.PontQrCode);const Jo={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var
|
|
5533
|
+
`}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${et}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};Je([a({type:String})],exports.PontQrCode.prototype,"seed",2);Je([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);Je([a({type:String})],exports.PontQrCode.prototype,"url",2);Je([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);Je([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);Je([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);Je([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);Je([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=Je([p("pont-qr-code")],exports.PontQrCode);const Jo={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var Z0=Object.defineProperty,J0=Object.getOwnPropertyDescriptor,_r=(e,t,r,n)=>{for(var o=n>1?void 0:n?J0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Z0(t,r,o),o};exports.PontSecret=class extends jt{constructor(){super(...arguments),this.title=Jo.title,this.secret=Jo.secret,this.issuer=Jo.issuer,this.account=Jo.account,this.secretLabel=Jo.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
|
|
5534
5534
|
<div part=${exports.PontSecret.PARTS.root} class="pont-secret-root">
|
|
5535
5535
|
<div part=${exports.PontSecret.PARTS.card} class="pont-secret-card">
|
|
5536
5536
|
<div part=${exports.PontSecret.PARTS.title} class="pont-secret-title">
|
|
@@ -5586,7 +5586,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5586
5586
|
</div>
|
|
5587
5587
|
</div>
|
|
5588
5588
|
</div>
|
|
5589
|
-
`}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${et}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};_r([a({type:String})],exports.PontSecret.prototype,"title",2);_r([a({type:String})],exports.PontSecret.prototype,"secret",2);_r([a({type:String})],exports.PontSecret.prototype,"issuer",2);_r([a({type:String})],exports.PontSecret.prototype,"account",2);_r([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);_r([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);_r([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=_r([p("pont-secret")],exports.PontSecret);const Rs={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var
|
|
5589
|
+
`}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${et}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};_r([a({type:String})],exports.PontSecret.prototype,"title",2);_r([a({type:String})],exports.PontSecret.prototype,"secret",2);_r([a({type:String})],exports.PontSecret.prototype,"issuer",2);_r([a({type:String})],exports.PontSecret.prototype,"account",2);_r([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);_r([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);_r([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=_r([p("pont-secret")],exports.PontSecret);const Rs={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var X0=Object.defineProperty,t2=Object.getOwnPropertyDescriptor,zo=(e,t,r,n)=>{for(var o=n>1?void 0:n?t2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&X0(t,r,o),o};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=Rs.title,this.subtitle=Rs.subtitle,this.codes=Rs.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
|
|
5590
5590
|
`);try{await navigator.clipboard.writeText(t),this.emit("pont-recovery-codes:copied",{codes:this.codes}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(r){console.warn("Failed to copy codes:",r),this.emit("pont-recovery-codes:copy-error",{error:r})}},this._handleDownload=()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
|
|
5591
5591
|
`),r=new Blob([t],{type:"text/plain"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download="recovery-codes.txt",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n),this.emit("pont-recovery-codes:downloaded",{codes:this.codes})}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this.codes&&this.codes.length>0;return l`
|
|
5592
5592
|
<div part=${exports.PontRecoveryCodes.PARTS.root} class="pont-recovery-codes-root">
|
|
@@ -5659,7 +5659,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5659
5659
|
</div>
|
|
5660
5660
|
</div>
|
|
5661
5661
|
</div>
|
|
5662
|
-
`}};exports.PontRecoveryCodes.ROOT="recovery-codes";exports.PontRecoveryCodes.CARD="card";exports.PontRecoveryCodes.TITLE="title";exports.PontRecoveryCodes.SUBTITLE="subtitle";exports.PontRecoveryCodes.CODES_LIST="codes-list";exports.PontRecoveryCodes.CODE_ITEM="code-item";exports.PontRecoveryCodes.BUTTONS="buttons";exports.PontRecoveryCodes.COPY_BUTTON="copy-button";exports.PontRecoveryCodes.DOWNLOAD_BUTTON="download-button";exports.PontRecoveryCodes.TOOLTIP="tooltip";exports.PontRecoveryCodes.TAG=`${et}-${exports.PontRecoveryCodes.ROOT}`;exports.PontRecoveryCodes.PARTS={root:exports.PontRecoveryCodes.ROOT,card:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CARD}`,title:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TITLE}`,subtitle:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.SUBTITLE}`,codesList:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODES_LIST}`,codeItem:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODE_ITEM}`,buttons:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.BUTTONS}`,copyButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.COPY_BUTTON}`,downloadButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.DOWNLOAD_BUTTON}`,tooltip:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TOOLTIP}`};zo([a({type:String})],exports.PontRecoveryCodes.prototype,"title",2);zo([a({type:String})],exports.PontRecoveryCodes.prototype,"subtitle",2);zo([a({type:Array})],exports.PontRecoveryCodes.prototype,"codes",2);zo([a({type:Boolean})],exports.PontRecoveryCodes.prototype,"disabled",2);zo([g()],exports.PontRecoveryCodes.prototype,"_copied",2);exports.PontRecoveryCodes=zo([p("pont-recovery-codes")],exports.PontRecoveryCodes);const
|
|
5662
|
+
`}};exports.PontRecoveryCodes.ROOT="recovery-codes";exports.PontRecoveryCodes.CARD="card";exports.PontRecoveryCodes.TITLE="title";exports.PontRecoveryCodes.SUBTITLE="subtitle";exports.PontRecoveryCodes.CODES_LIST="codes-list";exports.PontRecoveryCodes.CODE_ITEM="code-item";exports.PontRecoveryCodes.BUTTONS="buttons";exports.PontRecoveryCodes.COPY_BUTTON="copy-button";exports.PontRecoveryCodes.DOWNLOAD_BUTTON="download-button";exports.PontRecoveryCodes.TOOLTIP="tooltip";exports.PontRecoveryCodes.TAG=`${et}-${exports.PontRecoveryCodes.ROOT}`;exports.PontRecoveryCodes.PARTS={root:exports.PontRecoveryCodes.ROOT,card:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CARD}`,title:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TITLE}`,subtitle:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.SUBTITLE}`,codesList:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODES_LIST}`,codeItem:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODE_ITEM}`,buttons:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.BUTTONS}`,copyButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.COPY_BUTTON}`,downloadButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.DOWNLOAD_BUTTON}`,tooltip:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TOOLTIP}`};zo([a({type:String})],exports.PontRecoveryCodes.prototype,"title",2);zo([a({type:String})],exports.PontRecoveryCodes.prototype,"subtitle",2);zo([a({type:Array})],exports.PontRecoveryCodes.prototype,"codes",2);zo([a({type:Boolean})],exports.PontRecoveryCodes.prototype,"disabled",2);zo([g()],exports.PontRecoveryCodes.prototype,"_copied",2);exports.PontRecoveryCodes=zo([p("pont-recovery-codes")],exports.PontRecoveryCodes);const e2={default:U`
|
|
5663
5663
|
<circle cx="12" cy="12" r="10"/>
|
|
5664
5664
|
<line x1="12" x2="12" y1="8" y2="12"/>
|
|
5665
5665
|
<line x1="12" x2="12.01" y1="16" y2="16"/>
|
|
@@ -5678,7 +5678,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5678
5678
|
<circle cx="12" cy="12" r="10"/>
|
|
5679
5679
|
<path d="M12 16v-4"/>
|
|
5680
5680
|
<path d="M12 8h.01"/>
|
|
5681
|
-
`},Is={status:"default",palette:"default",variant:"default"};var
|
|
5681
|
+
`},Is={status:"default",palette:"default",variant:"default"};var r2=Object.defineProperty,o2=Object.getOwnPropertyDescriptor,Xe=(e,t,r,n)=>{for(var o=n>1?void 0:n?o2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&r2(t,r,o),o};exports.PontAlert=class extends f{constructor(){super(...arguments),this.seed=wt(),this.status=Is.status,this.palette=Is.palette,this.variant=Is.variant}get _defaultTitle(){return this.status==="default"?"Alert":this.status.charAt(0).toUpperCase()+this.status.slice(1)}get title(){return this._title??this._defaultTitle}set title(t){const r=this.title;this._title=t||void 0,this.requestUpdate("title",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontAlert.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontAlert.ICON}`}get titleId(){return`${this.rootId}-${exports.PontAlert.TITLE}`}get descriptionId(){return`${this.rootId}-${exports.PontAlert.DESCRIPTION}`}get _rootVariant(){let t=this.palette==="base"?"default":this.palette==="brand"?"brand":this.status==="error"?"destructive":this.status;return this.variant==="tonal"&&t!=="default"&&(t+="-tonal"),t}_renderIcon(){if(!this.icon)return h;const t=e2[this.status];return l`
|
|
5682
5682
|
<svg
|
|
5683
5683
|
id="${this.iconId}"
|
|
5684
5684
|
part="${exports.PontAlert.PARTS.icon}"
|
|
@@ -5719,11 +5719,11 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5719
5719
|
</pont-callout-description>
|
|
5720
5720
|
`:h}
|
|
5721
5721
|
</pont-callout>
|
|
5722
|
-
`}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${et}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};Xe([a({type:String})],exports.PontAlert.prototype,"seed",2);Xe([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);Xe([a({type:String})],exports.PontAlert.prototype,"status",2);Xe([a({type:String})],exports.PontAlert.prototype,"palette",2);Xe([a({type:String})],exports.PontAlert.prototype,"variant",2);Xe([a({type:String})],exports.PontAlert.prototype,"title",1);Xe([a({type:String})],exports.PontAlert.prototype,"description",2);Xe([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=Xe([p("pont-alert")],exports.PontAlert);var
|
|
5722
|
+
`}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${et}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};Xe([a({type:String})],exports.PontAlert.prototype,"seed",2);Xe([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);Xe([a({type:String})],exports.PontAlert.prototype,"status",2);Xe([a({type:String})],exports.PontAlert.prototype,"palette",2);Xe([a({type:String})],exports.PontAlert.prototype,"variant",2);Xe([a({type:String})],exports.PontAlert.prototype,"title",1);Xe([a({type:String})],exports.PontAlert.prototype,"description",2);Xe([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=Xe([p("pont-alert")],exports.PontAlert);var n2=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,Vo=(e,t,r,n)=>{for(var o=n>1?void 0:n?i2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&n2(t,r,o),o};exports.PontCountdown=class extends jt{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return l`
|
|
5723
5723
|
<div part=${this.id?this.id:"countdown"}>
|
|
5724
5724
|
<pont-typography-p>${this.renderContent()}</pont-typography-p>
|
|
5725
5725
|
</div>
|
|
5726
|
-
`}};Vo([a()],exports.PontCountdown.prototype,"content",2);Vo([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Vo([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Vo([a()],exports.PontCountdown.prototype,"id",2);Vo([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Vo([p("pont-countdown")],exports.PontCountdown);var
|
|
5726
|
+
`}};Vo([a()],exports.PontCountdown.prototype,"content",2);Vo([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Vo([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Vo([a()],exports.PontCountdown.prototype,"id",2);Vo([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Vo([p("pont-countdown")],exports.PontCountdown);var s2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,Vi=(e,t,r,n)=>{for(var o=n>1?void 0:n?a2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&s2(t,r,o),o};exports.PontBlock=class extends jt{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new W$(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await wa()}async updated(){await this.updateComplete,await wa()}_renderWatermark(){return l`
|
|
5727
5727
|
<pont-card-footer border>
|
|
5728
5728
|
<pont-watermark variant="muted"></pont-watermark>
|
|
5729
5729
|
</pont-card-footer>
|
|
@@ -5736,26 +5736,26 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5736
5736
|
<pont-card-content></pont-card-content>
|
|
5737
5737
|
${this.branding.showWatermark?this._renderWatermark():h}
|
|
5738
5738
|
</pont-card>
|
|
5739
|
-
`}};Vi([a()],exports.PontBlock.prototype,"id",2);Vi([a()],exports.PontBlock.prototype,"align",2);Vi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Vi([p("pont-block")],exports.PontBlock);var
|
|
5739
|
+
`}};Vi([a()],exports.PontBlock.prototype,"id",2);Vi([a()],exports.PontBlock.prototype,"align",2);Vi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Vi([p("pont-block")],exports.PontBlock);var l2=Object.defineProperty,d2=Object.getOwnPropertyDescriptor,vl=(e,t,r,n)=>{for(var o=n>1?void 0:n?d2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&l2(t,r,o),o};const c2="data-pont-design",p2="data-pont-design-empty",h2="data-pont-container";exports.PontContainer=class extends jt{constructor(){super(...arguments),this.id="",this.type="flex_column",this.design=new Rn(this)}createRenderRoot(){return this}get innerElement(){return this.querySelector(`:scope > [${h2}]`)}async firstUpdated(){await this.updateComplete;const t=this.innerElement;t&&this.moveLightDomChildrenInto(t),this.syncDesignState()}async updated(){await this.updateComplete,await wa(),this.syncDesignState()}syncDesignState(){var r;const t=this.design.active;this.toggleAttribute(c2,t),this.toggleAttribute(p2,t&&(((r=this.innerElement)==null?void 0:r.childElementCount)??0)===0)}render(){return l`<div
|
|
5740
5740
|
data-pont-container
|
|
5741
5741
|
part=${this.id?this.id:"container"}
|
|
5742
5742
|
data-type="${this.type}"
|
|
5743
|
-
></div>`}};vl([a()],exports.PontContainer.prototype,"id",2);vl([a()],exports.PontContainer.prototype,"type",2);exports.PontContainer=vl([p("pont-container")],exports.PontContainer);var
|
|
5743
|
+
></div>`}};vl([a()],exports.PontContainer.prototype,"id",2);vl([a()],exports.PontContainer.prototype,"type",2);exports.PontContainer=vl([p("pont-container")],exports.PontContainer);var u2=Object.defineProperty,m2=Object.getOwnPropertyDescriptor,Hi=(e,t,r,n)=>{for(var o=n>1?void 0:n?m2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&u2(t,r,o),o};exports.PontGap=class extends jt{constructor(){super(...arguments),this.size="8px",this.type="vertical",this.id=""}createRenderRoot(){return this}render(){let t={width:"0px",height:"0px"};return this.type==="vertical"?t={width:"1px",height:this.size}:t={height:"1px",width:this.size},l`
|
|
5744
5744
|
<div
|
|
5745
5745
|
part=${this.id?this.id:"gap"}
|
|
5746
5746
|
style=${X$({...t})}
|
|
5747
5747
|
></div>
|
|
5748
|
-
`}};Hi([a()],exports.PontGap.prototype,"size",2);Hi([a()],exports.PontGap.prototype,"type",2);Hi([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Hi([p("pont-gap")],exports.PontGap);var
|
|
5748
|
+
`}};Hi([a()],exports.PontGap.prototype,"size",2);Hi([a()],exports.PontGap.prototype,"type",2);Hi([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Hi([p("pont-gap")],exports.PontGap);var g2=Object.defineProperty,f2=Object.getOwnPropertyDescriptor,bl=(e,t,r,n)=>{for(var o=n>1?void 0:n?f2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&g2(t,r,o),o};const v2="data-pont-header";exports.PontHeader=class extends jt{constructor(){super(...arguments),this.id="",this.align="center"}get innerElement(){return this.querySelector(`:scope > [${v2}]`)}createRenderRoot(){return this}firstUpdated(){const t=this.innerElement;t&&this.moveLightDomChildrenInto(t)}render(){return l`
|
|
5749
5749
|
<div
|
|
5750
5750
|
data-pont-header
|
|
5751
5751
|
part=${this.id?this.id:"header"}
|
|
5752
5752
|
data-align=${this.align}
|
|
5753
5753
|
></div>
|
|
5754
|
-
`}};bl([a()],exports.PontHeader.prototype,"id",2);bl([a()],exports.PontHeader.prototype,"align",2);exports.PontHeader=bl([p("pont-header")],exports.PontHeader);var
|
|
5754
|
+
`}};bl([a()],exports.PontHeader.prototype,"id",2);bl([a()],exports.PontHeader.prototype,"align",2);exports.PontHeader=bl([p("pont-header")],exports.PontHeader);var b2=Object.defineProperty,y2=Object.getOwnPropertyDescriptor,yl=(e,t,r,n)=>{for(var o=n>1?void 0:n?y2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&b2(t,r,o),o};exports.PontSubtitle=class extends jt{get _containerElement(){return this.querySelector(`pont-typography-p[part=${this.id?this.id:"subtitle"}]`)}createRenderRoot(){return this}render(){return l`
|
|
5755
5755
|
<pont-typography-p part=${this.id?this.id:"subtitle"} id=${this.id}>
|
|
5756
5756
|
${this.content}
|
|
5757
5757
|
</pont-typography-p>
|
|
5758
|
-
`}};yl([a({type:String})],exports.PontSubtitle.prototype,"id",2);yl([a({type:String})],exports.PontSubtitle.prototype,"content",2);exports.PontSubtitle=yl([p("pont-subtitle")],exports.PontSubtitle);var
|
|
5758
|
+
`}};yl([a({type:String})],exports.PontSubtitle.prototype,"id",2);yl([a({type:String})],exports.PontSubtitle.prototype,"content",2);exports.PontSubtitle=yl([p("pont-subtitle")],exports.PontSubtitle);var _2=Object.defineProperty,w2=Object.getOwnPropertyDescriptor,_l=(e,t,r,n)=>{for(var o=n>1?void 0:n?w2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&_2(t,r,o),o};exports.PontTitle=class extends jt{get _containerElement(){return this.querySelector(`pont-typography-h[part=${this.id?this.id:"title"}]`)}createRenderRoot(){return this}render(){return l`
|
|
5759
5759
|
<pont-typography-h
|
|
5760
5760
|
part=${this.id?this.id:"title"}
|
|
5761
5761
|
level="h4"
|
|
@@ -5767,7 +5767,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5767
5767
|
* @license
|
|
5768
5768
|
* Copyright 2017 Google LLC
|
|
5769
5769
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5770
|
-
*/class Sa extends Qn{}Sa.directiveName="unsafeSVG",Sa.resultType=2;const np=Eo(Sa);var
|
|
5770
|
+
*/class Sa extends Qn{}Sa.directiveName="unsafeSVG",Sa.resultType=2;const np=Eo(Sa);var $2=Object.defineProperty,P2=Object.getOwnPropertyDescriptor,wr=(e,t,r,n)=>{for(var o=n>1?void 0:n?P2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$2(t,r,o),o};const C2=`
|
|
5771
5771
|
<svg viewBox="0 0 120 32" role="img" aria-label="Logo placeholder"
|
|
5772
5772
|
xmlns="http://www.w3.org/2000/svg" width="120" height="32">
|
|
5773
5773
|
<rect x="0.75" y="0.75" width="118.5" height="30.5" rx="6"
|
|
@@ -5780,7 +5780,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5780
5780
|
fill="currentColor" fill-opacity="0.18"/>
|
|
5781
5781
|
</svg>`;exports.PontLogo=class extends jt{constructor(){super(...arguments),this.align="center",this.width="",this.height="",this.theme=this.getTheme(),this.isSvg=!1,this.design=new Rn(this)}get _containerElement(){return this.querySelector(".pont-logo-wrapper")}connectedCallback(){super.connectedCallback(),this.style.display="grid",this.updateLayoutFromProps(),this.observer=new MutationObserver(()=>{this.theme=this.getTheme()}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}updated(t){super.updated(t),(t.has("align")||t.has("width")||t.has("height"))&&this.updateLayoutFromProps()}updateLayoutFromProps(){const t=this._containerElement;t&&(this.align&&(t.style.justifySelf=this.align),this.width&&(t.style.width=this.width),this.height&&(t.style.height=this.height))}disconnectedCallback(){var t;(t=this.observer)==null||t.disconnect(),super.disconnectedCallback()}getTheme(){return document.documentElement.getAttribute("data-theme")??"light"}createRenderRoot(){return this}render(){const t=rP(this.imageUrl,this.theme);if(!t&&this.design.active)return this.isSvg=!0,l`
|
|
5782
5782
|
<div class="pont-logo-wrapper" part=${this.id?this.id:"logo"}>
|
|
5783
|
-
${np(
|
|
5783
|
+
${np(C2)}
|
|
5784
5784
|
</div>
|
|
5785
5785
|
`;const r=t?iP(t):null;return this.isSvg=!!r,l`
|
|
5786
5786
|
<div class="pont-logo-wrapper">
|
|
@@ -5792,7 +5792,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5792
5792
|
/>
|
|
5793
5793
|
`}
|
|
5794
5794
|
</div>
|
|
5795
|
-
`}};wr([a({type:String})],exports.PontLogo.prototype,"id",2);wr([a({type:String,attribute:"image-url"})],exports.PontLogo.prototype,"imageUrl",2);wr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"align",2);wr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"width",2);wr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"height",2);wr([g()],exports.PontLogo.prototype,"theme",2);wr([g()],exports.PontLogo.prototype,"isSvg",2);exports.PontLogo=wr([p("pont-logo")],exports.PontLogo);const zn={variant:"brand",logoAlign:"end",label:"Powered by"};var
|
|
5795
|
+
`}};wr([a({type:String})],exports.PontLogo.prototype,"id",2);wr([a({type:String,attribute:"image-url"})],exports.PontLogo.prototype,"imageUrl",2);wr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"align",2);wr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"width",2);wr([a({type:String,reflect:!0})],exports.PontLogo.prototype,"height",2);wr([g()],exports.PontLogo.prototype,"theme",2);wr([g()],exports.PontLogo.prototype,"isSvg",2);exports.PontLogo=wr([p("pont-logo")],exports.PontLogo);const zn={variant:"brand",logoAlign:"end",label:"Powered by"};var S2=Object.defineProperty,E2=Object.getOwnPropertyDescriptor,Ho=(e,t,r,n)=>{for(var o=n>1?void 0:n?E2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&S2(t,r,o),o};exports.PontWatermark=class extends f{constructor(){super(...arguments),this.seed=wt(),this.variant=zn.variant,this.logoAlign=zn.logoAlign,this._label=zn.label}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:zn.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontWatermark.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontWatermark.LABEL}`}get logoId(){return`${this.rootId}-${exports.PontWatermark.LOGO}`}_renderLabel(){return l`
|
|
5796
5796
|
<span id="${this.labelId}" part="${exports.PontWatermark.PARTS.label}">
|
|
5797
5797
|
${this.label}
|
|
5798
5798
|
</span>
|
|
@@ -5826,5 +5826,5 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5826
5826
|
>
|
|
5827
5827
|
${this.logoAlign==="start"?l`${this._renderLogo()} ${this._renderLabel()}`:l`${this._renderLabel()} ${this._renderLogo()}`}
|
|
5828
5828
|
</span>
|
|
5829
|
-
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${et}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Ho([a({type:String})],exports.PontWatermark.prototype,"seed",2);Ho([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Ho([a({type:String})],exports.PontWatermark.prototype,"variant",2);Ho([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Ho([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Ho([p("pont-watermark")],exports.PontWatermark);function
|
|
5829
|
+
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${et}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Ho([a({type:String})],exports.PontWatermark.prototype,"seed",2);Ho([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Ho([a({type:String})],exports.PontWatermark.prototype,"variant",2);Ho([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Ho([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Ho([p("pont-watermark")],exports.PontWatermark);function x2(){return tt}exports.BaseElement=jt;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontNavUser=Fe;exports.PontPaginator=zr;exports.PontUserSnippet=zi;exports.closeAccountSettingsModal=ml;exports.closeMemberManagementModal=Nh;exports.openAccountSettingsModal=Fh;exports.openMemberManagementModal=kh;exports.setLocales=Mh;exports.useAuthProvider=x2;
|
|
5830
5830
|
//# sourceMappingURL=index.js.map
|