PageSourceSearch

https://buddyupcommunities.firebaseapp.com/assets/unsubscribe-CxzTTOCr.js

js buddyupcommunities.firebaseapp.com collected 2026-10-03 14:05:35 UTC 7,100 bytes, 117 lines download raw bytes

1import"./iron-icon-uWzU_ETe.js";import"./iron-icons-CfMukaon.js";import"./paper-dialog-BHUTgLrq.js";import{u as m,M as h,h as b,g as l,l as g,A as s,E as y,G as d,r as a,F as c,O as n,n as v,aU as w}from"./index-Db445JXE.js";import"./bu-button-CM7Axavt.js";import"./bu-input-DDVYxuOq.js";import"./dialog-BQHiCnDX.js";import"./iron-flex-layout-gopRBjDy.js";import"./iron-a11y-keys-behavior-CxI8uOwS.js";import"./iron-validatable-behavior-Dxi6swMk.js";import"./bu-dialog-DrsLcWkX.js";import"./bu-alert-dialog-CiRXI9EH.js";import"./bu-button2-DlO6dG56.js";import"./QuestionsUtil-BLJ1wBHW.js";import"./SettingSharedUtil-jBQ2ywCK.js";import"./SkillHandler-CVEKcQ9y.js";import"./bu-select-Du6euHFc.js";import"./ImageHandler-a6Cp5UbG.js";import"./bu-textarea-Bpp8yoZK.js";import"./gauge-BHFiDD7n.js";import"./bu2-cropper-dialog-DAGI-5D-.js";import"./bu-toggle-switch-sHy4xIzL.js";import"./bu-setting-radio-DvJfsUQN.js";import"./paper-radio-group-S7QvpC7u.js";import"./bu-setting-styles-BjU3i9c0.js";import"./NotificationHandler2-DIOHF2aW.js";import"./Notification-CgdtpPr2.js";import"./bu-toggle-DViMdmp6.js";import"./EmblemHandler-CamYk1MY.js";import"./bu-linked-text-CajrA3Sk.js";import"./bu-overlap-p7atmHWg.js";import"./bu-return-button-Bok_lAnj.js";import"./bu-tag-CbJ1w27V.js";class f extends m(h){static get template(){return b`
2      <style include="shared-styles">
3        .description {
4          margin: 2em 0;
5        }
6
7        .control {
8          display: grid;
9          grid-template-columns: 50% 50%;
10        }
11
12        .confirm {
13          margin: 4em 0;
14          text-align: center;
15        }
16
17        .dialog {
18          height: 75svh;
19          width: min(100%, 700px);
20          overflow: scroll;
21          scrollbar-width: none;
22        }
23        .dialog::-webkit-scrollbar {
24          display: none;
25        }
26        .close {
27          padding-top: 1em;
28          padding-left: 1em;
29        }
30        .nameboard {
31          border: solid 1px #ccc;
32          padding: 1em;
33        }
34      </style>
35      <article class="inner">
36        <h2>『[[community.name]]』から退会する</h2>
37
38        <div class="nameboard" on-click="showProfile">
39          <bu-nameboard
40            message
41            user="[[user]]"
42            target="[[user]]"
43            communityid="[[communityid]]"
44            community="[[community]]"
45            target-community="[[community]]"
46          ></bu-nameboard>
47        </div>
48
49        <p class="description">
50          コミュニティから退会すると、このコミュニティ内でのあなたに関する情報が全て削除されます。
51          この操作は元に戻すことはできません。
52        </p>
53        <p class="description">
54          コミュニティに再登録できることは保証されていません。
55          もう一度コミュニティに参加するには、新たに有効なトークンを取得する必要があります。
56        </p>
57        <p class="description">上記を理解したうえで、退会しますか?</p>
58
59        <bu-button
60          submit
61          type="button"
62          text="[[localize('退会する')]]"
63          on-click="openDialog"
64        ></bu-button>
65
66        <bu-button
67          flat
68          type="button"
69          text="[[localize('戻る')]]"
70          on-click="back"
71        ></bu-button>
72      </article>
73
74      <paper-dialog id="dialog" class="dialog">
75        <div class="close">
76          <iron-icon icon="clear" on-click="closeDialog"></iron-icon>
77        </div>
78        <p class="confirm">本当に退会しますか?</p>
79        <div class="password" hidden$="[[!passwordAuth]]">
80          <bu-autocomplete-guard />
81          <bu-input
82            id="password"
83            label="[[localize('パスワード')]]"
84            type="password"
85            placeholder="Password"
86          ></bu-input>
87        </div>
88        <div id="error" class="error"></div>
89        <div class="control">
90          <bu-button
91            submit
92            middle
93            type="button"
94            text="[[localize('退会する')]]"
95            on-click="unsubscribe"
96          ></bu-button>
97
98          <bu-button
99            flat
100            middle
101            type="button"
102            text="[[localize('キャンセル')]]"
103            on-click="closeDialog"
104          ></bu-button>
105        </div>
106      </paper-dialog>
107      <user-dialog
108        communityid="[[communityid]]"
109        community="[[community]]"
110        user="[[user]]"
111        state="{{userDialogState}}"
112        target="[[user]]"
113        targetid="[[user.uid]]"
114      >
115      </user-dialog>
116      <bu-loading display="{{loadingDisplay}}"></bu-loading>
117    `}constructor(){super(),this.loadingDisplay="none",this.language=window.MyAppGlobals.language,this.resources={en:{戻る:"Back",退会する:"Cancel the membership",キャンセル:"Cancel",データの削除を受け付けました:"Received data deletion",パスワード:"Password"},ja:{戻る:"戻る",退会する:"退会する",キャンセル:"キャンセル",データの削除を受け付けました:"データの削除を受け付けました",パスワード:"パスワード"}}}static get properties(){return{passwordAuth:{type:Boolean,computed:"computePasswordAuth(mounted, user)"}}}computePasswordAuth(r,t){return!r||!t?.uid?!1:!!l(firebaseApp).currentUser?.providerData.some(i=>i.providerId==="password")}async unsubscribe(){this.loadingDisplay="block";const t=l(firebaseApp).currentUser,i=t.providerData,u=await g(this.user);try{if(i.some(e=>e.providerId===s.Password)){const e=y.credential(t.email,this.$.password.value);await this.deleteUserWithCredential(t,e)}else if(i.some(e=>e.providerId===s.Google)){const e=new d,o=await a(t,e);await this.deleteUserWithCredential(t,d.credentialFromResult(o))}else if(i.some(e=>e.providerId===s.Facebook)){const e=new c,o=await a(t,e);await this.deleteUserWithCredential(t,c.credentialFromResult(o))}else if(i.some(e=>e.providerId===s.Apple)){const e=new n("apple.com"),o=await a(t,e);await this.deleteUserWithCredential(t,n.credentialFromResult(o))}else if(i.some(e=>u.map(o=>o.providerId).includes(e.providerId))){const e=new n(i.find(p=>p.providerId.startsWith(s.OidcPrefix)).providerId),o=await a(t,e);await this.deleteUserWithCredential(t,n.credentialFromResult(o))}}catch(e){console.error("error in containers/community/unsubscribe.js unsubscribe",e)}finally{this.loadingDisplay="none"}}async deleteUserWithCredential(r,t){try{await v(r,t),this.$.error.textContent="",(await w(this.communityid,{uid:r.uid})).data.text==="userDeleting"?this.transferAuthThanks():this.transferCommunityIndex()}catch(i){this.$.error.textContent=i.message,this.loadingDisplay="none"}}showProfile(r){this.userDialogState="open"}transferAuthThanks(){this.path="/auth-thanks/"}transferCommunityIndex(){this.path="/community-index2/"}openDialog(){this.$.dialog.open()}closeDialog(){this.$.dialog.close()}back(){this.community?.settings.global.menu.unsubscribe?this.path="/event-index/":this.path="/setting-index/"}}window.customElements.define("community-unsubscribe",f);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.