(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[547],{597:(e,t,r)=>{"use strict";r.d(t,{MapScript:()=>s});var n=r(12115),a=r(21095),o=r(15745);let i="map-script";function s(){let{setIsScriptLoaded:e}=(0,o.U)(),t=(0,n.useCallback)(async()=>{await new Promise((e,t)=>{if(document.getElementById(i))return void e();let r=document.createElement("script");r.id=i,r.src=a.y0,r.async=!0,r.onload=()=>e(),r.onerror=()=>t(Error("Failed to load Map script")),document.body.appendChild(r)})},[]);return(0,n.useEffect)(()=>{t().then(()=>{e(!0)}).catch(e=>{console.error(e)})},[t,e]),null}},3570:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});let n={maxCacheEntries:100,defaultCacheTTL:3e5,apiV1StopsSearchCacheTTL:6e4,apiV1StopsSearchByKeitouIdCacheTTL:6e4,apiV1StopsByIdCacheTTL:6e4,apiV1StopsDetailFromToCacheTTL:6e4,apiV1StopsDetailTripCacheTTL:6e4,apiV1KeitousSearchCacheTTL:6e4,apiV1KeitousCacheTTL:6e4,apiV1TripsTripIdCacheTTL:6e4,apiV1TripUpdatesTripIdCacheTTL:1e4,apiV1TripUpdatesSearchByStopFromToCacheTTL:1e4}},14402:(e,t,r)=>{"use strict";r.d(t,{M:()=>n,k:()=>a});var n=function(e){return e.StopId="stopId",e.SamePoleId="samePoleId",e}({}),a=function(e){return e[e.Dropoff=1]="Dropoff",e[e.Pickup=2]="Pickup",e[e.Both=3]="Both",e}({})},15099:(e,t,r)=>{"use strict";r.d(t,{S:()=>i,s:()=>s});var n=r(3570),a=r(79348),o=r(91845);async function i(e){var t;let r={Id:e.id,Language:null!=(t=e.language)?t:o.q};return await (0,a.s)("GET","/api/v1/Keitous/Search",r,{ttl:n.$.apiV1KeitousSearchCacheTTL})}async function s(e){var t;let r={Language:null!=(t=e.language)?t:o.q};return await (0,a.s)("GET","/api/v1/Keitous",r,{ttl:n.$.apiV1KeitousCacheTTL})}},15600:()=>{},15745:(e,t,r)=>{"use strict";r.d(t,{U:()=>l});var n=r(77202),a=r(80074),o=r(51208);let i=(0,a.eU)(!1),s=((0,o.tx)(void 0),{isScriptLoaded:i});function l(){return{isScriptLoaded:(0,n.md)(s.isScriptLoaded),setIsScriptLoaded:(0,n.Xr)(s.isScriptLoaded)}}},20379:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(25803);let a=e=>n.IB.includes(e)},21095:(e,t,r)=>{"use strict";r.d(t,{gT:()=>i,y0:()=>o});var n=r(87094),a=r(52869);let o=function(){let e=new URL("".concat(n.K.itsMo.jsApiBaseUrl).concat("/v3/loader")),t=n.K.itsMo.apiKey||"",r=n.K.itsMo.apiSecret||"",o=(0,a.af)(t),i=Object.assign({key:n.K.itsMo.apiKey||"",api:"zdcmap.js,control.js,shape.js",enc:"UTF8"},{auth_type:"oauth"}),s={...o,...i},l=(0,a.Rq)("GET",e.toString(),s,r);return s.oauth_signature=l,e.search=new URLSearchParams(s).toString(),e.toString()}();function i(e){let{latitude:t,longitude:r}=e,n=new ZDC.LatLon(t,r);return ZDC.wgsTotky(n)}},21140:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,41402,23)),Promise.resolve().then(r.bind(r,34198)),Promise.resolve().then(r.bind(r,597)),Promise.resolve().then(r.bind(r,52766)),Promise.resolve().then(r.bind(r,23188)),Promise.resolve().then(r.bind(r,82104)),Promise.resolve().then(r.bind(r,58845)),Promise.resolve().then(r.bind(r,76405)),Promise.resolve().then(r.bind(r,91096)),Promise.resolve().then(r.bind(r,46141)),Promise.resolve().then(r.t.bind(r,73483,23)),Promise.resolve().then(r.t.bind(r,11548,23)),Promise.resolve().then(r.t.bind(r,15600,23)),Promise.resolve().then(r.t.bind(r,93836,23))},23310:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(95155),a=r(87094);function o(e){let{strokeColor:t,trackColor:r}=e;return(0,n.jsxs)("svg",{"aria-label":"Loading",role:"status",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{style:{stroke:t},children:[(0,n.jsxs)("circle",{cx:"12",cy:"12",fill:"none",r:"9.5",strokeLinecap:"round",strokeWidth:"2",children:[(0,n.jsx)("animate",{attributeName:"stroke-dasharray",calcMode:"spline",dur:"1.5s",keySplines:"0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",keyTimes:"0;0.475;0.95;1",repeatCount:"indefinite",values:"0 150;42 150;42 150;42 150"}),(0,n.jsx)("animate",{attributeName:"stroke-dashoffset",calcMode:"spline",dur:"1.5s",keySplines:"0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",keyTimes:"0;0.475;0.95;1",repeatCount:"indefinite",values:"0;-16;-59;-59"})]}),(0,n.jsx)("animateTransform",{attributeName:"transform",dur:"2s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})]}),(0,n.jsx)("g",{style:{stroke:r},fill:"none",fillRule:"evenodd",children:(0,n.jsx)("g",{strokeWidth:"2",children:(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9.5",strokeOpacity:".5"})})})]})}var i=r(88294);function s(e){let{message:t="Loading..."}=e;return(0,n.jsxs)("div",{className:"flex min-h-screen w-full flex-col items-center justify-center",children:[(0,n.jsx)("div",{className:"w-24",children:(0,n.jsx)(o,{strokeColor:i.R.color.kobeGreen,trackColor:i.R.color.overlayMiddle})}),(0,n.jsx)("p",{className:"m-4 text-sm",children:a.K.isProd?"Loading...":t})]})}},37250:(e,t,r)=>{"use strict";r.d(t,{eD:()=>i,co:()=>l,aA:()=>s});var n=r(80074),a=r(58640),o=r(7720);function i(e){return{id:e.id,sameId:e.sameId,code:e.code,name:e.name,desc:e.desc,translationName:e.translationName,lat:e.lat,lon:e.lon,pickupAndDropoff:e.pickupAndDropoff}}function s(e,t,r){var n;let a=[t,function(e){if(!e.includes("@"))return e;let t=e.indexOf("@");return e.slice(t+1)}(r)].join("-");return null==(n=e.find(e=>e.id.startsWith(a)))?void 0:n.price}function l(e){if(!e.desc)return"";let t=(0,n.zp)().get(o.T.locale);return(0,a.g)(t)?"".concat(e.desc,"行き"):"To ".concat(e.desc)}},52766:(e,t,r)=>{"use strict";r.d(t,{BaseLayout:()=>T});var n=r(95155),a=r(12115),o=r(94896),i=r(92840),s=r(63639),l=r(14749),c=r(72557),u=r(20063),d=r(25803),p=r(20379),f=r(92964),h=r(75174);function m(){var e;let t=(0,u.useRouter)(),{pathname:r,searchParams:o}=(0,i.Sz)(),s=null!=(e=r.split("/")[1])?e:"",l=(0,p.Z)(s)?s:void 0,c=(0,a.useMemo)(()=>l===d.RH,[l]);return(0,n.jsxs)("nav",{className:"w-3/12 text-right","aria-label":"Language switcher",children:[(0,n.jsx)("span",{className:"text-blackopa pr-2",children:"English"}),(0,n.jsx)(h.j,{checked:c,onChange:()=>(()=>{let e=function(e,t,r){var n;let a=function(e){return"/"===e?"/":""===e?"/":e.endsWith("/")?e:e+"/"}("//"===(n=function(e){var t;let r=e.split("/"),n=null!=(t=r[1])?t:"";return(0,p.Z)(n)?"/"+r.slice(2).join("/"):"/"+r.slice(1).join("/")}(e||"/"))?"/":n),o="/".concat(r).concat(a);if(0===Object.keys(t).length)return o;let i=new URLSearchParams((0,f.b_)(t)).toString();return"".concat(o,"?").concat(i)}(r,o,l===d.RH?d.ts:d.RH);t.push(e)})()})]})}function g(e){let{title:t}=e;return(0,n.jsx)(l.H,{center:t,left:(0,n.jsx)(c.E,{}),right:(0,n.jsx)(m,{})})}var S=r(95127),y=r(67844);let v=(0,S.A)(y.a)({overflowY:"auto"});function k(e){let{children:t}=e;return(0,n.jsx)(v,{children:t})}function T(e){let{children:t}=e,{pageTitle:r}=(0,i.Sz)(),l=(0,o.pR)();return(0,a.useEffect)(()=>{l()},[]),(0,n.jsxs)("div",{children:[(0,n.jsx)(g,{title:r}),(0,n.jsx)("div",{className:"mx-auto py-26 px-8 relative min-h-screen",children:(0,n.jsx)(k,{children:t})}),(0,n.jsx)(s.y,{})]})}},58108:(e,t,r)=>{"use strict";r.d(t,{eB:()=>u,nG:()=>f,Sv:()=>d,sV:()=>p,v6:()=>m,GK:()=>h,r7:()=>S,oM:()=>y,sP:()=>g});var n=r(76767);function a(e){if(e instanceof DOMException){if("QuotaExceededError"===e.name)throw Error("ストレージ容量が不足しています",{cause:e});else if("SecurityError"===e.name)throw Error("ストレージへのアクセスが許可されていません",{cause:e})}throw Error("ストレージエラーが発生しました",{cause:e})}function o(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){a(e)}}var i=r(46985),s=r(37250),l=r(92964);let c={bookmarksStorage:"bookmarksStorage"},u=(e,t,r)=>({originStopName:(null==e?void 0:e.name)||"",destinationStopName:(null==t?void 0:t.name)||"",platformName:r?(0,s.co)(r):"",query:d(e,t,r)}),d=(e,t,r)=>"originStop=".concat((null==e?void 0:e.id)||"").concat(t?"&destinationStop=".concat(t.id):"").concat(r?"&stopPlatform=".concat(r.id):""),p=e=>e.destinationStopName?"".concat(e.originStopName," → ").concat(e.destinationStopName):e.originStopName,f=(e,t)=>{let r=Object.fromEntries(new URLSearchParams(t));return(0,l.tQ)(e,r)};function h(){let e=c.bookmarksStorage;try{let t=function(e){try{let t=localStorage.getItem(e);if(t)return JSON.parse(t)}catch(e){a(e)}return null}(e);return null!=t?t:[]}catch(e){return console.error("getBookmarks failed: ",e),[]}}function m(e){return h().find(t=>t.query===e)}function g(e){let t=c.bookmarksStorage,r=h().filter(t=>t.query!==e.query);if(r.length>=n.q.maxBookmarks)throw new i.Qy;o(t,[...r,e].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()))}function S(e){o(c.bookmarksStorage,h().filter(t=>t.query!==e))}function y(e){let t=c.bookmarksStorage,r=h(),n=new Set(e);o(t,r.filter(e=>!n.has(e.query)))}},58640:(e,t,r)=>{"use strict";r.d(t,{g:()=>a});var n=r(91845);let a=e=>e===n.y1},66197:(e,t,r)=>{"use strict";r.d(t,{D7:()=>s,N8:()=>p,PV:()=>d,Ti:()=>u,jA:()=>c,mK:()=>l});var n=r(3570),a=r(79348),o=r(14402),i=r(91845);async function s(e){var t,r;let o={Name:e.name||"",Quadkey:e.quadkey||"",Language:null!=(r=e.language)?r:i.q,Lat:e.latitude||"",Lon:e.longitude||"",SamePoleId:"",Limit:(null==(t=e.limit)?void 0:t.toString())||"20"},s=await (0,a.s)("GET","/api/v1/Stops/Search",o,{ttl:n.$.apiV1StopsSearchCacheTTL});return null===s?{list:[]}:s}async function l(e){var t;let r="/api/v1/Stops/SearchByKeitouId/".concat(e.routeId),o={Language:null!=(t=e.language)?t:i.q},s=await (0,a.s)("GET",r,o,{ttl:n.$.apiV1StopsSearchByKeitouIdCacheTTL});return null===s?{list:[]}:s}async function c(e){var t;let r="/api/v1/Stops/".concat(e.stopId),s={Language:null!=(t=e.language)?t:i.q,IdType:e.idType||o.M.StopId};return await (0,a.s)("GET",r,s,{ttl:n.$.apiV1StopsByIdCacheTTL})}async function u(e){var t;let r={StopIdFrom:e.fromStopId,StopIdTo:e.toStopId||"",Date:e.date||"",Language:null!=(t=e.language)?t:i.q,IdType:e.idType||o.M.StopId};return await (0,a.s)("GET","/api/v1/Stops/detailfromto",r,{ttl:n.$.apiV1StopsDetailFromToCacheTTL,refresh:e.refresh})}async function d(e){var t;let r={StopIdFrom:e.fromStopId,StopIdTo:e.toStopId||"",Date:e.date||"",Language:null!=(t=e.language)?t:i.q,IdType:e.idType||o.M.StopId};return await (0,a.s)("GET","/api/v1/Stops/brothersfromto",r,{ttl:n.$.apiV1StopsDetailFromToCacheTTL,refresh:e.refresh})}async function p(e){var t;let r={TripId:e.tripId,StopIdFrom:e.stopIdFrom,StopIdTo:e.stopIdTo||"",Date:e.date||"",Language:null!=(t=e.language)?t:i.q,IdType:o.M.StopId};return await (0,a.s)("GET","/api/v1/Stops/detailtrip",r,{ttl:n.$.apiV1StopsDetailTripCacheTTL})}},67844:(e,t,r)=>{"use strict";r.d(t,{a:()=>o});var n=r(95155);r(12115);var a=r(41574);function o(e){let{className:t,component:r="div",sx:o,children:i}=e;return(0,n.jsx)(a.A,{className:t,component:r,sx:o,children:i})}},75174:(e,t,r)=>{"use strict";r.d(t,{j:()=>s});var n=r(95155),a=r(95127),o=r(49571);function i(e){let{className:t,checked:r,defaultChecked:a,slotProps:i,sx:s,onChange:l}=e;return(0,n.jsx)(o.A,{className:t,checked:r,defaultChecked:a,slotProps:i,sx:s,onChange:l})}function s(e){let{checked:t,onChange:r}=e,o=(0,a.A)(i)(e=>{let{}=e;return{width:28,height:16,padding:0,"&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#009799"}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6},"& .MuiSwitch-track":{borderRadius:8,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box"}}});return(0,n.jsx)(o,{className:"mr-1",checked:t,onChange:r})}},76405:(e,t,r)=>{"use strict";r.d(t,{NotificationProvider:()=>c});var n=r(95155),a=r(12115),o=r(77567),i=r(34522),s=r(55401);function l(e){let{children:t}=e,[r,l]=(0,a.useState)(null),[c,u]=(0,a.useState)(o.k.defaultSeverity),[d,p]=(0,a.useState)(o.k.defaultAutoHideDuration),[f,h]=(0,a.useState)(void 0),[m,g]=(0,a.useState)(!1),S=(0,a.useCallback)((e,t)=>{var r;l(e),u(null!=(r=null==t?void 0:t.severity)?r:o.k.defaultSeverity),p((null==t?void 0:t.autoHideDuration)===void 0?o.k.defaultAutoHideDuration:t.autoHideDuration),h(null==t?void 0:t.action),g(!0)},[]),y=(0,a.useCallback)(()=>{l(null),u(o.k.defaultSeverity),p(o.k.defaultAutoHideDuration),h(void 0),g(!1)},[]),v=(0,a.useMemo)(()=>({showNotification:S,closeNotification:y}),[S,y]);return(0,n.jsxs)(i.T.Provider,{value:v,children:[t,(0,n.jsx)(s.z,{action:f,autoHideDuration:d,message:r,open:m,severity:c,onClose:y})]})}function c(e){let{children:t}=e;return(0,n.jsx)(l,{children:t})}},79348:(e,t,r)=>{"use strict";r.d(t,{s:()=>d});var n=r(65776),a=r(87094),o=r(3570),i=r(29382),s=r.n(i),l=r(46985);async function c(e,t,r){let n=new URL("".concat(a.K.mobustation.apiBaseUrl).concat(t));if("GET"===e&&Object.keys(r).length>0){let e=new URLSearchParams;Object.entries(r).forEach(t=>{let[r,n]=t;Array.isArray(n)?n.forEach(t=>e.append(r,String(t))):e.append(r,String(n))}),n.search=e.toString()}let o={method:e,mode:"cors",credentials:"include",headers:new Headers({"Content-Type":"application/json","x-api-key":a.K.mobustation.apiKey||""})};"GET"!==e&&Object.keys(r).length>0&&(o.body=JSON.stringify(r));let i=await fetch(n.toString(),o);if(!i.ok){if(400===i.status)throw new l.v7("バリデーションエラーが発生しました");if(401===i.status)throw new l.D_("認証に失敗しました");if(403===i.status)throw new l.qQ("アクセスが禁止されています");if(500===i.status)throw new l.PO("サーバーエラーが発生しました");throw new l.j$(i.status,i.statusText)}return 204===i.status?null:await i.json()}let u=new n.q({max:o.$.maxCacheEntries,ttl:o.$.defaultCacheTTL});async function d(e,t,r,n){let{ttl:a=o.$.defaultCacheTTL,refresh:i=!1}=n||{};if("GET"!==e)return c(e,t,r);let l=(!function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"params";if("number"==typeof t){if(!Number.isFinite(t))throw Error('Invalid number at "'.concat(r,'": ').concat(t));return}if("bigint"==typeof t)throw Error('BigInt not supported at "'.concat(r,'": ').concat(t,"n"));if(Array.isArray(t))return void t.forEach((t,n)=>{e(t,"".concat(r,"[").concat(n,"]"))});null!==t&&"object"==typeof t&&Object.entries(t).forEach(t=>{let[n,a]=t;e(a,"".concat(r,".").concat(n))})}(r),"".concat(e,"_").concat(t,"_").concat(s()(r)));if(!i){let e=u.get(l);if(e)return e}let d=await c(e,t,r);return null!==d&&u.set(l,d,{ttl:a}),d}},91096:(e,t,r)=>{"use strict";r.d(t,{PageProvider:()=>k});var n=r(95155),a=r(12115),o=r(20063),i=r(96534),s=r(23310),l=r(92840),c=r(14402),u=r(66197),d=r(37250),p=r(15099);async function f(e,t){if(!e)return null;try{let r=await (0,u.jA)({stopId:e,language:t,idType:c.M.StopId});if(!r)return null;return{id:r.id,name:r.name,translationName:"(no translation)",lat:r.lat,lon:r.lon,pickupAndDropoff:r.pickupAndDropoff}}catch(e){return console.error("Failed to hydrate origin bus stop:",e),null}}async function h(e,t){if(!e)return null;try{let r=await (0,u.jA)({stopId:e,language:t,idType:c.M.StopId});if(!r)return null;return{id:r.id,name:r.name,translationName:"(no translation)",lat:r.lat,lon:r.lon,pickupAndDropoff:r.pickupAndDropoff}}catch(e){return console.error("Failed to hydrate destination bus stop:",e),null}}async function m(e,t){if(!e)return null;try{let r=await (0,u.jA)({stopId:e,language:t,idType:c.M.StopId});if(!r)return null;return{id:r.id,sameId:"(no sameId)",code:r.code,name:r.name,desc:r.desc,translationName:"(no translation)",lat:r.lat,lon:r.lon,pickupAndDropoff:r.pickupAndDropoff}}catch(e){return console.error("Failed to hydrate bus stop platform:",e),null}}async function g(e,t){if(!e)return null;try{let r=await (0,p.S)({id:e,language:t});if(!r||!r.list[0])return null;return r.list[0]}catch(e){return console.error("Failed to hydrate bus route:",e),null}}async function S(e,t,r){if(!e)return null;try{let n,a=await (0,u.N8)({tripId:e,stopIdFrom:t,language:r});if(!a||!a.stopTimes[0])return null;let o=a.stopTimes[0];if(a.fares){let e=a.fares.sort((e,t)=>e.price-t.price);n=(0,d.aA)(e,o.trip.routeId,o.stopId)}return{tripId:o.tripId,stopId:o.stopId,route:o.trip.route,ikisakiNo:o.ikisakiNo,ikisakiMain:o.ikisakiMain,ikisakiSub:o.ikisakiSub,farePrice:n}}catch(e){return console.error("Failed to hydrate bus trip:",e),null}}function y(){let{searchParams:e,originStop:t,destinationStop:r,stopPlatform:n,busRoute:o,busTrip:i,setOriginStop:s,setDestinationStop:c,setStopPlatform:u,setBusRoute:d,setBusTrip:p}=(0,l.Sz)(),{locale:y}=(0,l.PZ)();return(0,a.useEffect)(()=>{let n=e.originStop||"",a=e.destinationStop||"",o=!1;if(!n&&!a)return;let i=null===t||t&&n!==t.id,l=null===r||r&&a!==r.id;if(!i&&!l)return;let u=[];return i&&u.push(f(n,y)),l&&u.push(h(a,y)),Promise.all(u).then(e=>{if(o)return;let t=0;if(i){let r=e[t++];r&&s(r)}if(l){let r=e[t++];r&&c(r)}}).catch(e=>{console.error("Failed to hydrate bus stops:",e)}),()=>{o=!0}},[e.originStop,e.destinationStop,y,t,r,s,c]),(0,a.useEffect)(()=>{let t=e.stopPlatform||"";t&&(null===n||n&&t!==n.id)&&m(t,y).then(e=>{e&&u(e)}).catch(e=>{console.error("Failed to hydrate bus stop platform:",e)})},[e.stopPlatform,y,n,u]),(0,a.useEffect)(()=>{let t=e.route||"";t&&(null===o||o&&t!==o.id)&&g(t,y).then(e=>{e&&d(e)}).catch(e=>{console.error("Failed to hydrate bus route:",e)})},[e.route,y,o,d]),(0,a.useEffect)(()=>{let t=e.trip||"",r=e.stopPlatform||e.originStop||"";t&&r&&(null===i||i&&(t!==i.tripId||r!==i.stopId))&&S(t,r,y).then(e=>{e&&p(e)}).catch(e=>{console.error("Failed to hydrate bus trip:",e)})},[e.trip,e.stopPlatform,e.originStop,y,i,p]),null}function v(e){let{children:t}=e,r=(0,o.usePathname)(),s=(0,o.useSearchParams)(),l=s.toString(),[c,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(null),[f,h]=(0,a.useState)(null),[m,g]=(0,a.useState)(null),[S,y]=(0,a.useState)(null),[v,k]=(0,a.useState)(null),T=(0,a.useCallback)(()=>{p(null)},[]),b=(0,a.useCallback)(()=>{h(null)},[]),w=(0,a.useCallback)(()=>{g(null)},[]),x=(0,a.useCallback)(()=>{y(null)},[]),I=(0,a.useCallback)(()=>{k(null)},[]),j=(0,a.useMemo)(()=>({pathname:r,searchParams:{...Object.fromEntries(s.entries())},pageTitle:c,originStop:d,destinationStop:f,stopPlatform:m,busRoute:S,busTrip:v,setPageTitle:u,setOriginStop:p,setDestinationStop:h,setStopPlatform:g,setBusRoute:y,setBusTrip:k,resetOriginStop:T,resetDestinationStop:b,resetStopPlatform:w,resetBusRoute:x,resetBusTrip:I}),[r,l,c,d,f,m,S,v,T,b,w,x,I]);return(0,n.jsx)(i.B.Provider,{value:j,children:t})}function k(e){let{children:t}=e;return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)(s.P,{message:"Providing Page..."}),children:(0,n.jsxs)(v,{children:[(0,n.jsx)(y,{}),t]})})}},92964:(e,t,r)=>{"use strict";r.d(t,{ph:()=>i,$U:()=>l,WU:()=>c,Q1:()=>u,nu:()=>s,gY:()=>f,xe:()=>p,tQ:()=>d,j9:()=>h,_H:()=>S,YJ:()=>m,$Z:()=>g,Ad:()=>y,cq:()=>v,lw:()=>k,b_:()=>o});var n=r(76767);let a=["originStop","destinationStop","stopPlatform","trip","route","action","view"];function o(e){return a.filter(t=>void 0!==e[t]).reduce((t,r)=>(t[r]=e[r],t),{})}function i(e,t){if(!t)return e;let r=new URLSearchParams(o(t)).toString();return"".concat(e,"?").concat(r)}function s(e,t){return i("/".concat(e,"/"),t)}function l(e,t){return i("/".concat(e,"/search-by-route/"),t)}function c(e,t){return i("/".concat(e,"/search-by-route/stops/"),t)}function u(e,t){return i("/".concat(e,"/search-nearby/"),t)}function d(e,t){return i("/".concat(e,"/trips/"),t)}function p(e,t){return i("/".concat(e,"/trips/detail/"),t)}function f(e,t){return i("/".concat(e,"/support/"),t)}function h(e,t){return i("/".concat(e,"/bookmarks/"),t)}function m(){return n.q.externalNewsPageUrl}function g(){return n.q.externalPolicyPageUrl}function S(){return"https://kotsucitykobe-delay.mobustation.jp/delay/main.aspx?c=kobecity"}function y(e){return e?"".concat(e.latitude.toFixed(6),",").concat(e.longitude.toFixed(6)):""}function v(e){return/^\/[a-z]{2}\/search-by-route(\/stops)?\/?$/.test(e)}function k(e){return/^\/[a-z]{2}\/search-nearby\/?$/.test(e)}},94896:(e,t,r)=>{"use strict";r.d(t,{ec:()=>k,Tc:()=>T,c1:()=>b,pR:()=>S,dv:()=>y,jd:()=>v});var n=r(12115),a=r(77202),o=r(46985),i=r(92840),s=r(58108),l=r(80074),c=r(51208),u=r(86919);let d={refreshTrigger:(0,l.eU)(0),isClientInitialized:(0,l.eU)(!1)},p=new Promise(()=>{}),f=(0,u.I)(e=>(0,l.eU)(async t=>t(d.isClientInitialized)?(t(d.refreshTrigger),(0,s.v6)(e)):p)),h=(0,u.I)(e=>(0,c.Rq)(f(e))),m=(0,l.eU)(async e=>e(d.isClientInitialized)?(e(d.refreshTrigger),(0,s.GK)()):p),g={loadableBookmarkByQuery:h,loadableBookmarks:(0,c.Rq)(m)},S=()=>{let e=(0,a.Xr)(d.isClientInitialized);return(0,n.useCallback)(()=>{e(!0)},[e])},y=e=>(0,a.md)(g.loadableBookmarkByQuery(e)),v=()=>(0,a.md)(g.loadableBookmarks),k=()=>{let e=(0,a.Xr)(d.refreshTrigger),{triggerError:t}=(0,i.pu)();return(0,n.useCallback)(r=>{let n={...r,createdAt:new Date().toISOString()};try{(0,s.sP)(n),e(e=>e+1)}catch(e){if(e instanceof o.Qy)throw e;t(e,"おきにいりの登録に失敗しました")}},[e,t])},T=()=>{let e=(0,a.Xr)(d.refreshTrigger),{triggerError:t}=(0,i.pu)();return(0,n.useCallback)(r=>{try{(0,s.r7)(r),e(e=>e+1)}catch(e){t(e,"おきにいりの削除に失敗しました")}},[e,t])},b=()=>{let e=(0,a.Xr)(d.refreshTrigger),{triggerError:t}=(0,i.pu)();return(0,n.useCallback)(r=>{try{(0,s.oM)(r),e(e=>e+1)}catch(e){t(e,"おきにいりの削除に失敗しました")}},[e,t])}}},e=>{e.O(0,[4652,1127,74,4923,4195,3092,4310,316,9571,9070,7009,2036,1718,8441,1255,7358],()=>e(e.s=21140)),_N_E=e.O()}]);