PageSourceSearch

https://appabrik-midlandsquare.web.app/_next/static/chunks/pages/lineMiniApp/edit-e2f16921dd7e0d0e.js

js appabrik-midlandsquare.web.app collected 2026-10-03 12:18:56 UTC 23,804 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2615],{50764:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/lineMiniApp/edit",function(){return t(97945)}])},97945:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return F}});var i=t(85893),r=t(67294),l=t(1778),o=t(74665),a=t(85835),s=t(41664),p=t.n(s),c=t(74855),u=t(39202);let d=e=>{let n=e.trim(),t=/^https?:\/\/(?:miniapp|liff)\.line\.me\/([^/?#]+)/i.exec(n);return t?t[1]:n},h="https://developers.line.biz/ja/docs/line-mini-app/quickstart/",f=e=>{let{verification:n,t}=e;return(0,i.jsx)(o._P.bZ,{showIcon:!0,type:n.ok?"success":"error",message:n.ok?t("lineMiniApp:verifySuccess"):t("lineMiniApp:verifyErrorTitle"),description:(0,i.jsx)("ul",{style:{margin:0,paddingLeft:20},children:n.checks.map(e=>(0,i.jsxs)("li",{children:[t("lineMiniApp:verifyCheck.".concat(e.key)),": ",t("lineMiniApp:verifyStatus.".concat(e.status)),e.detail?" — ".concat(e.detail):null]},e.key))})})},m=e=>{var n,t;let l=(0,r.useRef)(null),a=(0,r.useRef)(null),s=(0,r.useRef)(null),m=(0,r.useRef)(null);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o._P.Oj,{open:e.visibleOnboardingTour,onClose:e.onCloseOnboardingTour,onFinish:e.onCloseOnboardingTour,steps:[{title:e.t("lineMiniApp:onboardingGuideTitle"),description:e.t("lineMiniApp:onboardingGuideDescription"),target:()=>l.current,nextButtonProps:{children:e.t("lineMiniApp:onboardingNextButton")},prevButtonProps:{children:e.t("lineMiniApp:onboardingPrevButton")}},{title:e.t("lineMiniApp:onboardingUrlTitle"),description:e.t("lineMiniApp:onboardingUrlDescription"),target:()=>a.current,nextButtonProps:{children:e.t("lineMiniApp:onboardingNextButton")},prevButtonProps:{children:e.t("lineMiniApp:onboardingPrevButton")}},{title:e.t("lineMiniApp:onboardingInputTitle"),description:e.t("lineMiniApp:onboardingInputDescription"),target:()=>s.current,nextButtonProps:{children:e.t("lineMiniApp:onboardingNextButton")},prevButtonProps:{children:e.t("lineMiniApp:onboardingPrevButton")}},{title:e.t("lineMiniApp:onboardingVerifyTitle"),description:e.t("lineMiniApp:onboardingVerifyDescription"),target:()=>m.current,nextButtonProps:{children:e.t("lineMiniApp:onboardingFinishButton")},prevButtonProps:{children:e.t("lineMiniApp:onboardingPrevButton")}}]}),e.loading?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{paddingTop:8},children:(0,i.jsxs)(o._P.l0,{...u.dY,form:e.form,onFinish:e.onPressSubmit,autoComplete:"off",children:[(0,i.jsx)(o._P.l0.Item,{name:"appName",label:e.t("lineMiniApp:appName"),extra:e.t("lineMiniApp:appNameHelp"),rules:[{required:!0,message:e.t("common:forms.rules.required",{propertyLabel:e.t("lineMiniApp:appName")})}],children:(0,i.jsx)(o._P.II,{placeholder:e.t("lineMiniApp:appName"),style:{width:320}})}),(0,i.jsx)("div",{ref:a,children:(0,i.jsx)(o._P.l0.Item,{label:e.t("lineMiniApp:lineMiniAppUrl"),children:(0,i.jsxs)(o._P.T,{children:[(0,i.jsx)(p(),{href:e.lineMiniAppUrl,target:"_blank",rel:"noopener noreferrer",children:e.lineMiniAppUrl}),(0,i.jsx)(c.CopyToClipboard,{text:e.lineMiniAppUrl,onCopy:()=>o._P.yw.success(e.t("common:messages.copySuccess")),children:(0,i.jsx)(o._P.zx,{icon:(0,i.jsx)(o.JO.KK1,{}),children:e.t("common:pages.list.copyButton")})})]})})}),(0,i.jsxs)("div",{ref:s,children:[(0,i.jsx)(o._P.l0.Item,{label:e.t("lineMiniApp:liffId"),extra:e.t("lineMiniApp:liffIdHelp"),children:(0,i.jsx)(o._P.l0.Item,{name:"liffId",noStyle:!0,normalize:d,children:(0,i.jsx)(o._P.II,{placeholder:e.t("lineMiniApp:liffId"),style:{width:320}})})}),(0,i.jsx)(o._P.l0.Item,{name:"lineChannelId",label:e.t("lineMiniApp:lineChannelId"),children:(0,i.jsx)(o._P.II,{placeholder:e.t("lineMiniApp:lineChannelId")})}),(0,i.jsx)(o._P.l0.Item,{name:"lineChannelSecret",label:e.t("lineMiniApp:lineChannelSecret"),extra:e.t("lineMiniApp:lineChannelSecretHelp"),children:(0,i.jsx)(o._P.II.Password,{autoComplete:"new-password",placeholder:(null===(n=e.lineChannelStatus)||void 0===n?void 0:n.hasLineChannelSecret)?e.t("lineMiniApp:lineChannelSecretConfigured"):e.t("lineMiniApp:lineChannelSecret")})}),(0,i.jsx)(o._P.l0.Item,{name:"lineChannelAccessToken",label:e.t("lineMiniApp:lineChannelAccessToken"),extra:e.t("lineMiniApp:lineChannelSecretHelp"),children:(0,i.jsx)(o._P.II.Password,{autoComplete:"new-password",placeholder:(null===(t=e.lineChannelStatus)||void 0===t?void 0:t.hasLineChannelAccessToken)?e.t("lineMiniApp:lineChannelSecretConfigured"):e.t("lineMiniApp:lineChannelAccessToken")})})]}),e.verification?(0,i.jsx)(o._P.l0.Item,{label:" ",colon:!1,children:(0,i.jsx)(f,{verification:e.verification,t:e.t})}):null,(0,i.jsx)(o._P.l0.Item,{label:" ",colon:!1,children:(0,i.jsxs)(o._P.T,{children:[(0,i.jsx)(o._P.zx,{onClick:e.onPressCancel,children:e.t("common:pages.edit.cancelButton")}),(0,i.jsx)("div",{ref:m,children:(0,i.jsx)(o._P.zx,{onClick:e.onPressVerify,loading:e.isVerifying,children:e.t("lineMiniApp:verifyButton")})}),(0,i.jsx)(o._P.zx,{type:"primary",htmlType:"submit",loading:e.isUploading,children:e.submitButtonLabel})]})})]})}),(0,i.jsx)("div",{ref:l,style:{textAlign:"center",padding:16},children:(0,i.jsxs)(o._P.ZT.Text,{type:"secondary",children:[e.t("lineMiniApp:developerGuideLabel")," ",(0,i.jsx)(p(),{href:h,target:"_blank",rel:"noopener noreferrer",children:h})]})})]})]})};
1var g=t(31567),y=t(11163),b=t(55717),v=t(62930),x=t(2112);let C=()=>(0,x.y)({hostname:window.location.hostname}),j=e=>{let{onSaved:n}=e,{t}=(0,g.$)(["common","lineMiniApp"]),i=(0,y.useRouter)(),[l]=o._P.l0.useForm(),[a,s]=(0,r.useState)(!0),[p,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(void 0),[h,f]=(0,r.useState)(null),[m,x]=(0,r.useState)(!1),[j,P]=(0,r.useState)(!1),S=C(),A=b.PublicProjectUtils.getLiffWebAppBaseUrl({appabrikProjectId:S,buildEnv:"production"}),w=t("lineMiniApp:settingsTabLabel"),k=t("common:pages.edit.editSubmitButton"),_=(0,r.useCallback)(async()=>{var e,n,t;let[i,r]=await Promise.all([v.h.Projects.getSettings(),v.h.LineChannels.findOne({appabrikProjectId:S})]);l.setFieldsValue({appName:null!==(e=i.project.appName)&&void 0!==e?e:"",liffId:null!==(n=i.project.liffId)&&void 0!==n?n:"",lineChannelId:null!==(t=r.lineChannelId)&&void 0!==t?t:"",lineChannelSecret:"",lineChannelAccessToken:""}),d({hasLineChannelSecret:r.hasLineChannelSecret,hasLineChannelAccessToken:r.hasLineChannelAccessToken})},[S,l]);(0,r.useEffect)(()=>{(async()=>{try{await _()}catch(e){o._P.yw.error(t("common:messages.formSubmitFailure",{pageTitle:w,message:e instanceof Error?e.message:String(e)}))}finally{s(!1)}})()},[]),(0,r.useEffect)(()=>{!a&&i.isReady&&"1"===i.query.onboarding&&P(!0)},[a,i.isReady,i.query.onboarding]);let M=(0,r.useCallback)(async()=>{x(!0);try{f(await v.h.LineChannels.verify({appabrikProjectId:S}))}catch(e){o._P.yw.error(t("lineMiniApp:verifyFailure",{message:e instanceof Error?e.message:String(e)}))}finally{x(!1),n()}},[S,t,n]),T=(0,r.useCallback)(async e=>{c(!0);try{var n,i;await v.h.Projects.updateAppName({appabrikProjectId:S,appName:e.appName}),await v.h.LineChannels.save({appabrikProjectId:S,liffId:null!==(n=e.liffId)&&void 0!==n?n:"",lineChannelId:null!==(i=e.lineChannelId)&&void 0!==i?i:"",lineChannelSecret:e.lineChannelSecret||void 0,lineChannelAccessToken:e.lineChannelAccessToken||void 0}),o._P.yw.success(t("common:messages.formSubmitSuccess",{pageTitle:w})),await _(),await M()}catch(e){o._P.yw.error(t("common:messages.formSubmitFailure",{pageTitle:w,message:e instanceof Error?e.message:String(e)}))}finally{c(!1)}},[S,_,M,t,w,n]);return{form:l,loading:a,isUploading:p,lineMiniAppUrl:A,lineChannelStatus:u,verification:h,isVerifying:m,onPressVerify:M,onPressSubmit:T,onPressCancel:()=>i.back(),visibleOnboardingTour:j,onCloseOnboardingTour:()=>P(!1),submitButtonLabel:k,t}},P=e=>(0,i.jsx)(m,{...j({onSaved:e.onSaved})}),S=e=>{let n=r.useRef(null);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o._P.kC,{justify:"flex-end",align:"flex-start",style:{paddingBottom:12,marginBottom:16,borderBottom:"1px solid #f0f0f0"},children:(0,i.jsxs)("div",{ref:n,style:{textAlign:"right"},children:[(0,i.jsx)(o._P.zx,{type:"primary",size:"large",disabled:e.loading,loading:e.isUploading,onClick:e.onPressSubmit,children:e.submitButtonLabel}),e.submitNote?(0,i.jsx)("div",{children:(0,i.jsx)(o._P.ZT.Text,{type:"secondary",style:{fontSize:12},children:e.submitNote})}):null]})}),(0,i.jsx)(o._P.Oj,{open:e.visibleSaveStepTour,onClose:e.onCloseSaveStepTour,onFinish:e.onCloseSaveStepTour,indicatorsRender:()=>(0,i.jsx)("span",{style:{fontSize:12,color:"rgba(0,0,0,0.45)"},children:"7 / 8"}),steps:[{title:e.t("lineMiniApp:saveStepTour.title"),description:e.t("lineMiniApp:saveStepTour.description"),target:()=>n.current,nextButtonProps:{children:e.t("lineMiniApp:saveStepTour.next")}}]}),e.loading?null:(0,i.jsx)("div",{style:{display:"flex",width:"100%",height:"calc(100vh - 160px)",backgroundColor:"white",border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:(0,i.jsx)("iframe",{src:"/app",title:"app-preview",style:{flex:1,width:"100%",border:"none",height:"100%"}})}),(0,i.jsx)(o._P.u_,{open:e.visibleCompletion,footer:null,centered:!0,width:460,onCancel:e.onPressCompletionClose,children:(0,i.jsxs)(o._P.kC,{vertical:!0,align:"center",gap:"middle",style:{padding:"16px 12px 8px"},children:[(0,i.jsx)(o._P.Vp,{children:e.t("lineMiniApp:completion.step")}),(0,i.jsx)(o._P.ZT.Title,{level:5,style:{margin:0,textAlign:"center"},children:e.t("lineMiniApp:completion.title")}),(0,i.jsx)(o._P.ZT.Text,{type:"secondary",style:{textAlign:"center"},children:e.t("lineMiniApp:completion.description")}),(0,i.jsx)(o._P.zx,{type:"primary",size:"large",onClick:e.onPressCompletionNext,children:e.t("lineMiniApp:completion.next")})]})})]})};var A=t(7503);
1let w="appSettings",k=()=>{if("undefined"==typeof localStorage)return!1;try{localStorage.setItem("dummy","1");let e="1"===localStorage.getItem("dummy");return localStorage.removeItem("dummy"),e}catch{return!1}},_=()=>(0,x.y)({hostname:window.location.hostname}),M=e=>{let{onChangeDirty:n,onSaved:t}=e,{t:i}=(0,g.$)(["common","lineMiniApp"]),l=(0,y.useRouter)(),[a,s]=(0,r.useState)(!0),[p,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),[m,b]=(0,r.useState)(!1),[x,C]=(0,r.useState)(!1),j=(0,r.useRef)(null),P=(0,r.useRef)(!1),S=i("lineMiniApp:previewTabLabel"),M=u?i("lineMiniApp:initialSubmitButton"):i("lineMiniApp:publishSubmitButton"),T=u?"":i("lineMiniApp:publishSubmitNote");(0,r.useEffect)(()=>{(async()=>{try{if(!k())throw Error("Local storage is not activated.");let[{appSettings:e},n]=await Promise.all([v.h.AppSettings.get({appabrikProjectId:_()}),v.h.Projects.getSettings()]),t=JSON.stringify(e);j.current=t,localStorage.setItem(w,t),localStorage.setItem("projectSettings",JSON.stringify(n)),localStorage.setItem("language",A.ZP.language);let i=null==e?void 0:e.components;d(0===Object.keys(null!=i?i:{}).length)}catch(e){o._P.yw.error(i("common:messages.formSubmitFailure",{pageTitle:S,message:e instanceof Error?e.message:String(e)}))}finally{s(!1)}})()},[]),(0,r.useEffect)(()=>{let e=e=>{var n,t,r;if(e.origin!==window.location.origin)return;if((null===(n=e.data)||void 0===n?void 0:n.type)==="appabrik:appSettingsDirty"){b(!0);return}if((null===(t=e.data)||void 0===t?void 0:t.type)==="appabrik:requestSaveStepTour"){C(!0);return}if((null===(r=e.data)||void 0===r?void 0:r.type)!=="appabrik:registerAppName")return;let l="string"==typeof e.data.appName?e.data.appName.trim():"";l&&v.h.Projects.updateAppName({appabrikProjectId:_(),appName:l}).catch(e=>{o._P.yw.error(i("common:messages.formSubmitFailure",{pageTitle:i("lineMiniApp:appNameRegistration"),message:e instanceof Error?e.message:String(e)}))})};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[i]);let I=(0,r.useCallback)(()=>{null!==j.current&&localStorage.setItem(w,j.current)},[]);(0,r.useEffect)(()=>{if(!m)return;let e=e=>{if(!P.current&&e!==l.asPath&&e.split("?")[0]!==l.pathname)throw o._P.u_.confirm({title:i("lineMiniApp:unsavedChanges.title"),content:i("lineMiniApp:unsavedChanges.content"),okText:i("lineMiniApp:unsavedChanges.ok"),cancelText:i("lineMiniApp:unsavedChanges.cancel"),onOk:()=>{I(),P.current=!0,l.push(e)}}),l.events.emit("routeChangeError"),"Route change aborted by unsaved changes confirmation."};return l.events.on("routeChangeStart",e),()=>l.events.off("routeChangeStart",e)},[m,l,i,I]),(0,r.useEffect)(()=>{n(m)},[m,n]),(0,r.useEffect)(()=>{if(!m)return;let e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[m]);let O=(0,r.useCallback)(async()=>{c(!0);try{var e;if(!k())throw Error("Local storage is not activated.");let n=null!==(e=localStorage.getItem(w))&&void 0!==e?e:"null",r=JSON.parse(n);if(await v.h.AppSettings.update({appabrikProjectId:_(),appSettings:r}),j.current=n,b(!1),t(),u){f(!0);return}o._P.yw.success(i("lineMiniApp:publishSuccess")),l.reload()}catch(e){o._P.yw.error(i("common:messages.formSubmitFailure",{pageTitle:S,message:e instanceof Error?e.message:String(e)}))}finally{c(!1)}},[l,i,S,u,t]);return{loading:a,isUploading:p,submitButtonLabel:M,submitNote:T,visibleSaveStepTour:x,onCloseSaveStepTour:(0,r.useCallback)(()=>{var e;C(!1);let n=document.querySelector('iframe[title="app-preview"]');null==n||null===(e=n.contentWindow)||void 0===e||e.postMessage({type:"appabrik:saveStepTourDone"},window.location.origin)},[]),visibleCompletion:h,onPressSubmit:O,onPressCompletionNext:(0,r.useCallback)(()=>{f(!1),l.push("/lineMiniApp/edit?tab=settings&onboarding=1")},[l]),onPressCompletionClose:(0,r.useCallback)(()=>{f(!1),l.reload()},[l]),t:i}},T=e=>(0,i.jsx)(S,{...M({onChangeDirty:e.onChangeDirty,onSaved:e.onSaved})}),I=[{id:"createMiniApp",label:"ミニアプリの見た目を作る",tasks:[{id:"applyTemplate",label:"テンプレートを選ぶ",hint:"プレビュータブの「テンプレートを選ぶ」から、用途に合ったものを選びます。"},{id:"registerAppName",label:"ミニアプリ名を登録する",hint:"設定タブの「アプリ名」に入力して保存します。ミニアプリユーザーには表示されません。"},{id:"saveMiniApp",label:"内容を確認して保存する",hint:"プレビューで見た目を確認し、右上のボタンで保存します。"}]},{id:"prepareLine",label:"LINE側の準備をする",tasks:[{id:"createChannel",label:"LINE Developers でチャネルを作成する",hint:"LINE Developers コンソールでチャネルを作成します。設定手順のリンクから確認できます。"},{id:"createLiffApp",label:"LIFFアプリを作成する",hint:"作成したチャネルにLIFFアプリを追加し、エンドポイントURLに設定タブのLINEミニアプリURLを設定します。"}]},{id:"registerLineSettings",label:"CMSにLINEの情報を登録する",tasks:[{id:"saveChannelCredentials",label:"チャネルID・チャネルシークレットを保存する",hint:"LINE Developers で発行した値を設定タブに入力して保存します。"}
1,{id:"saveAccessToken",label:"チャネルアクセストークンを保存する",hint:"LINE Developers で発行したアクセストークンを保存します。"},{id:"saveLiffId",label:"LIFF IDを設定する",hint:"LINE Developers コンソールに表示されるLIFF IDを設定タブに入力して保存します。LIFF URLを貼り付けるとID部分だけが保存されます。"}]},{id:"verify",label:"連携を確認する",tasks:[{id:"passConnectionTest",label:"接続テストに通す",hint:"設定タブの「接続テスト」で、チャネルID・シークレットの認証がOKになるかを見ます。LIFF IDとエンドポイントURLはLINE Developers コンソールで確認してください。"}]}],O=I.flatMap(e=>e.tasks.map(e=>e.id)),L=e=>{let{completedTaskIds:n}=e,[t,l]=(0,r.useState)(null),a=e=>n.includes(e),s=O.filter(a).length,p=e=>I[e].tasks.every(e=>a(e.id));if(s===O.length)return null;let c=I.findIndex((e,n)=>!p(n)),u=c>=0?I[c].id:void 0;return(0,i.jsx)(o._P.UO,{size:"small",style:{marginBottom:16},items:[{key:"quest",label:"LINEミニアプリを公開するまで",extra:(0,i.jsxs)(o._P.ZT.Text,{type:"secondary",children:[s," / ",O.length," 完了"]}),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o._P.Ex,{percent:Math.round(s/O.length*100),size:"small",style:{marginBottom:8}}),(0,i.jsx)(o._P.UO,{ghost:!0,activeKey:null!=t?t:u?[u]:[],onChange:e=>{l(Array.isArray(e)?e:[e])},items:I.map((e,n)=>({key:e.id,label:(0,i.jsxs)(o._P.T,{children:[p(n)?(0,i.jsx)(o.JO.ggW,{style:{color:"#52c41a"}}):(0,i.jsx)(o.JO.wOv,{style:{color:"rgba(0, 0, 0, 0.25)"}}),(0,i.jsxs)(o._P.ZT.Text,{delete:p(n),children:[n+1,". ",e.label]})]}),children:(0,i.jsx)(o._P.T,{direction:"vertical",size:"middle",style:{width:"100%"},children:e.tasks.map(e=>(0,i.jsxs)(o._P.T,{align:"start",children:[a(e.id)?(0,i.jsx)(o.JO.ggW,{style:{color:"#52c41a"}}):(0,i.jsx)(o.JO.wOv,{style:{color:"rgba(0, 0, 0, 0.25)"}}),(0,i.jsxs)("div",{children:[(0,i.jsx)(o._P.ZT.Text,{delete:a(e.id),children:e.label}),!a(e.id)&&e.hint?(0,i.jsx)("div",{children:(0,i.jsx)(o._P.ZT.Text,{type:"secondary",style:{fontSize:12},children:e.hint})}):null]})]},e.id))})}))})]})}]})},E=e=>(0,i.jsx)(l.M,{title:e.pageTitle,children:(0,i.jsxs)(o._P.Ar,{children:[(0,i.jsx)(a.c,{routes:e.routes}),(0,i.jsx)(o.mr,{title:e.pageTitle}),(0,i.jsxs)(o._P.Ar.Content,{style:{padding:24},children:[(0,i.jsx)(L,{completedTaskIds:e.completedTaskIds}),(0,i.jsx)(o._P.mQ,{style:{background:"#fff",padding:"0 24px 24px",borderRadius:8},activeKey:e.activeTab,onChange:n=>e.onChangeTab(n),destroyInactiveTabPane:!1,items:[{key:"preview",label:e.t("lineMiniApp:previewTabLabel"),children:(0,i.jsx)(T,{onChangeDirty:e.onChangeDirty,onSaved:e.onSaved})},{key:"settings",label:e.t("lineMiniApp:settingsTabLabel"),children:(0,i.jsx)(P,{onSaved:e.onSaved})}]})]})]})}),N=async e=>{var n;let t;let[i,r,l]=await Promise.all([v.h.AppSettings.get({appabrikProjectId:e.appabrikProjectId}),v.h.Projects.getSettings(),v.h.LineChannels.findOne({appabrikProjectId:e.appabrikProjectId})]),o=[],a=null===(n=i.appSettings)||void 0===n?void 0:n.components;Object.keys(null!=a?a:{}).length>0&&o.push("applyTemplate","saveMiniApp"),r.project.appName&&o.push("registerAppName");let s=!!l.lineChannelId&&l.hasLineChannelSecret,p=!!r.project.liffId;if(s&&o.push("saveChannelCredentials"),l.hasLineChannelAccessToken&&o.push("saveAccessToken"),p&&o.push("saveLiffId"),s&&o.push("createChannel"),p&&o.push("createLiffApp"),!s)return o;try{t=await v.h.LineChannels.verify({appabrikProjectId:e.appabrikProjectId})}catch{return o}return t.ok&&o.push("passConnectionTest"),o},B=e=>"settings"===e||"preview"===e,R=()=>(0,x.y)({hostname:window.location.hostname}),D=()=>{let{t:e}=(0,g.$)(["common","lineMiniApp"]),n=(0,y.useRouter)(),[t,i]=(0,r.useState)("preview"),l=(0,r.useRef)(!1),a=e("lineMiniApp:label"),s=[{path:"/",breadcrumbName:e("common:pages.root.home")},{path:"",breadcrumbName:a}];(0,r.useEffect)(()=>{n.isReady&&B(n.query.tab)&&i(n.query.tab)},[n.isReady,n.query.tab]);let p=(0,r.useCallback)(e=>{i(e),n.replace({pathname:n.pathname,query:{...n.query,tab:e}},void 0,{shallow:!0})},[n]),c=(0,r.useCallback)(n=>{if(n!==t){if("preview"!==t||!l.current){p(n);return}o._P.u_.confirm({title:e("lineMiniApp:unsavedChangesOnTabChange.title"),content:e("lineMiniApp:unsavedChangesOnTabChange.content"),okText:e("lineMiniApp:unsavedChangesOnTabChange.ok"),cancelText:e("lineMiniApp:unsavedChangesOnTabChange.cancel"),onOk:()=>p(n)})}},[t,p,e]),u=(0,r.useCallback)(e=>{l.current=e},[]),[d,h]=(0,r.useState)([]),f=(0,r.useCallback)(async()=>{try{h(await N({appabrikProjectId:R()}))}catch{}},[]);return(0,r.useEffect)(()=>{f()},[f]),{pageTitle:a,routes:s,activeTab:t,onChangeTab:c,onChangeDirty:u,completedTaskIds:d,onSaved:f,t:e}};var F=()=>(0,i.jsx)(E,{...D()})},1778:function(e,n,t){"use strict";t.d(n,{M:function(){return i.M}});var i=t(98930)},74300:function(e,n,t){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var r=a(t(67294)),l=a(t(20640)),o=["text","onCopy","options","children"];
1function a(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){h(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c(e,n){return(c=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function u(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var f=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&c(e,n)}(s,e);var n,t,a=(n=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=d(s);return e=n?Reflect.construct(t,arguments,d(this).constructor):t.apply(this,arguments),function(e,n){if(n&&("object"===i(n)||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");return u(e)}(this,e)});function s(){var e;!function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}(this,s);for(var n=arguments.length,t=Array(n),i=0;i<n;i++)t[i]=arguments[i];return h(u(e=a.call.apply(a,[this].concat(t))),"onClick",function(n){var t=e.props,i=t.text,o=t.onCopy,a=t.children,s=t.options,p=r.default.Children.only(a),c=(0,l.default)(i,s);o&&o(i,c),p&&p.props&&"function"==typeof p.props.onClick&&p.props.onClick(n)}),e}return t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=function(e,n){if(null==e)return{};var t,i,r=function(e,n){if(null==e)return{};var t,i,r={},l=Object.keys(e);for(i=0;i<l.length;i++)t=l[i],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)t=l[i],!(n.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,o),i=r.default.Children.only(n);return r.default.cloneElement(i,p(p({},t),{},{onClick:this.onClick}))}}],function(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(s.prototype,t),Object.defineProperty(s,"prototype",{writable:!1}),s}(r.default.PureComponent);n.CopyToClipboard=f,h(f,"defaultProps",{onCopy:void 0,options:void 0})},74855:function(e,n,t){"use strict";var i=t(74300).CopyToClipboard;i.CopyToClipboard=i,e.exports=i}},function(e){e.O(0,[712,1664,3827,2888,9774,179],function(){return e(e.s=50764)}),_N_E=e.O()}]);

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.