PageSourceSearch

https://app.nanco.io/_next/static/chunks/pages/[companyShortId]/settings/plan-5ea0422c3078ae6a.js

js nanco.io collected 2026-10-01 16:06:14 UTC 36,201 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0936cd46-1fda-4688-9c19-6501cb2b9217",e._sentryDebugIdIdentifier="sentry-dbid-0936cd46-1fda-4688-9c19-6501cb2b9217")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3588],{54885:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[companyShortId]/settings/plan",function(){return a(64988)}])},64988:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PlanPageContent:()=>J,default:()=>X});var l=a(74348),n=a(2066),r=a(98022),i=a(82611),s=a(24673),d=a(74423),c=a(45931),o=a(16205),m=a(8113),u=a.n(m),h=a(91018),p=a(50148),f=a(90369),x=a(76947),g=a(64920);let y=f.bL,N=p.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.Y)(f.q7,{ref:t,className:(0,g.cn)("border-b",a),...n})});N.displayName="AccordionItem";let v=p.forwardRef((e,t)=>{let{className:a,children:n,...r}=e;return(0,l.Y)(f.Y9,{className:"flex",children:(0,l.FD)(f.l9,{ref:t,className:(0,g.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",a),...r,children:[n,(0,l.Y)(x.A,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});v.displayName=f.l9.displayName;let b=p.forwardRef((e,t)=>{let{className:a,children:n,...r}=e;return(0,l.Y)(f.UC,{ref:t,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:(0,l.Y)("div",{className:(0,g.cn)("pb-4 pt-0",a),children:n})})});b.displayName=f.UC.displayName;var Y=a(18920),D=a(29863),F=a(16066),w=a(95423);function I(e){let{label:t,current:a,limit:n,formatCurrent:r,formatLimit:i}=e,s=null==n,d=s?0:Math.min(a/n*100,100),c=(0,w.Pd)(d);return(0,l.FD)("div",{className:"space-y-2",children:[(0,l.FD)("div",{className:"flex items-baseline justify-between",children:[(0,l.Y)("span",{className:"text-sm font-medium text-foreground",children:t}),(0,l.FD)("div",{className:"flex items-baseline gap-1",children:[(0,l.Y)("span",{className:"text-lg font-semibold tabular-nums",children:r}),(0,l.FD)("span",{className:"text-sm text-muted-foreground",children:["/ ",i]})]})]}),s?(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"この項目に上限はありません"}):(0,l.FD)(l.FK,{children:[(0,l.Y)("div",{className:"relative h-3 w-full overflow-hidden rounded-full bg-muted",children:(0,l.Y)("div",{className:"h-full rounded-full transition-all duration-500 ".concat(c),style:{width:"".concat(d,"%")}})}),d>=90&&(0,l.Y)("p",{className:"text-xs text-red-600",children:"上限に近づいています。プランのアップグレードをご検討ください。"})]})]})}var A=a(72425),P=a(65433),S=a(89304),L=a(53185),E=a(99536),_=a(43537),k=a(82497),B=a(99103),C=a(93479),M=a(93713);function T(e,t){return"jpy"===t.toLowerCase()?"\xa5".concat(e.toLocaleString("ja-JP")):"".concat((e/100).toFixed(2)," ").concat(t.toUpperCase())}var q=a(3659),K=a(13756),U=a(69540),z=a(86745);let G=async e=>{let{companyId:t,successPath:a,cancelPath:l,selectedPlan:n,billingInterval:r}=e,i=await (0,z.zS)("/api/v1/lib/stripe/portal",{companyId:t,successPath:a,cancelPath:l,...n&&{selectedPlan:n},...r&&{billingInterval:r}});return q.$n.parse(i).url},R=async e=>{let{companyId:t,returnPath:a}=e,l=await (0,z.zS)("/api/v1/subscription/group-portal",{companyId:t,returnPath:a});return q.$n.parse(l).url},W=async e=>{let{companyId:t}=e;await (0,z.zS)("/api/v1/subscription/scheduleRelease",{companyId:t})};var $=a(85149),j=a(27808),H=a(4134),O=a(84711);let Z=[{key:"standard",name:"スタンダード",icon:(0,l.Y)(n.A,{className:"h-4 w-4"}),monthlyPrice:5980,annualMonthlyPrice:3480,features:[{label:"アイテム数",value:"1,500"},{label:"ストレージ",value:"5GB"}],plan:q.R$.Standard},{key:"pro",name:"プロ",icon:(0,l.Y)(r.A,{className:"h-4 w-4"}),monthlyPrice:12800,annualMonthlyPrice:7800,features:[{label:"アイテム数",value:"5,000"},{label:"ストレージ",value:"100GB"}],plan:q.R$.Pro},{key:"enterprise",name:"エンタープライズ",icon:(0,l.Y)(i.A,{className:"h-4 w-4"}),monthlyPrice:24800,annualMonthlyPrice:14800,features:[{label:"アイテム数",value:"無制限"},{label:"ストレージ",value:"200GB"}],plan:q.R$.Enterprise}];function Q(e){return"year"===e?"年払い":"月払い"}function V(e){let{isAdmin:t,companyId:a,companyShortId:l,authId:n,selectedPlan:r,billingInterval:i}=e,{setContent:s,setErrorContent:d}=(0,O.useToast)(),{logFeatureEvent:c}=(0,_.U)(),[o,m]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{let e=e=>{e.persisted&&m(!1)};return window.addEventListener("pageshow",e),()=>window.removeEventListener("pageshow",e)},[]),{redirect:async()=>
1{if(!o){if(!t)return void s({title:"管理者にお願いしてください",description:"プランの変更は管理者権限が必要です。ワークスペースの管理者にご依頼ください。",type:"normal"});m(!0),c(B.k.BILLING_CHECKOUT_START,{selectedPlan:null!=r?r:null,interval:null!=i?i:null});try{window.location.href=await G({companyId:a,authId:n,successPath:"/".concat(l,"/folder/home"),cancelPath:"/".concat(l,"/settings/plan"),selectedPlan:r,billingInterval:i})}catch(e){M.vF.error(e),d({title:"エラーが発生しました",description:(0,H.H4)(e)}),m(!1)}}},loading:o}}let X=()=>{var e;let{subscription:t,companyDB:a,user:n,userDB:r}=(0,E.Z2)(),i=null==a?void 0:a.company,s=!t||!i||!n,d=null!=r&&!!r.role&&(0,$.vN)(r.role),{userState:c,usage:o,usageLoading:m}=(0,k.Ir)(),{reservation:f}=function(e){var t,a;return{reservation:null!=(a=null==(t=(0,S.I)({queryKey:["discount-reservation",e],queryFn:()=>(0,L.CS)("/api/v1/company/discountReservation?companyId=".concat(e)),enabled:!!e,staleTime:6e4}).data)?void 0:t.reservation)?a:null}}(null==i?void 0:i.id),{preview:x}=function(e){var t,a;return{preview:null!=(a=null==(t=(0,S.I)({queryKey:["upcoming-invoice",e],queryFn:()=>(0,L.CS)("/api/v1/company/upcomingInvoice?companyId=".concat(e)),enabled:!!e,staleTime:3e5}).data)?void 0:t.preview)?a:null}}(null==i?void 0:i.id);(0,h.useRouter)();let{logFunnelStepOnce:g}=(0,_.U)();if((0,p.useEffect)(()=>{var e;t&&g(B.k.BILLING_PAGE_VIEW,{currentPlan:t.plan,currentInterval:null!=(e=t.interval)?e:null,userState:null!=c?c:null})},[t,c,g]),s)return(0,l.FD)(l.FK,{children:[(0,l.Y)(u(),{children:(0,l.Y)("title",{children:(0,A.U6)("プラン")})}),(0,l.Y)(K.A,{children:(0,l.FD)("div",{className:"space-y-6",children:[(0,l.Y)(F.E,{className:"h-24 w-full rounded-lg"}),(0,l.Y)(F.E,{className:"h-20 w-full rounded-lg"}),(0,l.FD)("div",{className:"grid grid-cols-3 gap-4",children:[(0,l.Y)(F.E,{className:"h-64 rounded-lg"}),(0,l.Y)(F.E,{className:"h-72 rounded-lg"}),(0,l.Y)(F.E,{className:"h-64 rounded-lg"})]})]})})]});let y=void 0,N=null!=(e=null!=y?y:c)?e:"expired",v="trial"===N||"expired"===N;return t.selfServeDisabled?(0,l.FD)(l.FK,{children:[(0,l.Y)(u(),{children:(0,l.Y)("title",{children:(0,A.U6)("プラン")})}),(0,l.Y)(K.A,{children:(0,l.FD)("div",{className:"space-y-6",children:[(0,l.Y)(et,{subscription:t,companyId:i.id,returnPath:"/".concat(i.shortId,"/settings/plan")}),(0,l.Y)(el,{usage:o,loading:m,isTrial:"trial"===N}),(0,l.Y)(ec,{})]})})]}):(0,l.FD)(l.FK,{children:[(0,l.Y)(u(),{children:(0,l.Y)("title",{children:(0,A.U6)("プラン")})}),(0,l.FD)(K.A,{children:[(0,l.FD)("div",{className:"space-y-6",children:[(0,l.Y)(ea,{subscription:t,userState:N,authorized:d,companyId:i.id,companyShortId:i.shortId,authId:n.uid}),f&&(0,l.Y)(es,{reservation:f}),x&&x.discountTotal>0&&(0,l.Y)(ed,{preview:x}),v&&(0,l.Y)(er,{currentPlan:t.plan,userState:N,interval:t.interval,authorized:d,companyId:i.id,companyShortId:i.shortId,authId:n.uid}),(0,l.Y)(el,{usage:o,loading:m,isTrial:"trial"===N}),!v&&(0,l.Y)(er,{currentPlan:t.plan,userState:N,interval:t.interval,authorized:d,companyId:i.id,companyShortId:i.shortId,authId:n.uid}),(0,l.Y)(ec,{})]}),!1]})]})};function J(e){let{subscription:t,userState:a,usage:n,usageLoading:r,authorized:i,companyId:s,companyShortId:d,authId:c}=e,o="trial"===a||"expired"===a;return t.selfServeDisabled?(0,l.Y)("div",{className:"max-w-4xl mx-auto w-full p-4 md:px-8",children:(0,l.FD)("div",{className:"space-y-6",children:[(0,l.Y)(et,{subscription:t,companyId:s,returnPath:"/".concat(d,"/settings/plan")}),(0,l.Y)(el,{usage:n,loading:r,isTrial:"trial"===a}),(0,l.Y)(ec,{})]})}):(0,l.Y)("div",{className:"max-w-4xl mx-auto w-full p-4 md:px-8",children:(0,l.FD)("div",{className:"space-y-6",children:[(0,l.Y)(ea,{subscription:t,userState:a,authorized:i,companyId:s,companyShortId:d,authId:c}),(0,l.Y)(el,{usage:n,loading:r,isTrial:"trial"===a}),o&&(0,l.Y)(er,{currentPlan:t.plan,userState:a,interval:t.interval,authorized:i,companyId:s,companyShortId:d,authId:c}),!o&&(0,l.Y)(er,{currentPlan:t.plan,userState:a,interval:t.interval,authorized:i,companyId:s,companyShortId:d,authId:c}),(0,l.Y)(ec,{})]})})}function ee(e){var t;let{subscription:a,companyId:n,authorized:r}=e,i=(0,P.jE)(),{setContent:d,setErrorContent:c}=(0,O.useToast)(),{logFeatureEvent:o}=(0,_.U)(),[m,u]=(0,p.useState)(!1);if(!a.scheduledPlan||!a.scheduledAt)return null;let h=a.scheduledPlan,f=null!=(t=a.scheduledInterval)?t:"month",x=a.scheduledAt,g=async()=>
1{if(r&&!m){u(!0);try{await W({companyId:n}),o(B.k.BILLING_SCHEDULE_CANCEL,{scheduledPlan:h,scheduledInterval:f}),i.setQueryData([C.Zs,{companyId:n}],e=>e?{...e,scheduledPlan:null,scheduledInterval:null,scheduledAt:null,hasScheduledChange:!1}:e),i.invalidateQueries({queryKey:[C.Zs]}),d({title:"予約変更を取り消しました",description:"現在のプランが継続されます",type:"normal"})}catch(e){M.vF.error("Failed to release scheduled change",e),c({title:"予約変更の取り消しに失敗しました",description:(0,H.H4)(e)})}finally{u(!1)}}};return(0,l.FD)("div",{className:"rounded-lg border border-border bg-secondary/30 p-4 flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,l.FD)("p",{className:"text-sm font-medium",children:["次回更新日(",(0,j.Yq)(x),")から"," ",(0,l.FD)("span",{className:"text-primary",children:[(0,q.by)(h),"(",Q(f),")"]})," ","に変わります"]}),r&&(0,l.Y)(D.$,{size:"sm",variant:"outline",onClick:g,disabled:m,className:"text-xs",children:m?(0,l.FD)(l.FK,{children:[(0,l.Y)(s.A,{className:"h-3 w-3 mr-1 animate-spin"}),"処理中..."]}):"予定を取り消す"})]})}function et(e){let{subscription:t,companyId:a,returnPath:n}=e,r="trial"===t.billingStatus,{setErrorContent:i}=(0,O.useToast)(),[d,c]=(0,p.useState)(!1),o=async()=>{if(!d){c(!0);try{let e=await R({companyId:a,returnPath:n});window.location.href=e}catch(e){i({title:"エラーが発生しました",description:(0,H.H4)(e)}),c(!1)}}};return(0,l.FD)(U.A,{children:[(0,l.FD)(U.A.Header,{children:[(0,l.FD)("div",{className:"flex items-center gap-3",children:[(0,l.FD)(U.A.Title,{className:"mt-0",children:[t.localePlanName,t.interval&&(0,l.FD)("span",{className:"text-sm font-normal text-muted-foreground ml-1.5",children:["(",Q(t.interval),")"]})]}),(0,l.Y)(Y.E,{variant:"plusBold",children:"まとめてご契約中"})]}),(0,l.Y)(U.A.Message,{children:"複数拠点をまとめた特別契約でご利用中です。ご請求はグループでまとめてお支払いいただきます。"})]}),(0,l.Y)(U.A.Content,{children:(0,l.FD)("div",{className:"flex flex-wrap gap-x-10 gap-y-3",children:[r?t.localeUpcomingPriceLabel&&(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"お試し終了後の料金"}),(0,l.FD)("p",{className:"text-base font-semibold mt-0.5",children:[t.localeUpcomingPriceLabel,t.interval&&(0,l.FD)("span",{className:"text-xs font-normal text-muted-foreground ml-1",children:["/ ",Q(t.interval)]})]})]}):(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"この拠点のご利用料金"}),(0,l.Y)("p",{className:"text-base font-semibold mt-0.5",children:t.localePriceLabel})]}),(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:r?"無料お試し終了日":"次回お支払い日"}),(0,l.Y)("p",{className:"text-base font-semibold mt-0.5",children:r?t.localeExpireDate:t.localeNextPaymentDate})]}),(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"お支払い方法"}),(0,l.Y)("p",{className:"text-base font-semibold mt-0.5",children:"グループ一括請求"})]})]})}),(0,l.Y)(U.A.Bottom,{children:(0,l.FD)("div",{className:"flex flex-wrap items-center gap-4",children:[t.canManageGroupBilling&&(0,l.FD)(D.$,{variant:"outline",size:"sm",onClick:o,disabled:d,children:[d&&(0,l.Y)(s.A,{className:"mr-1.5 h-4 w-4 animate-spin"}),"お支払い情報・請求書の管理"]}),(0,l.Y)("a",{href:"https://www.nanco.io/free-consultation",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primaryLight underline underline-offset-4",children:"プランの変更・解約について相談する"})]})})]})}function ea(e){let{subscription:t,userState:a,authorized:n,companyId:i,companyShortId:s,authId:d}=e,c=function(e,t){switch(e){case"trial":return null;case"expired":return"データは保存されています。プランを開始すると、すべての機能をご利用いただけます。";case"past_due":return"お支払いの更新が必要です。カード情報を更新するだけで、引き続きご利用いただけます。";case"cancel_scheduled":return t.cancelsAt?"".concat((0,j.Yq)(t.cancelsAt),"まで引き続きご利用いただけます。"):"現在の請求期間終了後にキャンセルされます。";case"standard_near_limit":return"ご利用量が上限に近づいています。";case"iap":return t.cancelsAtPeriodEnd?"アプリ課金は解約済みです。".concat(t.localeExpireDate,"まã
1§å¼•き続きご利用いただけます。期限後にWeb版で新しいプランをお選びいただけます。"):"Web版では年額プランや プロ・エンタープライズ もお選びいただけます。";default:return""}}(a,t),o=t.hasScheduledChange&&t.scheduledPlan&&t.scheduledAt,m=(0,q.Se)(t)&&"iap"!==a,u=m&&!t.cancelsAtPeriodEnd&&!t.cancelsAt&&!(0,q.Id)(t),h=t.cancelsAt?"支払い情報の変更はこちら":"支払い情報の変更・契約の停止はこちら";return(0,l.FD)(U.A,{children:[(0,l.FD)(U.A.Header,{children:[(0,l.FD)("div",{className:"flex items-center gap-3",children:[(0,l.Y)(U.A.Title,{className:"mt-0",children:"trial"===a?"".concat(k.My,"中"):"expired"===a?"".concat(k.My,"終了"):(0,l.FD)(l.FK,{children:[t.localePlanName,t.interval&&(0,l.FD)("span",{className:"text-sm font-normal text-muted-foreground ml-1.5",children:["(",Q(t.interval),")"]})]})}),function(e){switch(e){case"trial":case"expired":return null;case"past_due":return(0,l.Y)(Y.E,{variant:"minusBold",children:"お支払いに問題があります"});case"cancel_scheduled":return(0,l.Y)(Y.E,{variant:"grayBold",children:"キャンセル予定"});case"iap":return(0,l.Y)(Y.E,{variant:"plusBold",children:"アプリ課金"});default:return(0,l.Y)(Y.E,{variant:"plusBold",children:"ご契約中"})}}(a)]}),c&&(0,l.Y)(U.A.Message,{children:c})]}),o&&(0,l.Y)(U.A.Content,{children:(0,l.Y)(ee,{subscription:t,companyId:i,authorized:n})}),("trial"===a||u)&&(0,l.FD)(U.A.Content,{children:["trial"===a&&(0,l.FD)("div",{className:"flex gap-x-10",children:[(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground mb-1",children:"終了日"}),(0,l.Y)("p",{className:"text-lg font-semibold leading-none",children:t.localeExpireDate})]}),(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground mb-1",children:"残り日数"}),(0,l.FD)("p",{className:"text-lg font-semibold leading-none",children:[(0,k.le)(t.expiresDate),(0,l.Y)("span",{className:"text-sm font-normal text-muted-foreground ml-0.5",children:"日"})]})]})]}),u&&(()=>{let e=t.scheduledPlan,a=t.scheduledInterval,r=!!(t.hasScheduledChange&&e),c=r?Z.find(t=>t.key===e):Z.find(e=>e.plan===t.plan),o=r?a:t.interval,m="year"===o||"month"===o?o:"month",u=r?(0,q.by)(e):t.localePlanName,h=c?"year"===m?c.annualMonthlyPrice:c.monthlyPrice:null;return(0,l.FD)("div",{className:"space-y-3",children:[(0,l.FD)("div",{className:"flex flex-wrap gap-x-10 gap-y-3",children:[(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"次回お支払い日"}),(0,l.Y)("p",{className:"text-base font-semibold mt-0.5",children:t.localeNextPaymentDate})]}),(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"プラン"}),(0,l.FD)("p",{className:"text-base font-semibold mt-0.5",children:[u,(0,l.FD)("span",{className:"text-xs font-normal text-muted-foreground ml-0.5",children:["(",Q(m),")"]})]})]})]}),(0,l.FD)("div",{className:"flex flex-wrap gap-x-10 gap-y-3",children:[(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"お支払い額"}),null===h?(0,l.Y)("p",{className:"text-base font-semibold mt-0.5",children:"—"}):"year"===m?(0,l.FD)("p",{className:"text-base font-semibold mt-0.5",children:["\xa5",(12*h).toLocaleString(),"/å¹´",(0,l.FD)("span",{className:"text-xs font-normal text-muted-foreground ml-0.5",children:["(月額換算 \xa5",h.toLocaleString(),")"]})]}):(0,l.FD)("p",{className:"text-base font-semibold mt-0.5",children:["\xa5",h.toLocaleString(),(0,l.Y)("span",{className:"text-xs font-normal text-muted-foreground ml-0.5",children:"/月(月払い)"})]})]}),(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"お支払い方法"}),(0,l.FD)("p",{className:"text-base font-semibold mt-0.5",children:[t.localePaymentMethodName,t.paymentMethodDetail&&(0,l.FD)("span",{className:"text-xs font-normal text-muted-foreground ml-0.5",children:["(",t.paymentMethodDetail,")"]})]})]})]}),"month"===m&&c&&(()=>{let e=(c.monthlyPrice-c.annualMonthlyPrice)*12;return(0,l.FD)("div",{className:"flex items-center gap-3 mt-4",children:[(0,l.FD)("p",{className:"text-sm font-medium",children:["年払いに切り替えると",(0,l.FD)("span",{className:"text-primary",children:["年間\xa5",e.toLocaleStr
1ing(),"お得"]})]}),(0,l.Y)(eh,{label:"年払いに切り替える",errorLabel:"",isAdmin:n,companyId:i,companyShortId:s,authId:d,selectedPlan:c.plan,billingInterval:"year"})]})})()]})})()]}),"expired"===a&&(0,l.Y)("div",{className:"px-6 py-4 space-y-2",children:(0,l.FD)("p",{className:"text-xs text-muted-foreground",children:["導入のご相談やデータ移行の代行も承っています。 無料期間延長のご希望もお気軽にご連絡ください。",(0,l.Y)("a",{href:"https://www.nanco.io/free-consultation",target:"_blank",rel:"noopener noreferrer",className:"text-primaryLight underline underline-offset-4 hover:text-primary ml-1",children:"お問い合わせ"})]})}),"iap"===a&&(()=>{let e=t.cancelsAtPeriodEnd,a=(0,q.lZ)(t.source),n=e?["アプリ課金は解約済みです。".concat(t.localeExpireDate,"まで現在のプランを引き続きご利用いただけます"),"期限後、このページから Web 版でプランをお選びください(年額プランや プロ・エンタープライズもご利用可能)"]:[a,"現在のプランは有効期限まで引き続きご利用いただけます","有効期限後、このページから新しいプランをお選びください"],r=["①","②","③","④"];return(0,l.Y)(U.A.Content,{children:(0,l.FD)("div",{className:"p-4 rounded-lg bg-secondary/50 border border-border",children:[(0,l.Y)("p",{className:"text-sm font-medium mb-3",children:e?"Web版での再契約手順":"Web版への切り替え手順"}),(0,l.Y)("ol",{className:"space-y-2 text-sm text-muted-foreground",children:n.map((e,t)=>(0,l.FD)("li",{className:"flex gap-2",children:[(0,l.Y)("span",{className:"font-semibold text-foreground",children:r[t]}),(0,l.Y)("span",{children:e})]},t))})]})})})(),(0,l.FD)(U.A.Bottom,{children:[(0,l.FD)("div",{className:"flex flex-col gap-1",children:[m&&(0,l.Y)(eh,{label:h,errorLabel:"この操作には管理者権限が必要です。",isAdmin:n,companyId:i,companyShortId:s,authId:d}),("trial"===a||"expired"===a)&&(0,l.Y)("a",{href:"https://nanco.io/pricing",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primaryLight underline underline-offset-4",children:"プランについて詳しく知る"})]}),(0,l.FD)(U.A.Action,{children:["trial"===a&&(0,l.Y)(em,{label:"プランを選ぶ"}),"expired"===a&&(0,l.Y)(em,{label:"プランを開始する"}),"standard_near_limit"===a&&(0,l.Y)(eu,{label:"アップグレード",icon:(0,l.Y)(r.A,{className:"h-4 w-4"}),isAdmin:n,companyId:i,companyShortId:s,authId:d}),"cancel_scheduled"===a&&(0,l.Y)(eu,{label:"キャンセルを取り消す",variant:"outline",isAdmin:n,companyId:i,companyShortId:s,authId:d})]})]})]})}function el(e){var t,a,n,r;let{usage:i,loading:s,isTrial:d}=e,{companyDB:c}=(0,E.Z2)(),o=(r=null==c?void 0:c.company.id,(0,S.I)({queryKey:["company-ai-usage",r],queryFn:()=>(0,L.CS)("/api/v1/ai-usage/summary?companyId=".concat(r)),enabled:!!r,staleTime:6e4}));return(0,l.FD)(U.A,{children:[(0,l.FD)(U.A.Header,{children:[(0,l.Y)(U.A.Title,{children:"使用量"}),d&&(0,l.Y)(U.A.Message,{children:"無料お試し中は上限なしでご利用いただけます。ご契約後は選択したプランの上限が適用されます。"})]}),(0,l.FD)(U.A.Content,{children:[s&&(0,l.FD)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,l.Y)(F.E,{className:"h-14 w-full"}),(0,l.Y)(F.E,{className:"h-14 w-full"})]}),!s&&i&&d&&(0,l.FD)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground mb-1",children:"アイテム数"}),(0,l.Y)("p",{className:"text-lg font-semibold leading-none tabular-nums",children:i.activeItems.current.toLocaleString()})]}),(0,l.FD)("div",{children:[(0,l.Y)("p",{className:"text-xs text-muted-foreground mb-1",children:"画像ストレージ"}),(0,l.Y)("p",{className:"text-lg font-semibold leading-none tabular-nums",children:(0,w.z3)(i.storageBytes.current)})]})]}),!s&&i&&!d&&(0,l.FD)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,l.Y)(I,{label:"アイテム数",current:i.activeItems.current,limit:i.activeItems.limit,formatCurrent:i.activeItems.current.toLocaleStr
1ing(),formatLimit:null==i.activeItems.limit?"無制限":i.activeItems.limit.toLocaleString()+"件"}),(0,l.Y)(I,{label:"画像ストレージ",current:i.storageBytes.current,limit:i.storageBytes.limit,formatCurrent:(0,w.z3)(i.storageBytes.current),formatLimit:null==i.storageBytes.limit?"無制限":(0,w.DL)(i.storageBytes.limit)})]}),(0,l.Y)(en,{monthKey:null==(t=o.data)?void 0:t.monthKey,inputTokens:null==(a=o.data)?void 0:a.inputTokens,outputTokens:null==(n=o.data)?void 0:n.outputTokens,loading:o.isPending,error:o.isError})]})]})}function en(e){var t,a;let n=e.monthKey?"".concat(Number(e.monthKey.slice(5,7)),"月"):"今月",r=null!=(t=e.inputTokens)?t:0,i=null!=(a=e.outputTokens)?a:0;return(0,l.FD)("div",{className:"border-t pt-6",children:[(0,l.FD)("p",{className:"text-xs text-muted-foreground mb-2",children:[n,"の AI 利用"]}),e.error?(0,l.Y)("p",{className:"text-xs text-muted-foreground",children:"取得できませんでした。"}):e.loading?(0,l.Y)(F.E,{className:"h-5 w-24"}):(0,l.FD)("div",{className:"flex items-baseline gap-3",children:[(0,l.FD)("p",{className:"text-lg font-semibold leading-none tabular-nums",children:[(0,w._y)(r+i),(0,l.Y)("span",{className:"ml-1 text-sm font-normal text-muted-foreground",children:"tokens"})]}),(0,l.FD)("p",{className:"text-xs text-muted-foreground tabular-nums",children:["入力 ",(0,w._y)(r)," / 出力 ",(0,w._y)(i)]})]})]})}function er(e){let{currentPlan:t,userState:a,interval:n,authorized:r,companyId:i,companyShortId:s,authId:c}=e,[o,m]=(0,p.useState)(!0),{logFunnelStepOnce:u}=(0,_.U)(),h=e=>{m(e),u(B.k.BILLING_INTERVAL_TOGGLE,{interval:e?"year":"month"})};return(0,l.FD)("div",{id:"plans",className:"scroll-mt-4",children:[(0,l.FD)("div",{className:"relative flex items-center justify-center mt-20 mb-4",children:[(0,l.Y)("h3",{className:"absolute left-0 text-sm font-semibold",children:"プラン比較"}),(0,l.FD)("div",{className:"inline-flex items-center rounded-full bg-white shadow-sm p-1 text-sm",children:[(0,l.Y)("button",{className:"rounded-full px-4 py-2 font-medium transition-all ".concat(o?"text-foreground":"bg-primary text-white shadow-sm"),onClick:()=>h(!1),children:"月払い"}),(0,l.FD)("button",{className:"rounded-full px-4 py-2 font-medium transition-all ".concat(o?"bg-primary text-white shadow-sm":"text-foreground"),onClick:()=>h(!0),children:["年払い"," ",(0,l.Y)("span",{className:"tracking-wider ".concat(o?"":"text-primaryLight font-bold"),children:"40%お得"})]})]})]}),(0,l.Y)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Z.map((e,m)=>{let u=o?"year":"month",h=e.plan===t&&(null==n||n===u),p=e.plan===t,f=Z.findIndex(e=>e.plan===t);return(0,l.Y)("div",{className:"relative flex flex-col rounded-lg bg-white shadow-light ".concat(h?"ring-2 ring-primary":""),children:(0,l.FD)("div",{className:"p-5 flex flex-col flex-1",children:[(0,l.Y)("div",{className:"mb-4",children:(0,l.FD)("div",{className:"flex items-center gap-2",children:[(0,l.Y)("div",{className:"flex h-6 w-6 items-center justify-center rounded bg-secondary text-primary",children:e.icon}),(0,l.Y)("span",{className:"font-semibold",children:e.name})]})}),(0,l.FD)("div",{className:"mb-4",children:[(0,l.FD)("div",{className:"flex items-baseline",children:[(0,l.Y)("span",{className:"text-sm text-muted-foreground",children:"\xa5"}),(0,l.Y)("span",{className:"text-3xl font-bold tabular-nums",children:(o?e.annualMonthlyPrice:e.monthlyPrice).toLocaleString()}),(0,l.FD)("span",{className:"text-sm text-muted-foreground ml-0.5",children:["円/月",o?"(年払い)":"(月払い)"]})]}),o&&(0,l.FD)("p",{className:"text-xs text-muted-foreground mt-3",children:["年額 \xa5",(12*e.annualMonthlyPrice).toLocaleString(),(0,l.FD)("span",{className:"text-primary ml-1",children:["(年間\xa5",((e.monthlyPrice-e.annualMonthlyPrice)*12).toLocaleString(),"お得)"]})]})]}),(0,l.Y)("div",{className:"border-t border-border pt-4 flex-1",children:(0,l.FD)("ul",{className:"space-y-2.5",children:[e.features.map(e=>(0,l.FD)("li",{className:"flex items-center justify-between text-sm",children:[(0,l.Y)("span",{className:"text-muted-foreground",children:e.label}),(0,l.Y)("span",{className:"font-medium",children:e.value})]},e.label)),(0,l.FD)("li",{className:"flex items-center gap-2 text-xs text-muted-foreground pt-1",children:[(0,l.Y)(d.A,{className:"h-3.5 w-3.5 text-primaryLight flex-shrink-0"}),(0,l.Y)("span",{children:"その他すべての機能を利用可能"})]})]})}),(0,l.Y)("div",{className:"mt-5 pt-4 border-t border-border",children:(0,l.Y)(eo,{plan:e,currentPlan:t,isCurrentPlan:p,isUpgrade:!p&&m>
1f,isAnnual:o,interval:n,userState:a,authorized:r,companyId:i,companyShortId:s,authId:c})})]})},e.key)})}),(0,l.Y)("p",{className:"text-center text-sm text-muted-foreground mt-4",children:"アイテム数・ストレージ以外の機能はすべてのプランで共通で利用できます"})]})}let ei=[{question:"プランによる違いはなんですか?",answer:"プランによって異なるのはアイテム数とストレージ容量の上限のみです。出荷・入荷・棚卸などの機能やユーザー数はすべてのプランで制限なくご利用いただけます。"},{question:"ストレージ容量に写真は何枚くらい保存できますか?",answer:"スマートフォンアプリの標準設定(自動圧縮あり)で撮影・保存した場合、5GB で約 10,000 枚が目安です。撮影内容や「オリジナル」設定で保存した場合は変動します。"},{question:"ユーザー数によって料金は変わりますか?",answer:"いいえ。nancoはユーザー数による追加料金はありません。チーム全員でご利用いただけます。"},{question:"年払いと月払いは切り替えできますか?",answer:"「サブスクリプションを更新」からいつでも切り替えできます。月払い→年払いはその日からすぐ年払いに切り替わり(差額は日割り精算されます)、年払い→月払いは次回の更新日(現在の年払い期間の終了時)から月払いに切り替わります。年払いは月払いに比べて約40%お得です。"},{question:"プランを変更すると、いつから新しい料金になりますか?",answer:"上位プランへの変更(例: スタンダード→プロ)は変更した時点ですぐに新プランへ切り替わり、現在の請求期間の残り日数分の差額が日割りで請求されます。下位プランへの変更(例: プロ→スタンダード)は、現在の請求期間が終わったタイミングから新プランに切り替わります。期間が終わるまでは現在のプランをそのままご利用いただけるので、追加の支払いは発生しません。"},{question:"解約するとデータはどうなりますか?",answer:"解約後も請求期間の終了日まではすべての機能をご利用いただけます。期間終了後はデータの閲覧のみ可能となり、その後一定期間経過後に削除されます。\n\n※解約してもアカウントやワークスペースのデータは削除されません。退会(ワークスペースを完全に削除)したい場合は、設定 > 基本情報 から「ワークスペース削除」を行ってください。"},{question:"領収書や請求書はどこから取得できますか?",answer:"「支払い情報の変更・契約の停止はこちら」から決済管理ページへ進み、「請求履歴」から各月の領収書・請求書(PDF)をダウンロードできます。"},{question:"アプリから契約した場合はどうなりますか?",answer:"iOS/Androidアプリから契約した場合は、各ストアの設定画面からプランの管理・解約を行ってください。"}];function es(e){var t;let{reservation:a}=e,n=null!=(t=a.label)?t:"割引クーポン",r=null!=a.percentOff?"".concat(a.percentOff,"% オフ"):null;return(0,l.FD)("div",{className:"flex items-start gap-3 rounded-lg border border-teal-200 bg-teal-50 p-4",children:[(0,l.Y)(c.A,{className:"mt-0.5 h-5 w-5 shrink-0 text-teal-700"}),(0,l.FD)("div",{children:[(0,l.FD)("p",{className:"text-sm font-semibold text-teal-900",children:["クーポン「",n,"」",r?"(".concat(r,")"):"","がこのワークスペースに適用されます"]}),(0,l.Y)("p",{className:"mt-1 text-sm text-teal-800",children:"プランを選んで決済に進むと、割引後の価格が自動で表示されます。"})]})]})}function ed(e){let{preview:t}=e,a=t.nextPaymentAt?(0,j.Yq)(new Date(1e3*t.nextPaymentAt)):null;return(0,l.FD)("div",{className:"flex items-start gap-3 rounded-lg border border-teal-200 bg-teal-50 p-4",children:[(0,l.Y)(c.A,{className:"mt-0.5 h-5 w-5 shrink-0 text-teal-700"}),(0,l.FD)("div",{children:[(0,l.FD)("p",{className:"text-sm font-semibold text-teal-900",children:["クーポン適用中:次回のお支払いは ",T(t.amountDue,t.currency)," です"]}),(0,l.FD)("p",{className:"mt-1 text-sm text-teal-800",children:[T(t.discountTotal,t.currency)," の割引が適用されています。",a?"次回請求日: ".concat(a):""]})]})]})}function ec(){return(0,l.FD)("div",{children:[(0,l.Y)("h3",{className:"text-sm font-semibold mt-10 mb-3",children:"よくある質問"}),(0,l.Y)("div",{className:"bg-white shadow-light rounded-lg overflow-hidden",children:(0,l.Y)(y,{type:"multiple",className:"w-full",children:ei.map((e,t)=>(0,l.FD)(N,{value:"faq-".concat(t),children:[(0,l.Y)(v,{className:"px-6 py-4 text-sm text-left hover:no-underline hover:bg-secondary/50",children:e.question}),(0,l.Y)(b,{className:"px-6 pb-4 text-sm text-muted-foreground leading-relaxed whitespace-pre-line",children:e.answer})]},t))})})]})}function eo(e){let{plan:t,currentPlan:a,isCurrentPlan:n,isUpgrade:i,isAnnual
1:s,interval:d,userState:c,authorized:o,companyId:m,companyShortId:u,authId:h}=e,{logFeatureEvent:p}=(0,_.U)(),f="month"===d,x=!n&&!i;if("iap"===c)return(0,l.Y)("div",{className:"py-2"});let g=s?"year":"month",y=e=>{p(B.k.BILLING_UPGRADE_CLICK,{fromPlan:a,toPlan:t.plan,interval:e,isUpgrade:i})};if("trial"===c||"expired"===c)return(0,l.Y)(eu,{label:"このプランではじめる",isAdmin:o,companyId:m,companyShortId:u,authId:h,fullWidth:!0,variant:"outline",selectedPlan:t.plan,billingInterval:g});if(n){if(f&&s){let e=(t.monthlyPrice-t.annualMonthlyPrice)*12;return(0,l.FD)("div",{className:"space-y-1.5",children:[(0,l.Y)(eu,{label:"年払いに変更",isAdmin:o,companyId:m,companyShortId:u,authId:h,fullWidth:!0,variant:"default",selectedPlan:t.plan,billingInterval:"year",onBeforeRedirect:()=>y("year")}),(0,l.FD)("p",{className:"text-xs text-center text-primary font-medium",children:["年間\xa5",e.toLocaleString(),"お得"]})]})}return f||"year"!==d||s?(0,l.FD)("div",{className:"w-full py-2.5 text-center text-sm text-muted-foreground border border-border rounded-md",children:["現在のプラン",f?"(月払い)":""]}):(0,l.Y)(eu,{label:"月払いに変更",isAdmin:o,companyId:m,companyShortId:u,authId:h,fullWidth:!0,variant:"outline",selectedPlan:t.plan,billingInterval:"month",onBeforeRedirect:()=>y("month")})}return i?(0,l.Y)(eu,{label:"アップグレード",icon:(0,l.Y)(r.A,{className:"h-4 w-4"}),isAdmin:o,companyId:m,companyShortId:u,authId:h,fullWidth:!0,variant:"outline",selectedPlan:t.plan,billingInterval:g,onBeforeRedirect:()=>y(g)}):x?(0,l.Y)(eu,{label:"このプランに変更",isAdmin:o,companyId:m,companyShortId:u,authId:h,fullWidth:!0,variant:"ghost",className:"font-normal",selectedPlan:t.plan,billingInterval:g,onBeforeRedirect:()=>y(g)}):(0,l.Y)("div",{className:"py-2"})}function em(e){return(0,l.Y)(D.$,{asChild:!0,className:"gap-2",children:(0,l.FD)("a",{href:"#plans",children:[(0,l.Y)(o.A,{className:"h-4 w-4"}),e.label]})})}function eu(e){let{label:t,icon:a,isAdmin:n,companyId:r,companyShortId:i,authId:d,fullWidth:c,variant:m,className:u,selectedPlan:h,billingInterval:p,onBeforeRedirect:f}=e,{redirect:x,loading:y}=V({isAdmin:n,companyId:r,companyShortId:i,authId:d,selectedPlan:h,billingInterval:p});return(0,l.FD)(D.$,{variant:null!=m?m:"default",className:(0,g.cn)("gap-2",c&&"w-full",u),onClick:()=>{null==f||f(),x()},disabled:y,children:[y?(0,l.Y)(s.A,{className:"h-4 w-4 animate-spin"}):null!=a?a:(0,l.Y)(o.A,{className:"h-4 w-4"}),t]})}function eh(e){let{label:t,errorLabel:a,isAdmin:n,companyId:r,companyShortId:i,authId:d,selectedPlan:c,billingInterval:o}=e,{redirect:m,loading:u}=V({isAdmin:n,companyId:r,companyShortId:i,authId:d,selectedPlan:c,billingInterval:o});return n?(0,l.FD)(D.$,{variant:"link",className:"px-0 h-auto text-sm text-primaryLight",onClick:m,disabled:u,children:[u&&(0,l.Y)(s.A,{className:"h-3.5 w-3.5 animate-spin mr-1"}),t]}):(0,l.Y)("p",{className:"text-sm text-muted-foreground",children:a})}},95423:(e,t,a)=>{"use strict";function l(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),a=e/1024**t;return"".concat(a.toFixed(+(a<10))," ").concat(["B","KB","MB","GB","TB"][t])}function n(e){return e>=0x40000000?"".concat(Math.round(e/0x40000000),"GB"):e>=1048576?"".concat(Math.round(e/1048576),"MB"):l(e)}function r(e){return e>=90?"bg-red-500":e>=70?"bg-amber-500":"bg-primaryLight"}function i(e){let t=Math.max(0,Math.round(e));if(t<1e3)return t.toLocaleString();if(t<1e6){let e=t/1e3;return"".concat(e<10?e.toFixed(1):Math.round(e).toLocaleString(),"k")}let a=t/1e6;return"".concat(a<10?a.toFixed(2):a<100?a.toFixed(1):Math.round(a).toLocaleString(),"M")}a.d(t,{DL:()=>n,Pd:()=>r,_y:()=>i,z3:()=>l})}},e=>{var t=t=>e(e.s=t);e.O(0,[6482,4567,3085,5505,3139,3535,9769,9384,8966,8456,4645,636,6593,8792],()=>t(54885)),_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.