(function () { "use strict"; var e = { 61: function (e, t, a) { var r = a(5130), i = a(6768), o = a(4232); const l = { id: "app-container" }, s = { key: 0, class: "loading-overlay" }, n = { key: 2, id: "app" }, c = { class: "game-header" }, d = { class: "controls" }, u = ["disabled"], h = { class: "board-inner" }, k = { class: "left-column" }, g = { class: "successful-live-area-container" }, v = { class: "area-action" }, m = { class: "resolution-area-container" }, p = { class: "center-column" }, f = { class: "center-column-main" }, y = { class: "live-group" }, b = { class: "area-header" }, C = { class: "stage-group" }, L = { class: "card-slots" }, A = { class: "area-header" }, T = { class: "energy-area-container" }, S = { class: "area-header" }, D = ["disabled"], E = ["disabled"], w = { class: "right-column" }, _ = { class: "deck-area" }, x = { key: 0, class: "card-back" }, O = { class: "card-count" }, R = { class: "waiting-room-area" }, I = { class: "overlay-content" }; function F(e, t, a, F, V, U) { const M = (0, i.g2)("DeckBuilder"), B = (0, i.g2)("Card"), j = (0, i.g2)("draggable"); return (0, i.uX)(), (0, i.CE)("div", l, [V.isLoadingGame ? ((0, i.uX)(), (0, i.CE)("div", s, t[44] || (t[44] = [(0, i.Lk)("p", null, "山札を準備しています...", -1)]))) : (0, i.Q3)("", !0), V.isBuildingDeck ? ((0, i.uX)(), (0, i.Wv)(M, { key: 1, onStartGame: U.startGameWithConstructedDeck }, null, 8, ["onStartGame"])) : ((0, i.uX)(), (0, i.CE)("div", n, [(0, i.Lk)("header", c, [t[45] || (t[45] = (0, i.Lk)("h1", null, "ラブカ Solo", -1)), (0, i.Lk)("div", d, [(0, i.Lk)("button", { class: "action-button return-builder-button", onClick: t[0] || (t[0] = (...e) => U.returnToDeckBuilder && U.returnToDeckBuilder(...e)) }, "構築画面に戻る"), (0, i.Lk)("button", { class: "action-button reset-button", onClick: t[1] || (t[1] = (...e) => U.resetGame && U.resetGame(...e)) }, "リセット"), (0, i.Lk)("button", { class: "action-button", onClick: t[2] || (t[2] = (...e) => U.drawCardToHand && U.drawCardToHand(...e)) }, "山札を1枚ドロー"), (0, i.Lk)("button", { class: "action-button", onClick: t[3] || (t[3] = (...e) => U.drawCardToWaitingRoom && U.drawCardToWaitingRoom(...e)) }, "山札を1枚控え室へ"), (0, i.Lk)("button", { class: "action-button", onClick: t[4] || (t[4] = (...e) => U.drawCardToResolutionArea && U.drawCardToResolutionArea(...e)) }, "山札を1枚解決領域へ"), (0, i.Lk)("button", { class: "action-button undo-button", onClick: t[5] || (t[5] = (...e) => U.undoLastAction && U.undoLastAction(...e)), disabled: !V.previousState }, "1回戻る", 8, u)])]), (0, i.Lk)("main", { class: "game-board", onScroll: t[41] || (t[41] = (...e) => U.handleBoardScroll && U.handleBoardScroll(...e)) }, [(0, i.Lk)("div", h, [(0, i.Lk)("div", k, [(0, i.Lk)("div", g, [t[46] || (t[46] = (0, i.Lk)("h2", null, "成功ライブ", -1)), (0, i.bF)(j, { class: "card-area successful-live", modelValue: V.successfulLiveArea, "onUpdate:modelValue": t[6] || (t[6] = e => V.successfulLiveArea = e), group: "cards", "item-key": "id", "force-fallback": !0, delay: "150", "delay-on-touch-only": !0, move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "resolutionArea" }, null, 8, ["card"])], 4)]), _: 1 }, 8, ["modelValue", "move"])]), (0, i.Lk)("div", v, [(0, i.Lk)("button", { class: "action-button", onClick: t[7] || (t[7] = (...e) => U.returnResolutionAreaToTopOfDeck && U.returnResolutionAreaToTopOfDeck(...e)) }, "解決領域を山札の上へ"), (0, i.Lk)("button", { class: "action-button", onClick: t[8] || (t[8] = (...e) => U.returnResolutionAreaToDeckAndShuffle && U.returnResolutionAreaToDeckAndShuffle(...e)) }, "解決領域を山札へ(シャッフル)"), (0, i.Lk)("button", { class: "action-button", onClick: t[9] || (t[9] = (...e) => U.moveResolutionAreaToWaitingRoom && U.moveResolutionAreaToWaitingRoom(...e)) }, "解決領域を全て控え室へ")]), (0, i.Lk)("div", m, [t[47] || (t[47] = (0, i.Lk)("h2", null, "解決領域", -1)), (0, i.bF)(j, { class: "card-area resolution-area", modelValue: V.resolutionArea, "onUpdate:modelValue": t[10] || (t[10] = e => V.resolutionArea = e), group: "cards", "item-key": "id", onClick: t[11] || (t[11] = e => U.showOverlay("resolutionArea")), "force-fallback": !0, delay: "150", "delay-on-touch-only": !0, move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "resolutionArea" }, null, 8, ["card"])], 4)]), _: 1 }, 8, ["modelValue", "move"])])]), (0, i.Lk)("div", p, [(0, i.Lk)("div", f, [(0, i.Lk)("div", y, [(0, i.Lk)("div", b, [(0, i.Lk)("button", { class: "area-header-button", onClick: t[12] || (t[12] = e => V.isLiveAreaHidden = !V.isLiveAreaHidden) }, (0, o.v_)(V.isLiveAreaHidden ? "表示" : "隠す"), 1), t[48] || (t[48] = (0, i.Lk)("h2", null, "ライブ置き場", -1)), (0, i.Lk)("button", { class: "area-header-button primary", onClick: t[13] || (t[13] = (...e) => U.startLive && U.startLive(...e)) }, "ライブ開始")]), (0, i.Lk)("div", { class: (0, o.C4)(["card-slots", { "is-hidden": V.isLiveAreaHidden }]) }, [(0, i.bF)(j, { class: "card-area live-slot", modelValue: V.liveArea.left, "onUpdate:modelValue": t[14] || (t[14] = e => V.liveArea.left = e), group: "cards", "item-key": "id", "force-fallback": !0, onAdd: t[15] || (t[15] = e => U.handleCardAdded(e, V.liveArea.left)), move: U.checkMove }, { item: (0, i.k6)(({ element: e }) => [(0, i.bF)(B, { card: e, "area-type": "live" }, null, 8, ["card"])]), _: 1 }, 8, ["modelValue", "move"]), (0, i.bF)(j, { class: "card-area live-slot", modelValue: V.liveArea.center, "onUpdate:modelValue": t[16] || (t[16] = e => V.liveArea.center = e), group: "cards", "item-key": "id", "force-fallback": !0, onAdd: t[17] || (t[17] = e => U.handleCardAdded(e, V.liveArea.center)), move: U.checkMove }, { item: (0, i.k6)(({ element: e }) => [(0, i.bF)(B, { card: e, "area-type": "live" }, null, 8, ["card"])]), _: 1 }, 8, ["modelValue", "move"]), (0, i.bF)(j, { class: "card-area live-slot", modelValue: V.liveArea.right, "onUpdate:modelValue": t[18] || (t[18] = e => V.liveArea.right = e), group: "cards", "item-key": "id", "force-fallback": !0, onAdd: t[19] || (t[19] = e => U.handleCardAdded(e, V.liveArea.right)), move: U.checkMove }, { item: (0, i.k6)(({ element: e }) => [(0, i.bF)(B, { card: e, "area-type": "live" }, null, 8, ["card"])]), _: 1 }, 8, ["modelValue", "move"])], 2)]), (0, i.Lk)("div", C, [t[49] || (t[49] = (0, i.Lk)("h2", null, "ステージ", -1)), (0, i.Lk)("div", L, [(0, i.bF)(j, { class: "card-area stage-slot", modelValue: V.stage.left, "onUpdate:modelValue": t[20] || (t[20] = e => V.stage.left = e), group: "cards", "item-key": "id", "force-fallback": !0, delay: "150", "delay-on-touch-only": !0, onAdd: t[21] || (t[21] = e => U.handleCardAdded(e, V.stage.left)), onStart: t[22] || (t[22] = e => U.onStackDragStart(e, V.stage.left)), onEnd: t[23] || (t[23] = e => U.onStackDragEnd(e, V.stage.left)), move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "stage", onCardClicked: t => U.toggleCardOrientation(e) }, null, 8, ["card", "onCardClicked"])], 4)]), _: 1 }, 8, ["modelValue", "move"]), (0, i.bF)(j, { class: "card-area stage-slot", modelValue: V.stage.center, "onUpdate:modelValue": t[24] || (t[24] = e => V.stage.center = e), group: "cards", "item-key": "id", "force-fallback": !0, delay: "150", "delay-on-touch-only": !0, onAdd: t[25] || (t[25] = e => U.handleCardAdded(e, V.stage.center)), onStart: t[26] || (t[26] = e => U.onStackDragStart(e, V.stage.center)), onEnd: t[27] || (t[27] = e => U.onStackDragEnd(e, V.stage.center)), move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "stage", onCardClicked: t => U.toggleCardOrientation(e) }, null, 8, ["card", "onCardClicked"])], 4)]), _: 1 }, 8, ["modelValue", "move"]), (0, i.bF)(j, { class: "card-area stage-slot", modelValue: V.stage.right, "onUpdate:modelValue": t[28] || (t[28] = e => V.stage.right = e), group: "cards", "item-key": "id", "force-fallback": !0, delay: "150", "delay-on-touch-only": !0, onAdd: t[29] || (t[29] = e => U.handleCardAdded(e, V.stage.right)), onStart: t[30] || (t[30] = e => U.onStackDragStart(e, V.stage.right)), onEnd: t[31] || (t[31] = e => U.onStackDragEnd(e, V.stage.right)), move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "stage", onCardClicked: t => U.toggleCardOrientation(e) }, null, 8, ["card", "onCardClicked"])], 4)]), _: 1 }, 8, ["modelValue", "move"])])])]), (0, i.Lk)("div", A, [(0, i.Lk)("button", { class: "area-header-button", onClick: t[32] || (t[32] = e => V.isHandHidden = !V.isHandHidden) }, (0, o.v_)(V.isHandHidden ? "開く" : "閉じる"), 1), t[50] || (t[50] = (0, i.Lk)("h2", null, "手札", -1)), t[51] || (t[51] = (0, i.Lk)("div", { class: "area-header-placeholder" }, null, -1))]), (0, i.bo)((0, i.bF)(j, { class: "card-area hand", modelValue: V.hand, "onUpdate:modelValue": t[33] || (t[33] = e => V.hand = e), group: "cards", "item-key": "id", "force-fallback": !0, move: U.checkMove }, { item: (0, i.k6)(({ element: e }) => [(0, i.bF)(B, { card: e, "area-type": "hand" }, null, 8, ["card"])]), _: 1 }, 8, ["modelValue", "move"]), [[r.aG, !V.isHandHidden]]), (0, i.Lk)("div", T, [(0, i.Lk)("div", S, [(0, i.Lk)("button", { class: "action-button", onClick: t[34] || (t[34] = e => U.changeEnergyCount(-1)), disabled: V.energyArea.length <= 0 }, "-", 8, D), (0, i.Lk)("span", null, "  " + (0, o.v_)(V.energyArea.length) + " / 12  ", 1), (0, i.Lk)("button", { class: "action-button", onClick: t[35] || (t[35] = e => U.changeEnergyCount(1)), disabled: V.energyArea.length >= 12 }, "+", 8, E), t[52] || (t[52] = (0, i.Lk)("h2", null, "エネルギー", -1)), t[53] || (t[53] = (0, i.Lk)("div", { class: "area-header-placeholder-2" }, null, -1))]), (0, i.bF)(j, { class: "card-area energy-area", modelValue: V.energyArea, "onUpdate:modelValue": t[36] || (t[36] = e => V.energyArea = e), group: "cards", "item-key": "id", "force-fallback": !0, move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "energy", onCardClicked: t => U.toggleCardOrientation(e) }, null, 8, ["card", "onCardClicked"])], 4)]), _: 1 }, 8, ["modelValue", "move"])])]), (0, i.Lk)("div", w, [(0, i.Lk)("div", _, [t[54] || (t[54] = (0, i.Lk)("h2", null, "山札", -1)), (0, i.Lk)("div", { class: "card-area deck-slot", onClick: t[37] || (t[37] = e => U.showOverlay("deck")) }, [V.deck.length > 0 ? ((0, i.uX)(), (0, i.CE)("div", x, [(0, i.Lk)("span", O, (0, o.v_)(V.deck.length), 1)])) : (0, i.Q3)("", !0)]), (0, i.Lk)("button", { class: "action-button", onClick: t[38] || (t[38] = (...e) => U.refreshDeck && U.refreshDeck(...e)) }, "リフレッシュ")]), (0, i.Lk)("div", R, [t[55] || (t[55] = (0, i.Lk)("h2", null, "控え室", -1)), (0, i.bF)(j, { class: "card-area waiting-room", modelValue: V.waitingRoom, "onUpdate:modelValue": t[39] || (t[39] = e => V.waitingRoom = e), group: "cards", "item-key": "id", onClick: t[40] || (t[40] = e => U.showOverlay("waitingRoom")), "force-fallback": !0, delay: "150", "delay-on-touch-only": !0, move: U.checkMove }, { item: (0, i.k6)(({ element: e, index: t }) => [(0, i.Lk)("div", { class: "card-list-item", style: (0, o.Tr)({ zIndex: t, position: "relative" }) }, [(0, i.bF)(B, { card: e, "area-type": "waitingRoom" }, null, 8, ["card"])], 4)]), _: 1 }, 8, ["modelValue", "move"])])])])], 32), (0, i.Lk)("footer", { class: (0, o.C4)(["game-footer", { "is-hidden": V.isScrolling }]) }, t[56] || (t[56] = [(0, i.Lk)("p", null, [(0, i.eW)("このサイトは、一個人が作成した非公式のファンサイトです。作品の著作権は、権利所有者に帰属します。"), (0, i.Lk)("br"), (0, i.eW)("作成者: "), (0, i.Lk)("a", { href: "https://twitter.com/nmanju_", target: "_blank", rel: "noopener noreferrer" }, "大蒜饅頭")], -1)]), 2), V.isOverlayVisible ? ((0, i.uX)(), (0, i.CE)("div", { key: 0, class: (0, o.C4)(["overlay", { "is-dragging": V.isDraggingFromOverlay }]) }, [(0, i.Lk)("div", I, [(0, i.Lk)("button", { class: "close-button", onClick: t[42] || (t[42] = (...e) => U.closeOverlay && U.closeOverlay(...e)) }, "×"), (0, i.Lk)("h2", null, (0, o.v_)(V.overlayTitle), 1), (0, i.bF)(j, { class: (0, o.C4)(["overlay-card-list", { "no-drag": !U.isOverlayDraggable }]), modelValue: V.overlayCards, "onUpdate:modelValue": t[43] || (t[43] = e => V.overlayCards = e), group: { name: "cards", pull: U.isOverlayDraggable }, disabled: !U.isOverlayDraggable, "item-key": "id", "force-fallback": !0, onStart: U.onOverlayDragStart, onEnd: U.onOverlayDragEnd }, { item: (0, i.k6)(({ element: e }) => [(0, i.bF)(B, { card: e, "area-type": V.overlayAreaType }, null, 8, ["card", "area-type"])]), _: 1 }, 8, ["modelValue", "group", "disabled", "class", "onStart", "onEnd"])])], 2)) : (0, i.Q3)("", !0)]))]) } a(4114), a(8111), a(1148), a(2489), a(116), a(7588), a(3579); var V = a(1527), U = a.n(V); const M = ["data-id", "data-type"], B = ["src", "alt"], j = { key: 1 }; function P(e, t, a, r, l, s) { return (0, i.uX)(), (0, i.CE)("div", { class: (0, o.C4)(["card-item", { "card-horizontal": s.isHorizontal }]), "data-id": a.card.id, "data-type": a.card.type, onClick: t[1] || (t[1] = (...e) => s.handleClick && s.handleClick(...e)) }, [a.card && a.card.img ? ((0, i.uX)(), (0, i.CE)("img", { key: 0, src: a.card.img, alt: a.card.name, class: (0, o.C4)(["card-image", s.rotationClass]), onLoad: t[0] || (t[0] = (...e) => s.onImageLoad && s.onImageLoad(...e)) }, null, 42, B)) : ((0, i.uX)(), (0, i.CE)("span", j, (0, o.v_)(a.card.name), 1))], 10, M) } var $ = { name: "Card", props: { card: { type: Object, required: !0 }, areaType: { type: String, default: "" } }, data() { return { isImagePortrait: null } }, computed: { isHorizontal() { return ["stage", "energy"].includes(this.areaType) && Object.prototype.hasOwnProperty.call(this.card, "isRotated") ? this.card.isRotated : ["live", "successfulLive", "resolutionArea"].includes(this.areaType) }, rotationClass() { if (null === this.isImagePortrait) return ""; const e = !this.isHorizontal; return e && !this.isImagePortrait ? "rotate-cw" : !e && this.isImagePortrait ? "rotate-ccw" : "" } }, methods: { onImageLoad(e) { const t = e.target; this.isImagePortrait = t.naturalHeight > t.naturalWidth }, handleClick() { this.$emit("card-clicked", this.card) } } }, H = a(1241); const X = (0, H.A)($, [["render", P], ["__scopeId", "data-v-0eabc754"]]); var W = X; a(1701); const z = { class: "deck-builder" }, N = { key: 0, class: "loading-overlay" }, G = { class: "builder-inner" }, K = { class: "search-panel" }, J = { class: "filter-group" }, Q = { class: "filter-group" }, Y = { class: "checkbox-group" }, Z = { class: "checkbox-label" }, q = { class: "checkbox-label" }, ee = { class: "accordion" }, te = { class: "accordion-content" }, ae = { class: "filter-group" }, re = ["value"], ie = { class: "filter-group" }, oe = ["value"], le = { class: "filter-group" }, se = ["value"], ne = { class: "filter-group" }, ce = { class: "checkbox-group cost-checkbox-group" }, de = ["onUpdate:modelValue"], ue = { class: "cost-actions" }, he = { class: "card-list-panel" }, ke = { key: 0, class: "initial-message" }, ge = { class: "card-grid" }, ve = ["onClick"], me = ["src", "alt"], pe = { class: "deck-panel" }, fe = { class: "deck-panel-header" }, ye = { class: "deck-panel-actions" }, be = ["disabled"], Ce = { class: "deck-actions" }, Le = { class: "deck-count-details" }, Ae = { class: "deck-list" }, Te = { key: 0 }, Se = { class: "deck-list-card-info" }, De = ["src", "alt"], Ee = ["title"], we = { class: "deck-card-controls" }, _e = ["onClick"], xe = ["onClick"], Oe = { key: 2, class: "text-editor-overlay" }, Re = { class: "text-editor-content" }, Ie = { class: "text-editor-actions" }; function Fe(e, t, a, l, s, n) { return (0, i.uX)(), (0, i.CE)("div", z, [s.isLoading ? ((0, i.uX)(), (0, i.CE)("div", N, t[19] || (t[19] = [(0, i.Lk)("p", null, "カードデータベースを読み込んでいます...", -1)]))) : ((0, i.uX)(), (0, i.CE)("div", { key: 1, class: "builder-container", onDragover: t[15] || (t[15] = (...t) => e.handleDragScroll && e.handleDragScroll(...t)) }, [(0, i.Lk)("div", G, [(0, i.Lk)("div", K, [t[32] || (t[32] = (0, i.Lk)("h2", null, "カード検索", -1)), (0, i.Lk)("div", J, [t[20] || (t[20] = (0, i.Lk)("label", null, "カード名", -1)), (0, i.bo)((0, i.Lk)("input", { type: "text", "onUpdate:modelValue": t[0] || (t[0] = e => s.searchText = e), placeholder: "カード名で検索..." }, null, 512), [[r.Jo, s.searchText]])]), (0, i.Lk)("div", Q, [t[23] || (t[23] = (0, i.Lk)("label", null, "タイプ", -1)), (0, i.Lk)("div", Y, [(0, i.Lk)("label", Z, [(0, i.bo)((0, i.Lk)("input", { type: "checkbox", "onUpdate:modelValue": t[1] || (t[1] = e => s.filterTypes[s.CARD_TYPE_MEMBER] = e) }, null, 512), [[r.lH, s.filterTypes[s.CARD_TYPE_MEMBER]]]), t[21] || (t[21] = (0, i.eW)(" メンバー "))]), (0, i.Lk)("label", q, [(0, i.bo)((0, i.Lk)("input", { type: "checkbox", "onUpdate:modelValue": t[2] || (t[2] = e => s.filterTypes[s.CARD_TYPE_LIVE] = e) }, null, 512), [[r.lH, s.filterTypes[s.CARD_TYPE_LIVE]]]), t[22] || (t[22] = (0, i.eW)(" ライブ "))])])]), (0, i.Lk)("div", ee, [(0, i.Lk)("div", { class: "accordion-header", onClick: t[3] || (t[3] = e => s.isAccordionOpen = !s.isAccordionOpen) }, [t[24] || (t[24] = (0, i.Lk)("span", null, "詳細検索", -1)), (0, i.Lk)("span", { class: (0, o.C4)(["arrow", { open: s.isAccordionOpen }]) }, null, 2)]), (0, i.bo)((0, i.Lk)("div", te, [(0, i.Lk)("div", ae, [t[26] || (t[26] = (0, i.Lk)("label", null, "収録商品", -1)), (0, i.bo)((0, i.Lk)("select", { "onUpdate:modelValue": t[4] || (t[4] = e => s.filterProduct = e), class: "series-select" }, [t[25] || (t[25] = (0, i.Lk)("option", { value: "すべて" }, "すべて", -1)), ((0, i.uX)(!0), (0, i.CE)(i.FK, null, (0, i.pI)(s.allProducts, e => ((0, i.uX)(), (0, i.CE)("option", { key: e, value: e }, (0, o.v_)(e), 9, re))), 128))], 512), [[r.u1, s.filterProduct]])]), (0, i.Lk)("div", ie, [t[28] || (t[28] = (0, i.Lk)("label", null, "シリーズ", -1)), (0, i.bo)((0, i.Lk)("select", { "onUpdate:modelValue": t[5] || (t[5] = e => s.filterSeries = e), class: "series-select" }, [t[27] || (t[27] = (0, i.Lk)("option", { value: "すべて" }, "すべて", -1)), ((0, i.uX)(!0), (0, i.CE)(i.FK, null, (0, i.pI)(s.allSeries, e => ((0, i.uX)(), (0, i.CE)("option", { key: e, value: e }, (0, o.v_)(e), 9, oe))), 128))], 512), [[r.u1, s.filterSeries]])]), (0, i.Lk)("div", le, [t[30] || (t[30] = (0, i.Lk)("label", null, "ユニット", -1)), (0, i.bo)((0, i.Lk)("select", { "onUpdate:modelValue": t[6] || (t[6] = e => s.filterUnit = e), class: "series-select" }, [t[29] || (t[29] = (0, i.Lk)("option", { value: "すべて" }, "すべて", -1)), ((0, i.uX)(!0), (0, i.CE)(i.FK, null, (0, i.pI)(s.allUnits, e => ((0, i.uX)(), (0, i.CE)("option", { key: e, value: e }, (0, o.v_)(e), 9, se))), 128))], 512), [[r.u1, s.filterUnit]])]), (0, i.Lk)("div", ne, [t[31] || (t[31] = (0, i.Lk)("label", null, "コスト", -1)), (0, i.Lk)("div", ce, [((0, i.uX)(!0), (0, i.CE)(i.FK, null, (0, i.pI)(Object.keys(s.filterCosts).map(Number).sort((e, t) => e - t), e => ((0, i.uX)(), (0, i.CE)("label", { key: e, class: "checkbox-label" }, [(0, i.bo)((0, i.Lk)("input", { type: "checkbox", "onUpdate:modelValue": t => s.filterCosts[e] = t }, null, 8, de), [[r.lH, s.filterCosts[e]]]), (0, i.eW)(" " + (0, o.v_)(e), 1)]))), 128))]), (0, i.Lk)("div", ue, [(0, i.Lk)("button", { onClick: t[7] || (t[7] = e => n.toggleAllCosts(!0)) }, "すべて選択"), (0, i.Lk)("button", { onClick: t[8] || (t[8] = e => n.toggleAllCosts(!1)) }, "すべて解除")])])], 512), [[r.aG, s.isAccordionOpen]])]), t[33] || (t[33] = (0, i.Fv)('

デッキログから読み込む手順

', 1))]), (0, i.Lk)("div", he, [0 === n.filteredCards.length ? ((0, i.uX)(), (0, i.CE)("div", ke, t[34] || (t[34] = [(0, i.Lk)("p", null, [(0, i.eW)("条件に一致するカードがありません。"), (0, i.Lk)("br"), (0, i.eW)("検索ワードやフィルターを確認してください。")], -1)]))) : (0, i.Q3)("", !0), (0, i.Lk)("div", ge, [((0, i.uX)(!0), (0, i.CE)(i.FK, null, (0, i.pI)(n.filteredCards, e => ((0, i.uX)(), (0, i.CE)("div", { key: e.card_no, class: "card-thumbnail", onClick: t => n.addCardToDeck(e) }, [(0, i.Lk)("img", { src: e.img, alt: e.name, loading: "lazy" }, null, 8, me)], 8, ve))), 128))])]), (0, i.Lk)("div", pe, [(0, i.Lk)("div", fe, [(0, i.Lk)("div", ye, [(0, i.Lk)("button", { class: "start-game-button", onClick: t[9] || (t[9] = (...e) => n.startSoloPlay && n.startSoloPlay(...e)), disabled: 0 === n.deckTotalCount }, " このデッキで一人回しを始める ", 8, be), (0, i.Lk)("div", Ce, [(0, i.Lk)("button", { class: "action-button import-button", onClick: t[10] || (t[10] = (...e) => n.triggerFileInput && n.triggerFileInput(...e)) }, "インポート (.txt)"), (0, i.Lk)("input", { type: "file", ref: "fileInput", onChange: t[11] || (t[11] = (...e) => n.handleFileImport && n.handleFileImport(...e)), accept: ".txt", style: { display: "none" } }, null, 544), (0, i.Lk)("button", { class: "action-button export-button", onClick: t[12] || (t[12] = (...e) => n.exportDeck && n.exportDeck(...e)) }, "エクスポート (.txt)"), (0, i.Lk)("button", { class: "action-button edit-text-button", onClick: t[13] || (t[13] = (...e) => n.openTextEditor && n.openTextEditor(...e)) }, "デッキをテキストで編集"), (0, i.Lk)("button", { class: "action-button clear-button", onClick: t[14] || (t[14] = (...e) => n.clearDeck && n.clearDeck(...e)) }, "デッキをクリア")])]), (0, i.Lk)("h2", null, "デッキ (" + (0, o.v_)(n.deckTotalCount) + " / " + (0, o.v_)(s.DECK_SIZE_LIMIT) + ")", 1), (0, i.Lk)("div", Le, [(0, i.Lk)("span", { class: (0, o.C4)({ "is-over-limit": n.memberCardCount > s.MEMBER_CARD_LIMIT }) }, " メンバー: " + (0, o.v_)(n.memberCardCount) + " / " + (0, o.v_)(s.MEMBER_CARD_LIMIT), 3), (0, i.Lk)("span", { class: (0, o.C4)({ "is-over-limit": n.liveCardCount > s.LIVE_CARD_LIMIT }) }, " ライブ: " + (0, o.v_)(n.liveCardCount) + " / " + (0, o.v_)(s.LIVE_CARD_LIMIT), 3)])]), (0, i.Lk)("ul", Ae, [0 === n.deckTotalCount ? ((0, i.uX)(), (0, i.CE)("li", Te, t[35] || (t[35] = [(0, i.Lk)("p", { class: "empty-deck-message" }, "左のリストからカードをクリックしてデッキに追加します。", -1)]))) : (0, i.Q3)("", !0), ((0, i.uX)(!0), (0, i.CE)(i.FK, null, (0, i.pI)(n.deckListWithDetails, e => ((0, i.uX)(), (0, i.CE)("li", { key: e.card.card_no }, [(0, i.Lk)("div", Se, [(0, i.Lk)("img", { src: e.card.img, class: "deck-list-thumbnail", alt: e.card.name }, null, 8, De), (0, i.Lk)("span", { title: e.card.name }, (0, o.v_)(e.card.name), 9, Ee)]), (0, i.Lk)("div", we, [(0, i.Lk)("button", { onClick: t => n.removeCardFromDeck(e.card.card_no) }, "-", 8, _e), (0, i.Lk)("span", null, "x " + (0, o.v_)(e.count), 1), (0, i.Lk)("button", { onClick: t => n.addCardToDeck(e.card) }, "+", 8, xe)])]))), 128))])])])], 32)), s.isEditingAsText ? ((0, i.uX)(), (0, i.CE)("div", Oe, [(0, i.Lk)("div", Re, [t[36] || (t[36] = (0, i.Lk)("h3", null, "デッキをテキストで編集", -1)), t[37] || (t[37] = (0, i.Lk)("p", null, "形式: 「枚数 x カードID カード名」で1行に1種類ずつ入力してください。", -1)), (0, i.bo)((0, i.Lk)("textarea", { "onUpdate:modelValue": t[16] || (t[16] = e => s.deckAsText = e), class: "deck-textarea", placeholder: "例: 4 x PL!N-bp1-002-P 中須かすみ" }, null, 512), [[r.Jo, s.deckAsText]]), (0, i.Lk)("div", Ie, [(0, i.Lk)("button", { class: "action-button apply-button", onClick: t[17] || (t[17] = (...e) => n.applyTextDeck && n.applyTextDeck(...e)) }, "適用して閉じる"), (0, i.Lk)("button", { class: "action-button cancel-button", onClick: t[18] || (t[18] = e => s.isEditingAsText = !1) }, "キャンセル")])])])) : (0, i.Q3)("", !0)]) } a(8237), a(7642), a(8004), a(3853), a(5876), a(2475), a(5024), a(1698); const Ve = 60, Ue = 4, Me = 48, Be = 12, je = 12, Pe = 3, $e = "data/cards.json", He = "https://script.google.com/macros/s/AKfycbzY7wwoUZpsb8fLapBZcs8ZdSyiWt3E1wDRj7xLN_wTgS-mEk1IaoH_9yE34BRzRxQJXw/exec", Xe = "メンバー", We = "ライブ", ze = "エネルギー", Ne = "LL-E-001-SD", Ge = "エネルギー", Ke = "https://llofficial-cardgame.com/wordpress/wp-content/images/cardlist/PLSD01/LL-E-001-SD.png"; var Je = { name: "DeckBuilder", data() { return { allCards: [], deck: {}, deckAsText: "", searchText: "", isLoading: !0, filterTypes: { [Xe]: !0, [We]: !0 }, isAccordionOpen: !1, allProducts: [], filterProduct: "すべて", allSeries: [], filterSeries: "すべて", allUnits: [], filterUnit: "すべて", filterCosts: {}, saveTimeout: null, isEditingAsText: !1, DECK_SIZE_LIMIT: Ve, MEMBER_CARD_LIMIT: Me, LIVE_CARD_LIMIT: Be, CARD_TYPE_MEMBER: Xe, CARD_TYPE_LIVE: We } }, computed: { deckTotalCount() { return Object.values(this.deck).reduce((e, t) => e + t, 0) }, filteredCards() { const e = Object.keys(this.filterTypes).filter(e => this.filterTypes[e]), t = Object.keys(this.filterCosts).filter(e => this.filterCosts[e]).map(Number); if (0 === e.length) return []; const a = Object.keys(this.filterCosts).length === t.length; return !this.searchText.trim() && e.includes(Xe) && "すべて" === this.filterProduct && "すべて" === this.filterSeries && "すべて" === this.filterUnit && a ? [] : this.allCards.filter(a => { const r = a.type !== ze, i = (a.name || "").toLowerCase().includes(this.searchText.toLowerCase()), o = e.includes(a.type), l = "すべて" === this.filterProduct || a.product === this.filterProduct, s = "すべて" === this.filterSeries || a.series && a.series.split("\n").map(e => e.trim()).includes(this.filterSeries), n = "すべて" === this.filterUnit || a.unit === this.filterUnit, c = a.type === We || t.includes(a.cost); return r && i && o && l && s && n && c }) }, deckListWithDetails() { return Object.entries(this.deck).map(([e, t]) => ({ card: this.allCards.find(t => t.card_no === e), count: t })).filter(e => e.card).sort((e, t) => e.card.type !== t.card.type ? e.card.type > t.card.type ? 1 : -1 : e.card.card_no > t.card.card_no ? 1 : -1) }, memberCardCount() { return this.deckListWithDetails.reduce((e, t) => t.card.type === Xe ? e + t.count : e, 0) }, liveCardCount() { return this.deckListWithDetails.reduce((e, t) => t.card.type === We ? e + t.count : e, 0) } }, watch: { deck: { deep: !0, handler(e) { clearTimeout(this.saveTimeout), this.saveTimeout = setTimeout(() => { localStorage.setItem("llocg_deck", JSON.stringify(e)), console.log("Deck saved to localStorage.") }, 500) } } }, beforeUnmount() { clearTimeout(this.saveTimeout); const e = localStorage.getItem("llocg_deck"); JSON.stringify(this.deck) !== e && (console.log("Saving final deck state before unmount."), localStorage.setItem("llocg_deck", JSON.stringify(this.deck))) }, async created() { this.loadDeckFromStorage(), await this.loadCardDatabase() }, methods: { loadDeckFromStorage() { const e = localStorage.getItem("llocg_deck"); if (e) try { this.deck = JSON.parse(e) } catch (t) { console.error("ローカルストレージのデッキデータの解析に失敗しました。", t), localStorage.removeItem("llocg_deck") } }, triggerFileInput() { this.$refs.fileInput.click() }, handleFileImport(e) { const t = e.target.files[0]; if (!t) return; const a = 1; if (t.size > 1024 * a * 1024) return alert(`ファイルサイズが大きすぎます。${a}MB以下のファイルを選択してください。`), void (e.target.value = ""); if (this.deckTotalCount > 0 && !confirm("現在のデッキ内容はクリアされます。ファイルからデッキを読み込みますか?")) return void (e.target.value = ""); const r = new FileReader; r.onload = t => { try { const e = t.target.result, a = e.split(/\r?\n/), r = 1e4; if (a.length > r) return void alert(`行数が多すぎます。${r}行以下のファイルにしてください。`); const i = {}; let o = []; const l = /^(\d+)\s+x\s+([^\s]+)\s+(.+)$/; a.forEach((e, t) => { if (!e.trim()) return; const a = e.trim().match(l); if (!a) return void o.push(t + 1); const r = parseInt(a[1], 10), s = a[2], n = a[3].trim(), c = this.allCards.find(e => e.card_no === s); let d = !0; c ? (c.name !== n || isNaN(r) || r <= 0 || r > Ue) && (d = !1) : d = !1, d ? (i[s] = (i[s] || 0) + r, i[s] > Ue && (i[s] = Ue)) : o.push(t + 1) }), o.length > 0 ? alert(`エラー: ${o.join(", ")}行目で問題が見つかりました。\n\n・形式が正しくない\n・カードIDが存在しない\n・カードIDとカード名が一致しない\n・枚数が正しくない\n\nのいずれかの可能性があります。`) : (this.deck = i, alert("デッキをインポートしました。")) } catch (a) { alert("ファイルの読み込みに失敗しました。"), console.error(a) } finally { e.target.value = "" } }, r.readAsText(t, "UTF-8") }, exportDeck() { if (0 === this.deckTotalCount) return void alert("デッキにカードがありません。"); const e = this.deckListWithDetails.map(e => `${e.count} x ${e.card.card_no} ${e.card.name}`).join("\n"), t = new Blob([e], { type: "text/plain;charset=utf-8" }), a = URL.createObjectURL(t), r = document.createElement("a"); r.href = a, r.download = "deck.txt", document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(a) }, openTextEditor() { this.deckAsText = this.deckListWithDetails.map(e => `${e.count} x ${e.card.card_no} ${e.card.name}`).join("\n"), this.isEditingAsText = !0 }, applyTextDeck() { const e = this.deckAsText.split(/\r?\n/), t = {}; let a = []; const r = /^(\d+)\s+x\s+([^\s]+)\s+(.+)$/; e.forEach((e, i) => { if (!e.trim()) return; const o = e.trim().match(r); if (!o) return void a.push(i + 1); const l = parseInt(o[1], 10), s = o[2], n = o[3].trim(), c = this.allCards.find(e => e.card_no === s); let d = !0; (!c || c.name !== n || isNaN(l) || l <= 0 || l > Ue) && (d = !1), d ? (t[s] = (t[s] || 0) + l, t[s] > Ue && (t[s] = Ue)) : a.push(i + 1) }), a.length > 0 ? alert(`エラー: ${a.join(", ")}行目で問題が見つかりました。\n\n形式、カードID、カード名、または枚数を確認してください。`) : (this.deck = t, alert("デッキを更新しました。"), this.isEditingAsText = !1) }, clearDeck() { this.deckTotalCount > 0 && confirm("本当に現在のデッキをクリアしますか?") && (this.deck = {}) }, async loadCardDatabase() { try { this.isLoading = !0; const e = $e, t = He, [a, r] = await Promise.all([fetch(e), fetch(t)]); if (!a.ok) throw new Error("ローカルのカードDBの読み込みに失敗しました。"); if (!r.ok) throw new Error("外部のカードDBの読み込みに失敗しました。"); const i = await a.json(), o = await r.json(), l = { ...o, ...i }; this.allCards = Object.entries(l).filter(([e]) => !e.startsWith("_")).map(([, e]) => e); const s = this.allCards.filter(e => e.type !== ze), n = ["ラブライブ!", "ラブライブ!サンシャイン!!", "ラブライブ!虹ヶ咲学園スクールアイドル同好会", "ラブライブ!スーパースター!!", "蓮ノ空女学院スクールアイドルクラブ"], c = ["Printemps", "lilywhite", "BiBi", "CYaRon!", "GuiltyKiss", "AZALEA", "A・ZU・NA", "QU4RTZ", "DiverDiva", "R3BIRTH", "CatChu!", "KALEIDOSCORE", "5yncri5e!", "スリーズブーケ", "DOLLCHESTRA", "みらくらぱーく!"], d = (e, t, a = []) => { const r = new Set; e.forEach(e => { e[t] && e[t].split("\n").forEach(e => r.add(e.trim())) }); const i = Array.from(r).filter(Boolean); return i.sort((e, t) => { const r = a.indexOf(e), i = a.indexOf(t); return -1 !== r && -1 !== i ? r - i : -1 !== r ? -1 : -1 !== i ? 1 : e.localeCompare(t) }), i }; this.allProducts = d(s, "product"), this.allSeries = d(s, "series", n), this.allUnits = d(s, "unit", c); const u = new Set(s.filter(e => e.type === Xe && "number" === typeof e.cost).map(e => e.cost)), h = {}; Array.from(u).sort((e, t) => e - t).forEach(e => { h[e] = !0 }), this.filterCosts = h } catch (e) { console.error(e), alert(e.message) } finally { this.isLoading = !1 } }, toggleAllCosts(e) { for (const t in this.filterCosts) this.filterCosts[t] = e }, addCardToDeck(e) { const t = e.card_no, a = this.deck[t] || 0; this.deckTotalCount >= Ve ? alert(`デッキの枚数上限は${Ve}枚です。`) : a >= Ue ? alert(`同じカードは${Ue}枚までしか入れられません。`) : e.type === Xe && this.memberCardCount >= Me ? alert(`メンバーカードの上限は${Me}枚です。`) : e.type === We && this.liveCardCount >= Be ? alert(`ライブカードの上限は${Be}枚です。`) : this.deck = { ...this.deck, [t]: a + 1 } }, removeCardFromDeck(e) { const t = this.deck[e]; if (t) if (t > 1) this.deck = { ...this.deck, [e]: t - 1 }; else { const t = { ...this.deck }; delete t[e], this.deck = t } }, startSoloPlay() { 0 !== this.deckTotalCount ? this.$emit("start-game") : alert("デッキにカードが1枚もありません。") } } }; const Qe = (0, H.A)(Je, [["render", Fe], ["__scopeId", "data-v-d514b5c0"]]); var Ye = Qe, Ze = { name: "App", components: { Card: W, DeckBuilder: Ye, draggable: U() }, data() { return { isLoadingGame: !1, isBuildingDeck: !0, masterDeck: [], deck: [], stage: { left: [], center: [], right: [] }, liveArea: { left: [], center: [], right: [] }, successfulLiveArea: [], waitingRoom: [], hand: [], resolutionArea: [], energyArea: [], draggedStack: null, isOverlayVisible: !1, overlayTitle: "", overlayCards: [], isDraggingFromOverlay: !1, overlayAreaType: null, isHandHidden: !1, isLiveAreaHidden: !1, isScrolling: !1, scrollTimeout: null, previousState: null } }, computed: { isBoardEmpty() { const e = [this.hand, this.waitingRoom, this.successfulLiveArea, this.resolutionArea], t = e.every(e => 0 === e.length); if (!t) return !1; const a = [...Object.values(this.stage), ...Object.values(this.liveArea)], r = a.every(e => null === e); return r }, isOverlayDraggable() { return "deck" !== this.overlayAreaType } }, beforeUnmount() { clearTimeout(this.scrollTimeout) }, created() { this.initializeEnergy() }, methods: { async startGameWithConstructedDeck() { this.isLoadingGame = !0; try { const e = localStorage.getItem("llocg_deck"); if (!e) return void alert("デッキデータが見つかりません。"); const t = JSON.parse(e); await this.initializeDeckFromBuilder(t), this.isBuildingDeck = !1 } catch (e) { console.error("Failed to start game:", e), alert("ゲームの開始に失敗しました。") } finally { this.isLoadingGame = !1 } }, async initializeDeckFromBuilder(e) { const t = $e, a = He; try { const r = await fetch(t); if (!r.ok) throw new Error("ローカルのカードDBの読み込みに失敗しました。"); const i = await r.json(), o = Object.keys(e), l = o.every(e => Object.prototype.hasOwnProperty.call(i, e)); let s = i; if (l) console.log("Remote fetch skipped. All cards found in local data."); else { console.log("Remote fetch is necessary. Fetching remote data..."); const e = await fetch(a); if (!e.ok) throw new Error("外部のカードDBの読み込みに失敗しました。"); const t = await e.json(); s = { ...t, ...i } } const n = Object.values(s), c = new Map; for (const e of n) e && e.card_no && c.set(e.card_no, e); const d = []; for (const t in e) { const a = e[t], r = c.get(t); if (r) for (let e = 0; e < a; e++)d.push({ id: `${t}-${e}`, name: r.name, img: r.img, type: r.type, isRotated: !1 }); else console.warn(`Card with ID "${t}" not found in the database.`) } this.resetBoard(), this.masterDeck = [...d], this.deck = this.shuffleArray(d) } catch (r) { alert(r.message), console.error("Failed to initialize deck:", r) } }, resetBoard() { this.deck = [], this.stage = { left: [], center: [], right: [] }, this.liveArea = { left: [], center: [], right: [] }, this.successfulLiveArea = [], this.waitingRoom = [], this.hand = [], this.resolutionArea = [] }, shuffleArray(e) { for (let t = e.length - 1; t > 0; t--) { const a = Math.floor(Math.random() * (t + 1));[e[t], e[a]] = [e[a], e[t]] } return e }, async resetGame() { window.confirm("現在の盤面をすべてリセットし、山札を再生成します。よろしいですか?") && (this.saveStateForUndo(), this.resetBoard(), this.deck = this.shuffleArray([...this.masterDeck]), alert("盤面をリセットしました。")) }, returnToDeckBuilder() { this.isBoardEmpty || this.saveStateForUndo(), this.isBuildingDeck = !0 }, drawCard(e, t = 1) { if (this.deck.length < t) return void alert(`山札が足りません! 残り: ${this.deck.length}枚`); const a = this.deck.splice(0, t); a.forEach(t => this[e].push(t)) }, drawCardToHand() { this.deck.length > 0 ? this.drawCard("hand") : alert("山札がありません!") }, drawCardToWaitingRoom() { this.deck.length > 0 ? this.drawCard("waitingRoom") : alert("山札がありません!") }, refreshDeck() { if (0 === this.waitingRoom.length) return void alert("控え室にカードがありません。"); this.saveStateForUndo(); const e = this.waitingRoom.length; this.deck.push(...this.waitingRoom), this.waitingRoom = [], this.deck = this.shuffleArray(this.deck), alert(`控え室のカード${e}枚を山札に戻してシャッフルしました。`) }, drawCardToResolutionArea() { this.deck.length > 0 ? this.drawCard("resolutionArea") : alert("山札がありません!") }, returnResolutionAreaToTopOfDeck() { if (0 === this.resolutionArea.length) return void alert("解決領域にカードがありません。"); this.saveStateForUndo(); const e = this.resolutionArea.length; this.deck.unshift(...this.resolutionArea), this.resolutionArea = [], alert(`解決領域のカード${e}枚を山札の上に戻しました。`) }, returnResolutionAreaToDeckAndShuffle() { if (0 === this.resolutionArea.length) return void alert("解決領域にカードがありません。"); this.saveStateForUndo(); const e = this.resolutionArea.length; this.deck.push(...this.resolutionArea), this.resolutionArea = [], this.deck = this.shuffleArray(this.deck), alert(`解決領域のカード${e}枚を山札に戻してシャッフルしました。`) }, moveResolutionAreaToWaitingRoom() { if (0 === this.resolutionArea.length) return void alert("解決領域にカードがありません。"); this.saveStateForUndo(); const e = this.resolutionArea.length; this.waitingRoom.push(...this.resolutionArea), this.resolutionArea = [], alert(`解決領域のカード${e}枚を控え室に送りました。`) }, startLive() { let e = 0; const t = Object.values(this.liveArea).some(e => e.length > 0 && e[0].type === Xe); if (t) { for (const t in this.liveArea) this.liveArea[t].length > 0 && this.liveArea[t][0].type === Xe && (this.waitingRoom.push(...this.liveArea[t]), this.liveArea[t] = [], e++); e > 0 && alert(`ライブ置き場のメンバーカード${e}枚を控え室に送りました。`) } else alert("ライブ置き場にメンバーカードが見つかりませんでした。") }, checkMove(e) { const t = e.to.classList, a = e.draggedContext.element, r = e.relatedContext.list; return t.contains("energy-area") ? a.type === ze && r.length < je : a.type === ze ? !!t.contains("stage-slot") && r.some(e => e.type === Xe) : t.contains("stage-slot") ? a.type !== We : !!(t.contains("hand") || t.contains("waiting-room") || t.contains("resolution-area") || t.contains("successful-live")) || e.relatedContext.list.length < 2 }, handleCardAdded(e, t) { const a = t[e.newIndex]; if (a) { if (a.type === ze) { const e = t.filter(e => e.type === ze), a = t.find(e => e.type === Xe); return t.length = 0, void (a && Array.prototype.push.apply(t, [...e, a])) } if (a.type === Xe) { const e = t.find(e => e.type === Xe && e.id !== a.id); e && (this.waitingRoom.push(e), t.length = 0, t.push(a)) } if (t.length > 1) { const a = 1 - e.newIndex, r = t[a]; r && (this.waitingRoom.push(r), t.splice(a, 1)) } this.draggedStack && a.id === this.draggedStack.member.id && e.to.classList.contains("stage-slot") && t.splice(0, 0, ...this.draggedStack.energy) } }, onStackDragStart(e, t) { this.draggedStack = null; const a = t[e.oldIndex]; if (a && a.type === Xe) { const e = t.filter(e => e.type === ze); e.length > 0 && (this.draggedStack = { member: a, energy: e }) } }, onStackDragEnd(e, t) { if (this.draggedStack && e.from !== e.to) { const e = t.filter(e => e.type !== ze); t.length = 0, t.push(...e), this.draggedStack = null } }, toggleCardOrientation(e) { e.isRotated = !e.isRotated }, onOverlayDragStart() { this.isDraggingFromOverlay = !0 }, onOverlayDragEnd(e) { if (this.isDraggingFromOverlay = !1, e.to !== e.from) { const t = e.item.getAttribute("data-id"), a = this[this.overlayAreaType], r = a.findIndex(e => e.id === t); r > -1 && a.splice(r, 1), this.closeOverlay() } }, showOverlay(e) { if (this.overlayAreaType = e, "deck" === e) { if (0 === this.deck.length) return void alert("山札にカードがありません。"); this.overlayTitle = "山札の内容", this.overlayCards = [...this.deck].sort((e, t) => { const a = e.type === We, r = t.type === We; return a && !r ? 1 : !a && r ? -1 : e.id.localeCompare(t.id, void 0, { numeric: !0 }) }) } else { if (0 === this[e].length) return; this.overlayTitle = { waitingRoom: "控え室", resolutionArea: "解決領域" }[e] || "カード一覧", this.overlayCards = [...this[e]] } this.isOverlayVisible = !0 }, closeOverlay() { this.isOverlayVisible = !1, this.overlayTitle = "", this.overlayCards = [], this.overlayAreaType = null }, handleBoardScroll() { this.isScrolling = !0, clearTimeout(this.scrollTimeout), this.scrollTimeout = setTimeout(() => { this.isScrolling = !1 }, 2e3) }, saveStateForUndo() { this.previousState = JSON.parse(JSON.stringify({ deck: this.deck, stage: this.stage, liveArea: this.liveArea, successfulLiveArea: this.successfulLiveArea, waitingRoom: this.waitingRoom, hand: this.hand, resolutionArea: this.resolutionArea })) }, undoLastAction() { this.previousState ? (this.deck = this.previousState.deck, this.stage = this.previousState.stage, this.liveArea = this.previousState.liveArea, this.successfulLiveArea = this.previousState.successfulLiveArea, this.waitingRoom = this.previousState.waitingRoom, this.hand = this.previousState.hand, this.resolutionArea = this.previousState.resolutionArea, this.previousState = null, alert("直前の操作を元に戻しました。")) : alert("元に戻せる操作がありません。") }, initializeEnergy() { this.energyArea = []; const e = Ne; for (let t = 0; t < Pe; t++)this.energyArea.push({ id: `${e}-${t}`, card_no: e, name: Ge, img: Ke, type: ze, isRotated: !1 }) }, changeEnergyCount(e) { if (e > 0 && this.energyArea.length < je) { const e = Ne, t = `${e}-${Date.now()}-${Math.random()}`; this.energyArea.push({ id: t, card_no: e, name: Ge, img: Ke, type: ze, isRotated: !1 }) } else e < 0 && this.energyArea.length > 0 && this.energyArea.pop() } } }; const qe = (0, H.A)(Ze, [["render", F]]); var et = qe; (0, r.Ef)(et).mount("#app") } }, t = {}; function a(r) { var i = t[r]; if (void 0 !== i) return i.exports; var o = t[r] = { exports: {} }; return e[r].call(o.exports, o, o.exports, a), o.exports } a.m = e, function () { var e = []; a.O = function (t, r, i, o) { if (!r) { var l = 1 / 0; for (d = 0; d < e.length; d++) { r = e[d][0], i = e[d][1], o = e[d][2]; for (var s = !0, n = 0; n < r.length; n++)(!1 & o || l >= o) && Object.keys(a.O).every(function (e) { return a.O[e](r[n]) }) ? r.splice(n--, 1) : (s = !1, o < l && (l = o)); if (s) { e.splice(d--, 1); var c = i(); void 0 !== c && (t = c) } } return t } o = o || 0; for (var d = e.length; d > 0 && e[d - 1][2] > o; d--)e[d] = e[d - 1]; e[d] = [r, i, o] } }(), function () { a.n = function (e) { var t = e && e.__esModule ? function () { return e["default"] } : function () { return e }; return a.d(t, { a: t }), t } }(), function () { a.d = function (e, t) { for (var r in t) a.o(t, r) && !a.o(e, r) && Object.defineProperty(e, r, { enumerable: !0, get: t[r] }) } }(), function () { a.g = function () { if ("object" === typeof globalThis) return globalThis; try { return this || new Function("return this")() } catch (e) { if ("object" === typeof window) return window } }() }(), function () { a.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) } }(), function () { a.r = function (e) { "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) } }(), function () { var e = { 524: 0 }; a.O.j = function (t) { return 0 === e[t] }; var t = function (t, r) { var i, o, l = r[0], s = r[1], n = r[2], c = 0; if (l.some(function (t) { return 0 !== e[t] })) { for (i in s) a.o(s, i) && (a.m[i] = s[i]); if (n) var d = n(a) } for (t && t(r); c < l.length; c++)o = l[c], a.o(e, o) && e[o] && e[o][0](), e[o] = 0; return a.O(d) }, r = self["webpackChunkloveca_solo"] = self["webpackChunkloveca_solo"] || []; r.forEach(t.bind(null, 0)), r.push = t.bind(null, r.push.bind(r)) }(); var r = a.O(void 0, [504], function () { return a(61) }); r = a.O(r) })(); //# sourceMappingURL=app.9f5790d3.js.map