PageSourceSearch

https://static.moonpay.com/js/appsflyer-smart-script-v2.js

js moonpay.com collected 2026-10-01 11:30:14 UTC 79,940 bytes, 2,360 lines download raw bytes

1// The initialization code follows the Smart Script code below
2function _iterableToArrayLimit(t, e) {
3  var o =
4    null == t
5      ? null
6      : ("undefined" != typeof Symbol && t[Symbol.iterator]) || t["@@iterator"];
7  if (null != o) {
8    var r,
9      i,
10      n,
11      a,
12      s = [],
13      l = !0,
14      u = !1;
15    try {
16      if (((n = (o = o.call(t)).next), 0 === e)) {
17        if (Object(o) !== o) return;
18        l = !1;
19      } else
20        for (
21          ;
22          !(l = (r = n.call(o)).done) && (s.push(r.value), s.length !== e);
23          l = !0
24        );
25    } catch (t) {
26      (u = !0), (i = t);
27    } finally {
28      try {
29        if (!l && null != o.return && ((a = o.return()), Object(a) !== a))
30          return;
31      } finally {
32        if (u) throw i;
33      }
34    }
35    return s;
36  }
37}
38function ownKeys(e, t) {
39  var o,
40    r = Object.keys(e);
41  return (
42    Object.getOwnPropertySymbols &&
43      ((o = Object.getOwnPropertySymbols(e)),
44      t &&
45        (o = o.filter(function (t) {
46          return Object.getOwnPropertyDescriptor(e, t).enumerable;
47        })),
48      r.push.apply(r, o)),
49    r
50  );
51}
52function _objectSpread2(e) {
53  for (var t = 1; t < arguments.length; t++) {
54    var o = null != arguments[t] ? arguments[t] : {};
55    t % 2
56      ? ownKeys(Object(o), !0).forEach(function (t) {
57          _defineProperty(e, t, o[t]);
58        })
59      : Object.getOwnPropertyDescriptors
60      ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o))
61      : ownKeys(Object(o)).forEach(function (t) {
62          Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t));
63        });
64  }
65  return e;
66}
67function _typeof(t) {
68  return (_typeof =
69    "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
70      ? function (t) {
71          return typeof t;
72        }
73      : function (t) {
74          return t &&
75            "function" == typeof Symbol &&
76            t.constructor === Symbol &&
77            t !== Symbol.prototype
78            ? "symbol"
79            : typeof t;
80        })(t);
81}
82function _defineProperty(t, e, o) {
83  return (
84    (e = _toPropertyKey(e)) in t
85      ? Object.defineProperty(t, e, {
86          value: o,
87          enumerable: !0,
88          configurable: !0,
89          writable: !0,
90        })
91      : (t[e] = o),
92    t
93  );
94}
95function _slicedToArray(t, e) {
96  return (
97    _arrayWithHoles(t) ||
98    _iterableToArrayLimit(t, e) ||
99    _unsupportedIterableToArray(t, e) ||
100    _nonIterableRest()
101  );
102}
103function _toConsumableArray(t) {
104  return (
105    _arrayWithoutHoles(t) ||
106    _iterableToArray(t) ||
107    _unsupportedIterableToArray(t) ||
108    _nonIterableSpread()
109  );
110}
111function _arrayWithoutHoles(t) {
112  if (Array.isArray(t)) return _arrayLikeToArray(t);
113}
114function _arrayWithHoles(t) {
115  if (Array.isArray(t)) return t;
116}
117function _iterableToArray(t) {
118  if (
119    ("undefined" != typeof Symbol && null != t[Symbol.iterator]) ||
120    null != t["@@iterator"]
121  )
122    return Array.from(t);
123}
124function _unsupportedIterableToArray(t, e) {
125  var o;
126  if (t)
127    return "string" == typeof t
128      ? _arrayLikeToArray(t, e)
129      : "Map" ===
130          (o =
131            "Object" === (o = Object.prototype.toString.call(t).slice(8, -1)) &&
132            t.constructor
133              ? t.constructor.name
134              : o) || "Set" === o
135      ? Array.from(t)
136      : "Arguments" === o || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)
137      ? _arrayLikeToArray(t, e)
138      : void 0;
139}
140function _arrayLikeToArray(t, e) {
141  (null == e || e > t.length) && (e = t.length);
142  for (var o = 0, r = new Array(e); o < e; o++) r[o] = t[o];
143  return r;
144}
145function _nonIterableSpread() {
146  throw new TypeError(
147    "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
148  );
149}
150function _nonIterableRest() {
151  throw new TypeError(
152    "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
153  );
154}
155function _toPrimitive(t, e) {
156  if ("object" != typeof t || null === t) return t;
157  var o = t[Symbol.toPrimitive];
158  if (void 0 === o) return ("string" === e ? String : Number)(t);
159  o = o.call(t, e || "default");
160  if ("object" != typeof o) return o;
161  throw new TypeError("@@toPrimitive must return a primitive value.");
162}
163function _toPropertyKey(t) {
164  t = _toPrimitive(t, "string");
165  return "symbol" == typeof t ? t : String(t);
166}
167var AF_URL_SCHEME = "(https:\\/\\/)(([^\\.]+).)(.*\\/)(.*)",
168  VALID_AF_URL_PARTS_LENGTH = 5,
169  GOOGLE_CLICK_ID = "gclid",
170  ASSOCIATED_AD_KEYWORD = "keyword",
171  AF_KEYWORDS = "af_keywords",
172  AF_CUSTOM_EXCLUDE_PARAMS_KEYS = [
173    "pid",
174    "c",
175    "af_channel",
176    "af_ad",
177    "af_adset",
178    "deep_link_value",
179    "af_sub1",
180    "af_sub2",
181    "af_sub3",
182    "af_sub4",
183    "af_sub5",
184  ],
185  GCLID_EXCLUDE_PARAMS_KEYS = [
186    "pid",
187    "c",
188    "af_channel",
189    "af_ad",
190    "af_adset",
191    "deep_link_value",
192  ],
193  LOCAL_STORAGE_VALUES = { SS_WEB_REFERRER: "ss_webReferrer" },
194  isSkippedURL = function (t) {
195    var e = t.url,
196      o = t.skipKeys,
197      t = t.errorMsg;
198    if (e) {
199      var r = e.toLowerCase();
200      if (r)
201        return (
202          (e = o.find(function (t) {
203            return r.includes(t.toLowerCase());
204          })) && console.debug(t, e),
205          !!e
206        );
207    }
208    return !1;
209  },
210  getGoogleClickIdParameters = function (t, e) {
211    var o = e[GOOGLE_CLICK_ID],
212      r = {};
213    return (
214      o
215        ? (console.debug("This user comes from Google AdWords"),
216          (r[t] = o),
217          (t = e[ASSOCIATED_AD_KEYWORD]) &&
218            (console.debug("There is a keyword associated with the ad"),
219            (r[AF_KEYWORDS] = t)))
220        : console.debug("This user comes from SRN or custom network"),
221      r
222    );
223  },
224  stringifyParameters = function () {
225    var o = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
226      t = Object.keys(o).reduce(function (t, e) {
227        return o[e] && (t += "&".concat(e, "=").concat(o[e])), t;
228      }, "");
229    return console.debug("Generated OneLink parameters", t), t;
230  },
231  getParameterValue = function (e) {
232    var t,
233      o,
234      r,
235      i =
236        1 < arguments.length && void 0 !== arguments[1]
237          ? arguments[1]
238          : { keys: [], overrideValues: {}, defaultValue: "" };
239    return (null != i && i.keys && Array.isArray(i.keys)) ||
240      (null != i && i.defaultValue)
241      ? ((o = i.keys),
242        (r = void 0 === (r = i.overrideValues) ? {} : r),
243        (t = void 0 === (t = i.defaultValue) ? "" : t),
244        ((o = (void 0 === o ? [] : o).find(function (t) {
245          return !!e[t];
246        })) &&
247          (r[(r = e[o])] || r)) ||
248          t)
249      : (console.error("Parameter config structure is wrong", i), null);
250  },
251  isIOS = function (t) {
252    return /iphone|ipad|ipod/i.test(t && t.toLowerCase());
253  },
254  isUACHSupported = function () {
255    return (
256      "object" ===
257        ("undefined" == typeof navigator ? "undefined" : _typeof(navigator)) &&
258      "userAgentData" in navigator &&
259      "getHighEntropyValues" in navigator.userAgentData &&
260      !isIOS(navigator && navigator.userAgent)
261    );
262  },
263  getQueryParamsAndSaveToLocalStorage = function (t) {
264    t || console.debug("website doesnt exist + ".concat(t));
265    try {
266      var e = new URL(t),
267        o = new URLSearchParams(e.search),
268        r = Array.from(o).reduce(function (t, e) {
269          var e = _slicedToArray(e, 2),
270            o = e[0],
271            e = e[1];
272          return _objectSpread2(
273            _objectSpread2({}, t),
274            {},
275            _defineProperty({}, o, encodeURIComponent(e))
276          );
277        }, {}),
278        i = JSON.parse(localStorage.getItem("ss_incoming_params") || "[]"),
279        n = new Date().getTime() + 72e5,
280        a = _objectSpread2(_objectSpread2({}, r), {}, { af_ss_exp_at: n });
281      i.unshift(a),
282        localStorage.setItem("ss_incoming_params", JSON.stringify(i));
283    } catch (t) {
284      console.debug("url isnt valid + ".concat(t));
285    }
286  },
287  isValidUrl = function (t) {
288    try {
289      return Boolean(new URL(t));
290    } catch (t) {
291      return !1;
292    }
293  },
294  getCurrentUrl = function () {
295    return new URL(window.location.href);
296  },
297  getReferrerUrl = function () {
298    var t = document.referrer;
299    return t ? new URL(t) : null;
300  },
301  isSameOrigin = function (t, e) {
302    return t.origin === e.origin;
303  },
304  saveWebReferrer = function () {
305    var t = getCurrentUrl(),
306      e = getReferrerUrl();
307    e && isSameOrigin(t, e)
308      ? console.warn("You navigate from the same website")
309      : localStorage.setItem(
310          LOCAL_STORAGE_VALUES.SS_WEB_REFERRER,
311          JSON.stringify(document.referrer)
312        );
313  },
314  removeExpiredLocalStorageItems = function () {
315    var e =
316        0 < arguments.length && void 0 !== arguments[0]
317          ? arguments[0]
318          : Date.now(),
319      t = JSON.parse(localStorage.getItem("ss_incoming_params") || "[]");
320    localStorage.setItem(
321      "ss_incoming_params",
322      JSON.stringify(
323        t.filter(function (t) {
324          t = t.af_ss_exp_at;
325          return e < t;
326        })
327      )
328    );
329  };
330function aggregateValuesFromParameters() {
331  var e = [];
332  return (
333    Object.values(
334      0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
335    ).forEach(function (t) {
336      t &&
337        t.keys &&
338        Array.isArray(t.keys) &&
339        t.keys.forEach(function (t) {
340          return e.push(t);
341        }),
342        Array.isArray(t) &&
343          t.forEach(function (t) {
344            Array.isArray(null == t ? void 0 : t.keys) &&
345              e.push.apply(e, _toConsumableArray(t.keys));
346          });
347    }),
348    e
349  );
350}
351function getCurrentURLParams(t) {
352  var e = {};
353  return (
354    Object.keys(localStorage).includes("ss_incoming_params")
355      ? (e =
356          JSON.parse(localStorage.ss_incoming_params).find(function (e) {
357            return t.some(function (t) {
358              return t in e;
359            });
360          }) || {})
361      : console.log("Key 'ss_incoming_params' not found in localStorage."),
362    e
363  );
364}
365var isOneLinkURLValid = function (t) {
366    var e = null == (e = t || "") ? void 0 : e.toString().match(AF_URL_SCHEME);
367    return (
368      !(!e || (null == e ? void 0 : e.length) < VALID_AF_URL_PARTS_LENGTH) ||
369      (console.error(
370        "oneLinkURL is missing or not in the correct format, can't generate URL",
371        t
372      ),
373      !1)
374    );
375  },
376  validatedMs = function () {
377    var t,
378      e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
379    return (
380      !!(
381        0 !== (null == e || null == (t = e.keys) ? void 0 : t.length) ||
382        (null != e && e.defaultValue)
383      ) ||
384      (console.error(
385        "mediaSource is missing (default value was not supplied), can't generate URL",
386        e
387      ),
388      !1)
389    );
390  },
391  isSkipListsValid = function (t) {
392    var e = t.referrerSkipList,
393      t = t.urlSkipList,
394      t = void 0 === t ? [] : t;
395    return (
396      !isSkippedURL({
397        url: document.referrer,
398        skipKeys: void 0 === e ? [] : e,
399        errorMsg: "Generate url is skipped. HTTP referrer contains key:",
400      }) &&
401      !isSkippedURL({
402        url: document.URL,
403        skipKeys: t,
404        errorMsg: "Generate url is skipped. URL contains string:",
405      })
406    );
407  },
408  extractCustomParams = function (t) {
409    var e = t.afCustom,
410      e = void 0 === e ? [] : e,
411      o = t.currentURLParams,
412      r = void 0 === o ? {} : o,
413      i = t.googleClickIdKey,
414      n = {};
415    return (
416      Array.isArray(e) &&
417        e.forEach(function (e) {
418          var t;
419          null != e &&
420            e.paramKey &&
421            ((t = AF_CUSTOM_EXCLUDE_PARAMS_KEYS.find(function (t) {
422              return t === (null == e ? void 0 : e.paramKey);
423            })),
424            (null == e ? void 0 : e.paramKey) === i || t
425              ? console.debug(
426                  "Custom parameter ParamKey can't override Google-Click-Id or AF Parameters keys",
427                  e
428                )
429              : (n[e.paramKey] = getParameterValue(r, e)));
430        }),
431      n
432    );
433  },
434  validateAndMappedParams = function () {
435    var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
436      o = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},
437      e = 2 < arguments.length && void 0 !== arguments[2] && arguments[2],
438      r = t.mediaSource,
439      i = t.campaign,
440      n = t.channel,
441      a = t.ad,
442      s = t.adSet,
443      l = t.deepLinkValue,
444      u = t.afSub1,
445      h = t.afSub2,
446      d = t.afSub3,
447      c = t.afSub4,
448      g = t.afSub5,
449      p = t.afCustom,
450      f = t.googleClickIdKey,
451      m = {};
452    if (r) {
453      t = getParameterValue(o, r);
454      if (!t)
455        return (
456          console.error(
457            "mediaSource was not found in the URL and default value was not supplied, can't generate URL",
458            r
459          ),
460          null
461        );
462      m[e ? "af_media_source" : "pid"] = t;
463    }
464    if (i) {
465      r = getParameterValue(o, i);
466      if (!r && e)
467        return (
468          console.error(
469            "campaign was not found in the URL and default value was not supplied, can't generate URL",
470            i
471          ),
472          null
473        );
474      e ? ((m.af_campaign = r), (m.af_campaign_id = r)) : (m.c = r);
475    }
476    n && (m.af_channel = getParameterValue(o, n)),
477      a && (m.af_ad = getParameterValue(o, a)),
478      s && (m.af_adset = getParameterValue(o, s)),
479      l && (m.deep_link_value = getParameterValue(o, l));
480    [u, h, d, c, g].forEach(function (t, e) {
481      t && (m["af_sub".concat(e + 1)] = getParameterValue(o, t));
482    }),
483      f &&
484        (GCLID_EXCLUDE_PARAMS_KEYS.find(function (t) {
485          return t === f;
486        })
487          ? console.debug(
488              "Google Click Id ParamKey can't override AF Parameters keys",
489              f
490            )
491          : ((_ = getGoogleClickIdParameters(f, o)),
492            Object.keys(_).forEach(function (t) {
493              m[t] = _[t];
494            })));
495    var _,
496      t = extractCustomParams({
497        afCustom: p,
498        currentURLParams: o,
499        googleClickIdKey: f,
500      });
501    return _objectSpread2(_objectSpread2({}, m), t);
502  },
503  isPlatformValid = function (t) {
504    return t
505      ? !![
506          "smartcast",
507          "tizen",
508          "roku",
509          "webos",
510          "vidaa",
511          "playstation",
512          "android",
513          "ios",
514          "steam",
515          "quest",
516          "battlenet",
517          "epic",
518          "switch",
519          "xbox",
520          "nativepc",
521        ].includes(t.toLowerCase()) ||
522          (console.error(
523            "platform need to be part of the known platforms supoorted"
524          ),
525          !1)
526      : (console.error("platform is missing , can't generate URL", t), !1);
527  };
528function getUserAgentData() {
529  return new Promise(function (e) {
530    isUACHSupported()
531      ? navigator.userAgentData
532          .getHighEntropyValues(["model", "platformVersion"])
533          .then(function (t) {
534            e({ model: t.model, platformVersion: t.platformVersion });
535          })
536          .catch(function () {
537            e();
538          })
539      : e();
540  });
541}
542var createImpressionsLink = function (r) {
543  return r
544    ? new Promise(function (o) {
545        getUserAgentData()
546          .then(function (t) {
547            var e = new URL(r);
548            (e.hostname = "impressions.onelink.me"),
549              t &&
550                ((e.pathname = "/ch".concat(e.pathname)),
551                e.searchParams.append(
552                  "af_ch_model",
553                  encodeURIComponent(t.model)
554                ),
555                e.searchParams.append(
556                  "af_ch_os_version",
557                  encodeURIComponent(t.platformVersion)
558                )),
559              o(e.href);
560          })
561          .catch(function () {
562            o();
563          });
564      })
565    : (console.debug("ClickURL is not valid"), null);
566};
567function getHexColorAfterValidation(t) {
568  return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t) ? t : "#000";
569}
570function QRCode() {
571  var h,
572    t,
573    e =
574      "object" ==
575        ("undefined" == typeof global ? "undefined" : _typeof(global)) &&
576      global &&
577      global.Object === Object &&
578      global,
579    o =
580      "object" == ("undefined" == typeof self ? "undefined" : _typeof(self)) &&
581      self &&
582      self.Object === Object &&
583      self,
584    r = e || o || Function("return this")(),
585    e =
586      "object" ==
587        ("undefined" == typeof exports ? "undefined" : _typeof(exports)) &&
588      exports &&
589      !exports.nodeType &&
590      exports,
591    o =
592      e &&
593      "object" ==
594        ("undefined" == typeof module ? "undefined" : _typeof(module)) &&
595      module &&
596      !module.nodeType &&
597      module,
598    i = r.QRCode;
599  function n(t, e, o) {
600    (this.mode = s.MODE_8BIT_BYTE), (this.data = t), (this.parsedData = []);
601    for (var r = 0, i = this.data.length; r < i; r++) {
602      var n = [],
603        a = this.data.charCodeAt(r);
604      e
605        ? (n[0] = a)
606        : 65536 < a
607        ? ((n[0] = 240 | ((1835008 & a) >>> 18)),
608          (n[1] = 128 | ((258048 & a) >>> 12)),
609          (n[2] = 128 | ((4032 & a) >>> 6)),
610          (n[3] = 128 | (63 & a)))
611        : 2048 < a
612        ? ((n[0] = 224 | ((61440 & a) >>> 12)),
613          (n[1] = 128 | ((4032 & a) >>> 6)),
614          (n[2] = 128 | (63 & a)))
615        : 128 < a
616        ? ((n[0] = 192 | ((1984 & a) >>> 6)), (n[1] = 128 | (63 & a)))
617        : (n[0] = a),
618        this.parsedData.push(n);
619    }
620    (this.parsedData = Array.prototype.concat.apply([], this.parsedData)),
621      o ||
622        this.parsedData.length == this.data.length ||
623        (this.parsedData.unshift(191),
624        this.parsedData.unshift(187),
625        this.parsedData.unshift(239));
626  }
627  function l(t, e) {
628    (this.typeNumber = t),
629      (this.errorCorrectLevel = e),
630      (this.modules = null),
631      (this.moduleCount = 0),
632      (this.dataCache = null),
633      (this.dataList = []);
634  }
635  (n.prototype = {
636    getLength: function (t) {
637      return this.parsedData.length;
638    },
639    write: function (t) {
640      for (var e = 0, o = this.parsedData.length; e < o; e++)
641        t.put(this.parsedData[e], 8);
642    },
643  }),
644    (l.prototype = {
645      addData: function (t, e, o) {
646        t = new n(t, e, o);
647        this.dataList.push(t), (this.dataCache = null);
648      },
649      isDark: function (t, e) {
650        if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e)
651          throw new Error(t + "," + e);
652        return this.modules[t][e][0];
653      },
654      getEye: function (t, e) {
655        if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e)
656          throw new Error(t + "," + e);
657        t = this.modules[t][e];
658        return t[1]
659          ? ((e = "P" + t[1] + "_" + t[2]),
660            "A" == t[2] && (e = "A" + t[1]),
661            { isDark: t[0], type: e })
662          : null;
663      },
664      getModuleCount: function () {
665        return this.moduleCount;
666      },
667      make: function () {
668        this.makeImpl(!1, this.getBestMaskPattern());
669      },
670      makeImpl: function (t, e) {
671        (this.moduleCount = 4 * this.typeNumber + 17),
672          (this.modules = new Array(this.moduleCount));
673        for (var o = 0; o < this.moduleCount; o++) {
674          this.modules[o] = new Array(this.moduleCount);
675          for (var r = 0; r < this.moduleCount; r++) this.modules[o][r] = [];
676        }
677        this.setupPositionProbePattern(0, 0, "TL"),
678          this.setupPositionProbePattern(this.moduleCount - 7, 0, "BL"),
679          this.setupPositionProbePattern(0, this.moduleCount - 7, "TR"),
680          this.setupPositionAdjustPattern("A"),
681          this.setupTimingPattern(),
682          this.setupTypeInfo(t, e),
683          7 <= this.typeNumber && this.setupTypeNumber(t),
684          null == this.dataCache &&
685            (this.dataCache = l.createData(
686              this.typeNumber,
687              this.errorCorrectLevel,
688              this.dataList
689            )),
690          this.mapData(this.dataCache, e);
691      },
692      setupPositionProbePattern: function (t, e, o) {
693        for (var r = -1; r <= 7; r++)
694          if (!(t + r <= -1 || this.moduleCount <= t + r))
695            for (var i = -1; i <= 7; i++)
696              e + i <= -1 ||
697                this.moduleCount <= e + i ||
698                ((0 <= r && r <= 6 && (0 == i || 6 == i)) ||
699                (0 <= i && i <= 6 && (0 == r || 6 == r)) ||
700                (2 <= r && r <= 4 && 2 <= i && i <= 4)
701                  ? ((this.modules[t + r][e + i][0] = !0),
702                    (this.modules[t + r][e + i][2] = o),
703                    (this.modules[t + r][e + i][1] =
704                      -0 == r || -0 == i || 6 == r || 6 == i ? "O" : "I"))
705                  : (this.modules[t + r][e + i][0] = !1));
706      },
707      getBestMaskPattern: function () {
708        for (var t = 0, e = 0, o = 0; o < 8; o++) {
709          this.makeImpl(!0, o);
710          var r = v.getLostPoint(this);
711          (0 == o || r < t) && ((t = r), (e = o));
712        }
713        return e;
714      },
715      createMovieClip: function (t, e, o) {
716        var r = t.createEmptyMovieClip(e, o);
717        this.make();
718        for (var i = 0; i < this.modules.length; i++)
719          for (var n = +i, a = 0; a < this.modules[i].length; a++) {
720            var s = +a;
721            this.modules[i][a][0] &&
722              (r.beginFill(0, 100),
723              r.moveTo(s, n),
724              r.lineTo(1 + s, n),
725              r.lineTo(1 + s, 1 + n),
726              r.lineTo(s, 1 + n),
727              r.endFill());
728          }
729        return r;
730      },
731      setupTimingPattern: function () {
732        for (var t = 8; t < this.moduleCount - 8; t++)
733          null == this.modules[t][6][0] && (this.modules[t][6][0] = t % 2 == 0);
734        for (var e = 8; e < this.moduleCount - 8; e++)
735          null == this.modules[6][e][0] && (this.modules[6][e][0] = e % 2 == 0);
736      },
737      setupPositionAdjustPattern: function (t) {
738        for (
739          var e = v.getPatternPosition(this.typeNumber), o = 0;
740          o < e.length;
741          o++
742        )
743          for (var r = 0; r < e.length; r++) {
744            var i = e[o],
745              n = e[r];
746            if (null == this.modules[i][n][0])
747              for (var a = -2; a <= 2; a++)
748                for (var s = -2; s <= 2; s++)
749                  -2 == a || 2 == a || -2 == s || 2 == s || (0 == a && 0 == s)
750                    ? ((this.modules[i + a][n + s][0] = !0),
751                      (this.modules[i + a][n + s][2] = t),
752                      (this.modules[i + a][n + s][1] =
753                        -2 == a || -2 == s || 2 == a || 2 == s ? "O" : "I"))
754                    : (this.modules[i + a][n + s][0] = !1);
755          }
756      },
757      setupTypeNumber: function (t) {
758        for (var e = v.getBCHTypeNumber(this.typeNumber), o = 0; o < 18; o++) {
759          var r = !t && 1 == ((e >> o) & 1);
760          this.modules[Math.floor(o / 3)][
761            (o % 3) + this.moduleCount - 8 - 3
762          ][0] = r;
763        }
764        for (o = 0; o < 18; o++) {
765          r = !t && 1 == ((e >> o) & 1);
766          this.modules[(o % 3) + this.moduleCount - 8 - 3][
767            Math.floor(o / 3)
768          ][0] = r;
769        }
770      },
771      setupTypeInfo: function (t, e) {
772        for (
773          var e = (this.errorCorrectLevel << 3) | e,
774            o = v.getBCHTypeInfo(e),
775            r = 0;
776          r < 15;
777          r++
778        ) {
779          var i = !t && 1 == ((o >> r) & 1);
780          r < 6
781            ? (this.modules[r][8][0] = i)
782            : r < 8
783            ? (this.modules[r + 1][8][0] = i)
784            : (this.modules[this.moduleCount - 15 + r][8][0] = i);
785        }
786        for (r = 0; r < 15; r++) {
787          i = !t && 1 == ((o >> r) & 1);
788          r < 8
789            ? (this.modules[8][this.moduleCount - r - 1][0] = i)
790            : r < 9
791            ? (this.modules[8][15 - r - 1 + 1][0] = i)
792            : (this.modules[8][15 - r - 1][0] = i);
793        }
794        this.modules[this.moduleCount - 8][8][0] = !t;
795      },
796      mapData: function (t, e) {
797        for (
798          var o = -1,
799            r = this.moduleCount - 1,
800            i = 7,
801            n = 0,
802            a = this.moduleCount - 1;
803          0 < a;
804          a -= 2
805        )
806          for (6 == a && a--; ; ) {
807            for (var s, l, u = 0; u < 2; u++)
808              null == this.modules[r][a - u][0] &&
809                ((s = !1),
810                n < t.length && (s = 1 == ((t[n] >>> i) & 1)),
811                (l = v.getMask(e, r, a - u)),
812                (this.modules[r][a - u][0] = s = l ? !s : s),
813                -1 == --i) &&
814                (n++, (i = 7));
815            if ((r += o) < 0 || this.moduleCount <= r) {
816              (r -= o), (o = -o);
817              break;
818            }
819          }
820      },
821    }),
822    (l.PAD0 = 236),
823    (l.PAD1 = 17),
824    (l.createData = function (t, e, o) {
825      for (var r = A.getRSBlocks(t, e), i = new C(), n = 0; n < o.length; n++) {
826        var a = o[n];
827        i.put(a.mode, 4),
828          i.put(a.getLength(), v.getLengthInBits(a.mode, t)),
829          a.write(i);
830      }
831      for (var s = 0, n = 0; n < r.length; n++) s += r[n].dataCount;
832      if (i.getLengthInBits() > 8 * s)
833        throw new Error(
834          "code length overflow. (" + i.getLengthInBits() + ">" + 8 * s + ")"
835        );
836      for (
837        i.getLengthInBits() + 4 <= 8 * s && i.put(0, 4);
838        i.getLengthInBits() % 8 != 0;
839
840      )
841        i.putBit(!1);
842      for (;;) {
843        if (i.getLengthInBits() >= 8 * s) break;
844        if ((i.put(l.PAD0, 8), i.getLengthInBits() >= 8 * s)) break;
845        i.put(l.PAD1, 8);
846      }
847      return l.createBytes(i, r);
848    }),
849    (l.createBytes = function (t, e) {
850      for (
851        var o = 0,
852          r = 0,
853          i = 0,
854          n = new Array(e.length),
855          a = new Array(e.length),
856          s = 0;
857        s < e.length;
858        s++
859      ) {
860        var l = e[s].dataCount,
861          u = e[s].totalCount - l,
862          r = Math.max(r, l),
863          i = Math.max(i, u);
864        n[s] = new Array(l);
865        for (var h = 0; h < n[s].length; h++) n[s][h] = 255 & t.buffer[h + o];
866        o += l;
867        var l = v.getErrorCorrectPolynomial(u),
868          d = new S(n[s], l.getLength() - 1).mod(l);
869        a[s] = new Array(l.getLength() - 1);
870        for (h = 0; h < a[s].length; h++) {
871          var c = h + d.getLength() - a[s].length;
872          a[s][h] = 0 <= c ? d.get(c) : 0;
873        }
874      }
875      for (var g = 0, h = 0; h < e.length; h++) g += e[h].totalCount;
876      for (var p = new Array(g), f = 0, h = 0; h < r; h++)
877        for (s = 0; s < e.length; s++) h < n[s].length && (p[f++] = n[s][h]);
878      for (h = 0; h < i; h++)
879        for (s = 0; s < e.length; s++) h < a[s].length && (p[f++] = a[s][h]);
880      return p;
881    });
882  for (
883    var s = {
884        MODE_NUMBER: 1,
885        MODE_ALPHA_NUM: 2,
886        MODE_8BIT_BYTE: 4,
887        MODE_KANJI: 8,
888      },
889      u = { L: 1, M: 0, Q: 3, H: 2 },
890      a = 0,
891      d = 1,
892      c = 2,
893      g = 3,
894      p = 4,
895      f = 5,
896      m = 6,
897      _ = 7,
898      v = {
899        PATTERN_POSITION_TABLE: [
900          [],
901          [6, 18],
902          [6, 22],
903          [6, 26],
904          [6, 30],
905          [6, 34],
906          [6, 22, 38],
907          [6, 24, 42],
908          [6, 26, 46],
909          [6, 28, 50],
910          [6, 30, 54],
911          [6, 32, 58],
912          [6, 34, 62],
913          [6, 26, 46, 66],
914          [6, 26, 48, 70],
915          [6, 26, 50, 74],
916          [6, 30, 54, 78],
917          [6, 30, 56, 82],
918          [6, 30, 58, 86],
919          [6, 34, 62, 90],
920          [6, 28, 50, 72, 94],
921          [6, 26, 50, 74, 98],
922          [6, 30, 54, 78, 102],
923          [6, 28, 54, 80, 106],
924          [6, 32, 58, 84, 110],
925          [6, 30, 58, 86, 114],
926          [6, 34, 62, 90, 118],
927          [6, 26, 50, 74, 98, 122],
928          [6, 30, 54, 78, 102, 126],
929          [6, 26, 52, 78, 104, 130],
930          [6, 30, 56, 82, 108, 134],
931          [6, 34, 60, 86, 112, 138],
932          [6, 30, 58, 86, 114, 142],
933          [6, 34, 62, 90, 118, 146],
934          [6, 30, 54, 78, 102, 126, 150],
935          [6, 24, 50, 76, 102, 128, 154],
936          [6, 28, 54, 80, 106, 132, 158],
937          [6, 32, 58, 84, 110, 136, 162],
938          [6, 26, 54, 82, 110, 138, 166],
939          [6, 30, 58, 86, 114, 142, 170],
940        ],
941        G15: 1335,
942        G18: 7973,
943        G15_MASK: 21522,
944        getBCHTypeInfo: function (t) {
945          for (var e = t << 10; 0 <= v.getBCHDigit(e) - v.getBCHDigit(v.G15); )
946            e ^= v.G15 << (v.getBCHDigit(e) - v.getBCHDigit(v.G15));
947          return ((t << 10) | e) ^ v.G15_MASK;
948        },
949        getBCHTypeNumber: function (t) {
950          for (var e = t << 12; 0 <= v.getBCHDigit(e) - v.getBCHDigit(v.G18); )
951            e ^= v.G18 << (v.getBCHDigit(e) - v.getBCHDigit(v.G18));
952          return (t << 12) | e;
953        },
954        getBCHDigit: function (t) {
955          for (var e = 0; 0 != t; ) e++, (t >>>= 1);
956          return e;
957        },
958        getPatternPosition: function (t) {
959          return v.PATTERN_POSITION_TABLE[t - 1];
960        },
961        getMask: function (t, e, o) {
962          switch (t) {
963            case a:
964              return (e + o) % 2 == 0;
965            case d:
966              return e % 2 == 0;
967            case c:
968              return o % 3 == 0;
969            case g:
970              return (e + o) % 3 == 0;
971            case p:
972              return (Math.floor(e / 2) + Math.floor(o / 3)) % 2 == 0;
973            case f:
974              return ((e * o) % 2) + ((e * o) % 3) == 0;
975            case m:
976              return (((e * o) % 2) + ((e * o) % 3)) % 2 == 0;
977            case _:
978              return (((e * o) % 3) + ((e + o) % 2)) % 2 == 0;
979            default:
980              throw new Error("bad maskPattern:" + t);
981          }
982        },
983        getErrorCorrectPolynomial: function (t) {
984          for (var e = new S([1], 0), o = 0; o < t; o++)
985            e = e.multiply(new S([1, y.gexp(o)], 0));
986          return e;
987        },
988        getLengthInBits: function (t, e) {
989          if (1 <= e && e < 10)
990            switch (t) {
991              case s.MODE_NUMBER:
992                return 10;
993              case s.MODE_ALPHA_NUM:
994                return 9;
995              case s.MODE_8BIT_BYTE:
996              case s.MODE_KANJI:
997                return 8;
998              default:
999                throw new Error("mode:" + t);
1000            }
1001          else if (e < 27)
1002            switch (t) {
1003              case s.MODE_NUMBER:
1004                return 12;
1005              case s.MODE_ALPHA_NUM:
1006                return 11;
1007              case s.MODE_8BIT_BYTE:
1008                return 16;
1009              case s.MODE_KANJI:
1010                return 10;
1011              default:
1012                throw new Error("mode:" + t);
1013            }
1014          else {
1015            if (!(e < 41)) throw new Error("type:" + e);
1016            switch (t) {
1017              case s.MODE_NUMBER:
1018                return 14;
1019              case s.MODE_ALPHA_NUM:
1020                return 13;
1021              case s.MODE_8BIT_BYTE:
1022                return 16;
1023              case s.MODE_KANJI:
1024                return 12;
1025              default:
1026                throw new Error("mode:" + t);
1027            }
1028          }
1029        },
1030        getLostPoint: function (t) {
1031          for (var e = t.getModuleCount(), o = 0, r = 0; r < e; r++)
1032            for (var i = 0; i < e; i++) {
1033              for (var n = 0, a = t.isDark(r, i), s = -1; s <= 1; s++)
1034                if (!(r + s < 0 || e <= r + s))
1035                  for (var l = -1; l <= 1; l++)
1036                    i + l < 0 ||
1037                      e <= i + l ||
1038                      (0 == s && 0 == l) ||
1039                      (a == t.isDark(r + s, i + l) && n++);
1040              5 < n && (o += 3 + n - 5);
1041            }
1042          for (r = 0; r < e - 1; r++)
1043            for (i = 0; i < e - 1; i++) {
1044              var u = 0;
1045              t.isDark(r, i) && u++,
1046                t.isDark(r + 1, i) && u++,
1047                t.isDark(r, i + 1) && u++,
1048                t.isDark(r + 1, i + 1) && u++,
1049                (0 != u && 4 != u) || (o += 3);
1050            }
1051          for (r = 0; r < e; r++)
1052            for (i = 0; i < e - 6; i++)
1053              t.isDark(r, i) &&
1054                !t.isDark(r, i + 1) &&
1055                t.isDark(r, i + 2) &&
1056                t.isDark(r, i + 3) &&
1057                t.isDark(r, i + 4) &&
1058                !t.isDark(r, i + 5) &&
1059                t.isDark(r, i + 6) &&
1060                (o += 40);
1061          for (i = 0; i < e; i++)
1062            for (r = 0; r < e - 6; r++)
1063              t.isDark(r, i) &&
1064                !t.isDark(r + 1, i) &&
1065                t.isDark(r + 2, i) &&
1066                t.isDark(r + 3, i) &&
1067                t.isDark(r + 4, i) &&
1068                !t.isDark(r + 5, i) &&
1069                t.isDark(r + 6, i) &&
1070                (o += 40);
1071          for (var h = 0, i = 0; i < e; i++)
1072            for (r = 0; r < e; r++) t.isDark(r, i) && h++;
1073          return (o += 10 * (Math.abs((100 * h) / e / e - 50) / 5));
1074        },
1075      },
1076      y = {
1077        glog: function (t) {
1078          if (t < 1) throw new Error("glog(" + t + ")");
1079          return y.LOG_TABLE[t];
1080        },
1081        gexp: function (t) {
1082          for (; t < 0; ) t += 255;
1083          for (; 256 <= t; ) t -= 255;
1084          return y.EXP_TABLE[t];
1085        },
1086        EXP_TABLE: new Array(256),
1087        LOG_TABLE: new Array(256),
1088      },
1089      b = 0;
1090    b < 8;
1091    b++
1092  )
1093    y.EXP_TABLE[b] = 1 << b;
1094  for (b = 8; b < 256; b++)
1095    y.EXP_TABLE[b] =
1096      y.EXP_TABLE[b - 4] ^
1097      y.EXP_TABLE[b - 5] ^
1098      y.EXP_TABLE[b - 6] ^
1099      y.EXP_TABLE[b - 8];
1100  for (b = 0; b < 255; b++) y.LOG_TABLE[y.EXP_TABLE[b]] = b;
1101  function S(t, e) {
1102    if (t.length == h) throw new Error(t.length + "/" + e);
1103    for (var o = 0; o < t.length && 0 == t[o]; ) o++;
1104    this.num = new Array(t.length - o + e);
1105    for (var r = 0; r < t.length - o; r++) this.num[r] = t[r + o];
1106  }
1107  function A(t, e) {
1108    (this.totalCount = t), (this.dataCount = e);
1109  }
1110  function C() {
1111    (this.buffer = []), (this.length = 0);
1112  }
1113  (S.prototype = {
1114    get: function (t) {
1115      return this.num[t];
1116    },
1117    getLength: function () {
1118      return this.num.length;
1119    },
1120    multiply: function (t) {
1121      for (
1122        var e = new Array(this.getLength() + t.getLength() - 1), o = 0;
1123        o < this.getLength();
1124        o++
1125      )
1126        for (var r = 0; r < t.getLength(); r++)
1127          e[o + r] ^= y.gexp(y.glog(this.get(o)) + y.glog(t.get(r)));
1128      return new S(e, 0);
1129    },
1130    mod: function (t) {
1131      if (this.getLength() - t.getLength() < 0) return this;
1132      for (
1133        var e = y.glog(this.get(0)) - y.glog(t.get(0)),
1134          o = new Array(this.getLength()),
1135          r = 0;
1136        r < this.getLength();
1137        r++
1138      )
1139        o[r] = this.get(r);
1140      for (r = 0; r < t.getLength(); r++) o[r] ^= y.gexp(y.glog(t.get(r)) + e);
1141      return new S(o, 0).mod(t);
1142    },
1143  }),
1144    (A.RS_BLOCK_TABLE = [
1145      [1, 26, 19],
1146      [1, 26, 16],
1147      [1, 26, 13],
1148      [1, 26, 9],
1149      [1, 44, 34],
1150      [1, 44, 28],
1151      [1, 44, 22],
1152      [1, 44, 16],
1153      [1, 70, 55],
1154      [1, 70, 44],
1155      [2, 35, 17],
1156      [2, 35, 13],
1157      [1, 100, 80],
1158      [2, 50, 32],
1159      [2, 50, 24],
1160      [4, 25, 9],
1161      [1, 134, 108],
1162      [2, 67, 43],
1163      [2, 33, 15, 2, 34, 16],
1164      [2, 33, 11, 2, 34, 12],
1165      [2, 86, 68],
1166      [4, 43, 27],
1167      [4, 43, 19],
1168      [4, 43, 15],
1169      [2, 98, 78],
1170      [4, 49, 31],
1171      [2, 32, 14, 4, 33, 15],
1172      [4, 39, 13, 1, 40, 14],
1173      [2, 121, 97],
1174      [2, 60, 38, 2, 61, 39],
1175      [4, 40, 18, 2, 41, 19],
1176      [4, 40, 14, 2, 41, 15],
1177      [2, 146, 116],
1178      [3, 58, 36, 2, 59, 37],
1179      [4, 36, 16, 4, 37, 17],
1180      [4, 36, 12, 4, 37, 13],
1181      [2, 86, 68, 2, 87, 69],
1182      [4, 69, 43, 1, 70, 44],
1183      [6, 43, 19, 2, 44, 20],
1184      [6, 43, 15, 2, 44, 16],
1185      [4, 101, 81],
1186      [1, 80, 50, 4, 81, 51],
1187      [4, 50, 22, 4, 51, 23],
1188      [3, 36, 12, 8, 37, 13],
1189      [2, 116, 92, 2, 117, 93],
1190      [6, 58, 36, 2, 59, 37],
1191      [4, 46, 20, 6, 47, 21],
1192      [7, 42, 14, 4, 43, 15],
1193      [4, 133, 107],
1194      [8, 59, 37, 1, 60, 38],
1195      [8, 44, 20, 4, 45, 21],
1196      [12, 33, 11, 4, 34, 12],
1197      [3, 145, 115, 1, 146, 116],
1198      [4, 64, 40, 5, 65, 41],
1199      [11, 36, 16, 5, 37, 17],
1200      [11, 36, 12, 5, 37, 13],
1201      [5, 109, 87, 1, 110, 88],
1202      [5, 65, 41, 5, 66, 42],
1203      [5, 54, 24, 7, 55, 25],
1204      [11, 36, 12, 7, 37, 13],
1205      [5, 122, 98, 1, 123, 99],
1206      [7, 73, 45, 3, 74, 46],
1207      [15, 43, 19, 2, 44, 20],
1208      [3, 45, 15, 13, 46, 16],
1209      [1, 135, 107, 5, 136, 108],
1210      [10, 74, 46, 1, 75, 47],
1211      [1, 50, 22, 15, 51, 23],
1212      [2, 42, 14, 17, 43, 15],
1213      [5, 150, 120, 1, 151, 121],
1214      [9, 69, 43, 4, 70, 44],
1215      [17, 50, 22, 1, 51, 23],
1216      [2, 42, 14, 19, 43, 15],
1217      [3, 141, 113, 4, 142, 114],
1218      [3, 70, 44, 11, 71, 45],
1219      [17, 47, 21, 4, 48, 22],
1220      [9, 39, 13, 16, 40, 14],
1221      [3, 135, 107, 5, 136, 108],
1222      [3, 67, 41, 13, 68, 42],
1223      [15, 54, 24, 5, 55, 25],
1224      [15, 43, 15, 10, 44, 16],
1225      [4, 144, 116, 4, 145, 117],
1226      [17, 68, 42],
1227      [17, 50, 22, 6, 51, 23],
1228      [19, 46, 16, 6, 47, 17],
1229      [2, 139, 111, 7, 140, 112],
1230      [17, 74, 46],
1231      [7, 54, 24, 16, 55, 25],
1232      [34, 37, 13],
1233      [4, 151, 121, 5, 152, 122],
1234      [4, 75, 47, 14, 76, 48],
1235      [11, 54, 24, 14, 55, 25],
1236      [16, 45, 15, 14, 46, 16],
1237      [6, 147, 117, 4, 148, 118],
1238      [6, 73, 45, 14, 74, 46],
1239      [11, 54, 24, 16, 55, 25],
1240      [30, 46, 16, 2, 47, 17],
1241      [8, 132, 106, 4, 133, 107],
1242      [8, 75, 47, 13, 76, 48],
1243      [7, 54, 24, 22, 55, 25],
1244      [22, 45, 15, 13, 46, 16],
1245      [10, 142, 114, 2, 143, 115],
1246      [19, 74, 46, 4, 75, 47],
1247      [28, 50, 22, 6, 51, 23],
1248      [33, 46, 16, 4, 47, 17],
1249      [8, 152, 122, 4, 153, 123],
1250      [22, 73, 45, 3, 74, 46],
1251      [8, 53, 23, 26, 54, 24],
1252      [12, 45, 15, 28, 46, 16],
1253      [3, 147, 117, 10, 148, 118],
1254      [3, 73, 45, 23, 74, 46],
1255      [4, 54, 24, 31, 55, 25],
1256      [11, 45, 15, 31, 46, 16],
1257      [7, 146, 116, 7, 147, 117],
1258      [21, 73, 45, 7, 74, 46],
1259      [1, 53, 23, 37, 54, 24],
1260      [19, 45, 15, 26, 46, 16],
1261      [5, 145, 115, 10, 146, 116],
1262      [19, 75, 47, 10, 76, 48],
1263      [15, 54, 24, 25, 55, 25],
1264      [23, 45, 15, 25, 46, 16],
1265      [13, 145, 115, 3, 146, 116],
1266      [2, 74, 46, 29, 75, 47],
1267      [42, 54, 24, 1, 55, 25],
1268      [23, 45, 15, 28, 46, 16],
1269      [17, 145, 115],
1270      [10, 74, 46, 23, 75, 47],
1271      [10, 54, 24, 35, 55, 25],
1272      [19, 45, 15, 35, 46, 16],
1273      [17, 145, 115, 1, 146, 116],
1274      [14, 74, 46, 21, 75, 47],
1275      [29, 54, 24, 19, 55, 25],
1276      [11, 45, 15, 46, 46, 16],
1277      [13, 145, 115, 6, 146, 116],
1278      [14, 74, 46, 23, 75, 47],
1279      [44, 54, 24, 7, 55, 25],
1280      [59, 46, 16, 1, 47, 17],
1281      [12, 151, 121, 7, 152, 122],
1282      [12, 75, 47, 26, 76, 48],
1283      [39, 54, 24, 14, 55, 25],
1284      [22, 45, 15, 41, 46, 16],
1285      [6, 151, 121, 14, 152, 122],
1286      [6, 75, 47, 34, 76, 48],
1287      [46, 54, 24, 10, 55, 25],
1288      [2, 45, 15, 64, 46, 16],
1289      [17, 152, 122, 4, 153, 123],
1290      [29, 74, 46, 14, 75, 47],
1291      [49, 54, 24, 10, 55, 25],
1292      [24, 45, 15, 46, 46, 16],
1293      [4, 152, 122, 18, 153, 123],
1294      [13, 74, 46, 32, 75, 47],
1295      [48, 54, 24, 14, 55, 25],
1296      [42, 45, 15, 32, 46, 16],
1297      [20, 147, 117, 4, 148, 118],
1298      [40, 75, 47, 7, 76, 48],
1299      [43, 54, 24, 22, 55, 25],
1300      [10, 45, 15, 67, 46, 16],
1301      [19, 148, 118, 6, 149, 119],
1302      [18, 75, 47, 31, 76, 48],
1303      [34, 54, 24, 34, 55, 25],
1304      [20, 45, 15, 61, 46, 16],
1305    ]),
1306    (A.getRSBlocks = function (t, e) {
1307      var o = A.getRsBlockTable(t, e);
1308      if (o == h)
1309        throw new Error(
1310          "bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e
1311        );
1312      for (var r = o.length / 3, i = [], n = 0; n < r; n++)
1313        for (
1314          var a = o[3 * n + 0], s = o[3 * n + 1], l = o[3 * n + 2], u = 0;
1315          u < a;
1316          u++
1317        )
1318          i.push(new A(s, l));
1319      return i;
1320    }),
1321    (A.getRsBlockTable = function (t, e) {
1322      switch (e) {
1323        case u.L:
1324          return A.RS_BLOCK_TABLE[4 * (t - 1) + 0];
1325        case u.M:
1326          return A.RS_BLOCK_TABLE[4 * (t - 1) + 1];
1327        case u.Q:
1328          return A.RS_BLOCK_TABLE[4 * (t - 1) + 2];
1329        case u.H:
1330          return A.RS_BLOCK_TABLE[4 * (t - 1) + 3];
1331        default:
1332          return h;
1333      }
1334    }),
1335    (C.prototype = {
1336      get: function (t) {
1337        var e = Math.floor(t / 8);
1338        return 1 == ((this.buffer[e] >>> (7 - (t % 8))) & 1);
1339      },
1340      put: function (t, e) {
1341        for (var o = 0; o < e; o++) this.putBit(1 == ((t >>> (e - o - 1)) & 1));
1342      },
1343      getLengthInBits: function () {
1344        return this.length;
1345      },
1346      putBit: function (t) {
1347        var e = Math.floor(this.length / 8);
1348        this.buffer.length <= e && this.buffer.push(0),
1349          t && (this.buffer[e] |= 128 >>> this.length % 8),
1350          this.length++;
1351      },
1352    });
1353  var w = [
1354    [17, 14, 11, 7],
1355    [32, 26, 20, 14],
1356    [53, 42, 32, 24],
1357    [78, 62, 46, 34],
1358    [106, 84, 60, 44],
1359    [134, 106, 74, 58],
1360    [154, 122, 86, 64],
1361    [192, 152, 108, 84],
1362    [230, 180, 130, 98],
1363    [271, 213, 151, 119],
1364    [321, 251, 177, 137],
1365    [367, 287, 203, 155],
1366    [425, 331, 241, 177],
1367    [458, 362, 258, 194],
1368    [520, 412, 292, 220],
1369    [586, 450, 322, 250],
1370    [644, 504, 364, 280],
1371    [718, 560, 394, 310],
1372    [792, 624, 442, 338],
1373    [858, 666, 482, 382],
1374    [929, 711, 509, 403],
1375    [1003, 779, 565, 439],
1376    [1091, 857, 611, 461],
1377    [1171, 911, 661, 511],
1378    [1273, 997, 715, 535],
1379    [1367, 1059, 751, 593],
1380    [1465, 1125, 805, 625],
1381    [1528, 1190, 868, 658],
1382    [1628, 1264, 908, 698],
1383    [1732, 1370, 982, 742],
1384    [1840, 1452, 1030, 790],
1385    [1952, 1538, 1112, 842],
1386    [2068, 1628, 1168, 898],
1387    [2188, 1722, 1228, 958],
1388    [2303, 1809, 1283, 983],
1389    [2431, 1911, 1351, 1051],
1390    [2563, 1989, 1423, 1093],
1391    [2699, 2099, 1499, 1139],
1392    [2809, 2213, 1579, 1219],
1393    [2953, 2331, 1663, 1273],
1394  ];
1395  function L() {
1396    var t = !1,
1397      e = navigator.userAgent;
1398    return (t =
1399      /android/i.test(e) &&
1400      ((t = !0), (e = e.toString().match(/android ([0-9]\.[0-9])/i))) &&
1401      e[1]
1402        ? parseFloat(e[1])
1403        : t);
1404  }
1405  var O =
1406    "undefined" == typeof CanvasRenderingContext2D
1407      ? ((k.prototype.draw = function (t) {
1408          var e = this._htOption,
1409            o = this._el,
1410            r = t.getModuleCount(),
1411            i = Math.round(e.width / r),
1412            n = Math.round((e.height - e.titleHeight) / r),
1413            a =
1414              (n <= 1 && (n = 1),
1415              (this._htOption.width = (i = i <= 1 ? 1 : i) * r),
1416              (this._htOption.height = n * r + e.titleHeight),
1417              (this._htOption.quietZone = Math.round(this._htOption.quietZone)),
1418              []),
1419            s = "",
1420            l = Math.round(i * e.dotScale),
1421            u = Math.round(n * e.dotScale),
1422            h = (l < 4 && (u = l = 4), e.colorDark),
1423            d = e.colorLight;
1424          e.backgroundImage &&
1425            (e.autoColor
1426              ? ((e.colorDark =
1427                  "rgba(0, 0, 0, .6);filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#99000000', EndColorStr='#99000000');"),
1428                (e.colorLight =
1429                  "rgba(255, 255, 255, .7);filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#B2FFFFFF', EndColorStr='#B2FFFFFF');"))
1430              : (e.colorLight = "rgba(0,0,0,0)"),
1431            (_ =
1432              '<div style="display:inline-block; z-index:-10;position:absolute;"><img src="' +
1433              e.backgroundImage +
1434              '" widht="' +
1435              (e.width + 2 * e.quietZone) +
1436              '" height="' +
1437              (e.height + 2 * e.quietZone) +
1438              '" style="opacity:' +
1439              e.backgroundImageAlpha +
1440              ";filter:alpha(opacity=" +
1441              100 * e.backgroundImageAlpha +
1442              '); "/></div>'),
1443            a.push(_)),
1444            e.quietZone &&
1445              (s =
1446                "display:inline-block; width:" +
1447                (e.width + 2 * e.quietZone) +
1448                "px; height:" +
1449                (e.width + 2 * e.quietZone) +
1450                "px;background:" +
1451                e.quietZoneColor +
1452                "; text-align:center;"),
1453            a.push('<div style="font-size:0;' + s + '">'),
1454            a.push(
1455              '<table  style="font-size:0;border:0;border-collapse:collapse; margin-top:' +
1456                e.quietZone +
1457                'px;" border="0" cellspacing="0" cellspadding="0" align="center" valign="middle">'
1458            ),
1459            a.push(
1460              '<tr height="' +
1461                e.titleHeight +
1462                '" align="center"><td style="border:0;border-collapse:collapse;margin:0;padding:0" colspan="' +
1463                r +
1464                '">'
1465            ),
1466            e.title &&
1467              ((_ = e.titleColor),
1468              (s = e.titleFont),
1469              a.push(
1470                '<div style="width:100%;margin-top:' +
1471                  e.titleTop +
1472                  "px;color:" +
1473                  _ +
1474                  ";font:" +
1475                  s +
1476                  ";background:" +
1477                  e.titleBackgroundColor +
1478                  '">' +
1479                  e.title +
1480                  "</div>"
1481              )),
1482            e.subTitle &&
1483              a.push(
1484                '<div style="width:100%;margin-top:' +
1485                  (e.subTitleTop - e.titleTop) +
1486                  "px;color:" +
1487                  e.subTitleColor +
1488                  "; font:" +
1489                  e.subTitleFont +
1490                  '">' +
1491                  e.subTitle +
1492                  "</div>"
1493              ),
1494            a.push("</td></tr>");
1495          for (var c = 0; c < r; c++) {
1496            a.push('<tr style="border:0; padding:0; margin:0;" height="7">');
1497            for (var g = 0; g < r; g++) {
1498              var p = t.isDark(c, g),
1499                f = t.getEye(c, g);
1500              f
1501                ? ((p = f.isDark),
1502                  (f = e[(f = f.type)] || e[f.substring(0, 2)] || h),
1503                  a.push(
1504                    '<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' +
1505                      i +
1506                      "px;height:" +
1507                      n +
1508                      'px;"><span style="width:' +
1509                      i +
1510                      "px;height:" +
1511                      n +
1512                      "px;background-color:" +
1513                      (p ? f : d) +
1514                      ';display:inline-block"></span></td>'
1515                  ))
1516                : ((f = e.colorDark),
1517                  6 == c
1518                    ? ((f = e.timing_H || e.timing || h),
1519                      a.push(
1520                        '<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' +
1521                          i +
1522                          "px;height:" +
1523                          n +
1524                          "px;background-color:" +
1525                          (p ? f : d) +
1526                          ';"></td>'
1527                      ))
1528                    : 6 == g
1529                    ? ((f = e.timing_V || e.timing || h),
1530                      a.push(
1531                        '<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' +
1532                          i +
1533                          "px;height:" +
1534                          n +
1535                          "px;background-color:" +
1536                          (p ? f : d) +
1537                          ';"></td>'
1538                      ))
1539                    : a.push(
1540                        '<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' +
1541                          i +
1542                          "px;height:" +
1543                          n +
1544                          'px;"><div style="display:inline-block;width:' +
1545                          l +
1546                          "px;height:" +
1547                          u +
1548                          "px;background-color:" +
1549                          (p ? f : e.colorLight) +
1550                          ';"></div></td>'
1551                      ));
1552            }
1553            a.push("</tr>");
1554          }
1555          a.push("</table>"),
1556            a.push("</div>"),
1557            e.logo &&
1558              ((_ = new Image()),
1559              null != e.crossOrigin && (_.crossOrigin = e.crossOrigin),
1560              (_.src = e.logo),
1561              (s = e.width / 3.5) != (_ = e.height / 3.5) && (s = _),
1562              e.logoWidth && (s = e.logoWidth),
1563              e.logoHeight && (_ = e.logoHeight),
1564              (m =
1565                "position:relative; z-index:1;display:table-cell;top:-" +
1566                ((e.height - e.titleHeight) / 2 + _ / 2 + e.quietZone) +
1567                "px;text-align:center; width:" +
1568                s +
1569                "px; height:" +
1570                _ +
1571                "px;line-height:" +
1572                s +
1573                "px; vertical-align: middle;"),
1574              e.logoBackgroundTransparent ||
1575                (m += "background:" + e.logoBackgroundColor),
1576              a.push(
1577                '<div style="' +
1578                  m +
1579                  '"><img  src="' +
1580                  e.logo +
1581                  '"  style="max-width: ' +
1582                  s +
1583                  "px; max-height: " +
1584                  _ +
1585                  'px;" /> <div style=" display: none; width:1px;margin-left: -1px;"></div></div>'
1586              )),
1587            e.onRenderingStart && e.onRenderingStart(e),
1588            (o.innerHTML = a.join(""));
1589          var m = o.childNodes[0],
1590            s = (e.width - m.offsetWidth) / 2,
1591            _ = (e.height - m.offsetHeight) / 2;
1592          0 < s && 0 < _ && (m.style.margin = _ + "px " + s + "px"),
1593            this._htOption.onRenderingEnd &&
1594              this._htOption.onRenderingEnd(this._htOption, null);
1595        }),
1596        (k.prototype.clear = function () {
1597          this._el.innerHTML = "";
1598        }),
1599        k)
1600      : (function () {
1601          function t() {
1602            if ("svg" == this._htOption.drawer) {
1603              var t = this._oContext.getSerializedSvg(!0);
1604              (this.dataURL = t), (this._el.innerHTML = t);
1605            } else
1606              try {
1607                var e = this._elCanvas.toDataURL("image/png");
1608                this.dataURL = e;
1609              } catch (t) {
1610                console.error(t);
1611              }
1612            this._htOption.onRenderingEnd &&
1613              (this.dataURL ||
1614                console.error(
1615                  "Can not get base64 data, please check: 1. Published the page and image to the server 2. The image request support CORS 3. Configured `crossOrigin:'anonymous'` option"
1616                ),
1617              this._htOption.onRenderingEnd(this._htOption, this.dataURL));
1618          }
1619          var h, d;
1620          r._android &&
1621            r._android <= 2.1 &&
1622            ((h = 1 / window.devicePixelRatio),
1623            (d = CanvasRenderingContext2D.prototype.drawImage),
1624            (CanvasRenderingContext2D.prototype.drawImage = function (
1625              t,
1626              e,
1627              o,
1628              r,
1629              i,
1630              n,
1631              a,
1632              s,
1633              l
1634            ) {
1635              if ("nodeName" in t && /img/i.test(t.nodeName))
1636                for (var u = arguments.length - 1; 1 <= u; u--)
1637                  arguments[u] = arguments[u] * h;
1638              else
1639                void 0 === s &&
1640                  ((arguments[1] *= h),
1641                  (arguments[2] *= h),
1642                  (arguments[3] *= h),
1643                  (arguments[4] *= h));
1644              d.apply(this, arguments);
1645            }));
1646          function e(t, e) {
1647            (this._bIsPainted = !1),
1648              (this._android = L()),
1649              (this._el = t),
1650              (this._htOption = e),
1651              "svg" == this._htOption.drawer
1652                ? ((this._oContext = {}), (this._elCanvas = {}))
1653                : ((this._elCanvas = document.createElement("canvas")),
1654                  this._el.appendChild(this._elCanvas),
1655                  (this._oContext = this._elCanvas.getContext("2d"))),
1656              (this._bSupportDataURI = null),
1657              (this.dataURL = null);
1658          }
1659          return (
1660            (e.prototype.draw = function (o) {
1661              var r,
1662                c = this._htOption,
1663                g =
1664                  (c.title ||
1665                    c.subTitle ||
1666                    ((c.height -= c.titleHeight), (c.titleHeight = 0)),
1667                  o.getModuleCount()),
1668                p = Math.round(c.width / g),
1669                f = Math.round((c.height - c.titleHeight) / g),
1670                m =
1671                  (p <= 1 && (p = 1),
1672                  f <= 1 && (f = 1),
1673                  (c.width = p * g),
1674                  (c.height = f * g + c.titleHeight),
1675                  (c.quietZone = Math.round(c.quietZone)),
1676                  (this._elCanvas.width = c.width + 2 * c.quietZone),
1677                  (this._elCanvas.height = c.height + 2 * c.quietZone),
1678                  "canvas" != this._htOption.drawer &&
1679                    (this._oContext = new C2S(
1680                      this._elCanvas.width,
1681                      this._elCanvas.height
1682                    )),
1683                  this.clear(),
1684                  this._oContext),
1685                i =
1686                  ((m.lineWidth = 0),
1687                  (m.fillStyle = c.colorLight),
1688                  m.fillRect(0, 0, this._elCanvas.width, this._elCanvas.height),
1689                  this);
1690              function _() {
1691                0 < c.quietZone &&
1692                  c.quietZoneColor &&
1693                  ((m.lineWidth = 0),
1694                  (m.fillStyle = c.quietZoneColor),
1695                  m.fillRect(0, 0, i._elCanvas.width, c.quietZone),
1696                  m.fillRect(
1697                    0,
1698                    c.quietZone,
1699                    c.quietZone,
1700                    i._elCanvas.height - 2 * c.quietZone
1701                  ),
1702                  m.fillRect(
1703                    i._elCanvas.width - c.quietZone,
1704                    c.quietZone,
1705                    c.quietZone,
1706                    i._elCanvas.height - 2 * c.quietZone
1707                  ),
1708                  m.fillRect(
1709                    0,
1710                    i._elCanvas.height - c.quietZone,
1711                    i._elCanvas.width,
1712                    c.quietZone
1713                  ));
1714              }
1715              function n(t) {
1716                c.onRenderingStart && c.onRenderingStart(c);
1717                for (var u, h, e = 0; e < g; e++)
1718                  for (var o = 0; o < g; o++) {
1719                    var r,
1720                      i,
1721                      n = o * p + c.quietZone,
1722                      a = e * f + c.quietZone,
1723                      s = t.isDark(e, o),
1724                      l = t.getEye(e, o),
1725                      d = c.dotScale;
1726                    (m.lineWidth = 0),
1727                      l
1728                        ? ((r =
1729                            c[l.type] ||
1730                            c[l.type.substring(0, 2)] ||
1731                            c.colorDark),
1732                          (i = c.colorLight))
1733                        : c.backgroundImage
1734                        ? ((i = "rgba(0,0,0,0)"),
1735                          6 == e
1736                            ? c.autoColor
1737                              ? ((r =
1738                                  c.timing_H || c.timing || c.autoColorDark),
1739                                (i = c.autoColorLight))
1740                              : (r = c.timing_H || c.timing || c.colorDark)
1741                            : 6 == o
1742                            ? c.autoColor
1743                              ? ((r =
1744                                  c.timing_V || c.timing || c.autoColorDark),
1745                                (i = c.autoColorLight))
1746                              : (r = c.timing_V || c.timing || c.colorDark)
1747                            : c.autoColor
1748                            ? ((r = c.autoColorDark), (i = c.autoColorLight))
1749                            : (r = c.colorDark))
1750                        : ((r =
1751                            6 == e
1752                              ? c.timing_H || c.timing || c.colorDark
1753                              : (6 == o && (c.timing_V || c.timing)) ||
1754                                c.colorDark),
1755                          (i = c.colorLight)),
1756                      (m.strokeStyle = s ? r : i),
1757                      (m.fillStyle = s ? r : i),
1758                      l
1759                        ? ((d =
1760                            "AO" == l.type
1761                              ? c.dotScaleAO
1762                              : "AI" == l.type
1763                              ? c.dotScaleAI
1764                              : 1),
1765                          c.backgroundImage && c.autoColor
1766                            ? ((r =
1767                                ("AO" == l.type ? c.AI : c.AO) ||
1768                                c.autoColorDark),
1769                              (i = c.autoColorLight))
1770                            : (r = ("AO" == l.type ? c.AI : c.AO) || r),
1771                          l.isDark)
1772                        : 6 == e
1773                        ? (d = c.dotScaleTiming_H)
1774                        : 6 == o
1775                        ? (d = c.dotScaleTiming_V)
1776                        : c.backgroundImage,
1777                      m.fillRect(
1778                        n + (p * (1 - d)) / 2,
1779                        c.titleHeight + a + (f * (1 - d)) / 2,
1780                        p * d,
1781                        f * d
1782                      ),
1783                      1 == c.dotScale || l || (m.strokeStyle = c.colorLight);
1784                  }
1785                c.title &&
1786                  ((m.fillStyle = c.titleBackgroundColor),
1787                  m.fillRect(
1788                    0,
1789                    0,
1790                    this._elCanvas.width,
1791                    c.titleHeight + c.quietZone
1792                  ),
1793                  (m.font = c.titleFont),
1794                  (m.fillStyle = c.titleColor),
1795                  (m.textAlign = "center"),
1796                  m.fillText(
1797                    c.title,
1798                    this._elCanvas.width / 2,
1799                    +c.quietZone + c.titleTop
1800                  )),
1801                  c.subTitle &&
1802                    ((m.font = c.subTitleFont),
1803                    (m.fillStyle = c.subTitleColor),
1804                    m.fillText(
1805                      c.subTitle,
1806                      this._elCanvas.width / 2,
1807                      +c.quietZone + c.subTitleTop
1808                    )),
1809                  c.logo
1810                    ? ((u = new Image()),
1811                      (h = this),
1812                      (u.onload = function () {
1813                        var t, e, o, r, i, n, a, s, l;
1814                        (t = u),
1815                          (e = Math.round(c.width / 3.5)),
1816                          (o = Math.round(c.height / 3.5)),
1817                          e !== o && (e = o),
1818                          c.logoMaxWidth
1819                            ? (e = Math.round(c.logoMaxWidth))
1820                            : c.logoWidth && (e = Math.round(c.logoWidth)),
1821                          c.logoMaxHeight
1822                            ? (o = Math.round(c.logoMaxHeight))
1823                            : c.logoHeight && (o = Math.round(c.logoHeight)),
1824                          (s =
1825                            void 0 === t.naturalWidth
1826                              ? ((a = t.width), t.height)
1827                              : ((a = t.naturalWidth), t.naturalHeight)),
1828                          (c.logoMaxWidth || c.logoMaxHeight) &&
1829                            (c.logoMaxWidth && a <= e && (e = a),
1830                            c.logoMaxHeight && s <= o && (o = s),
1831                            a <= e) &&
1832                            s <= o &&
1833                            ((e = a), (o = s)),
1834                          (r = (c.width + 2 * c.quietZone - e) / 2),
1835                          (i =
1836                            (c.height + c.titleHeight + 2 * c.quietZone - o) /
1837                            2),
1838                          (n = Math.min(e / a, o / s)),
1839                          (a *= n),
1840                          (s *= n),
1841                          (c.logoMaxWidth || c.logoMaxHeight) &&
1842                            ((r = (c.width + 2 * c.quietZone - (e = a)) / 2),
1843                            (i =
1844                              (c.height +
1845                                c.titleHeight +
1846                                2 * c.quietZone -
1847                                (o = s)) /
1848                              2)),
1849                          c.logoBackgroundTransparent ||
1850                            ((m.fillStyle = c.logoBackgroundColor),
1851                            m.fillRect(r, i, e, o)),
1852                          (n = m.imageSmoothingQuality),
1853                          (l = m.imageSmoothingEnabled),
1854                          (m.imageSmoothingEnabled = !0),
1855                          (m.imageSmoothingQuality = "high"),
1856                          m.drawImage(
1857                            t,
1858                            r + (e - a) / 2,
1859                            i + (o - s) / 2,
1860                            a,
1861                            s
1862                          ),
1863                          (m.imageSmoothingEnabled = l),
1864                          (m.imageSmoothingQuality = n),
1865                          _(),
1866                          (h._bIsPainted = !0),
1867                          h.makeImage();
1868                      }),
1869                      (u.onerror = function (t) {
1870                        console.error(t);
1871                      }),
1872                      null != c.crossOrigin && (u.crossOrigin = c.crossOrigin),
1873                      (u.originalSrc = c.logo),
1874                      (u.src = c.logo))
1875                    : (_(), (this._bIsPainted = !0), this.makeImage());
1876              }
1877              c.backgroundImage
1878                ? (((r = new Image()).onload = function () {
1879                    (m.globalAlpha = 1),
1880                      (m.globalAlpha = c.backgroundImageAlpha);
1881                    var t = m.imageSmoothingQuality,
1882                      e = m.imageSmoothingEnabled;
1883                    (m.imageSmoothingEnabled = !0),
1884                      (m.imageSmoothingQuality = "high"),
1885                      m.drawImage(
1886                        r,
1887                        0,
1888                        c.titleHeight,
1889                        c.width + 2 * c.quietZone,
1890                        c.height + 2 * c.quietZone - c.titleHeight
1891                      ),
1892                      (m.imageSmoothingEnabled = e),
1893                      (m.imageSmoothingQuality = t),
1894                      (m.globalAlpha = 1),
1895                      n.call(i, o);
1896                  }),
1897                  null != c.crossOrigin && (r.crossOrigin = c.crossOrigin),
1898                  (r.originalSrc = c.backgroundImage),
1899                  (r.src = c.backgroundImage))
1900                : n.call(i, o);
1901            }),
1902            (e.prototype.makeImage = function () {
1903              this._bIsPainted &&
1904                !function (t, e) {
1905                  var o = this;
1906                  (o._fFail = e),
1907                    (o._fSuccess = t),
1908                    null === o._bSupportDataURI
1909                      ? (((e = document.createElement("img")).onabort = t =
1910                          function () {
1911                            (o._bSupportDataURI = !1),
1912                              o._fFail && o._fFail.call(o);
1913                          }),
1914                        (e.onerror = t),
1915                        (e.onload = function () {
1916                          (o._bSupportDataURI = !0),
1917                            o._fSuccess && o._fSuccess.call(o);
1918                        }),
1919                        (e.src =
1920                          "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="))
1921                      : !0 === o._bSupportDataURI && o._fSuccess
1922                      ? o._fSuccess.call(o)
1923                      : !1 === o._bSupportDataURI &&
1924                        o._fFail &&
1925                        o._fFail.call(o);
1926                }.call(this, t);
1927            }),
1928            (e.prototype.isPainted = function () {
1929              return this._bIsPainted;
1930            }),
1931            (e.prototype.clear = function () {
1932              this._oContext.clearRect(
1933                0,
1934                0,
1935                this._elCanvas.width,
1936                this._elCanvas.height
1937              ),
1938                (this._bIsPainted = !1);
1939            }),
1940            (e.prototype.remove = function () {
1941              this._oContext.clearRect(
1942                0,
1943                0,
1944                this._elCanvas.width,
1945                this._elCanvas.height
1946              ),
1947                (this._bIsPainted = !1),
1948                (this._el.innerHTML = "");
1949            }),
1950            (e.prototype.round = function (t) {
1951              return t && Math.floor(1e3 * t) / 1e3;
1952            }),
1953            e
1954          );
1955        })();
1956  function k(t, e) {
1957    (this._el = t), (this._htOption = e);
1958  }
1959  function R(t, e) {
1960    for (
1961      var o,
1962        r = e.correctLevel,
1963        i = 1,
1964        n =
1965          ((t = t),
1966          (o = encodeURI(t)
1967            .toString()
1968            .replace(/\%[0-9a-fA-F]{2}/g, "a")).length +
1969            (o.length != t.length ? 3 : 0)),
1970        a = 0,
1971        s = w.length;
1972      a < s;
1973      a++
1974    ) {
1975      var l = 0;
1976      switch (r) {
1977        case u.L:
1978          l = w[a][0];
1979          break;
1980        case u.M:
1981          l = w[a][1];
1982          break;
1983        case u.Q:
1984          l = w[a][2];
1985          break;
1986        case u.H:
1987          l = w[a][3];
1988      }
1989      if (n <= l) break;
1990      i++;
1991    }
1992    if (w.length < i)
1993      throw new Error(
1994        "Too long data. the CorrectLevel." +
1995          ["M", "L", "H", "Q"][r] +
1996          " limit length is " +
1997          l
1998      );
1999    return (
2000      0 != e.version &&
2001        (i <= e.version
2002          ? (i = e.version)
2003          : console.warn(
2004              "QR Code version " +
2005                e.version +
2006                " too small, run version use " +
2007                i
2008            ),
2009        (e.runVersion = i)),
2010      i
2011    );
2012  }
2013  ((t = function (t, e) {
2014    if (
2015      ((this._htOption = {
2016        width: 256,
2017        height: 256,
2018        typeNumber: 4,
2019        colorDark: "#000000",
2020        colorLight: "#ffffff",
2021        correctLevel: u.H,
2022        dotScale: 1,
2023        dotScaleTiming: 1,
2024        dotScaleTiming_H: h,
2025        dotScaleTiming_V: h,
2026        dotScaleA: 1,
2027        dotScaleAO: h,
2028        dotScaleAI: h,
2029        quietZone: 0,
2030        quietZoneColor: "rgba(0,0,0,0)",
2031        title: "",
2032        titleFont: "normal normal bold 16px Arial",
2033        titleColor: "#000000",
2034        titleBackgroundColor: "#ffffff",
2035        titleHeight: 0,
2036        titleTop: 30,
2037        subTitle: "",
2038        subTitleFont: "normal normal normal 14px Arial",
2039        subTitleColor: "#4F4F4F",
2040        subTitleTop: 60,
2041        logo: h,
2042        logoWidth: h,
2043        logoHeight: h,
2044        logoMaxWidth: h,
2045        logoMaxHeight: h,
2046        logoBackgroundColor: "#ffffff",
2047        logoBackgroundTransparent: !1,
2048        PO: h,
2049        PI: h,
2050        PO_TL: h,
2051        PI_TL: h,
2052        PO_TR: h,
2053        PI_TR: h,
2054        PO_BL: h,
2055        PI_BL: h,
2056        AO: h,
2057        AI: h,
2058        timing: h,
2059        timing_H: h,
2060        timing_V: h,
2061        backgroundImage: h,
2062        backgroundImageAlpha: 1,
2063        autoColor: !1,
2064        autoColorDark: "rgba(0, 0, 0, .6)",
2065        autoColorLight: "rgba(255, 255, 255, .7)",
2066        onRenderingStart: h,
2067        onRenderingEnd: h,
2068        version: 0,
2069        tooltip: !1,
2070        binary: !1,
2071        drawer: "canvas",
2072        crossOrigin: null,
2073        utf8WithoutBOM: !0,
2074      }),
2075      (e = "string" == typeof e ? { text: e } : e))
2076    )
2077      for (var o in e) this._htOption[o] = e[o];
2078    (this._htOption.version < 0 || 40 < this._htOption.version) &&
2079      (console.warn(
2080        "QR Code version '" +
2081          this._htOption.version +
2082          "' is invalidate, reset to 0"
2083      ),
2084      (this._htOption.version = 0)),
2085      (this._htOption.dotScale < 0 || 1 < this._htOption.dotScale) &&
2086        (console.warn(
2087          this._htOption.dotScale +
2088            " , is invalidate, dotScale must greater than 0, less than or equal to 1, now reset to 1. "
2089        ),
2090        (this._htOption.dotScale = 1)),
2091      (this._htOption.dotScaleTiming < 0 ||
2092        1 < this._htOption.dotScaleTiming) &&
2093        (console.warn(
2094          this._htOption.dotScaleTiming +
2095            " , is invalidate, dotScaleTiming must greater than 0, less than or equal to 1, now reset to 1. "
2096        ),
2097        (this._htOption.dotScaleTiming = 1)),
2098      this._htOption.dotScaleTiming_H
2099        ? (this._htOption.dotScaleTiming_H < 0 ||
2100            1 < this._htOption.dotScaleTiming_H) &&
2101          (console.warn(
2102            this._htOption.dotScaleTiming_H +
2103              " , is invalidate, dotScaleTiming_H must greater than 0, less than or equal to 1, now reset to 1. "
2104          ),
2105          (this._htOption.dotScaleTiming_H = 1))
2106        : (this._htOption.dotScaleTiming_H = this._htOption.dotScaleTiming),
2107      this._htOption.dotScaleTiming_V
2108        ? (this._htOption.dotScaleTiming_V < 0 ||
2109            1 < this._htOption.dotScaleTiming_V) &&
2110          (console.warn(
2111            this._htOption.dotScaleTiming_V +
2112              " , is invalidate, dotScaleTiming_V must greater than 0, less than or equal to 1, now reset to 1. "
2113          ),
2114          (this._htOption.dotScaleTiming_V = 1))
2115        : (this._htOption.dotScaleTiming_V = this._htOption.dotScaleTiming),
2116      (this._htOption.dotScaleA < 0 || 1 < this._htOption.dotScaleA) &&
2117        (console.warn(
2118          this._htOption.dotScaleA +
2119            " , is invalidate, dotScaleA must greater than 0, less than or equal to 1, now reset to 1. "
2120        ),
2121        (this._htOption.dotScaleA = 1)),
2122      this._htOption.dotScaleAO
2123        ? (this._htOption.dotScaleAO < 0 || 1 < this._htOption.dotScaleAO) &&
2124          (console.warn(
2125            this._htOption.dotScaleAO +
2126              " , is invalidate, dotScaleAO must greater than 0, less than or equal to 1, now reset to 1. "
2127          ),
2128          (this._htOption.dotScaleAO = 1))
2129        : (this._htOption.dotScaleAO = this._htOption.dotScaleA),
2130      this._htOption.dotScaleAI
2131        ? (this._htOption.dotScaleAI < 0 || 1 < this._htOption.dotScaleAI) &&
2132          (console.warn(
2133            this._htOption.dotScaleAI +
2134              " , is invalidate, dotScaleAI must greater than 0, less than or equal to 1, now reset to 1. "
2135          ),
2136          (this._htOption.dotScaleAI = 1))
2137        : (this._htOption.dotScaleAI = this._htOption.dotScaleA),
2138      (this._htOption.backgroundImageAlpha < 0 ||
2139        1 < this._htOption.backgroundImageAlpha) &&
2140        (console.warn(
2141          this._htOption.backgroundImageAlpha +
2142            " , is invalidate, backgroundImageAlpha must between 0 and 1, now reset to 1. "
2143        ),
2144        (this._htOption.backgroundImageAlpha = 1)),
2145      (this._htOption.height =
2146        this._htOption.height + this._htOption.titleHeight),
2147      "string" == typeof t && (t = document.getElementById(t)),
2148      (this._htOption.drawer &&
2149        ("svg" == this._htOption.drawer ||
2150          "canvas" == this._htOption.drawer)) ||
2151        (this._htOption.drawer = "canvas"),
2152      (this._android = L()),
2153      (this._el = t),
2154      (this._oQRCode = null);
2155    var r = {};
2156    for (o in this._htOption) r[o] = this._htOption[o];
2157    (this._oDrawing = new O(this._el, r)),
2158      this._htOption.text && this.makeCode(this._htOption.text);
2159  }).prototype.makeCode = function (t) {
2160    (this._oQRCode = new l(R(t, this._htOption), this._htOption.correctLevel)),
2161      this._oQRCode.addData(
2162        t,
2163        this._htOption.binary,
2164        this._htOption.utf8WithoutBOM
2165      ),
2166      this._oQRCode.make(),
2167      this._htOption.tooltip && (this._el.title = t),
2168      this._oDrawing.draw(this._oQRCode);
2169  }),
2170    (t.prototype.makeImage = function () {
2171      "function" == typeof this._oDrawing.makeImage &&
2172        (!this._android || 3 <= this._android) &&
2173        this._oDrawing.makeImage();
2174    }),
2175    (t.prototype.clear = function () {
2176      this._oDrawing.remove();
2177    }),
2178    (t.prototype.resize = function (t, e) {
2179      (this._oDrawing._htOption.width = t),
2180        (this._oDrawing._htOption.height = e),
2181        this._oDrawing.draw(this._oQRCode);
2182    }),
2183    (t.prototype.noConflict = function () {
2184      return r.QRCode === this && (r.QRCode = i), t;
2185    }),
2186    (t.CorrectLevel = u),
2187    "function" == typeof define && (define.amd || define.cmd)
2188      ? define([], function () {
2189          return t;
2190        })
2191      : o
2192      ? (((o.exports = t).QRCode = t), (e.QRCode = t))
2193      : (r.QRCode = t);
2194}
2195var version = "2.7.3",
2196  formatVersion = version.replace(/\./g, "_");
2197QRCode(),
2198  removeExpiredLocalStorageItems(),
2199  getQueryParamsAndSaveToLocalStorage(window.location.href),
2200  saveWebReferrer(),
2201  (window.AF_SMART_SCRIPT = {
2202    generateOneLinkURL: function () {
2203      var i,
2204        t =
2205          0 < arguments.length && void 0 !== arguments[0]
2206            ? arguments[0]
2207            : { afParameters: {} },
2208        e = t.oneLinkURL,
2209        o = t.afParameters,
2210        o = (void 0 === o ? {} : o).mediaSource,
2211        r = t.referrerSkipList,
2212        r = void 0 === r ? [] : r,
2213        n = t.urlSkipList,
2214        n = void 0 === n ? [] : n,
2215        a = t.webReferrer;
2216      return isOneLinkURLValid(e) &&
2217        isSkipListsValid({ referrerSkipList: r, urlSkipList: n }) &&
2218        validatedMs(o) &&
2219        ((r = getCurrentURLParams(
2220          aggregateValuesFromParameters(t.afParameters)
2221        )),
2222        (n = validateAndMappedParams(t.afParameters, r)))
2223        ? ((o = _objectSpread2(
2224            { af_js_web: !0, af_ss_ver: window.AF_SMART_SCRIPT.version },
2225            n
2226          )),
2227          (i = e + stringifyParameters(o).replace("&", "?")),
2228          (t = JSON.parse(
2229            localStorage.getItem(LOCAL_STORAGE_VALUES.SS_WEB_REFERRER)
2230          )),
2231          a &&
2232            t &&
2233            isValidUrl(t) &&
2234            ((r = "&".concat(a, "=").concat(t)), (i = "".concat(i).concat(r))),
2235          console.debug("Generated OneLink URL", i),
2236          (window.AF_SMART_SCRIPT.displayQrCode = function (t) {
2237            var e =
2238                1 < arguments.length && void 0 !== arguments[1]
2239                  ? arguments[1]
2240                  : {},
2241              o = e.logo,
2242              o = void 0 === o ? "" : o,
2243              r = e.codeColor,
2244              r = void 0 === r ? "#000" : r;
2245            return i
2246              ? new QRCode(document.getElementById(t), {
2247                  text: ""
2248                    .concat(i, "&af_ss_qr=")
2249                    .concat(e.logo || e.codeColor ? "c" : "true", " "),
2250                  logo: o,
2251                  colorDark: getHexColorAfterValidation(r),
2252                  logoBackgroundTransparent: !0,
2253                  crossOrigin: "anonymous",
2254                  correctLevel: o
2255                    ? QRCode.CorrectLevel.Q
2256                    : QRCode.CorrectLevel.L,
2257                })
2258              : (console.debug("ClickURL is not valid"), null);
2259          }),
2260          createImpressionsLink(i).then(function (e) {
2261            e &&
2262              (window.AF_SMART_SCRIPT.fireImpressionsLink = function () {
2263                var t = new Image(1, 1);
2264                (t.style.display = "none"),
2265                  (t.style.position = "absolute"),
2266                  (t.style.left = "-1px"),
2267                  (t.style.top = "-1px"),
2268                  (t.src = e);
2269              });
2270          }),
2271          { clickURL: i })
2272        : null;
2273    },
2274    generateDirectClickURL: function () {
2275      var t,
2276        e =
2277          0 < arguments.length && void 0 !== arguments[0]
2278            ? arguments[0]
2279            : { afParameters: {}, referrerSkipList: [], urlSkipList: [] },
2280        o = e.afParameters,
2281        o = void 0 === o ? {} : o,
2282        r = e.referrerSkipList,
2283        r = void 0 === r ? [] : r,
2284        i = e.urlSkipList,
2285        i = void 0 === i ? [] : i,
2286        n = e.platform,
2287        a = e.app_id,
2288        s = e.redirectURL,
2289        l = o.mediaSource,
2290        o = o.campaign;
2291      return l
2292        ? o
2293          ? a
2294            ? s
2295              ? ((n = null == n ? void 0 : n.toLowerCase()),
2296                isPlatformValid(n)
2297                  ? "string" != typeof a
2298                    ? (console.error("app_id must be a string"), null)
2299                    : 0 !==
2300                        (null == o || null == (t = o.keys)
2301                          ? void 0
2302                          : t.length) ||
2303                      (null != o && o.defaultValue)
2304                    ? isSkipListsValid({
2305                        referrerSkipList: r,
2306                        urlSkipList: i,
2307                      }) &&
2308                      validatedMs(l) &&
2309                      ((t = getCurrentURLParams(
2310                        aggregateValuesFromParameters(e.afParameters)
2311                      )),
2312                      (r = validateAndMappedParams(e.afParameters, t, !0)))
2313                      ? ((i = _objectSpread2(
2314                          {
2315                            af_js_web: !0,
2316                            af_ss_ver: window.AF_SMART_SCRIPT.version,
2317                          },
2318                          r
2319                        )),
2320                        (e = stringifyParameters(i).replace("&", "?")),
2321                        (t =
2322                          "https://engagements.appsflyer.com/v1.0/c2s/click/app/".concat(
2323                            n
2324                          )),
2325                        ["ios", "android"].includes(n) &&
2326                          (t = "https://app.appsflyer.com"),
2327                        (r = ""
2328                          .concat(t, "/")
2329                          .concat(a)
2330                          .concat(e, "&af_r=")
2331                          .concat(encodeURIComponent(s))),
2332                        ["ios", "android"].includes(n) &&
2333                          (r = r
2334                            .replace("af_media_source", "pid")
2335                            .replace("af_campaign", "c")
2336                            .replace("af_campaign_id", "af_c_id")),
2337                        console.debug("generate Direct Click URL", r),
2338                        delete window.AF_SMART_SCRIPT.displayQrCode,
2339                        delete window.AF_SMART_SCRIPT.fireImpressionsLink,
2340                        { clickURL: r })
2341                      : null
2342                    : (console.error(
2343                        "campaign is missing (default value was not supplied), can't generate URL",
2344                        l
2345                      ),
2346                      null)
2347                  : null)
2348              : (console.error(
2349                  "redirectURL is missing , can't generate URL",
2350                  s
2351                ),
2352                null)
2353            : (console.error("app_id is missing , can't generate URL", a), null)
2354          : (console.error("campaign  is missing , can't generate URL", o),
2355            null)
2356        : (console.error("mediaSource is missing , can't generate URL", l),
2357          null);
2358    },
2359    version: formatVersion,
2360  });

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.