PageSourceSearch

https://bet.minnano-keirin.com/_next/static/chunks/9927-d8922024dfc3394c.js

js minnano-keirin.com collected 2026-10-08 00:26:36 UTC 9,106 bytes, 2 lines download raw bytes

1try{!function(){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]="12fdf311-bec6-42d0-abd1-8ab1b755262f",e._sentryDebugIdIdentifier="sentry-dbid-12fdf311-bec6-42d0-abd1-8ab1b755262f")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9927],{54439:(e,t,r)=>{r.d(t,{F:()=>c,Z:()=>i});var a=r(68590);let n="carts";class o{async getDB(){return this.dbPromise||(this.dbPromise=this.openDB()),this.dbPromise}async openDB(){return new Promise((e,t)=>{let r=indexedDB.open("CartDB",1);r.onerror=()=>{t(Error("Failed to open database"))},r.onsuccess=()=>{e(r.result)},r.onupgradeneeded=e=>{let r=e.target;if(!(r instanceof IDBOpenDBRequest))return void t(Error("Invalid event target"));let a=null==r?void 0:r.result;if(!a)return void t(Error("Failed to get database from event"));if(!a.objectStoreNames.contains(n)){let e=a.createObjectStore(n,{keyPath:"id"});e.createIndex("userId","userId",{unique:!1}),e.createIndex("userId_type_raceId",["userId","cart.type","cart.raceId"],{unique:!0})}}})}async getCartByKey(e){let t=(await this.getDB()).transaction([n],"readonly").objectStore(n);return new Promise((r,a)=>{let n=t.get(e);n.onsuccess=()=>{let t=n.result;if(t){let a=Math.floor(Date.now()/1e3);t.cart.lifetimeEpochSeconds>
1a?r(t.cart):this.deleteCartByKey(e).then(()=>r(null))}else r(null)},n.onerror=()=>{a(Error("Failed to get cart"))}})}async setCartByKey(e,t,r){let a=(await this.getDB()).transaction([n],"readwrite"),o=a.objectStore(n),s={cart:r,id:e,userId:t};return new Promise((e,t)=>{let r=o.put(s);r.onsuccess=()=>{e()},r.onerror=()=>{t(Error("Failed to set cart"))},a.oncomplete=()=>{e()},a.onerror=()=>{t(Error("Transaction failed"))}})}async deleteCartByKey(e){let t=(await this.getDB()).transaction([n],"readwrite"),r=t.objectStore(n);return new Promise((a,n)=>{let o=r.delete(e);o.onsuccess=()=>{a()},o.onerror=()=>{n(Error("Failed to delete cart"))},t.oncomplete=()=>{a()},t.onerror=()=>{n(Error("Transaction failed"))}})}async deleteAllCarts(e){let t=(await this.getDB()).transaction([n],"readwrite"),r=t.objectStore(n).index("userId");return new Promise((a,n)=>{let o=r.openCursor(IDBKeyRange.only(e));o.onsuccess=()=>{let e=o.result;e&&(e.delete(),e.continue())},o.onerror=()=>{n(Error("Failed to delete all carts"))},t.oncomplete=()=>{a()},t.onerror=()=>{n(Error("Transaction failed"))}})}async getAllCarts(e,t){let r=(await this.getDB()).transaction([n],"readonly"),a=r.objectStore(n).index("userId"),o=Math.floor(Date.now()/1e3),s=[],l=[];return new Promise((n,i)=>{let c=a.openCursor(IDBKeyRange.only(e));c.onsuccess=()=>{let e=c.result;if(e){let r=e.value;if(r&&!t(r.id))return void e.continue();r.cart.lifetimeEpochSeconds>o?s.push(r.cart):l.push(r.id),e.continue()}else l.length>0&&this.deleteExpiredCarts(l),n(s)},c.onerror=()=>{i(Error("Failed to get all carts"))},r.onerror=()=>{i(Error("Transaction failed"))}})}async deleteExpiredCarts(e){let t=(await this.getDB()).transaction([n],"readwrite"),r=t.objectStore(n);return new Promise((a,n)=>{let o=0,s=e.length;e.forEach(e=>{let t=r.delete(e);t.onsuccess=()=>{++o===s&&a()},t.onerror=()=>{n(Error("Failed to delete expired cart with key: ".concat(e)))}}),t.onerror=()=>{n(Error("Transaction failed while deleting expired carts"))}})}constructor(){this.dbPromise=null}}class s extends o{generateKey(e,t,r){return"".concat(e,"_").concat(t,"_").concat(r)}async getCart(e,t,r){let n=this.generateKey(e,t,r),o=await this.getCartByKey(n);return o&&o.version!==a.Ok?(await this.deleteCartByKey(n),null):o}async setCart(e,t){let r=this.generateKey(e,t.type,t.raceId);return this.setCartByKey(r,e,t)}async deleteCart(e,t,r){let a=this.generateKey(e,t,r);return this.deleteCartByKey(a)}async getAllCarts(e){let t=await super.getAllCarts(e,e=>["keirin","pist6"].includes(e.split("_")[1])),r=[],n=[];for(let o of t)if(o.version===a.Ok)r.push(o);else{let t=this.generateKey(e,o.type,o.raceId);n.push(t)}return n.length>0&&Promise.all(n.map(e=>
1this.deleteCartByKey(e))),r}}class l extends o{generateKey(e,t,r){return"".concat(e,"_").concat(t,"_").concat(r)}async getCart(e,t,r){let a=this.generateKey(e,t,r);return this.getCartByKey(a)}async setCart(e,t){let r=this.generateKey(e,t.type,t.programId);return this.setCartByKey(r,e,t)}async deleteCart(e,t,r){let a=this.generateKey(e,t,r);return this.deleteCartByKey(a)}async getAllCarts(e){return super.getAllCarts(e,e=>["chariloto","chariloto-3","chariloto-5","chariloto-select"].includes(e.split("_")[1]))}}let i=new s,c=new l},68590:(e,t,r)=>{r.d(t,{MI:()=>n,Ok:()=>a,a9:()=>o});let a=1;function n(e){let{bets:t,...r}=e;return{...r,bets:t.map(e=>{let{odds:t,...r}=e;return r})}}function o(e){let{bets:t,...r}=e;return{...r,bets:t.map(e=>{let{odds:t,...r}=e;return r})}}},74501:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(95155);r(12115);var n=r(75889);let o=(0,r(27972).tv)({base:["flex cursor-pointer items-center justify-center gap-2 rounded-full font-bold transition-colors duration-300","font-[Mulish,Noto_Sans_JP,sans-serif]","disabled:bg-black-50 disabled:cursor-not-allowed disabled:border-none disabled:text-[#E0E0E0]"],defaultVariants:{borderRadius:"large",disableHover:!1,size:"medium",variant:"primary",width:"auto"},variants:{disableHover:{true:"hover:bg-[var(--bg)] active:bg-[var(--bg)]"},size:{large:"px-6 py-4 text-lg",medium:"px-4 py-2 text-base",small:"px-4 py-2 text-sm"},variant:{ghost:["border border-[#E0E0E0] bg-white text-[#4F91F4]","hover:border-[#CCCCCC] hover:bg-[#F0F0F0]","active:border-[#BBBBBB] active:bg-[#E8E8E8]"],gray:["text-default border-none bg-[#F0F0F0]","hover:bg-[#E0E0E0] active:bg-[#D0D0D0]"],primary:["bg-primary border-none text-white","hover:bg-[#E04A00] active:bg-[#D13F00]"],secondary:["text-default border border-[#E0E0E0] bg-white","hover:border-[#CCCCCC] hover:bg-[#F0F0F0]","active:border-[#BBBBBB] active:bg-[#E8E8E8]"],"text-primary":["text-primary border-none bg-white","hover:bg-[#F0F0F0] active:bg-[#E8E8E8]"]},width:{auto:"w-auto",fit:"w-fit",full:"w-full"}}}),s=e=>{let{as:t,children:r,...n}=e;return(0,a.jsx)(t,{...n,children:r})},l=e=>{let{children:t,variant:r,size:l,width:i,disableHover:c,onClick:d,type:u="button",disabled:y=!1,as:b="button",href:g,className:f}=e,h=o({disableHover:c,size:l,variant:r,width:i});return(0,a.jsx)(s,{as:b,className:(0,n.QP)(h,f),onClick:d,type:u,disabled:y,href:g,children:t})}},83242:(e,t,r)=>{r.d(t,{QQ:()=>c,Sv:()=>s,V0:()=>d,gN:()=>i,vW:()=>l});var a=r(12115);class n{subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(){this.listeners.forEach(e=>{e()})}constructor(){this.listeners=new Set}}function o(e,t){switch(t.type){case"FETCH_START":return{...e,loading:!0};case"FETCH_SUCCESS":return{cart:t.payload,loading:!1};default:return e}}function s(e,t){switch(t.type){case"MUTATE_START":return{data:e.data,loading:!0};case"MUTATE_SUCCESS":return{data:t.payload,loading:!1};default:return e}}function l(e,t,r,n){let[s,l]=(0,a.useReducer)(o,{cart:null,loading:!0}),i=(0,a.useCallback)(async()=>{if(!e)return void l({type:"FETCH_SUCCESS",payload:null});l({type:"FETCH_START"});try{let r=await t.getCart(e,...n);l({payload:r,type:"FETCH_SUCCESS"})}catch(t){let e=t instanceof Error?t:Error("Failed to get cart");throw console.error("Failed to get cart:",e),e}},[e,t,JSON.stringify(n)]);return(0,a.useEffect)(()=>{i()},[e,i]),(0,a.useEffect)(()=>r.subscribe(()=>{i()}),[i,r]),{cart:s.cart,loading:s.loading,refetch:i}}function i(e,t,r){let[n,o]=(0,a.useReducer)(s,{loading:!1}),[l,i]=(0,a.useTransition)(),c=(0,a.useRef)(null),d=(0,a.useCallback)(async a=>{if(!e)return;c.current&&c.current.abort();let n=new AbortController;c.current=n,o({type:"MUTATE_START"});try{await t.setCart(e,a),n.signal.aborted||(o({payload:a,type:"MUTATE_SUCCESS"}),i(()=>{r.emit()}))}catch(e){if(!n.signal.aborted){let t=e instanceof Error?e:Error("Failed to update cart");throw console.error("Failed to update cart:",t),t}}finally{c.current===n&&(c.current=null)}},[e,t,r]);return(0,a.useEffect)(()=>()=>{c.current&&c.current.abort()},[]),{loading:n.loading||l,updateCart:d}}function c(e,t,r){let[n,o]=(0,a.useReducer)(s,{loading:!0,data:[]}),l=(0,a.useRef)(null),i=(0,a.useCallback)(async()=>
1{if(!e)return void o({type:"MUTATE_SUCCESS",payload:[]});l.current&&l.current.abort();let r=new AbortController;l.current=r,o({type:"MUTATE_START"});try{let a=await t.getAllCarts(e);r.signal.aborted||o({type:"MUTATE_SUCCESS",payload:a})}catch(e){r.signal.aborted||(console.error("Failed to get all carts:",e instanceof Error?e:Error("Failed to get all carts")),o({type:"MUTATE_SUCCESS",payload:[]}))}finally{l.current===r&&(l.current=null)}},[e,t]);return(0,a.useEffect)(()=>{function e(){i()}e();let t=setInterval(e,6e4);return()=>clearInterval(t)},[i]),(0,a.useEffect)(()=>r.subscribe(()=>{i()}),[i,r]),(0,a.useEffect)(()=>()=>{l.current&&l.current.abort()},[]),{carts:n.data||[],loading:n.loading,refetch:i}}function d(){return new n}}}]);
2//# sourceMappingURL=9927-d8922024dfc3394c.js.map

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.