PageSourceSearch

https://www.segaluckykujionline.net/lib/hbl.js?v=3806272fd6

js segaluckykujionline.net collected 2026-09-30 11:49:50 UTC 5,611 bytes, 123 lines download raw bytes

1/*! (C) SEGA */
2/*! 3806272fd6-r-'es6'-'x' */
3(function () {
4    'use strict';
5
6    /**
7     * hbl.ts – Handlebars Loader / Bootstrap
8     *
9     * This file is compiled to ES5 by Rollup + @rollup/plugin-typescript.
10     * It runs before Vue and cliche.js, setting up polyfills and loading scripts.
11     */
12    // IIFE wrapper keeps variables out of global scope (same as original hbl.js)
13    (function (w, El, Arr, doc) {
14        // from はコスト高になる(文字数少ないため)
15        // includes もコスト高になる(使用数が少ないため)
16        var CustomEventStr = 'CustomEvent';
17        var prototype = 'prototype';
18        var createElement = 'createElement';
19        var setAttribute = 'setAttribute';
20        var querySelector_ = 'querySelector';
21        var remove_ = 'remove';
22        var script_ = 'script';
23        var list;
24        var isES5;
25        var commitHash;
26        var userAgent;
27        // ── Polyfills ──────────────────────────────────────────────────────────────
28        // el.remove()
29        if (!El[prototype][remove_]) {
30            El[prototype][remove_] = function () {
31                if (this.parentNode)
32                    this.parentNode.removeChild(this);
33            };
34        }
35        // [].includes()
36        if (!Arr[prototype].includes) {
37            Arr[prototype].includes = function (x) {
38                return this.indexOf(x) >= 0;
39            };
40        }
41        // Array.from()
42        if (!Arr.from) {
43            Arr.from = function (obj) {
44                // eslint-disable-next-line @typescript-eslint/no-explicit-any
45                return Arr[prototype].slice.call(obj);
46            };
47        }
48        // <template> element
49        doc[createElement]('template');
50        // new CustomEvent()
51        if (typeof w[CustomEventStr] !== 'function') {
52            // eslint-disable-next-line @typescript-eslint/no-explicit-any
53            var CustomEventFn = function (event, params) {
54                var _a, _b;
55                params = params || { bubbles: false, cancelable: false, detail: undefined };
56                var tempEv = doc.createEvent(CustomEventStr);
57                tempEv.initCustomEvent(event, (_a = params.bubbles) !== null && _a !== void 0 ? _a : false, (_b = params.cancelable) !== null && _b !== void 0 ? _b : false, params.detail);
58                return tempEv;
59            };
60            // eslint-disable-next-line @typescript-eslint/no-explicit-any
61            CustomEventFn[prototype] = w.Event[prototype];
62            w[CustomEventStr] = CustomEventFn;
63        }
64        // ── Script loader ──────────────────────────────────────────────────────────
65        function insert(url, cb) {
66            var scriptEl = doc[createElement](script_);
67            if (cb)
68                scriptEl.onload = cb;
69            scriptEl[setAttribute]('src', url);
70            doc.head.appendChild(scriptEl);
71        }
72        function loadScript(remaining) {
73            var url = remaining.shift();
74            if (!url)
75                return;
76            insert(url, function () {
77                if (remaining.length) {
78                    loadScript(remaining);
79                }
80            });
81        }
82        if (!w.fetch) {
83            insert('lib/polyfills/fetch-0.11.1.min.js');
84        }
85        if (!w.Promise) {
86            insert('lib/polyfills/promise-7.0.4.min.js');
87        }
88        // ── ES6 detection ──────────────────────────────────────────────────────────
89        isES5 = !(function () {
90            try {
91                return eval('() => { class isES6Class { constructor(isES6) { this.isES6 = isES6; } } const isES6 = new isES6Class(true); return isES6.isES6; }');
92            }
93            catch (_a) {
94                return false;
95            }
96        })();
97        userAgent = w.navigator.userAgent.toLowerCase();
98        // Android4.2のChromeだけなぜかうまく通らないため、Android4.X系のを全てES5にする
99        if (userAgent.indexOf('android 4') > -1)
100            isES5 = true;
101        // 2017-11-26
102        // iOS10はsafariだけSRAのmypageでES6構文の何かが引っかかるため、一時的に全てES5にする
103        // リリース後に原因究明してここは削除する予定
104        if (userAgent.indexOf('iphone os 10') > -1)
105            isES5 = true;
106        // ── Commit hash ────────────────────────────────────────────────────────────
107        {
108            var meta = doc[querySelector_]('[name="git-commit-hash"]');
109            commitHash = '?$=' + (meta ? meta.getAttribute('content') : '');
110        }
111        // ── Build script list and kick off loading ─────────────────────────────────
112        list = [
113            'lib/cliche.js' + commitHash,
114            'app/app.js' + commitHash,
115        ];
116        if (isES5) {
117            list = list.map(function (url) { return url.replace(/\.js/, '.es5.js'); });
118            doc[querySelector_]('html').classList.add('es5');
119        }
120        loadScript(list);
121    })(window, Element, Array, document);
122
123})();

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.