(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [3106],
  {
    78537: (e, t, i) => {
      'use strict';
      i.d(t, { B: () => E });
      const s = [
          ['(', ')'],
          [')', '('],
          ['<', '>'],
          ['>', '<'],
          ['[', ']'],
          [']', '['],
          ['{', '}'],
          ['}', '{'],
          ['«', '»'],
          ['»', '«'],
          ['‹', '›'],
          ['›', '‹'],
          ['⁽', '⁾'],
          ['⁾', '⁽'],
          ['₍', '₎'],
          ['₎', '₍'],
          ['≤', '≥'],
          ['≥', '≤'],
          ['〈', '〉'],
          ['〉', '〈'],
          ['﹙', '﹚'],
          ['﹚', '﹙'],
          ['﹛', '﹜'],
          ['﹜', '﹛'],
          ['﹝', '﹞'],
          ['﹞', '﹝'],
          ['﹤', '﹥'],
          ['﹥', '﹤'],
        ],
        r = ['آ', 'أ', 'إ', 'ا'],
        n = ['ﻵ', 'ﻷ', 'ﻹ', 'ﻻ'],
        o = ['ﻶ', 'ﻸ', 'ﻺ', 'ﻼ'],
        l = [
          'ا',
          'ب',
          'ت',
          'ث',
          'ج',
          'ح',
          'خ',
          'د',
          'ذ',
          'ر',
          'ز',
          'س',
          'ش',
          'ص',
          'ض',
          'ط',
          'ظ',
          'ع',
          'غ',
          'ف',
          'ق',
          'ك',
          'ل',
          'م',
          'ن',
          'ه',
          'و',
          'ي',
          'إ',
          'أ',
          'آ',
          'ة',
          'ى',
          'ل',
          'م',
          'ن',
          'ه',
          'و',
          'ي',
          'إ',
          'أ',
          'آ',
          'ة',
          'ى',
          'ی',
          'ئ',
          'ؤ',
        ],
        a = [
          'ﺍ',
          'ﺏ',
          'ﺕ',
          'ﺙ',
          'ﺝ',
          'ﺡ',
          'ﺥ',
          'ﺩ',
          'ﺫ',
          'ﺭ',
          'ﺯ',
          'ﺱ',
          'ﺵ',
          'ﺹ',
          'ﺽ',
          'ﻁ',
          'ﻅ',
          'ﻉ',
          'ﻍ',
          'ﻑ',
          'ﻕ',
          'ﻙ',
          'ﻝ',
          'ﻡ',
          'ﻥ',
          'ﻩ',
          'ﻭ',
          'ﻱ',
          'ﺇ',
          'ﺃ',
          'ﺁ',
          'ﺓ',
          'ﻯ',
          'ﯼ',
          'ﺉ',
          'ﺅ',
          'ﹰ',
          'ﹲ',
          'ﹴ',
          'ﹶ',
          'ﹸ',
          'ﹺ',
          'ﹼ',
          'ﹾ',
          'ﺀ',
          'ﺉ',
          'ﺅ',
        ],
        h = [
          'ﺎ',
          'ﺐ',
          'ﺖ',
          'ﺚ',
          'ﺞ',
          'ﺢ',
          'ﺦ',
          'ﺪ',
          'ﺬ',
          'ﺮ',
          'ﺰ',
          'ﺲ',
          'ﺶ',
          'ﺺ',
          'ﺾ',
          'ﻂ',
          'ﻆ',
          'ﻊ',
          'ﻎ',
          'ﻒ',
          'ﻖ',
          'ﻚ',
          'ﻞ',
          'ﻢ',
          'ﻦ',
          'ﻪ',
          'ﻮ',
          'ﻲ',
          'ﺈ',
          'ﺄ',
          'ﺂ',
          'ﺔ',
          'ﻰ',
          'ﯽ',
          'ﺊ',
          'ﺆ',
          'ﹰ',
          'ﹲ',
          'ﹴ',
          'ﹶ',
          'ﹸ',
          'ﹺ',
          'ﹼ',
          'ﹾ',
          'ﺀ',
          'ﺊ',
          'ﺆ',
        ],
        u = [
          'ﺎ',
          'ﺒ',
          'ﺘ',
          'ﺜ',
          'ﺠ',
          'ﺤ',
          'ﺨ',
          'ﺪ',
          'ﺬ',
          'ﺮ',
          'ﺰ',
          'ﺴ',
          'ﺸ',
          'ﺼ',
          'ﻀ',
          'ﻄ',
          'ﻈ',
          'ﻌ',
          'ﻐ',
          'ﻔ',
          'ﻘ',
          'ﻜ',
          'ﻠ',
          'ﻤ',
          'ﻨ',
          'ﻬ',
          'ﻮ',
          'ﻴ',
          'ﺈ',
          'ﺄ',
          'ﺂ',
          'ﺔ',
          'ﻰ',
          'ﯿ',
          'ﺌ',
          'ﺆ',
          'ﹱ',
          'ﹲ',
          'ﹴ',
          'ﹷ',
          'ﹹ',
          'ﹻ',
          'ﹽ',
          'ﹿ',
          'ﺀ',
          'ﺌ',
          'ﺆ',
        ],
        c = [
          'ﺍ',
          'ﺑ',
          'ﺗ',
          'ﺛ',
          'ﺟ',
          'ﺣ',
          'ﺧ',
          'ﺩ',
          'ﺫ',
          'ﺭ',
          'ﺯ',
          'ﺳ',
          'ﺷ',
          'ﺻ',
          'ﺿ',
          'ﻃ',
          'ﻇ',
          'ﻋ',
          'ﻏ',
          'ﻓ',
          'ﻗ',
          'ﻛ',
          'ﻟ',
          'ﻣ',
          'ﻧ',
          'ﻫ',
          'ﻭ',
          'ﻳ',
          'ﺇ',
          'ﺃ',
          'ﺁ',
          'ﺓ',
          'ﻯ',
          'ﯾ',
          'ﺋ',
          'ﺅ',
          'ﹰ',
          'ﹲ',
          'ﹴ',
          'ﹶ',
          'ﹸ',
          'ﹺ',
          'ﹼ',
          'ﹾ',
          'ﺀ',
          'ﺋ',
          'ﺅ',
        ],
        x = ['ء', 'آ', 'أ', 'ؤ', 'إ', 'ا', 'ة', 'د', 'ذ', 'ر', 'ز', 'و', 'ى'],
        g = [
          'ً',
          'ً',
          'ٌ',
          '؟',
          'ٍ',
          '؟',
          'َ',
          'َ',
          'ُ',
          'ُ',
          'ِ',
          'ِ',
          'ّ',
          'ّ',
          'ْ',
          'ْ',
          'ء',
          'آ',
          'آ',
          'أ',
          'أ',
          'ؤ',
          'ؤ',
          'إ',
          'إ',
          'ئ',
          'ئ',
          'ئ',
          'ئ',
          'ا',
          'ا',
          'ب',
          'ب',
          'ب',
          'ب',
          'ة',
          'ة',
          'ت',
          'ت',
          'ت',
          'ت',
          'ث',
          'ث',
          'ث',
          'ث',
          'ج',
          'ج',
          'ج',
          'ج',
          'ح',
          'ح',
          'ح',
          'ح',
          'خ',
          'خ',
          'خ',
          'خ',
          'د',
          'د',
          'ذ',
          'ذ',
          'ر',
          'ر',
          'ز',
          'ز',
          'س',
          'س',
          'س',
          'س',
          'ش',
          'ش',
          'ش',
          'ش',
          'ص',
          'ص',
          'ص',
          'ص',
          'ض',
          'ض',
          'ض',
          'ض',
          'ط',
          'ط',
          'ط',
          'ط',
          'ظ',
          'ظ',
          'ظ',
          'ظ',
          'ع',
          'ع',
          'ع',
          'ع',
          'غ',
          'غ',
          'غ',
          'غ',
          'ف',
          'ف',
          'ف',
          'ف',
          'ق',
          'ق',
          'ق',
          'ق',
          'ك',
          'ك',
          'ك',
          'ك',
          'ل',
          'ل',
          'ل',
          'ل',
          'م',
          'م',
          'م',
          'م',
          'ن',
          'ن',
          'ن',
          'ن',
          'ه',
          'ه',
          'ه',
          'ه',
          'و',
          'و',
          'ى',
          'ى',
          'ي',
          'ي',
          'ي',
          'ي',
          'ﻵ',
          'ﻶ',
          'ﻷ',
          'ﻸ',
          'ﻹ',
          'ﻺ',
          'ﻻ',
          'ﻼ',
          '؟',
          '؟',
          '؟',
        ],
        _ = ['ء', 'ف'],
        d = ['غ', 'ي'],
        p = [
          [0, 3, 0, 1, 0, 0, 0],
          [0, 3, 0, 1, 2, 2, 0],
          [0, 3, 0, 17, 2, 0, 1],
          [0, 3, 5, 5, 4, 1, 0],
          [0, 3, 21, 21, 4, 0, 1],
          [0, 3, 5, 5, 4, 2, 0],
        ],
        m = [
          [2, 0, 1, 1, 0, 1, 0],
          [2, 0, 1, 1, 0, 2, 0],
          [2, 0, 2, 1, 3, 2, 0],
          [2, 0, 2, 33, 3, 1, 1],
        ],
        y = [
          'UBAT_L',
          'UBAT_R',
          'UBAT_EN',
          'UBAT_AN',
          'UBAT_ON',
          'UBAT_B',
          'UBAT_S',
          'UBAT_AL',
          'UBAT_WS',
          'UBAT_CS',
          'UBAT_ES',
          'UBAT_ET',
          'UBAT_NSM',
          'UBAT_LRE',
          'UBAT_RLE',
          'UBAT_PDF',
          'UBAT_LRO',
          'UBAT_RLO',
          'UBAT_BN',
        ],
        f = [
          100,
          0,
          0,
          0,
          0,
          101,
          102,
          103,
          1,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          104,
          4,
          4,
          4,
          0,
          4,
          0,
          4,
          0,
          4,
          4,
          4,
          0,
          0,
          4,
          4,
          0,
          0,
          0,
          0,
          0,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          0,
          0,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          0,
          0,
          4,
          4,
          0,
          0,
          4,
          4,
          0,
          0,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          4,
          0,
          0,
          0,
          105,
          7,
          7,
          106,
          107,
        ],
        v = [
          [
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            6,
            5,
            6,
            8,
            5,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            5,
            5,
            5,
            6,
            8,
            4,
            4,
            11,
            11,
            11,
            4,
            4,
            4,
            4,
            4,
            10,
            9,
            10,
            9,
            9,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            9,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            18,
            18,
            18,
            18,
            18,
            18,
            5,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            18,
            9,
            4,
            11,
            11,
            11,
            11,
            4,
            4,
            4,
            4,
            0,
            4,
            4,
            18,
            4,
            4,
            11,
            11,
            2,
            2,
            4,
            0,
            4,
            4,
            4,
            2,
            0,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
          ],
          [
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            0,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            1,
            12,
            1,
            12,
            12,
            1,
            12,
            12,
            1,
            12,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            4,
            4,
            4,
            4,
            4,
            1,
            1,
            1,
            1,
            1,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
          ],
          [
            3,
            3,
            3,
            3,
            4,
            4,
            4,
            4,
            7,
            11,
            11,
            7,
            9,
            7,
            4,
            4,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            7,
            4,
            4,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            3,
            3,
            3,
            3,
            3,
            3,
            3,
            3,
            3,
            3,
            11,
            3,
            3,
            7,
            7,
            7,
            12,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            3,
            4,
            12,
            12,
            12,
            12,
            12,
            12,
            7,
            7,
            12,
            12,
            4,
            12,
            12,
            12,
            12,
            7,
            7,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            7,
            7,
            7,
            7,
            7,
            7,
          ],
          [
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            4,
            7,
            7,
            12,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            4,
            4,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            7,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            1,
            1,
            4,
            4,
            4,
            4,
            1,
            4,
            4,
            4,
            4,
            4,
          ],
          [
            8,
            8,
            8,
            8,
            8,
            8,
            8,
            8,
            8,
            8,
            8,
            18,
            18,
            18,
            0,
            1,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            8,
            5,
            13,
            14,
            15,
            16,
            17,
            9,
            11,
            11,
            11,
            11,
            11,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            9,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            8,
            18,
            18,
            18,
            18,
            18,
            4,
            4,
            4,
            4,
            4,
            18,
            18,
            18,
            18,
            18,
            18,
            2,
            0,
            4,
            4,
            2,
            2,
            2,
            2,
            2,
            2,
            10,
            10,
            4,
            4,
            4,
            0,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            10,
            10,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            11,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
          ],
          [
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            4,
            1,
            12,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            10,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            4,
            1,
            1,
            1,
            1,
            1,
            4,
            1,
            4,
            1,
            1,
            4,
            1,
            1,
            4,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
          ],
          [
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            12,
            12,
            12,
            12,
            12,
            12,
            12,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            9,
            4,
            9,
            4,
            4,
            9,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            11,
            4,
            4,
            10,
            10,
            4,
            4,
            4,
            4,
            4,
            11,
            11,
            4,
            4,
            4,
            4,
            4,
            7,
            7,
            7,
            7,
            7,
            4,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            7,
            4,
            4,
            18,
          ],
          [
            4,
            4,
            4,
            11,
            11,
            11,
            4,
            4,
            4,
            4,
            4,
            10,
            9,
            10,
            9,
            9,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            9,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            0,
            0,
            0,
            4,
            4,
            4,
            11,
            11,
            4,
            4,
            4,
            11,
            11,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
            4,
          ],
        ];
      class E {
        constructor() {
          (this.inputFormat = 'ILYNN'),
            (this.outputFormat = 'VLNNN'),
            (this.sourceToTarget = []),
            (this.targetToSource = []),
            (this.levels = []);
        }
        bidiTransform(e, t, i) {
          if (((this.sourceToTarget = []), (this.targetToSource = []), !e)) return '';
          if (
            ((function (e, t, i) {
              (H = []), (W = []);
              for (let s = 0; s < i; s++) (e[s] = s), (t[s] = s), (H[s] = s);
            })(this.sourceToTarget, this.targetToSource, e.length),
            !this.checkParameters(t, i))
          )
            return e;
          (t = this.inputFormat), (i = this.outputFormat);
          let s = e;
          const l = Z,
            u = M(t.charAt(1)),
            x = M(i.charAt(1)),
            _ = ('I' === t.charAt(0) ? 'L' : t.charAt(0)) + u,
            d = ('I' === i.charAt(0) ? 'L' : i.charAt(0)) + x,
            p = t.charAt(2) + i.charAt(2);
          (l.defInFormat = _), (l.defOutFormat = d), (l.defSwap = p);
          const m = T(e, _, d, p, l);
          let y = !1;
          return (
            'R' === i.charAt(1)
              ? (y = !0)
              : ('C' !== i.charAt(1) && 'D' !== i.charAt(1)) ||
                (y = 'rtl' === this.checkContextual(m)),
            (this.sourceToTarget = H),
            (this.targetToSource = (function (e) {
              const t = new Array(e.length);
              for (let i = 0; i < e.length; i++) t[e[i]] = i;
              return t;
            })(this.sourceToTarget)),
            (z = this.targetToSource),
            (s =
              t.charAt(3) === i.charAt(3)
                ? m
                : 'S' === i.charAt(3)
                ? (function (e, t, i) {
                    if (0 === t.length) return '';
                    void 0 === e && (e = !0), void 0 === i && (i = !0);
                    const s = (t = String(t)).split('');
                    let r = 0,
                      l = 1,
                      u = s.length;
                    e || ((r = s.length - 1), (l = -1), (u = 1));
                    const x = (function (e, t, i, s, r) {
                      let l = 0;
                      const u = [];
                      let x = 0;
                      for (let g = t; g * i < s; g += i)
                        if (R(e[g]) || F(e[g])) {
                          if ('ل' === e[g] && A(e, g + i, i, s)) {
                            (e[g] = V(e[g + i], 0 === l ? n : o)),
                              (g += i),
                              B(e, g, i, s),
                              r && ((u[x] = g), x++),
                              (l = 0);
                            continue;
                          }
                          const t = e[g];
                          1 === l
                            ? (e[g] = b(e, g + i, i, s) ? C(e[g]) : P(e[g], h))
                            : !0 === b(e, g + i, i, s)
                            ? (e[g] = P(e[g], c))
                            : (e[g] = P(e[g], a)),
                            F(t) || (l = 1),
                            !0 === k(t) && (l = 0);
                        } else l = 0;
                      return u;
                    })(s, r, l, u, i);
                    let g = '';
                    for (let t = 0; t < s.length; t++)
                      i && G(x, x.length, t) > -1 ? (q(z, t, !e, -1), H.splice(t, 1)) : (g += s[t]);
                    return g;
                  })(y, m, !0)
                : (function (e, t, i) {
                    if (0 === e.length) return '';
                    void 0 === i && (i = !0), void 0 === t && (t = !0);
                    let s = '';
                    const n = (e = String(e)).split('');
                    for (let o = 0; o < e.length; o++) {
                      let l = !1;
                      if (n[o] >= 'ﹰ' && n[o] < '\ufeff') {
                        const a = e.charCodeAt(o);
                        n[o] >= 'ﻵ' && n[o] <= 'ﻼ'
                          ? (t
                              ? (o > 0 && i && ' ' === n[o - 1]
                                  ? (s = s.substring(0, s.length - 1) + 'ل')
                                  : ((s += 'ل'), (l = !0)),
                                (s += r[(a - 65269) / 2]))
                              : ((s += r[(a - 65269) / 2]),
                                (s += 'ل'),
                                o + 1 < e.length && i && ' ' === n[o + 1] ? o++ : (l = !0)),
                            l && (q(z, o, !0, 1), H.splice(o, 0, H[o])))
                          : (s += g[a - 65136]);
                      } else s += n[o];
                    }
                    return s;
                  })(m, y, !0)),
            (this.sourceToTarget = H),
            (this.targetToSource = z),
            (this.levels = W),
            s
          );
        }
        _inputFormatSetter(e) {
          if (!K.test(e))
            throw new Error('dojox/string/BidiEngine: the bidi layout string is wrong!');
          this.inputFormat = e;
        }
        _outputFormatSetter(e) {
          if (!K.test(e))
            throw new Error('dojox/string/BidiEngine: the bidi layout string is wrong!');
          this.outputFormat = e;
        }
        checkParameters(e, t) {
          return (
            e ? this._inputFormatSetter(e) : (e = this.inputFormat),
            t ? this._outputFormatSetter(t) : (t = this.outputFormat),
            e !== t
          );
        }
        checkContextual(e) {
          let t = N(e);
          if ('ltr' !== t && 'rtl' !== t) {
            try {
              t = document.dir.toLowerCase();
            } catch (e) {}
            'ltr' !== t && 'rtl' !== t && (t = 'ltr');
          }
          return t;
        }
        hasBidiChar(e) {
          return J.test(e);
        }
      }
      function T(e, t, i, s, r) {
        const n = (function (e, t, i) {
          if (
            (void 0 === t.inFormat && (t.inFormat = i.defInFormat),
            void 0 === t.outFormat && (t.outFormat = i.defOutFormat),
            void 0 === t.swap && (t.swap = i.defSwap),
            t.inFormat === t.outFormat)
          )
            return t;
          const s = t.inFormat.substring(0, 1),
            r = t.outFormat.substring(0, 1);
          let n,
            o = t.inFormat.substring(1, 4),
            l = t.outFormat.substring(1, 4);
          return (
            'C' === o.charAt(0) &&
              ((n = N(e)),
              (o =
                'ltr' === n || 'rtl' === n
                  ? n.toUpperCase()
                  : 'L' === t.inFormat.charAt(2)
                  ? 'LTR'
                  : 'RTL'),
              (t.inFormat = s + o)),
            'C' === l.charAt(0) &&
              ((n = N(e)),
              'rtl' === n
                ? (l = 'RTL')
                : 'ltr' === n
                ? ((n = (function (e) {
                    const t = e.split('');
                    return t.reverse(), N(t.join(''));
                  })(e)),
                  (l = n.toUpperCase()))
                : (l = 'L' === t.outFormat.charAt(2) ? 'LTR' : 'RTL'),
              (t.outFormat = r + l)),
            t
          );
        })(e, { inFormat: t, outFormat: i, swap: s }, r);
        if (n.inFormat === n.outFormat) return e;
        (t = n.inFormat), (i = n.outFormat), (s = n.swap);
        const o = t.substring(0, 1),
          l = t.substring(1, 4),
          a = i.substring(0, 1),
          h = i.substring(1, 4);
        if (((r.inFormat = t), (r.outFormat = i), (r.swap = s), 'L' === o && 'VLTR' === i)) {
          if ('LTR' === l) return (r.dir = X), w(e, r);
          if ('RTL' === l) return (r.dir = j), w(e, r);
        }
        if ('V' === o && 'V' === a) return (r.dir = 'RTL' === l ? j : X), U(e, r);
        if ('L' === o && 'VRTL' === i)
          return 'LTR' === l ? ((r.dir = X), (e = w(e, r))) : ((r.dir = j), (e = w(e, r))), U(e);
        if ('VLTR' === t && 'LLTR' === i) return (r.dir = X), w(e, r);
        if ('V' === o && 'L' === a && l !== h)
          return (e = U(e)), 'RTL' === l ? T(e, 'LLTR', 'VLTR', s, r) : T(e, 'LRTL', 'VRTL', s, r);
        if ('VRTL' === t && 'LRTL' === i) return T(e, 'LRTL', 'VRTL', s, r);
        if ('L' === o && 'L' === a) {
          const t = r.swap;
          return (
            (r.swap = t.substr(0, 1) + 'N'),
            'RTL' === l
              ? ((r.dir = j),
                (e = w(e, r)),
                (r.swap = 'N' + t.substr(1, 2)),
                (r.dir = X),
                (e = w(e, r)))
              : ((r.dir = X),
                (e = w(e, r)),
                (r.swap = 'N' + t.substr(1, 2)),
                (e = T(e, 'VLTR', 'LRTL', r.swap, r))),
            e
          );
        }
        return e;
      }
      function N(e) {
        const t = /[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(
          e,
        );
        return t ? (t[0] <= 'z' ? 'ltr' : 'rtl') : '';
      }
      function w(e, t) {
        const i = e.split(''),
          s = [];
        return (
          S(i, s, t),
          (function (e, t, i) {
            if (0 !== i.hiLevel && i.swap.substr(0, 1) !== i.swap.substr(1, 2))
              for (let i = 0; i < e.length; i++) 1 === t[i] && (e[i] = D(e[i]));
          })(i, s, t),
          I(2, i, s, t),
          I(1, i, s, t),
          (W = s),
          i.join('')
        );
      }
      function S(e, t, i) {
        const s = e.length,
          r = i.dir ? m : p;
        let n = 0,
          o = -1;
        const l = [],
          a = [];
        (i.hiLevel = i.dir),
          (i.lastArabic = !1),
          (i.hasUbatAl = !1),
          (i.hasUbatB = !1),
          (i.hasUbatS = !1);
        for (let t = 0; t < s; t++) l[t] = L(e[t]);
        for (let h = 0; h < s; h++) {
          const s = n,
            u = O(e, l, a, h, i);
          (a[h] = u), (n = r[s][u]);
          const c = 240 & n;
          n &= 15;
          const x = r[n][Q];
          if (((t[h] = x), c > 0))
            if (16 === c) {
              for (let e = o; e < h; e++) t[e] = 1;
              o = -1;
            } else o = -1;
          if (r[n][Y]) -1 === o && (o = h);
          else if (o > -1) {
            for (let e = o; e < h; e++) t[e] = x;
            o = -1;
          }
          5 === l[h] && (t[h] = 0), (i.hiLevel |= x);
        }
        i.hasUbatS &&
          (function (e, t, i, s) {
            for (let r = 0; r < i; r++)
              if (6 === e[r]) {
                t[r] = s.dir;
                for (let i = r - 1; i >= 0 && 8 === e[i]; i--) t[i] = s.dir;
              }
          })(l, t, s, i);
      }
      function L(e) {
        const t = e.charCodeAt(0),
          i = f[t >> 8];
        return i < 100 ? i : v[i - 100][255 & t];
      }
      function U(e, t) {
        const i = e.split('');
        if (t) {
          const e = [];
          S(i, e, t), (W = e);
        }
        return i.reverse(), H.reverse(), i.join('');
      }
      function G(e, t, i) {
        for (let s = 0; s < t; s++) if (e[s] === i) return s;
        return -1;
      }
      function R(e) {
        for (let t = 0; t < _.length; t++) if (e >= _[t] && e <= d[t]) return !0;
        return !1;
      }
      function b(e, t, i, s) {
        for (; t * i < s && F(e[t]); ) t += i;
        return !!(t * i < s && R(e[t]));
      }
      function A(e, t, i, s) {
        for (; t * i < s && F(e[t]); ) t += i;
        let n = ' ';
        if (!(t * i < s)) return !1;
        n = e[t];
        for (let e = 0; e < r.length; e++) if (r[e] === n) return !0;
        return !1;
      }
      function I(e, t, i, s) {
        if (s.hiLevel < e) return;
        if (1 === e && s.dir === j && !s.hasUbatB) return t.reverse(), void H.reverse();
        const r = t.length;
        let n,
          o,
          l,
          a,
          h,
          u = 0;
        for (; u < r; ) {
          if (i[u] >= e) {
            for (n = u + 1; n < r && i[n] >= e; ) n++;
            for (o = u, l = n - 1; o < l; o++, l--)
              (a = t[o]), (t[o] = t[l]), (t[l] = a), (h = H[o]), (H[o] = H[l]), (H[l] = h);
            u = n;
          }
          u++;
        }
      }
      function O(e, t, i, s, r) {
        const n = t[s];
        return {
          UBAT_L: () => ((r.lastArabic = !1), 0),
          UBAT_R: () => ((r.lastArabic = !1), 1),
          UBAT_ON: () => 4,
          UBAT_AN: () => 3,
          UBAT_EN: () => (r.lastArabic ? 3 : 2),
          UBAT_AL: () => ((r.lastArabic = !0), (r.hasUbatAl = !0), 1),
          UBAT_WS: () => 4,
          UBAT_CS: () => {
            let e, n;
            return s < 1 ||
              s + 1 >= t.length ||
              (2 !== (e = i[s - 1]) && 3 !== e) ||
              (2 !== (n = t[s + 1]) && 3 !== n)
              ? 4
              : (r.lastArabic && (n = 3), n === e ? n : 4);
          },
          UBAT_ES: () =>
            2 === (s > 0 ? i[s - 1] : 5) && s + 1 < t.length && 2 === t[s + 1] ? 2 : 4,
          UBAT_ET: () => {
            if (s > 0 && 2 === i[s - 1]) return 2;
            if (r.lastArabic) return 4;
            let e = s + 1;
            const n = t.length;
            for (; e < n && 11 === t[e]; ) e++;
            return e < n && 2 === t[e] ? 2 : 4;
          },
          UBAT_NSM: () => {
            if ('VLTR' === r.inFormat) {
              const i = t.length;
              let r = s + 1;
              for (; r < i && 12 === t[r]; ) r++;
              if (r < i) {
                const i = e[s].charCodeAt[0],
                  n = (i >= 1425 && i <= 2303) || 64286 === i,
                  o = t[r];
                if (n && (1 === o || 7 === o)) return 1;
              }
            }
            return s < 1 || 5 === t[s - 1] ? 4 : i[s - 1];
          },
          UBAT_B: () => ((r.lastArabic = !0), (r.hasUbatB = !0), r.dir),
          UBAT_S: () => ((r.hasUbatS = !0), 4),
          UBAT_LRE: () => ((r.lastArabic = !1), 4),
          UBAT_RLE: () => ((r.lastArabic = !1), 4),
          UBAT_LRO: () => ((r.lastArabic = !1), 4),
          UBAT_RLO: () => ((r.lastArabic = !1), 4),
          UBAT_PDF: () => ((r.lastArabic = !1), 4),
          UBAT_BN: () => 4,
        }[y[n]]();
      }
      function D(e) {
        let t,
          i = 0,
          r = s.length - 1;
        for (; i <= r; )
          if (((t = Math.floor((i + r) / 2)), e < s[t][0])) r = t - 1;
          else {
            if (!(e > s[t][0])) return s[t][1];
            i = t + 1;
          }
        return e;
      }
      function k(e) {
        for (let t = 0; t < x.length; t++) if (x[t] === e) return !0;
        return !1;
      }
      function C(e) {
        for (let t = 0; t < l.length; t++) if (e === l[t]) return u[t];
        return e;
      }
      function P(e, t) {
        for (let i = 0; i < l.length; i++) if (e === l[i]) return t[i];
        return e;
      }
      function F(e) {
        return e >= 'ً' && e <= 'ٕ';
      }
      function M(e) {
        return 'L' === e ? 'LTR' : 'R' === e ? 'RTL' : 'C' === e ? 'CLR' : 'D' === e ? 'CRL' : '';
      }
      function B(e, t, i, s) {
        for (; t * i < s && F(e[t]); ) t += i;
        return t * i < s && ((e[t] = ' '), !0);
      }
      function V(e, t) {
        for (let i = 0; i < r.length; i++) if (e === r[i]) return t[i];
        return e;
      }
      function q(e, t, i, s) {
        for (let r = 0; r < e.length; r++) (e[r] > t || (!i && e[r] === t)) && (e[r] += s);
      }
      let H = [],
        z = [],
        W = [];
      const Z = {
          dir: 0,
          defInFormat: 'LLTR',
          defoutFormat: 'VLTR',
          defSwap: 'YN',
          inFormat: 'LLTR',
          outFormat: 'VLTR',
          swap: 'YN',
          hiLevel: 0,
          lastArabic: !1,
          hasUbatAl: !1,
          hasBlockSep: !1,
          hasSegSep: !1,
          defOutFormat: '',
        },
        Q = 5,
        Y = 6,
        X = 0,
        j = 1,
        K = /^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,
        J = /[\u0591-\u06ff\ufb1d-\ufefc]/;
    },
    66992: (e, t, i) => {
      'use strict';
      i.d(t, { b: () => l, d: () => o, r: () => n });
      const s = 128 / Math.PI;
      function r(e, t) {
        return (e %= t) >= 0 ? e : e + t;
      }
      function n(e) {
        return r(e * s, 256);
      }
      function o(e) {
        return r(0.7111111111111111 * e, 256);
      }
      function l(e, t, i) {
        return (e >= t && e <= i) || (e >= i && e <= t);
      }
      Math.LN2;
    },
    20369: (e, t, i) => {
      'use strict';
      i.d(t, { R: () => s });
      class s {
        constructor(e = 0, t = 0, i = 0, s = 0) {
          (this.x = e), (this.y = t), (this.width = i), (this.height = s);
        }
        get isEmpty() {
          return this.width <= 0 || this.height <= 0;
        }
        union(e) {
          (this.x = Math.min(this.x, e.x)),
            (this.y = Math.min(this.y, e.y)),
            (this.width = Math.max(this.width, e.width)),
            (this.height = Math.max(this.height, e.height));
        }
      }
    },
    19484: (e, t, i) => {
      'use strict';
      i.d(t, { P: () => o, S: () => d, T: () => x, a: () => _ });
      var s = i(92143),
        r = i(82356),
        n = i(66992);
      class o {
        constructor(e, t) {
          (this.x = e), (this.y = t);
        }
        clone() {
          return new o(this.x, this.y);
        }
        equals(e, t) {
          return e === this.x && t === this.y;
        }
        isEqual(e) {
          return e.x === this.x && e.y === this.y;
        }
        setCoords(e, t) {
          (this.x = e), (this.y = t);
        }
        normalize() {
          const e = this.x,
            t = this.y,
            i = Math.sqrt(e * e + t * t);
          (this.x /= i), (this.y /= i);
        }
        rightPerpendicular() {
          const e = this.x;
          (this.x = this.y), (this.y = -e);
        }
        move(e, t) {
          (this.x += e), (this.y += t);
        }
        assign(e) {
          (this.x = e.x), (this.y = e.y);
        }
        assignAdd(e, t) {
          (this.x = e.x + t.x), (this.y = e.y + t.y);
        }
        assignSub(e, t) {
          (this.x = e.x - t.x), (this.y = e.y - t.y);
        }
        rotate(e, t) {
          const i = this.x,
            s = this.y;
          (this.x = i * e - s * t), (this.y = i * t + s * e);
        }
        scale(e) {
          (this.x *= e), (this.y *= e);
        }
        length() {
          const e = this.x,
            t = this.y;
          return Math.sqrt(e * e + t * t);
        }
        static distance(e, t) {
          const i = t.x - e.x,
            s = t.y - e.y;
          return Math.sqrt(i * i + s * s);
        }
        static add(e, t) {
          return new o(e.x + t.x, e.y + t.y);
        }
        static sub(e, t) {
          return new o(e.x - t.x, e.y - t.y);
        }
      }
      var l,
        a,
        h,
        u = { exports: {} };
      (l = u),
        void 0 !==
          (((h = {
            DEBUG: !1,
            assert: function (e, t) {
              if (h.DEBUG && !e) throw new Error('Assertion failed' + (t ? ': ' + t : ''));
            },
            GLU_TESS_MAX_COORD: 1e150,
            TRUE_PROJECT: !1,
            GLU_TESS_DEFAULT_TOLERANCE: 0,
            windingRule: {
              GLU_TESS_WINDING_ODD: 100130,
              GLU_TESS_WINDING_NONZERO: 100131,
              GLU_TESS_WINDING_POSITIVE: 100132,
              GLU_TESS_WINDING_NEGATIVE: 100133,
              GLU_TESS_WINDING_ABS_GEQ_TWO: 100134,
            },
            primitiveType: {
              GL_LINE_LOOP: 2,
              GL_TRIANGLES: 4,
              GL_TRIANGLE_STRIP: 5,
              GL_TRIANGLE_FAN: 6,
            },
            errorType: {
              GLU_TESS_MISSING_BEGIN_POLYGON: 100151,
              GLU_TESS_MISSING_END_POLYGON: 100153,
              GLU_TESS_MISSING_BEGIN_CONTOUR: 100152,
              GLU_TESS_MISSING_END_CONTOUR: 100154,
              GLU_TESS_COORD_TOO_LARGE: 100155,
              GLU_TESS_NEED_COMBINE_CALLBACK: 100156,
            },
            gluEnum: {
              GLU_TESS_BEGIN: 100100,
              GLU_TESS_VERTEX: 100101,
              GLU_TESS_END: 100102,
              GLU_TESS_ERROR: 100103,
              GLU_TESS_EDGE_FLAG: 100104,
              GLU_TESS_COMBINE: 100105,
              GLU_TESS_BEGIN_DATA: 100106,
              GLU_TESS_VERTEX_DATA: 100107,
              GLU_TESS_END_DATA: 100108,
              GLU_TESS_ERROR_DATA: 100109,
              GLU_TESS_EDGE_FLAG_DATA: 100110,
              GLU_TESS_COMBINE_DATA: 100111,
              GLU_TESS_MESH: 100112,
              GLU_TESS_TOLERANCE: 100142,
              GLU_TESS_WINDING_RULE: 100140,
              GLU_TESS_BOUNDARY_ONLY: 100141,
              GLU_INVALID_ENUM: 100900,
              GLU_INVALID_VALUE: 100901,
            },
            geom: {},
          }).geom.vertEq = function (e, t) {
            return e.s === t.s && e.t === t.t;
          }),
          (h.geom.vertLeq = function (e, t) {
            return e.s < t.s || (e.s === t.s && e.t <= t.t);
          }),
          (h.geom.edgeEval = function (e, t, i) {
            h.assert(h.geom.vertLeq(e, t) && h.geom.vertLeq(t, i));
            var s = t.s - e.s,
              r = i.s - t.s;
            return s + r > 0
              ? s < r
                ? t.t - e.t + (e.t - i.t) * (s / (s + r))
                : t.t - i.t + (i.t - e.t) * (r / (s + r))
              : 0;
          }),
          (h.geom.edgeSign = function (e, t, i) {
            h.assert(h.geom.vertLeq(e, t) && h.geom.vertLeq(t, i));
            var s = t.s - e.s,
              r = i.s - t.s;
            return s + r > 0 ? (t.t - i.t) * s + (t.t - e.t) * r : 0;
          }),
          (h.geom.transLeq = function (e, t) {
            return e.t < t.t || (e.t === t.t && e.s <= t.s);
          }),
          (h.geom.transEval = function (e, t, i) {
            h.assert(h.geom.transLeq(e, t) && h.geom.transLeq(t, i));
            var s = t.t - e.t,
              r = i.t - t.t;
            return s + r > 0
              ? s < r
                ? t.s - e.s + (e.s - i.s) * (s / (s + r))
                : t.s - i.s + (i.s - e.s) * (r / (s + r))
              : 0;
          }),
          (h.geom.transSign = function (e, t, i) {
            h.assert(h.geom.transLeq(e, t) && h.geom.transLeq(t, i));
            var s = t.t - e.t,
              r = i.t - t.t;
            return s + r > 0 ? (t.s - i.s) * s + (t.s - e.s) * r : 0;
          }),
          (h.geom.edgeGoesLeft = function (e) {
            return h.geom.vertLeq(e.dst(), e.org);
          }),
          (h.geom.edgeGoesRight = function (e) {
            return h.geom.vertLeq(e.org, e.dst());
          }),
          (h.geom.vertL1dist = function (e, t) {
            return Math.abs(e.s - t.s) + Math.abs(e.t - t.t);
          }),
          (h.geom.vertCCW = function (e, t, i) {
            return e.s * (t.t - i.t) + t.s * (i.t - e.t) + i.s * (e.t - t.t) >= 0;
          }),
          (h.geom.interpolate_ = function (e, t, i, s) {
            return (e = e < 0 ? 0 : e) <= (i = i < 0 ? 0 : i)
              ? 0 === i
                ? (t + s) / 2
                : t + (e / (e + i)) * (s - t)
              : s + (i / (e + i)) * (t - s);
          }),
          (h.geom.edgeIntersect = function (e, t, i, s, r) {
            var n, o, l;
            h.geom.vertLeq(e, t) || ((l = e), (e = t), (t = l)),
              h.geom.vertLeq(i, s) || ((l = i), (i = s), (s = l)),
              h.geom.vertLeq(e, i) || ((l = e), (e = i), (i = l), (l = t), (t = s), (s = l)),
              h.geom.vertLeq(i, t)
                ? h.geom.vertLeq(t, s)
                  ? ((n = h.geom.edgeEval(e, i, t)) + (o = h.geom.edgeEval(i, t, s)) < 0 &&
                      ((n = -n), (o = -o)),
                    (r.s = h.geom.interpolate_(n, i.s, o, t.s)))
                  : ((n = h.geom.edgeSign(e, i, t)) + (o = -h.geom.edgeSign(e, s, t)) < 0 &&
                      ((n = -n), (o = -o)),
                    (r.s = h.geom.interpolate_(n, i.s, o, s.s)))
                : (r.s = (i.s + t.s) / 2),
              h.geom.transLeq(e, t) || ((l = e), (e = t), (t = l)),
              h.geom.transLeq(i, s) || ((l = i), (i = s), (s = l)),
              h.geom.transLeq(e, i) || ((l = e), (e = i), (i = l), (l = t), (t = s), (s = l)),
              h.geom.transLeq(i, t)
                ? h.geom.transLeq(t, s)
                  ? ((n = h.geom.transEval(e, i, t)) + (o = h.geom.transEval(i, t, s)) < 0 &&
                      ((n = -n), (o = -o)),
                    (r.t = h.geom.interpolate_(n, i.t, o, t.t)))
                  : ((n = h.geom.transSign(e, i, t)) + (o = -h.geom.transSign(e, s, t)) < 0 &&
                      ((n = -n), (o = -o)),
                    (r.t = h.geom.interpolate_(n, i.t, o, s.t)))
                : (r.t = (i.t + t.t) / 2);
          }),
          (h.mesh = {}),
          (h.mesh.makeEdge = function (e) {
            var t = h.mesh.makeEdgePair_(e.eHead);
            return (
              h.mesh.makeVertex_(t, e.vHead),
              h.mesh.makeVertex_(t.sym, e.vHead),
              h.mesh.makeFace_(t, e.fHead),
              t
            );
          }),
          (h.mesh.meshSplice = function (e, t) {
            var i = !1,
              s = !1;
            e !== t &&
              (t.org !== e.org && ((s = !0), h.mesh.killVertex_(t.org, e.org)),
              t.lFace !== e.lFace && ((i = !0), h.mesh.killFace_(t.lFace, e.lFace)),
              h.mesh.splice_(t, e),
              s || (h.mesh.makeVertex_(t, e.org), (e.org.anEdge = e)),
              i || (h.mesh.makeFace_(t, e.lFace), (e.lFace.anEdge = e)));
          }),
          (h.mesh.deleteEdge = function (e) {
            var t = e.sym,
              i = !1;
            e.lFace !== e.rFace() && ((i = !0), h.mesh.killFace_(e.lFace, e.rFace())),
              e.oNext === e
                ? h.mesh.killVertex_(e.org, null)
                : ((e.rFace().anEdge = e.oPrev()),
                  (e.org.anEdge = e.oNext),
                  h.mesh.splice_(e, e.oPrev()),
                  i || h.mesh.makeFace_(e, e.lFace)),
              t.oNext === t
                ? (h.mesh.killVertex_(t.org, null), h.mesh.killFace_(t.lFace, null))
                : ((e.lFace.anEdge = t.oPrev()),
                  (t.org.anEdge = t.oNext),
                  h.mesh.splice_(t, t.oPrev())),
              h.mesh.killEdge_(e);
          }),
          (h.mesh.addEdgeVertex = function (e) {
            var t = h.mesh.makeEdgePair_(e),
              i = t.sym;
            return (
              h.mesh.splice_(t, e.lNext),
              (t.org = e.dst()),
              h.mesh.makeVertex_(i, t.org),
              (t.lFace = i.lFace = e.lFace),
              t
            );
          }),
          (h.mesh.splitEdge = function (e) {
            var t = h.mesh.addEdgeVertex(e).sym;
            return (
              h.mesh.splice_(e.sym, e.sym.oPrev()),
              h.mesh.splice_(e.sym, t),
              (e.sym.org = t.org),
              (t.dst().anEdge = t.sym),
              (t.sym.lFace = e.rFace()),
              (t.winding = e.winding),
              (t.sym.winding = e.sym.winding),
              t
            );
          }),
          (h.mesh.connect = function (e, t) {
            var i = !1,
              s = h.mesh.makeEdgePair_(e),
              r = s.sym;
            return (
              t.lFace !== e.lFace && ((i = !0), h.mesh.killFace_(t.lFace, e.lFace)),
              h.mesh.splice_(s, e.lNext),
              h.mesh.splice_(r, t),
              (s.org = e.dst()),
              (r.org = t.org),
              (s.lFace = r.lFace = e.lFace),
              (e.lFace.anEdge = r),
              i || h.mesh.makeFace_(s, e.lFace),
              s
            );
          }),
          (h.mesh.zapFace = function (e) {
            var t,
              i = e.anEdge,
              s = i.lNext;
            do {
              if (((s = (t = s).lNext), (t.lFace = null), null === t.rFace())) {
                t.oNext === t
                  ? h.mesh.killVertex_(t.org, null)
                  : ((t.org.anEdge = t.oNext), h.mesh.splice_(t, t.oPrev()));
                var r = t.sym;
                r.oNext === r
                  ? h.mesh.killVertex_(r.org, null)
                  : ((r.org.anEdge = r.oNext), h.mesh.splice_(r, r.oPrev())),
                  h.mesh.killEdge_(t);
              }
            } while (t !== i);
            var n = e.prev,
              o = e.next;
            (o.prev = n), (n.next = o);
          }),
          (h.mesh.meshUnion = function (e, t) {
            var i = e.fHead,
              s = e.vHead,
              r = e.eHead,
              n = t.fHead,
              o = t.vHead,
              l = t.eHead;
            return (
              n.next !== n &&
                ((i.prev.next = n.next),
                (n.next.prev = i.prev),
                (n.prev.next = i),
                (i.prev = n.prev)),
              o.next !== o &&
                ((s.prev.next = o.next),
                (o.next.prev = s.prev),
                (o.prev.next = s),
                (s.prev = o.prev)),
              l.next !== l &&
                ((r.sym.next.sym.next = l.next),
                (l.next.sym.next = r.sym.next),
                (l.sym.next.sym.next = r),
                (r.sym.next = l.sym.next)),
              e
            );
          }),
          (h.mesh.deleteMesh = function (e) {}),
          (h.mesh.makeEdgePair_ = function (e) {
            var t = new h.GluHalfEdge(),
              i = new h.GluHalfEdge(),
              s = e.sym.next;
            return (
              (i.next = s),
              (s.sym.next = t),
              (t.next = e),
              (e.sym.next = i),
              (t.sym = i),
              (t.oNext = t),
              (t.lNext = i),
              (i.sym = t),
              (i.oNext = i),
              (i.lNext = t),
              t
            );
          }),
          (h.mesh.splice_ = function (e, t) {
            var i = e.oNext,
              s = t.oNext;
            (i.sym.lNext = t), (s.sym.lNext = e), (e.oNext = s), (t.oNext = i);
          }),
          (h.mesh.makeVertex_ = function (e, t) {
            var i = t.prev,
              s = new h.GluVertex(t, i);
            (i.next = s), (t.prev = s), (s.anEdge = e);
            var r = e;
            do {
              (r.org = s), (r = r.oNext);
            } while (r !== e);
          }),
          (h.mesh.makeFace_ = function (e, t) {
            var i = t.prev,
              s = new h.GluFace(t, i);
            (i.next = s), (t.prev = s), (s.anEdge = e), (s.inside = t.inside);
            var r = e;
            do {
              (r.lFace = s), (r = r.lNext);
            } while (r !== e);
          }),
          (h.mesh.killEdge_ = function (e) {
            var t = e.next,
              i = e.sym.next;
            (t.sym.next = i), (i.sym.next = t);
          }),
          (h.mesh.killVertex_ = function (e, t) {
            var i = e.anEdge,
              s = i;
            do {
              (s.org = t), (s = s.oNext);
            } while (s !== i);
            var r = e.prev,
              n = e.next;
            (n.prev = r), (r.next = n);
          }),
          (h.mesh.killFace_ = function (e, t) {
            var i = e.anEdge,
              s = i;
            do {
              (s.lFace = t), (s = s.lNext);
            } while (s !== i);
            var r = e.prev,
              n = e.next;
            (n.prev = r), (r.next = n);
          }),
          (h.normal = {}),
          (h.normal.S_UNIT_X_ = 1),
          (h.normal.S_UNIT_Y_ = 0),
          (h.normal.projectPolygon = function (e, t, i, s) {
            var r = !1,
              n = [t, i, s];
            0 === t && 0 === i && 0 === s && (h.normal.computeNormal_(e, n), (r = !0));
            var o,
              l = h.normal.longAxis_(n),
              a = e.mesh.vHead;
            if (h.TRUE_PROJECT) {
              h.normal.normalize_(n);
              var u = [0, 0, 0],
                c = [0, 0, 0];
              (u[l] = 0),
                (u[(l + 1) % 3] = h.normal.S_UNIT_X_),
                (u[(l + 2) % 3] = h.normal.S_UNIT_Y_);
              var x = h.normal.dot_(u, n);
              for (
                u[0] -= x * n[0],
                  u[1] -= x * n[1],
                  u[2] -= x * n[2],
                  h.normal.normalize_(u),
                  c[0] = n[1] * u[2] - n[2] * u[1],
                  c[1] = n[2] * u[0] - n[0] * u[2],
                  c[2] = n[0] * u[1] - n[1] * u[0],
                  h.normal.normalize_(c),
                  o = a.next;
                o !== a;
                o = o.next
              )
                (o.s = h.normal.dot_(o.coords, u)), (o.t = h.normal.dot_(o.coords, c));
            } else {
              var g = (l + 1) % 3,
                _ = (l + 2) % 3,
                d = n[l] > 0 ? 1 : -1;
              for (o = a.next; o !== a; o = o.next) (o.s = o.coords[g]), (o.t = d * o.coords[_]);
            }
            r && h.normal.checkOrientation_(e);
          }),
          (h.normal.dot_ = function (e, t) {
            return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
          }),
          (h.normal.normalize_ = function (e) {
            var t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2];
            h.assert(t > 0), (t = Math.sqrt(t)), (e[0] /= t), (e[1] /= t), (e[2] /= t);
          }),
          (h.normal.longAxis_ = function (e) {
            var t = 0;
            return (
              Math.abs(e[1]) > Math.abs(e[0]) && (t = 1),
              Math.abs(e[2]) > Math.abs(e[t]) && (t = 2),
              t
            );
          }),
          (h.normal.computeNormal_ = function (e, t) {
            var i,
              s = [-2 * h.GLU_TESS_MAX_COORD, -2 * h.GLU_TESS_MAX_COORD, -2 * h.GLU_TESS_MAX_COORD],
              r = [2 * h.GLU_TESS_MAX_COORD, 2 * h.GLU_TESS_MAX_COORD, 2 * h.GLU_TESS_MAX_COORD],
              n = [],
              o = [],
              l = e.mesh.vHead;
            for (i = l.next; i !== l; i = i.next)
              for (var a = 0; a < 3; ++a) {
                var u = i.coords[a];
                u < r[a] && ((r[a] = u), (o[a] = i)), u > s[a] && ((s[a] = u), (n[a] = i));
              }
            var c = 0;
            if (
              (s[1] - r[1] > s[0] - r[0] && (c = 1),
              s[2] - r[2] > s[c] - r[c] && (c = 2),
              r[c] >= s[c])
            )
              return (t[0] = 0), (t[1] = 0), void (t[2] = 1);
            var x = 0,
              g = o[c],
              _ = n[c],
              d = [0, 0, 0],
              p = [g.coords[0] - _.coords[0], g.coords[1] - _.coords[1], g.coords[2] - _.coords[2]],
              m = [0, 0, 0];
            for (i = l.next; i !== l; i = i.next) {
              (m[0] = i.coords[0] - _.coords[0]),
                (m[1] = i.coords[1] - _.coords[1]),
                (m[2] = i.coords[2] - _.coords[2]),
                (d[0] = p[1] * m[2] - p[2] * m[1]),
                (d[1] = p[2] * m[0] - p[0] * m[2]),
                (d[2] = p[0] * m[1] - p[1] * m[0]);
              var y = d[0] * d[0] + d[1] * d[1] + d[2] * d[2];
              y > x && ((x = y), (t[0] = d[0]), (t[1] = d[1]), (t[2] = d[2]));
            }
            x <= 0 && ((t[0] = t[1] = t[2] = 0), (t[h.normal.longAxis_(p)] = 1));
          }),
          (h.normal.checkOrientation_ = function (e) {
            for (var t = 0, i = e.mesh.fHead, s = i.next; s !== i; s = s.next) {
              var r = s.anEdge;
              if (!(r.winding <= 0))
                do {
                  (t += (r.org.s - r.dst().s) * (r.org.t + r.dst().t)), (r = r.lNext);
                } while (r !== s.anEdge);
            }
            if (t < 0) for (var n = e.mesh.vHead, o = n.next; o !== n; o = o.next) o.t = -o.t;
          }),
          (h.render = {}),
          (h.render.renderMesh = function (e, t, i) {
            for (var s = !1, r = -1, n = t.fHead.prev; n !== t.fHead; n = n.prev)
              if (n.inside) {
                s || (e.callBeginCallback(h.primitiveType.GL_TRIANGLES), (s = !0));
                var o = n.anEdge;
                h.assert(o.lNext.lNext.lNext === o, 'renderMesh called with non-triangulated mesh');
                do {
                  if (i) {
                    var l = o.rFace().inside ? 0 : 1;
                    r !== l && ((r = l), e.callEdgeFlagCallback(!!r));
                  }
                  e.callVertexCallback(o.org.data), (o = o.lNext);
                } while (o !== n.anEdge);
              }
            s && e.callEndCallback();
          }),
          (h.render.renderBoundary = function (e, t) {
            for (var i = t.fHead.next; i !== t.fHead; i = i.next)
              if (i.inside) {
                e.callBeginCallback(h.primitiveType.GL_LINE_LOOP);
                var s = i.anEdge;
                do {
                  e.callVertexCallback(s.org.data), (s = s.lNext);
                } while (s !== i.anEdge);
                e.callEndCallback();
              }
          }),
          (h.sweep = {}),
          (h.sweep.SENTINEL_COORD_ = 4 * h.GLU_TESS_MAX_COORD),
          (h.sweep.TOLERANCE_NONZERO_ = !1),
          (h.sweep.computeInterior = function (e) {
            var t;
            for (
              e.fatalError = !1,
                h.sweep.removeDegenerateEdges_(e),
                h.sweep.initPriorityQ_(e),
                h.sweep.initEdgeDict_(e);
              null !== (t = e.pq.extractMin());

            ) {
              for (;;) {
                var i = e.pq.minimum();
                if (null === i || !h.geom.vertEq(i, t)) break;
                (i = e.pq.extractMin()), h.sweep.spliceMergeVertices_(e, t.anEdge, i.anEdge);
              }
              h.sweep.sweepEvent_(e, t);
            }
            var s = e.dict.getMin().getKey();
            (e.event = s.eUp.org),
              h.sweep.doneEdgeDict_(e),
              h.sweep.donePriorityQ_(e),
              h.sweep.removeDegenerateFaces_(e.mesh),
              e.mesh.checkMesh();
          }),
          (h.sweep.addWinding_ = function (e, t) {
            (e.winding += t.winding), (e.sym.winding += t.sym.winding);
          }),
          (h.sweep.edgeLeq_ = function (e, t, i) {
            var s = e.event,
              r = t.eUp,
              n = i.eUp;
            return r.dst() === s
              ? n.dst() === s
                ? h.geom.vertLeq(r.org, n.org)
                  ? h.geom.edgeSign(n.dst(), r.org, n.org) <= 0
                  : h.geom.edgeSign(r.dst(), n.org, r.org) >= 0
                : h.geom.edgeSign(n.dst(), s, n.org) <= 0
              : n.dst() === s
              ? h.geom.edgeSign(r.dst(), s, r.org) >= 0
              : h.geom.edgeEval(r.dst(), s, r.org) >= h.geom.edgeEval(n.dst(), s, n.org);
          }),
          (h.sweep.deleteRegion_ = function (e, t) {
            t.fixUpperEdge && h.assert(0 === t.eUp.winding),
              (t.eUp.activeRegion = null),
              e.dict.deleteNode(t.nodeUp),
              (t.nodeUp = null);
          }),
          (h.sweep.fixUpperEdge_ = function (e, t) {
            h.assert(e.fixUpperEdge),
              h.mesh.deleteEdge(e.eUp),
              (e.fixUpperEdge = !1),
              (e.eUp = t),
              (t.activeRegion = e);
          }),
          (h.sweep.topLeftRegion_ = function (e) {
            var t = e.eUp.org;
            do {
              e = e.regionAbove();
            } while (e.eUp.org === t);
            if (e.fixUpperEdge) {
              var i = h.mesh.connect(e.regionBelow().eUp.sym, e.eUp.lNext);
              h.sweep.fixUpperEdge_(e, i), (e = e.regionAbove());
            }
            return e;
          }),
          (h.sweep.topRightRegion_ = function (e) {
            var t = e.eUp.dst();
            do {
              e = e.regionAbove();
            } while (e.eUp.dst() === t);
            return e;
          }),
          (h.sweep.addRegionBelow_ = function (e, t, i) {
            var s = new h.ActiveRegion();
            return (
              (s.eUp = i), (s.nodeUp = e.dict.insertBefore(t.nodeUp, s)), (i.activeRegion = s), s
            );
          }),
          (h.sweep.isWindingInside_ = function (e, t) {
            switch (e.windingRule) {
              case h.windingRule.GLU_TESS_WINDING_ODD:
                return 0 != (1 & t);
              case h.windingRule.GLU_TESS_WINDING_NONZERO:
                return 0 !== t;
              case h.windingRule.GLU_TESS_WINDING_POSITIVE:
                return t > 0;
              case h.windingRule.GLU_TESS_WINDING_NEGATIVE:
                return t < 0;
              case h.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:
                return t >= 2 || t <= -2;
            }
            return h.assert(!1), !1;
          }),
          (h.sweep.computeWinding_ = function (e, t) {
            (t.windingNumber = t.regionAbove().windingNumber + t.eUp.winding),
              (t.inside = h.sweep.isWindingInside_(e, t.windingNumber));
          }),
          (h.sweep.finishRegion_ = function (e, t) {
            var i = t.eUp,
              s = i.lFace;
            (s.inside = t.inside), (s.anEdge = i), h.sweep.deleteRegion_(e, t);
          }),
          (h.sweep.finishLeftRegions_ = function (e, t, i) {
            for (var s = t, r = t.eUp; s !== i; ) {
              s.fixUpperEdge = !1;
              var n = s.regionBelow(),
                o = n.eUp;
              if (o.org !== r.org) {
                if (!n.fixUpperEdge) {
                  h.sweep.finishRegion_(e, s);
                  break;
                }
                (o = h.mesh.connect(r.lPrev(), o.sym)), h.sweep.fixUpperEdge_(n, o);
              }
              r.oNext !== o && (h.mesh.meshSplice(o.oPrev(), o), h.mesh.meshSplice(r, o)),
                h.sweep.finishRegion_(e, s),
                (r = n.eUp),
                (s = n);
            }
            return r;
          }),
          (h.sweep.addRightEdges_ = function (e, t, i, s, r, n) {
            var o = !0,
              l = i;
            do {
              h.assert(h.geom.vertLeq(l.org, l.dst())),
                h.sweep.addRegionBelow_(e, t, l.sym),
                (l = l.oNext);
            } while (l !== s);
            null === r && (r = t.regionBelow().eUp.rPrev());
            for (var a, u = t, c = r; (l = (a = u.regionBelow()).eUp.sym).org === c.org; )
              l.oNext !== c && (h.mesh.meshSplice(l.oPrev(), l), h.mesh.meshSplice(c.oPrev(), l)),
                (a.windingNumber = u.windingNumber - l.winding),
                (a.inside = h.sweep.isWindingInside_(e, a.windingNumber)),
                (u.dirty = !0),
                !o &&
                  h.sweep.checkForRightSplice_(e, u) &&
                  (h.sweep.addWinding_(l, c), h.sweep.deleteRegion_(e, u), h.mesh.deleteEdge(c)),
                (o = !1),
                (u = a),
                (c = l);
            (u.dirty = !0),
              h.assert(u.windingNumber - l.winding === a.windingNumber),
              n && h.sweep.walkDirtyRegions_(e, u);
          }),
          (h.sweep.callCombine_ = function (e, t, i, s, r) {
            var n = [t.coords[0], t.coords[1], t.coords[2]];
            (t.data = null),
              (t.data = e.callCombineCallback(n, i, s)),
              null === t.data &&
                (r
                  ? e.fatalError ||
                    (e.callErrorCallback(h.errorType.GLU_TESS_NEED_COMBINE_CALLBACK),
                    (e.fatalError = !0))
                  : (t.data = i[0]));
          }),
          (h.sweep.spliceMergeVertices_ = function (e, t, i) {
            var s = [null, null, null, null];
            (s[0] = t.org.data),
              (s[1] = i.org.data),
              h.sweep.callCombine_(e, t.org, s, [0.5, 0.5, 0, 0], !1),
              h.mesh.meshSplice(t, i);
          }),
          (h.sweep.vertexWeights_ = function (e, t, i, s, r) {
            var n = h.geom.vertL1dist(t, e),
              o = h.geom.vertL1dist(i, e),
              l = r,
              a = r + 1;
            (s[l] = (0.5 * o) / (n + o)),
              (s[a] = (0.5 * n) / (n + o)),
              (e.coords[0] += s[l] * t.coords[0] + s[a] * i.coords[0]),
              (e.coords[1] += s[l] * t.coords[1] + s[a] * i.coords[1]),
              (e.coords[2] += s[l] * t.coords[2] + s[a] * i.coords[2]);
          }),
          (h.sweep.getIntersectData_ = function (e, t, i, s, r, n) {
            var o = [0, 0, 0, 0],
              l = [i.data, s.data, r.data, n.data];
            (t.coords[0] = t.coords[1] = t.coords[2] = 0),
              h.sweep.vertexWeights_(t, i, s, o, 0),
              h.sweep.vertexWeights_(t, r, n, o, 2),
              h.sweep.callCombine_(e, t, l, o, !0);
          }),
          (h.sweep.checkForRightSplice_ = function (e, t) {
            var i = t.regionBelow(),
              s = t.eUp,
              r = i.eUp;
            if (h.geom.vertLeq(s.org, r.org)) {
              if (h.geom.edgeSign(r.dst(), s.org, r.org) > 0) return !1;
              h.geom.vertEq(s.org, r.org)
                ? s.org !== r.org &&
                  (e.pq.remove(s.org.pqHandle), h.sweep.spliceMergeVertices_(e, r.oPrev(), s))
                : (h.mesh.splitEdge(r.sym),
                  h.mesh.meshSplice(s, r.oPrev()),
                  (t.dirty = i.dirty = !0));
            } else {
              if (h.geom.edgeSign(s.dst(), r.org, s.org) < 0) return !1;
              (t.regionAbove().dirty = t.dirty = !0),
                h.mesh.splitEdge(s.sym),
                h.mesh.meshSplice(r.oPrev(), s);
            }
            return !0;
          }),
          (h.sweep.checkForLeftSplice_ = function (e, t) {
            var i,
              s = t.regionBelow(),
              r = t.eUp,
              n = s.eUp;
            if ((h.assert(!h.geom.vertEq(r.dst(), n.dst())), h.geom.vertLeq(r.dst(), n.dst()))) {
              if (h.geom.edgeSign(r.dst(), n.dst(), r.org) < 0) return !1;
              (t.regionAbove().dirty = t.dirty = !0),
                (i = h.mesh.splitEdge(r)),
                h.mesh.meshSplice(n.sym, i),
                (i.lFace.inside = t.inside);
            } else {
              if (h.geom.edgeSign(n.dst(), r.dst(), n.org) > 0) return !1;
              (t.dirty = s.dirty = !0),
                (i = h.mesh.splitEdge(n)),
                h.mesh.meshSplice(r.lNext, n.sym),
                (i.rFace().inside = t.inside);
            }
            return !0;
          }),
          (h.sweep.checkForIntersect_ = function (e, t) {
            var i = t.regionBelow(),
              s = t.eUp,
              r = i.eUp,
              n = s.org,
              o = r.org,
              l = s.dst(),
              a = r.dst(),
              u = new h.GluVertex();
            if (
              (h.assert(!h.geom.vertEq(a, l)),
              h.assert(h.geom.edgeSign(l, e.event, n) <= 0),
              h.assert(h.geom.edgeSign(a, e.event, o) >= 0),
              h.assert(n !== e.event && o !== e.event),
              h.assert(!t.fixUpperEdge && !i.fixUpperEdge),
              n === o)
            )
              return !1;
            if (Math.min(n.t, l.t) > Math.max(o.t, a.t)) return !1;
            if (h.geom.vertLeq(n, o)) {
              if (h.geom.edgeSign(a, n, o) > 0) return !1;
            } else if (h.geom.edgeSign(l, o, n) < 0) return !1;
            h.geom.edgeIntersect(l, n, a, o, u),
              h.assert(Math.min(n.t, l.t) <= u.t),
              h.assert(u.t <= Math.max(o.t, a.t)),
              h.assert(Math.min(a.s, l.s) <= u.s),
              h.assert(u.s <= Math.max(o.s, n.s)),
              h.geom.vertLeq(u, e.event) && ((u.s = e.event.s), (u.t = e.event.t));
            var c = h.geom.vertLeq(n, o) ? n : o;
            if (
              (h.geom.vertLeq(c, u) && ((u.s = c.s), (u.t = c.t)),
              h.geom.vertEq(u, n) || h.geom.vertEq(u, o))
            )
              return h.sweep.checkForRightSplice_(e, t), !1;
            if (
              (!h.geom.vertEq(l, e.event) && h.geom.edgeSign(l, e.event, u) >= 0) ||
              (!h.geom.vertEq(a, e.event) && h.geom.edgeSign(a, e.event, u) <= 0)
            ) {
              if (a === e.event)
                return (
                  h.mesh.splitEdge(s.sym),
                  h.mesh.meshSplice(r.sym, s),
                  (s = (t = h.sweep.topLeftRegion_(t)).regionBelow().eUp),
                  h.sweep.finishLeftRegions_(e, t.regionBelow(), i),
                  h.sweep.addRightEdges_(e, t, s.oPrev(), s, s, !0),
                  !0
                );
              if (l === e.event) {
                h.mesh.splitEdge(r.sym), h.mesh.meshSplice(s.lNext, r.oPrev()), (i = t);
                var x = (t = h.sweep.topRightRegion_(t)).regionBelow().eUp.rPrev();
                return (
                  (i.eUp = r.oPrev()),
                  (r = h.sweep.finishLeftRegions_(e, i, null)),
                  h.sweep.addRightEdges_(e, t, r.oNext, s.rPrev(), x, !0),
                  !0
                );
              }
              return (
                h.geom.edgeSign(l, e.event, u) >= 0 &&
                  ((t.regionAbove().dirty = t.dirty = !0),
                  h.mesh.splitEdge(s.sym),
                  (s.org.s = e.event.s),
                  (s.org.t = e.event.t)),
                h.geom.edgeSign(a, e.event, u) <= 0 &&
                  ((t.dirty = i.dirty = !0),
                  h.mesh.splitEdge(r.sym),
                  (r.org.s = e.event.s),
                  (r.org.t = e.event.t)),
                !1
              );
            }
            return (
              h.mesh.splitEdge(s.sym),
              h.mesh.splitEdge(r.sym),
              h.mesh.meshSplice(r.oPrev(), s),
              (s.org.s = u.s),
              (s.org.t = u.t),
              (s.org.pqHandle = e.pq.insert(s.org)),
              h.sweep.getIntersectData_(e, s.org, n, l, o, a),
              (t.regionAbove().dirty = t.dirty = i.dirty = !0),
              !1
            );
          }),
          (h.sweep.walkDirtyRegions_ = function (e, t) {
            for (var i = t.regionBelow(); ; ) {
              for (; i.dirty; ) (t = i), (i = i.regionBelow());
              if (!t.dirty && ((i = t), null === (t = t.regionAbove()) || !t.dirty)) return;
              t.dirty = !1;
              var s = t.eUp,
                r = i.eUp;
              if (
                (s.dst() !== r.dst() &&
                  h.sweep.checkForLeftSplice_(e, t) &&
                  (i.fixUpperEdge
                    ? (h.sweep.deleteRegion_(e, i),
                      h.mesh.deleteEdge(r),
                      (r = (i = t.regionBelow()).eUp))
                    : t.fixUpperEdge &&
                      (h.sweep.deleteRegion_(e, t),
                      h.mesh.deleteEdge(s),
                      (s = (t = i.regionAbove()).eUp))),
                s.org !== r.org)
              )
                if (
                  s.dst() === r.dst() ||
                  t.fixUpperEdge ||
                  i.fixUpperEdge ||
                  (s.dst() !== e.event && r.dst() !== e.event)
                )
                  h.sweep.checkForRightSplice_(e, t);
                else if (h.sweep.checkForIntersect_(e, t)) return;
              s.org === r.org &&
                s.dst() === r.dst() &&
                (h.sweep.addWinding_(r, s),
                h.sweep.deleteRegion_(e, t),
                h.mesh.deleteEdge(s),
                (t = i.regionAbove()));
            }
          }),
          (h.sweep.connectRightVertex_ = function (e, t, i) {
            var s,
              r = i.oNext,
              n = t.regionBelow(),
              o = t.eUp,
              l = n.eUp,
              a = !1;
            o.dst() !== l.dst() && h.sweep.checkForIntersect_(e, t),
              h.geom.vertEq(o.org, e.event) &&
                (h.mesh.meshSplice(r.oPrev(), o),
                (r = (t = h.sweep.topLeftRegion_(t)).regionBelow().eUp),
                h.sweep.finishLeftRegions_(e, t.regionBelow(), n),
                (a = !0)),
              h.geom.vertEq(l.org, e.event) &&
                (h.mesh.meshSplice(i, l.oPrev()),
                (i = h.sweep.finishLeftRegions_(e, n, null)),
                (a = !0)),
              a
                ? h.sweep.addRightEdges_(e, t, i.oNext, r, r, !0)
                : ((s = h.geom.vertLeq(l.org, o.org) ? l.oPrev() : o),
                  (s = h.mesh.connect(i.lPrev(), s)),
                  h.sweep.addRightEdges_(e, t, s, s.oNext, s.oNext, !1),
                  (s.sym.activeRegion.fixUpperEdge = !0),
                  h.sweep.walkDirtyRegions_(e, t));
          }),
          (h.sweep.connectLeftDegenerate_ = function (e, t, i) {
            var s = t.eUp;
            if (h.geom.vertEq(s.org, i))
              return (
                h.assert(h.sweep.TOLERANCE_NONZERO_),
                void (h.sweep.TOLERANCE_NONZERO_ && h.sweep.spliceMergeVertices_(e, s, i.anEdge))
              );
            if (!h.geom.vertEq(s.dst(), i))
              return (
                h.mesh.splitEdge(s.sym),
                t.fixUpperEdge && (h.mesh.deleteEdge(s.oNext), (t.fixUpperEdge = !1)),
                h.mesh.meshSplice(i.anEdge, s),
                void h.sweep.sweepEvent_(e, i)
              );
            if ((h.assert(h.sweep.TOLERANCE_NONZERO_), h.sweep.TOLERANCE_NONZERO_)) {
              var r = (t = h.sweep.topRightRegion_(t)).regionBelow(),
                n = r.eUp.sym,
                o = n.oNext,
                l = o;
              r.fixUpperEdge &&
                (h.assert(o !== n),
                h.sweep.deleteRegion_(e, r),
                h.mesh.deleteEdge(n),
                (n = o.oPrev())),
                h.mesh.meshSplice(i.anEdge, n),
                h.geom.edgeGoesLeft(o) || (o = null),
                h.sweep.addRightEdges_(e, t, n.oNext, l, o, !0);
            }
          }),
          (h.sweep.connectLeftVertex_ = function (e, t) {
            var i = new h.ActiveRegion();
            i.eUp = t.anEdge.sym;
            var s = e.dict.search(i).getKey(),
              r = s.regionBelow(),
              n = s.eUp,
              o = r.eUp;
            if (0 !== h.geom.edgeSign(n.dst(), t, n.org)) {
              var l,
                a = h.geom.vertLeq(o.dst(), n.dst()) ? s : r;
              s.inside || a.fixUpperEdge
                ? ((l =
                    a === s
                      ? h.mesh.connect(t.anEdge.sym, n.lNext)
                      : h.mesh.connect(o.dNext(), t.anEdge).sym),
                  a.fixUpperEdge
                    ? h.sweep.fixUpperEdge_(a, l)
                    : h.sweep.computeWinding_(e, h.sweep.addRegionBelow_(e, s, l)),
                  h.sweep.sweepEvent_(e, t))
                : h.sweep.addRightEdges_(e, s, t.anEdge, t.anEdge, null, !0);
            } else h.sweep.connectLeftDegenerate_(e, s, t);
          }),
          (h.sweep.sweepEvent_ = function (e, t) {
            e.event = t;
            for (var i = t.anEdge; null === i.activeRegion; )
              if ((i = i.oNext) === t.anEdge) return void h.sweep.connectLeftVertex_(e, t);
            var s = h.sweep.topLeftRegion_(i.activeRegion),
              r = s.regionBelow(),
              n = r.eUp,
              o = h.sweep.finishLeftRegions_(e, r, null);
            o.oNext === n
              ? h.sweep.connectRightVertex_(e, s, o)
              : h.sweep.addRightEdges_(e, s, o.oNext, n, n, !0);
          }),
          (h.sweep.addSentinel_ = function (e, t) {
            var i = new h.ActiveRegion(),
              s = h.mesh.makeEdge(e.mesh);
            (s.org.s = h.sweep.SENTINEL_COORD_),
              (s.org.t = t),
              (s.dst().s = -h.sweep.SENTINEL_COORD_),
              (s.dst().t = t),
              (e.event = s.dst()),
              (i.eUp = s),
              (i.windingNumber = 0),
              (i.inside = !1),
              (i.fixUpperEdge = !1),
              (i.sentinel = !0),
              (i.dirty = !1),
              (i.nodeUp = e.dict.insert(i));
          }),
          (h.sweep.initEdgeDict_ = function (e) {
            (e.dict = new h.Dict(e, h.sweep.edgeLeq_)),
              h.sweep.addSentinel_(e, -h.sweep.SENTINEL_COORD_),
              h.sweep.addSentinel_(e, h.sweep.SENTINEL_COORD_);
          }),
          (h.sweep.doneEdgeDict_ = function (e) {
            for (var t, i = 0; null !== (t = e.dict.getMin().getKey()); )
              t.sentinel || (h.assert(t.fixUpperEdge), h.assert(1 == ++i)),
                h.assert(0 === t.windingNumber),
                h.sweep.deleteRegion_(e, t);
            e.dict = null;
          }),
          (h.sweep.removeDegenerateEdges_ = function (e) {
            for (var t, i = e.mesh.eHead, s = i.next; s !== i; s = t) {
              t = s.next;
              var r = s.lNext;
              h.geom.vertEq(s.org, s.dst()) &&
                s.lNext.lNext !== s &&
                (h.sweep.spliceMergeVertices_(e, r, s), h.mesh.deleteEdge(s), (r = (s = r).lNext)),
                r.lNext === s &&
                  (r !== s && ((r !== t && r !== t.sym) || (t = t.next), h.mesh.deleteEdge(r)),
                  (s !== t && s !== t.sym) || (t = t.next),
                  h.mesh.deleteEdge(s));
            }
          }),
          (h.sweep.initPriorityQ_ = function (e) {
            var t = new h.PriorityQ();
            e.pq = t;
            var i,
              s = e.mesh.vHead;
            for (i = s.next; i !== s; i = i.next) i.pqHandle = t.insert(i);
            t.init();
          }),
          (h.sweep.donePriorityQ_ = function (e) {
            e.pq.deleteQ(), (e.pq = null);
          }),
          (h.sweep.removeDegenerateFaces_ = function (e) {
            for (var t, i = e.fHead.next; i !== e.fHead; i = t) {
              t = i.next;
              var s = i.anEdge;
              h.assert(s.lNext !== s),
                s.lNext.lNext === s && (h.sweep.addWinding_(s.oNext, s), h.mesh.deleteEdge(s));
            }
          }),
          (h.tessmono = {}),
          (h.tessmono.tessellateMonoRegion_ = function (e) {
            var t = e.anEdge;
            for (
              h.assert(t.lNext !== t && t.lNext.lNext !== t);
              h.geom.vertLeq(t.dst(), t.org);
              t = t.lPrev()
            );
            for (; h.geom.vertLeq(t.org, t.dst()); t = t.lNext);
            for (var i, s = t.lPrev(); t.lNext !== s; )
              if (h.geom.vertLeq(t.dst(), s.org)) {
                for (
                  ;
                  s.lNext !== t &&
                  (h.geom.edgeGoesLeft(s.lNext) ||
                    h.geom.edgeSign(s.org, s.dst(), s.lNext.dst()) <= 0);

                )
                  s = (i = h.mesh.connect(s.lNext, s)).sym;
                s = s.lPrev();
              } else {
                for (
                  ;
                  s.lNext !== t &&
                  (h.geom.edgeGoesRight(t.lPrev()) ||
                    h.geom.edgeSign(t.dst(), t.org, t.lPrev().org) >= 0);

                )
                  (i = h.mesh.connect(t, t.lPrev())), (t = i.sym);
                t = t.lNext;
              }
            for (h.assert(s.lNext !== t); s.lNext.lNext !== t; )
              s = (i = h.mesh.connect(s.lNext, s)).sym;
          }),
          (h.tessmono.tessellateInterior = function (e) {
            for (var t, i = e.fHead.next; i !== e.fHead; i = t)
              (t = i.next), i.inside && h.tessmono.tessellateMonoRegion_(i);
          }),
          (h.tessmono.discardExterior = function (e) {
            for (var t, i = e.fHead.next; i !== e.fHead; i = t)
              (t = i.next), i.inside || h.mesh.zapFace(i);
          }),
          (h.tessmono.setWindingNumber = function (e, t, i) {
            for (var s, r = e.eHead.next; r !== e.eHead; r = s)
              (s = r.next),
                r.rFace().inside !== r.lFace.inside
                  ? (r.winding = r.lFace.inside ? t : -t)
                  : i
                  ? h.mesh.deleteEdge(r)
                  : (r.winding = 0);
          }),
          (h.Dict = function (e, t) {
            (this.head_ = new h.DictNode()), (this.frame_ = e), (this.leq_ = t);
          }),
          (h.Dict.prototype.deleteDict_ = function () {}),
          (h.Dict.prototype.insertBefore = function (e, t) {
            do {
              e = e.prev;
            } while (null !== e.key && !this.leq_(this.frame_, e.key, t));
            var i = new h.DictNode(t, e.next, e);
            return (e.next.prev = i), (e.next = i), i;
          }),
          (h.Dict.prototype.insert = function (e) {
            return this.insertBefore(this.head_, e);
          }),
          (h.Dict.prototype.deleteNode = function (e) {
            (e.next.prev = e.prev), (e.prev.next = e.next);
          }),
          (h.Dict.prototype.search = function (e) {
            var t = this.head_;
            do {
              t = t.next;
            } while (null !== t.key && !this.leq_(this.frame_, e, t.key));
            return t;
          }),
          (h.Dict.prototype.getMin = function () {
            return this.head_.next;
          }),
          (h.Dict.prototype.getMax = function () {
            return this.head_.prev;
          }),
          (h.DictNode = function (e, t, i) {
            (this.key = e || null), (this.next = t || this), (this.prev = i || this);
          }),
          (h.DictNode.prototype.getKey = function () {
            return this.key;
          }),
          (h.DictNode.prototype.getSuccessor = function () {
            return this.next;
          }),
          (h.DictNode.prototype.getPredecessor = function () {
            return this.prev;
          }),
          (h.GluTesselator = function () {
            (this.state_ = h.GluTesselator.tessState_.T_DORMANT),
              (this.lastEdge_ = null),
              (this.mesh = null),
              (this.errorCallback_ = null),
              (this.normal_ = [0, 0, 0]),
              (this.windingRule = h.windingRule.GLU_TESS_WINDING_ODD),
              (this.fatalError = !1),
              (this.dict = null),
              (this.pq = null),
              (this.event = null),
              (this.combineCallback_ = null),
              (this.boundaryOnly_ = !1),
              (this.beginCallback_ = null),
              (this.edgeFlagCallback_ = null),
              (this.vertexCallback_ = null),
              (this.endCallback_ = null),
              (this.meshCallback_ = null),
              (this.polygonData_ = null);
          }),
          (h.GluTesselator.tessState_ = { T_DORMANT: 0, T_IN_POLYGON: 1, T_IN_CONTOUR: 2 }),
          (h.GluTesselator.prototype.gluDeleteTess = function () {
            this.requireState_(h.GluTesselator.tessState_.T_DORMANT);
          }),
          (h.GluTesselator.prototype.gluTessProperty = function (e, t) {
            switch (e) {
              case h.gluEnum.GLU_TESS_TOLERANCE:
                return;
              case h.gluEnum.GLU_TESS_WINDING_RULE:
                var i = t;
                switch (i) {
                  case h.windingRule.GLU_TESS_WINDING_ODD:
                  case h.windingRule.GLU_TESS_WINDING_NONZERO:
                  case h.windingRule.GLU_TESS_WINDING_POSITIVE:
                  case h.windingRule.GLU_TESS_WINDING_NEGATIVE:
                  case h.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:
                    return void (this.windingRule = i);
                }
                break;
              case h.gluEnum.GLU_TESS_BOUNDARY_ONLY:
                return void (this.boundaryOnly_ = !!t);
              default:
                return void this.callErrorCallback(h.gluEnum.GLU_INVALID_ENUM);
            }
            this.callErrorCallback(h.gluEnum.GLU_INVALID_VALUE);
          }),
          (h.GluTesselator.prototype.gluGetTessProperty = function (e) {
            switch (e) {
              case h.gluEnum.GLU_TESS_TOLERANCE:
                return 0;
              case h.gluEnum.GLU_TESS_WINDING_RULE:
                var t = this.windingRule;
                return (
                  h.assert(
                    t === h.windingRule.GLU_TESS_WINDING_ODD ||
                      t === h.windingRule.GLU_TESS_WINDING_NONZERO ||
                      t === h.windingRule.GLU_TESS_WINDING_POSITIVE ||
                      t === h.windingRule.GLU_TESS_WINDING_NEGATIVE ||
                      t === h.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO,
                  ),
                  t
                );
              case h.gluEnum.GLU_TESS_BOUNDARY_ONLY:
                return (
                  h.assert(!0 === this.boundaryOnly_ || !1 === this.boundaryOnly_),
                  this.boundaryOnly_
                );
              default:
                this.callErrorCallback(h.gluEnum.GLU_INVALID_ENUM);
            }
            return !1;
          }),
          (h.GluTesselator.prototype.gluTessNormal = function (e, t, i) {
            (this.normal_[0] = e), (this.normal_[1] = t), (this.normal_[2] = i);
          }),
          (h.GluTesselator.prototype.gluTessCallback = function (e, t) {
            var i = t || null;
            switch (e) {
              case h.gluEnum.GLU_TESS_BEGIN:
              case h.gluEnum.GLU_TESS_BEGIN_DATA:
                return void (this.beginCallback_ = i);
              case h.gluEnum.GLU_TESS_EDGE_FLAG:
              case h.gluEnum.GLU_TESS_EDGE_FLAG_DATA:
                return void (this.edgeFlagCallback_ = i);
              case h.gluEnum.GLU_TESS_VERTEX:
              case h.gluEnum.GLU_TESS_VERTEX_DATA:
                return void (this.vertexCallback_ = i);
              case h.gluEnum.GLU_TESS_END:
              case h.gluEnum.GLU_TESS_END_DATA:
                return void (this.endCallback_ = i);
              case h.gluEnum.GLU_TESS_ERROR:
              case h.gluEnum.GLU_TESS_ERROR_DATA:
                return void (this.errorCallback_ = i);
              case h.gluEnum.GLU_TESS_COMBINE:
              case h.gluEnum.GLU_TESS_COMBINE_DATA:
                return void (this.combineCallback_ = i);
              case h.gluEnum.GLU_TESS_MESH:
                return void (this.meshCallback_ = i);
              default:
                return void this.callErrorCallback(h.gluEnum.GLU_INVALID_ENUM);
            }
          }),
          (h.GluTesselator.prototype.gluTessVertex = function (e, t) {
            var i = !1,
              s = [0, 0, 0];
            this.requireState_(h.GluTesselator.tessState_.T_IN_CONTOUR);
            for (var r = 0; r < 3; ++r) {
              var n = e[r];
              n < -h.GLU_TESS_MAX_COORD && ((n = -h.GLU_TESS_MAX_COORD), (i = !0)),
                n > h.GLU_TESS_MAX_COORD && ((n = h.GLU_TESS_MAX_COORD), (i = !0)),
                (s[r] = n);
            }
            i && this.callErrorCallback(h.errorType.GLU_TESS_COORD_TOO_LARGE),
              this.addVertex_(s, t);
          }),
          (h.GluTesselator.prototype.gluTessBeginPolygon = function (e) {
            this.requireState_(h.GluTesselator.tessState_.T_DORMANT),
              (this.state_ = h.GluTesselator.tessState_.T_IN_POLYGON),
              (this.mesh = new h.GluMesh()),
              (this.polygonData_ = e);
          }),
          (h.GluTesselator.prototype.gluTessBeginContour = function () {
            this.requireState_(h.GluTesselator.tessState_.T_IN_POLYGON),
              (this.state_ = h.GluTesselator.tessState_.T_IN_CONTOUR),
              (this.lastEdge_ = null);
          }),
          (h.GluTesselator.prototype.gluTessEndContour = function () {
            this.requireState_(h.GluTesselator.tessState_.T_IN_CONTOUR),
              (this.state_ = h.GluTesselator.tessState_.T_IN_POLYGON);
          }),
          (h.GluTesselator.prototype.gluTessEndPolygon = function () {
            if (
              (this.requireState_(h.GluTesselator.tessState_.T_IN_POLYGON),
              (this.state_ = h.GluTesselator.tessState_.T_DORMANT),
              h.normal.projectPolygon(this, this.normal_[0], this.normal_[1], this.normal_[2]),
              h.sweep.computeInterior(this),
              !this.fatalError)
            ) {
              var e = this.mesh;
              if (
                (this.boundaryOnly_
                  ? h.tessmono.setWindingNumber(e, 1, !0)
                  : h.tessmono.tessellateInterior(e),
                this.mesh.checkMesh(),
                this.beginCallback_ ||
                  this.endCallback_ ||
                  this.vertexCallback_ ||
                  this.edgeFlagCallback_)
              )
                if (this.boundaryOnly_) h.render.renderBoundary(this, this.mesh);
                else {
                  var t = !!this.edgeFlagCallback_;
                  h.render.renderMesh(this, this.mesh, t);
                }
              if (this.meshCallback_)
                return (
                  h.tessmono.discardExterior(this.mesh),
                  this.meshCallback_(this.mesh),
                  (this.mesh = null),
                  void (this.polygonData_ = null)
                );
            }
            h.mesh.deleteMesh(this.mesh), (this.polygonData_ = null), (this.mesh = null);
          }),
          (h.GluTesselator.prototype.requireState_ = function (e) {
            this.state_ !== e && this.gotoState_(e);
          }),
          (h.GluTesselator.prototype.gotoState_ = function (e) {
            for (; this.state_ !== e; )
              if (this.state_ < e)
                switch (this.state_) {
                  case h.GluTesselator.tessState_.T_DORMANT:
                    this.callErrorCallback(h.errorType.GLU_TESS_MISSING_BEGIN_POLYGON),
                      this.gluTessBeginPolygon(null);
                    break;
                  case h.GluTesselator.tessState_.T_IN_POLYGON:
                    this.callErrorCallback(h.errorType.GLU_TESS_MISSING_BEGIN_CONTOUR),
                      this.gluTessBeginContour();
                }
              else
                switch (this.state_) {
                  case h.GluTesselator.tessState_.T_IN_CONTOUR:
                    this.callErrorCallback(h.errorType.GLU_TESS_MISSING_END_CONTOUR),
                      this.gluTessEndContour();
                    break;
                  case h.GluTesselator.tessState_.T_IN_POLYGON:
                    this.callErrorCallback(h.errorType.GLU_TESS_MISSING_END_POLYGON),
                      this.gluTessEndPolygon();
                }
          }),
          (h.GluTesselator.prototype.addVertex_ = function (e, t) {
            var i = this.lastEdge_;
            null === i
              ? ((i = h.mesh.makeEdge(this.mesh)), h.mesh.meshSplice(i, i.sym))
              : (h.mesh.splitEdge(i), (i = i.lNext)),
              (i.org.data = t),
              (i.org.coords[0] = e[0]),
              (i.org.coords[1] = e[1]),
              (i.org.coords[2] = e[2]),
              (i.winding = 1),
              (i.sym.winding = -1),
              (this.lastEdge_ = i);
          }),
          (h.GluTesselator.prototype.callBeginCallback = function (e) {
            this.beginCallback_ && this.beginCallback_(e, this.polygonData_);
          }),
          (h.GluTesselator.prototype.callVertexCallback = function (e) {
            this.vertexCallback_ && this.vertexCallback_(e, this.polygonData_);
          }),
          (h.GluTesselator.prototype.callEdgeFlagCallback = function (e) {
            this.edgeFlagCallback_ && this.edgeFlagCallback_(e, this.polygonData_);
          }),
          (h.GluTesselator.prototype.callEndCallback = function () {
            this.endCallback_ && this.endCallback_(this.polygonData_);
          }),
          (h.GluTesselator.prototype.callCombineCallback = function (e, t, i) {
            return (
              (this.combineCallback_ && this.combineCallback_(e, t, i, this.polygonData_)) || null
            );
          }),
          (h.GluTesselator.prototype.callErrorCallback = function (e) {
            this.errorCallback_ && this.errorCallback_(e, this.polygonData_);
          }),
          (h.GluFace = function (e, t) {
            (this.next = e || this),
              (this.prev = t || this),
              (this.anEdge = null),
              (this.inside = !1);
          }),
          (h.GluHalfEdge = function (e) {
            (this.next = e || this),
              (this.sym = null),
              (this.oNext = null),
              (this.lNext = null),
              (this.org = null),
              (this.lFace = null),
              (this.activeRegion = null),
              (this.winding = 0);
          }),
          (h.GluHalfEdge.prototype.rFace = function () {
            return this.sym.lFace;
          }),
          (h.GluHalfEdge.prototype.dst = function () {
            return this.sym.org;
          }),
          (h.GluHalfEdge.prototype.oPrev = function () {
            return this.sym.lNext;
          }),
          (h.GluHalfEdge.prototype.lPrev = function () {
            return this.oNext.sym;
          }),
          (h.GluHalfEdge.prototype.dPrev = function () {
            return this.lNext.sym;
          }),
          (h.GluHalfEdge.prototype.rPrev = function () {
            return this.sym.oNext;
          }),
          (h.GluHalfEdge.prototype.dNext = function () {
            return this.rPrev().sym;
          }),
          (h.GluHalfEdge.prototype.rNext = function () {
            return this.oPrev().sym;
          }),
          (h.GluMesh = function () {
            (this.vHead = new h.GluVertex()),
              (this.fHead = new h.GluFace()),
              (this.eHead = new h.GluHalfEdge()),
              (this.eHeadSym = new h.GluHalfEdge()),
              (this.eHead.sym = this.eHeadSym),
              (this.eHeadSym.sym = this.eHead);
          }),
          (h.GluMesh.prototype.checkMesh = function () {
            if (h.DEBUG) {
              var e,
                t,
                i,
                s = this.fHead,
                r = this.vHead,
                n = this.eHead,
                o = s;
              for (o = s; (t = o.next) !== s; o = t) {
                h.assert(t.prev === o), (e = t.anEdge);
                do {
                  h.assert(e.sym !== e),
                    h.assert(e.sym.sym === e),
                    h.assert(e.lNext.oNext.sym === e),
                    h.assert(e.oNext.sym.lNext === e),
                    h.assert(e.lFace === t),
                    (e = e.lNext);
                } while (e !== t.anEdge);
              }
              h.assert(t.prev === o && null === t.anEdge);
              var l = r;
              for (l = r; (i = l.next) !== r; l = i) {
                h.assert(i.prev === l), (e = i.anEdge);
                do {
                  h.assert(e.sym !== e),
                    h.assert(e.sym.sym === e),
                    h.assert(e.lNext.oNext.sym === e),
                    h.assert(e.oNext.sym.lNext === e),
                    h.assert(e.org === i),
                    (e = e.oNext);
                } while (e !== i.anEdge);
              }
              h.assert(i.prev === l && null === i.anEdge && null === i.data);
              var a = n;
              for (a = n; (e = a.next) !== n; a = e)
                h.assert(e.sym.next === a.sym),
                  h.assert(e.sym !== e),
                  h.assert(e.sym.sym === e),
                  h.assert(null !== e.org),
                  h.assert(null !== e.dst()),
                  h.assert(e.lNext.oNext.sym === e),
                  h.assert(e.oNext.sym.lNext === e);
              h.assert(
                e.sym.next === a.sym &&
                  e.sym === this.eHeadSym &&
                  e.sym.sym === e &&
                  null === e.org &&
                  null === e.dst() &&
                  null === e.lFace &&
                  null === e.rFace(),
              );
            }
          }),
          (h.GluVertex = function (e, t) {
            (this.next = e || this),
              (this.prev = t || this),
              (this.anEdge = null),
              (this.data = null),
              (this.coords = [0, 0, 0]),
              (this.s = 0),
              (this.t = 0),
              (this.pqHandle = 0);
          }),
          (h.PriorityQ = function () {
            (this.verts_ = []),
              (this.order_ = null),
              (this.size_ = 0),
              (this.initialized_ = !1),
              (this.heap_ = new h.PriorityQHeap());
          }),
          (h.PriorityQ.prototype.deleteQ = function () {
            (this.heap_ = null), (this.order_ = null), (this.verts_ = null);
          }),
          (h.PriorityQ.prototype.init = function () {
            this.order_ = [];
            for (var e = 0; e < this.size_; e++) this.order_[e] = e;
            var t,
              i =
                ((t = this.verts_),
                function (e, i) {
                  return h.geom.vertLeq(t[e], t[i]) ? 1 : -1;
                });
            if ((this.order_.sort(i), (this.initialized_ = !0), this.heap_.init(), h.DEBUG)) {
              var s = 0 + this.size_ - 1;
              for (e = 0; e < s; ++e)
                h.assert(
                  h.geom.vertLeq(this.verts_[this.order_[e + 1]], this.verts_[this.order_[e]]),
                );
            }
          }),
          (h.PriorityQ.prototype.insert = function (e) {
            if (this.initialized_) return this.heap_.insert(e);
            var t = this.size_++;
            return (this.verts_[t] = e), -(t + 1);
          }),
          (h.PriorityQ.prototype.extractMin = function () {
            if (0 === this.size_) return this.heap_.extractMin();
            var e = this.verts_[this.order_[this.size_ - 1]];
            if (!this.heap_.isEmpty()) {
              var t = this.heap_.minimum();
              if (h.geom.vertLeq(t, e)) return this.heap_.extractMin();
            }
            do {
              --this.size_;
            } while (this.size_ > 0 && null === this.verts_[this.order_[this.size_ - 1]]);
            return e;
          }),
          (h.PriorityQ.prototype.minimum = function () {
            if (0 === this.size_) return this.heap_.minimum();
            var e = this.verts_[this.order_[this.size_ - 1]];
            if (!this.heap_.isEmpty()) {
              var t = this.heap_.minimum();
              if (h.geom.vertLeq(t, e)) return t;
            }
            return e;
          }),
          (h.PriorityQ.prototype.remove = function (e) {
            if (e >= 0) this.heap_.remove(e);
            else
              for (
                e = -(e + 1),
                  h.assert(e < this.verts_.length && null !== this.verts_[e]),
                  this.verts_[e] = null;
                this.size_ > 0 && null === this.verts_[this.order_[this.size_ - 1]];

              )
                --this.size_;
          }),
          (h.PriorityQHeap = function () {
            (this.heap_ = h.PriorityQHeap.reallocNumeric_([0], h.PriorityQHeap.INIT_SIZE_ + 1)),
              (this.verts_ = [null, null]),
              (this.handles_ = [0, 0]),
              (this.size_ = 0),
              (this.max_ = h.PriorityQHeap.INIT_SIZE_),
              (this.freeList_ = 0),
              (this.initialized_ = !1),
              (this.heap_[1] = 1);
          }),
          (h.PriorityQHeap.INIT_SIZE_ = 32),
          (h.PriorityQHeap.reallocNumeric_ = function (e, t) {
            for (var i = new Array(t), s = 0; s < e.length; s++) i[s] = e[s];
            for (; s < t; s++) i[s] = 0;
            return i;
          }),
          (h.PriorityQHeap.prototype.init = function () {
            for (var e = this.size_; e >= 1; --e) this.floatDown_(e);
            this.initialized_ = !0;
          }),
          (h.PriorityQHeap.prototype.insert = function (e) {
            var t,
              i = ++this.size_;
            return (
              2 * i > this.max_ &&
                ((this.max_ *= 2),
                (this.handles_ = h.PriorityQHeap.reallocNumeric_(this.handles_, this.max_ + 1))),
              0 === this.freeList_
                ? (t = i)
                : ((t = this.freeList_), (this.freeList_ = this.handles_[this.freeList_])),
              (this.verts_[t] = e),
              (this.handles_[t] = i),
              (this.heap_[i] = t),
              this.initialized_ && this.floatUp_(i),
              t
            );
          }),
          (h.PriorityQHeap.prototype.isEmpty = function () {
            return 0 === this.size_;
          }),
          (h.PriorityQHeap.prototype.minimum = function () {
            return this.verts_[this.heap_[1]];
          }),
          (h.PriorityQHeap.prototype.extractMin = function () {
            var e = this.heap_,
              t = this.verts_,
              i = this.handles_,
              s = e[1],
              r = t[s];
            return (
              this.size_ > 0 &&
                ((e[1] = e[this.size_]),
                (i[e[1]] = 1),
                (t[s] = null),
                (i[s] = this.freeList_),
                (this.freeList_ = s),
                --this.size_ > 0 && this.floatDown_(1)),
              r
            );
          }),
          (h.PriorityQHeap.prototype.remove = function (e) {
            var t = this.heap_,
              i = this.verts_,
              s = this.handles_;
            h.assert(e >= 1 && e <= this.max_ && null !== i[e]);
            var r = s[e];
            if (((t[r] = t[this.size_]), (s[t[r]] = r), r <= --this.size_))
              if (r <= 1) this.floatDown_(r);
              else {
                var n = i[t[r]],
                  o = i[t[r >> 1]];
                h.geom.vertLeq(o, n) ? this.floatDown_(r) : this.floatUp_(r);
              }
            (i[e] = null), (s[e] = this.freeList_), (this.freeList_ = e);
          }),
          (h.PriorityQHeap.prototype.floatDown_ = function (e) {
            for (var t = this.heap_, i = this.verts_, s = this.handles_, r = e, n = t[r]; ; ) {
              var o = r << 1;
              o < this.size_ && h.geom.vertLeq(i[t[o + 1]], i[t[o]]) && (o += 1),
                h.assert(o <= this.max_);
              var l = t[o];
              if (o > this.size_ || h.geom.vertLeq(i[n], i[l])) return (t[r] = n), void (s[n] = r);
              (t[r] = l), (s[l] = r), (r = o);
            }
          }),
          (h.PriorityQHeap.prototype.floatUp_ = function (e) {
            for (var t = this.heap_, i = this.verts_, s = this.handles_, r = e, n = t[r]; ; ) {
              var o = r >> 1,
                l = t[o];
              if (0 === o || h.geom.vertLeq(i[l], i[n])) return (t[r] = n), void (s[n] = r);
              (t[r] = l), (s[l] = r), (r = o);
            }
          }),
          (h.ActiveRegion = function () {
            (this.eUp = null),
              (this.nodeUp = null),
              (this.windingNumber = 0),
              (this.inside = !1),
              (this.sentinel = !1),
              (this.dirty = !1),
              (this.fixUpperEdge = !1);
          }),
          (h.ActiveRegion.prototype.regionBelow = function () {
            return this.nodeUp.getPredecessor().getKey();
          }),
          (h.ActiveRegion.prototype.regionAbove = function () {
            return this.nodeUp.getSuccessor().getKey();
          }),
          (a = h)) && (l.exports = a);
      const c = s.L.getLogger('esri.views.2d.engine.webgl.mesh.templates.Tesselator');
      class x {
        constructor() {
          (this._currentVertexIndex = 0),
            (this._indexCounter = 0),
            (this._triangleIndices = [-1, -1, -1]),
            (this.glu = new u.exports.GluTesselator()),
            this.glu.gluTessCallback(
              u.exports.gluEnum.GLU_TESS_BEGIN,
              this._begincallback.bind(this),
            ),
            this.glu.gluTessCallback(
              u.exports.gluEnum.GLU_TESS_VERTEX_DATA,
              this._vertexCallback.bind(this),
            ),
            this.glu.gluTessCallback(u.exports.gluEnum.GLU_TESS_END, this._endcallback.bind(this)),
            this.glu.gluTessCallback(
              u.exports.gluEnum.GLU_TESS_COMBINE,
              this._combinecallback.bind(this),
            ),
            this.glu.gluTessCallback(
              u.exports.gluEnum.GLU_TESS_ERROR,
              this._errorcallback.bind(this),
            ),
            this.glu.gluTessCallback(
              u.exports.gluEnum.GLU_TESS_EDGE_FLAG,
              this._edgeCallback.bind(this),
            ),
            this.glu.gluTessProperty(
              u.exports.gluEnum.GLU_TESS_WINDING_RULE,
              u.exports.windingRule.GLU_TESS_WINDING_ODD,
            );
        }
        beginPolygon(e, t) {
          (this._triangleIndices[0] = -1),
            (this._triangleIndices[1] = -1),
            (this._triangleIndices[2] = -1),
            (this._currentVertexIndex = 0),
            (this._indexCounter = 0),
            this.glu.gluTessBeginPolygon(e),
            (this._indices = t);
        }
        endPolygon() {
          this.glu.gluTessEndPolygon();
        }
        beginContour() {
          this.glu.gluTessBeginContour();
        }
        endContour() {
          this.glu.gluTessEndContour();
        }
        addVertex(e, t) {
          this.glu.gluTessVertex(e, t);
        }
        _vertexCallback(e, t) {
          if (
            ((t[t.length] = e[0]),
            (t[t.length] = e[1]),
            (this._triangleIndices[this._currentVertexIndex] = -1),
            this._currentVertexIndex >= 2)
          ) {
            for (let e = 0; e < 3; e++)
              -1 === this._triangleIndices[e] && (this._triangleIndices[e] = this._indexCounter++),
                (this._indices[this._indices.length] = this._triangleIndices[e]);
            this._currentVertexIndex = 0;
          } else this._currentVertexIndex++;
        }
        _begincallback() {
          (this._triangleIndices[0] = -1),
            (this._triangleIndices[1] = -1),
            (this._triangleIndices[2] = -1),
            (this._currentVertexIndex = 0);
        }
        _endcallback() {
          this._currentVertexIndex = 0;
        }
        _errorcallback(e) {
          c.error(`Encountered error during tesselation: ${e}`);
        }
        _combinecallback(e) {
          return [e[0], e[1], e[2]];
        }
        _edgeCallback() {}
      }
      class g {
        constructor(e, t, i) {
          (this.ratio = e), (this.x = t), (this.y = i);
        }
      }
      class _ {
        constructor(e, t, i, s = 8, n = 8) {
          (this.lines = []),
            (this.starts = []),
            (this.validateTessellation = !0),
            (this.pixelRatio = s),
            (this.pixelMargin = n),
            (this.tileSize = r.k * s),
            (this.dz = e),
            (this.yPos = t),
            (this.xPos = i);
        }
        setPixelMargin(e) {
          e !== this.pixelMargin && ((this.pixelMargin = e), this.setExtent(this._extent));
        }
        setExtent(e) {
          (this._extent = e), (this.finalRatio = (this.tileSize / e) * (1 << this.dz));
          let t = this.pixelRatio * this.pixelMargin;
          t /= this.finalRatio;
          const i = e >> this.dz;
          t > i && (t = i),
            (this.margin = t),
            (this.xmin = i * this.xPos - t),
            (this.ymin = i * this.yPos - t),
            (this.xmax = this.xmin + i + 2 * t),
            (this.ymax = this.ymin + i + 2 * t);
        }
        reset(e) {
          (this.type = e),
            (this.lines = []),
            (this.starts = []),
            (this.line = null),
            (this.start = 0);
        }
        moveTo(e, t) {
          this._pushLine(),
            (this._prevIsIn = this._isIn(e, t)),
            this._moveTo(e, t, this._prevIsIn),
            (this._prevPt = new o(e, t)),
            (this._firstPt = new o(e, t)),
            (this._dist = 0);
        }
        lineTo(e, t) {
          const i = this._isIn(e, t),
            s = new o(e, t),
            r = o.distance(this._prevPt, s);
          let n, l, a, h, u, c, x, _;
          if (i)
            this._prevIsIn
              ? this._lineTo(e, t, !0)
              : ((n = this._prevPt),
                (l = s),
                (a = this._intersect(l, n)),
                (this.start = this._dist + r * (1 - this._r)),
                this._lineTo(a.x, a.y, !0),
                this._lineTo(l.x, l.y, !0));
          else if (this._prevIsIn)
            (l = this._prevPt),
              (n = s),
              (a = this._intersect(l, n)),
              this._lineTo(a.x, a.y, !0),
              this._lineTo(n.x, n.y, !1);
          else {
            const e = this._prevPt,
              t = s;
            if (
              (e.x <= this.xmin && t.x <= this.xmin) ||
              (e.x >= this.xmax && t.x >= this.xmax) ||
              (e.y <= this.ymin && t.y <= this.ymin) ||
              (e.y >= this.ymax && t.y >= this.ymax)
            )
              this._lineTo(t.x, t.y, !1);
            else {
              const i = [];
              if (
                (((e.x < this.xmin && t.x > this.xmin) || (e.x > this.xmin && t.x < this.xmin)) &&
                  ((h = (this.xmin - e.x) / (t.x - e.x)),
                  (_ = e.y + h * (t.y - e.y)),
                  _ <= this.ymin
                    ? (c = !1)
                    : _ >= this.ymax
                    ? (c = !0)
                    : i.push(new g(h, this.xmin, _))),
                ((e.x < this.xmax && t.x > this.xmax) || (e.x > this.xmax && t.x < this.xmax)) &&
                  ((h = (this.xmax - e.x) / (t.x - e.x)),
                  (_ = e.y + h * (t.y - e.y)),
                  _ <= this.ymin
                    ? (c = !1)
                    : _ >= this.ymax
                    ? (c = !0)
                    : i.push(new g(h, this.xmax, _))),
                ((e.y < this.ymin && t.y > this.ymin) || (e.y > this.ymin && t.y < this.ymin)) &&
                  ((h = (this.ymin - e.y) / (t.y - e.y)),
                  (x = e.x + h * (t.x - e.x)),
                  x <= this.xmin
                    ? (u = !1)
                    : x >= this.xmax
                    ? (u = !0)
                    : i.push(new g(h, x, this.ymin))),
                ((e.y < this.ymax && t.y > this.ymax) || (e.y > this.ymax && t.y < this.ymax)) &&
                  ((h = (this.ymax - e.y) / (t.y - e.y)),
                  (x = e.x + h * (t.x - e.x)),
                  x <= this.xmin
                    ? (u = !1)
                    : x >= this.xmax
                    ? (u = !0)
                    : i.push(new g(h, x, this.ymax))),
                0 === i.length)
              )
                u
                  ? c
                    ? this._lineTo(this.xmax, this.ymax, !0)
                    : this._lineTo(this.xmax, this.ymin, !0)
                  : c
                  ? this._lineTo(this.xmin, this.ymax, !0)
                  : this._lineTo(this.xmin, this.ymin, !0);
              else if (i.length > 1 && i[0].ratio > i[1].ratio)
                (this.start = this._dist + r * i[1].ratio),
                  this._lineTo(i[1].x, i[1].y, !0),
                  this._lineTo(i[0].x, i[0].y, !0);
              else {
                this.start = this._dist + r * i[0].ratio;
                for (let e = 0; e < i.length; e++) this._lineTo(i[e].x, i[e].y, !0);
              }
              this._lineTo(t.x, t.y, !1);
            }
          }
          (this._dist += r), (this._prevIsIn = i), (this._prevPt = s);
        }
        close() {
          if (this.line.length > 2) {
            const e = this._firstPt,
              t = this._prevPt;
            (e.x === t.x && e.y === t.y) || this.lineTo(e.x, e.y);
            const i = this.line;
            let s = i.length;
            for (
              ;
              s >= 4 &&
              ((i[0].x === i[1].x && i[0].x === i[s - 2].x) ||
                (i[0].y === i[1].y && i[0].y === i[s - 2].y));

            )
              i.pop(), (i[0].x = i[s - 2].x), (i[0].y = i[s - 2].y), --s;
          }
        }
        result(e = !0) {
          return (
            this._pushLine(),
            0 === this.lines.length
              ? null
              : (3 === this.type &&
                  e &&
                  p.simplify(this.tileSize, this.margin * this.finalRatio, this.lines),
                this.lines)
          );
        }
        resultWithStarts() {
          if (2 !== this.type) throw new Error('Only valid for lines');
          this._pushLine();
          const e = this.lines,
            t = e.length;
          if (0 === t) return null;
          const i = [];
          for (let s = 0; s < t; s++) i.push({ line: e[s], start: this.starts[s] || 0 });
          return i;
        }
        _isIn(e, t) {
          return e >= this.xmin && e <= this.xmax && t >= this.ymin && t <= this.ymax;
        }
        _intersect(e, t) {
          let i, s, r;
          if (t.x >= this.xmin && t.x <= this.xmax)
            (s = t.y <= this.ymin ? this.ymin : this.ymax),
              (r = (s - e.y) / (t.y - e.y)),
              (i = e.x + r * (t.x - e.x));
          else if (t.y >= this.ymin && t.y <= this.ymax)
            (i = t.x <= this.xmin ? this.xmin : this.xmax),
              (r = (i - e.x) / (t.x - e.x)),
              (s = e.y + r * (t.y - e.y));
          else {
            (s = t.y <= this.ymin ? this.ymin : this.ymax),
              (i = t.x <= this.xmin ? this.xmin : this.xmax);
            const n = (i - e.x) / (t.x - e.x),
              o = (s - e.y) / (t.y - e.y);
            n < o ? ((r = n), (s = e.y + n * (t.y - e.y))) : ((r = o), (i = e.x + o * (t.x - e.x)));
          }
          return (this._r = r), new o(i, s);
        }
        _pushLine() {
          this.line &&
            (1 === this.type
              ? this.line.length > 0 && (this.lines.push(this.line), this.starts.push(this.start))
              : 2 === this.type
              ? this.line.length > 1 && (this.lines.push(this.line), this.starts.push(this.start))
              : 3 === this.type &&
                this.line.length > 3 &&
                (this.lines.push(this.line), this.starts.push(this.start))),
            (this.line = []),
            (this.start = 0);
        }
        _moveTo(e, t, i) {
          3 !== this.type
            ? i &&
              ((e = Math.round((e - (this.xmin + this.margin)) * this.finalRatio)),
              (t = Math.round((t - (this.ymin + this.margin)) * this.finalRatio)),
              this.line.push(new o(e, t)))
            : (i ||
                (e < this.xmin && (e = this.xmin),
                e > this.xmax && (e = this.xmax),
                t < this.ymin && (t = this.ymin),
                t > this.ymax && (t = this.ymax)),
              (e = Math.round((e - (this.xmin + this.margin)) * this.finalRatio)),
              (t = Math.round((t - (this.ymin + this.margin)) * this.finalRatio)),
              this.line.push(new o(e, t)),
              (this._is_h = !1),
              (this._is_v = !1));
        }
        _lineTo(e, t, i) {
          let s, r;
          if (3 !== this.type)
            if (i) {
              if (
                ((e = Math.round((e - (this.xmin + this.margin)) * this.finalRatio)),
                (t = Math.round((t - (this.ymin + this.margin)) * this.finalRatio)),
                this.line.length > 0 && ((s = this.line[this.line.length - 1]), s.equals(e, t)))
              )
                return;
              this.line.push(new o(e, t));
            } else this.line && this.line.length > 0 && this._pushLine();
          else if (
            (i ||
              (e < this.xmin && (e = this.xmin),
              e > this.xmax && (e = this.xmax),
              t < this.ymin && (t = this.ymin),
              t > this.ymax && (t = this.ymax)),
            (e = Math.round((e - (this.xmin + this.margin)) * this.finalRatio)),
            (t = Math.round((t - (this.ymin + this.margin)) * this.finalRatio)),
            this.line && this.line.length > 0)
          ) {
            s = this.line[this.line.length - 1];
            const i = s.x === e,
              n = s.y === t;
            if (i && n) return;
            (this._is_h && i) || (this._is_v && n)
              ? ((s.x = e),
                (s.y = t),
                (r = this.line[this.line.length - 2]),
                r.x === e && r.y === t
                  ? (this.line.pop(),
                    this.line.length <= 1
                      ? ((this._is_h = !1), (this._is_v = !1))
                      : ((r = this.line[this.line.length - 2]),
                        (this._is_h = r.x === e),
                        (this._is_v = r.y === t)))
                  : ((this._is_h = r.x === e), (this._is_v = r.y === t)))
              : (this.line.push(new o(e, t)), (this._is_h = i), (this._is_v = n));
          } else this.line.push(new o(e, t));
        }
      }
      class d {
        setExtent(e) {
          this._ratio = 4096 === e ? 1 : 4096 / e;
        }
        get validateTessellation() {
          return this._ratio < 1;
        }
        reset(e) {
          (this.lines = []), (this.line = null);
        }
        moveTo(e, t) {
          this.line && this.lines.push(this.line), (this.line = []);
          const i = this._ratio;
          this.line.push(new o(e * i, t * i));
        }
        lineTo(e, t) {
          const i = this._ratio;
          this.line.push(new o(e * i, t * i));
        }
        close() {
          const e = this.line;
          e && !e[0].isEqual(e[e.length - 1]) && e.push(e[0]);
        }
        result() {
          return (
            this.line && this.lines.push(this.line), 0 === this.lines.length ? null : this.lines
          );
        }
      }
      class p {
        static simplify(e, t, i) {
          if (!i) return;
          const s = -t,
            r = e + t,
            n = -t,
            o = e + t,
            l = [],
            a = [],
            h = i.length;
          for (let e = 0; e < h; ++e) {
            const t = i[e];
            if (!t || t.length < 2) continue;
            let h,
              u = t[0];
            const c = t.length;
            for (let i = 1; i < c; ++i)
              (h = t[i]),
                u.x === h.x &&
                  (u.x <= s &&
                    (u.y > h.y
                      ? (l.push(e), l.push(i), l.push(0), l.push(-1))
                      : (a.push(e), a.push(i), a.push(0), a.push(-1))),
                  u.x >= r &&
                    (u.y < h.y
                      ? (l.push(e), l.push(i), l.push(1), l.push(-1))
                      : (a.push(e), a.push(i), a.push(1), a.push(-1)))),
                u.y === h.y &&
                  (u.y <= n &&
                    (u.x < h.x
                      ? (l.push(e), l.push(i), l.push(2), l.push(-1))
                      : (a.push(e), a.push(i), a.push(2), a.push(-1))),
                  u.y >= o &&
                    (u.x > h.x
                      ? (l.push(e), l.push(i), l.push(3), l.push(-1))
                      : (a.push(e), a.push(i), a.push(3), a.push(-1)))),
                (u = h);
          }
          if (0 === l.length || 0 === a.length) return;
          p.fillParent(i, a, l), p.fillParent(i, l, a);
          const u = [];
          p.calcDeltas(u, a, l), p.calcDeltas(u, l, a), p.addDeltas(u, i);
        }
        static fillParent(e, t, i) {
          const s = i.length,
            r = t.length;
          for (let o = 0; o < r; o += 4) {
            const r = t[o],
              l = t[o + 1],
              a = t[o + 2],
              h = e[r][l - 1],
              u = e[r][l];
            let c = 8092,
              x = -1;
            for (let t = 0; t < s; t += 4) {
              if (i[t + 2] !== a) continue;
              const s = i[t],
                r = i[t + 1],
                o = e[s][r - 1],
                l = e[s][r];
              switch (a) {
                case 0:
                case 1:
                  if ((0, n.b)(h.y, o.y, l.y) && (0, n.b)(u.y, o.y, l.y)) {
                    const e = Math.abs(l.y - o.y);
                    e < c && ((c = e), (x = t));
                  }
                  break;
                case 2:
                case 3:
                  if ((0, n.b)(h.x, o.x, l.x) && (0, n.b)(u.x, o.x, l.x)) {
                    const e = Math.abs(l.x - o.x);
                    e < c && ((c = e), (x = t));
                  }
              }
            }
            t[o + 3] = x;
          }
        }
        static calcDeltas(e, t, i) {
          const s = t.length;
          for (let r = 0; r < s; r += 4) {
            const s = [],
              n = p.calcDelta(r, t, i, s);
            e.push(t[r]), e.push(t[r + 1]), e.push(t[r + 2]), e.push(n);
          }
        }
        static calcDelta(e, t, i, s) {
          const r = t[e + 3];
          if (-1 === r) return 0;
          const n = s.length;
          return n > 1 && s[n - 2] === r ? 0 : (s.push(r), p.calcDelta(r, i, t, s) + 1);
        }
        static addDeltas(e, t) {
          const i = e.length;
          let s = 0;
          for (let t = 0; t < i; t += 4) {
            const i = e[t + 3];
            i > s && (s = i);
          }
          for (let r = 0; r < i; r += 4) {
            const i = t[e[r]],
              n = e[r + 1],
              o = s - e[r + 3];
            switch (e[r + 2]) {
              case 0:
                (i[n - 1].x -= o),
                  (i[n].x -= o),
                  1 === n && (i[i.length - 1].x -= o),
                  n === i.length - 1 && (i[0].x -= o);
                break;
              case 1:
                (i[n - 1].x += o),
                  (i[n].x += o),
                  1 === n && (i[i.length - 1].x += o),
                  n === i.length - 1 && (i[0].x += o);
                break;
              case 2:
                (i[n - 1].y -= o),
                  (i[n].y -= o),
                  1 === n && (i[i.length - 1].y -= o),
                  n === i.length - 1 && (i[0].y -= o);
                break;
              case 3:
                (i[n - 1].y += o),
                  (i[n].y += o),
                  1 === n && (i[i.length - 1].y += o),
                  n === i.length - 1 && (i[0].y += o);
            }
          }
        }
      }
    },
    45731: (e, t, i) => {
      'use strict';
      i.d(t, { L: () => x });
      var s = i(82356);
      function r(e, t) {
        return e.x === t.x && e.y === t.y;
      }
      function n(e, t) {
        return (e.x = t.y), (e.y = -t.x), e;
      }
      function o(e, t) {
        return (e.x = -t.y), (e.y = t.x), e;
      }
      function l(e, t) {
        return (e.x = t.x), (e.y = t.y), e;
      }
      function a(e, t) {
        return (e.x = -t.x), (e.y = -t.y), e;
      }
      function h(e) {
        return Math.sqrt(e.x * e.x + e.y * e.y);
      }
      function u(e, t) {
        return e.x * t.x + e.y * t.y;
      }
      function c(e, t, i, s) {
        return (e.x = t.x * i + t.y * s), (e.y = t.x * s - t.y * i), e;
      }
      class x {
        constructor(e, t, i) {
          (this.writeVertex = e),
            (this.writeTriangle = t),
            (this.canUseThinTessellation = i),
            (this.prevNormal = { x: void 0, y: void 0 }),
            (this.nextNormal = { x: void 0, y: void 0 }),
            (this.textureNormalLeft = { x: 0, y: 1 }),
            (this.textureNormalRight = { x: 0, y: -1 }),
            (this.textureNormal = { x: void 0, y: void 0 }),
            (this.joinNormal = { x: void 0, y: void 0 }),
            (this.inner = { x: void 0, y: void 0 }),
            (this.outer = { x: void 0, y: void 0 }),
            (this.roundStart = { x: void 0, y: void 0 }),
            (this.roundEnd = { x: void 0, y: void 0 }),
            (this.startBreak = { x: void 0, y: void 0 }),
            (this.endBreak = { x: void 0, y: void 0 }),
            (this.innerPrev = { x: void 0, y: void 0 }),
            (this.innerNext = { x: void 0, y: void 0 }),
            (this.bevelStart = { x: void 0, y: void 0 }),
            (this.bevelEnd = { x: void 0, y: void 0 }),
            (this.bevelMiddle = { x: void 0, y: void 0 });
        }
        tessellate(e, t) {
          !(function (e) {
            if (!e) return;
            const t = e.length;
            if (t <= 1) return;
            let i = 0;
            for (let s = 1; s < t; s++) r(e[s], e[i]) || ++i === s || (e[i] = e[s]);
            e.length = i + 1;
          })(e),
            this.canUseThinTessellation && t.halfWidth < s.T && !t.offset
              ? this.tessellateThin_(e, t)
              : this.tessellate_(e, t);
        }
        tessellateThin_(e, t) {
          if (e.length < 2) return;
          const i = t.wrapDistance || 65535;
          let s = t.initialDistance || 0,
            r = !1,
            n = e[0].x,
            o = e[0].y;
          const l = e.length;
          for (let t = 1; t < l; ++t) {
            r && ((r = !1), (s = 0));
            let l = e[t].x,
              a = e[t].y,
              h = l - n,
              u = a - o,
              c = Math.sqrt(h * h + u * u);
            if (((h /= c), (u /= c), s + c > i)) {
              r = !0;
              const e = (i - s) / c;
              (c = i - s), (l = (1 - e) * n + e * l), (a = (1 - e) * o + e * a), --t;
            }
            const x = this.writeVertex(n, o, 0, 0, h, u, u, -h, 0, -1, s),
              g = this.writeVertex(n, o, 0, 0, h, u, -u, h, 0, 1, s);
            s += c;
            const _ = this.writeVertex(l, a, 0, 0, h, u, u, -h, 0, -1, s),
              d = this.writeVertex(l, a, 0, 0, h, u, -u, h, 0, 1, s);
            this.writeTriangle(x, g, _), this.writeTriangle(g, _, d), (n = l), (o = a);
          }
        }
        tessellate_(e, t) {
          const i = e[0],
            s = e[e.length - 1],
            x = r(i, s),
            g = x ? 3 : 2;
          if (e.length < g) return;
          const _ = t.pixelCoordRatio,
            d = null != t.capType ? t.capType : 0,
            p = null != t.joinType ? t.joinType : 2,
            m = null != t.miterLimit ? Math.min(t.miterLimit, 4) : 2,
            y = null != t.roundLimit ? Math.min(t.roundLimit, 1.05) : 1.05,
            f = null != t.halfWidth ? t.halfWidth : 2,
            v = !!t.textured;
          let E,
            T,
            N = null,
            w = null;
          const S = this.prevNormal,
            L = this.nextNormal;
          let U = -1,
            G = -1;
          const R = this.joinNormal;
          let b, A;
          const I = this.textureNormalLeft,
            O = this.textureNormalRight,
            D = this.textureNormal;
          let k = -1,
            C = -1;
          const P = t.wrapDistance || 65535;
          let F = t.initialDistance || 0;
          const M = this.writeVertex,
            B = this.writeTriangle,
            V = function (e, t, i, s, r, n) {
              const o = M(E, T, b, A, i, s, e, t, r, n, F);
              return k >= 0 && C >= 0 && o >= 0 && B(k, C, o), (k = C), (C = o), o;
            };
          x &&
            ((N = e[e.length - 2]),
            (L.x = s.x - N.x),
            (L.y = s.y - N.y),
            (G = h(L)),
            (L.x /= G),
            (L.y /= G));
          let q = !1;
          for (let t = 0; t < e.length; ++t) {
            if (
              (q && ((q = !1), (F = 0)),
              N && ((S.x = -L.x), (S.y = -L.y), (U = G), F + U > P && (q = !0)),
              q)
            ) {
              const i = (P - F) / U;
              (U = P - F),
                (N = { x: (1 - i) * N.x + i * e[t].x, y: (1 - i) * N.y + i * e[t].y }),
                --t;
            } else N = e[t];
            (E = N.x), (T = N.y);
            const i = t <= 0 && !q,
              s = t === e.length - 1;
            if (
              (i || (F += U),
              (w = s ? (x ? e[1] : null) : e[t + 1]),
              w
                ? ((L.x = w.x - E), (L.y = w.y - T), (G = h(L)), (L.x /= G), (L.y /= G))
                : ((L.x = void 0), (L.y = void 0)),
              !x)
            ) {
              if (i) {
                o(R, L),
                  (b = R.x),
                  (A = R.y),
                  2 === d &&
                    (V(-L.y - L.x, L.x - L.y, L.x, L.y, 0, -1),
                    V(L.y - L.x, -L.x - L.y, L.x, L.y, 0, 1)),
                  1 === d &&
                    (V(-L.y - L.x, L.x - L.y, L.x, L.y, -1, -1),
                    V(L.y - L.x, -L.x - L.y, L.x, L.y, -1, 1)),
                  (1 !== d && 0 !== d) ||
                    (V(-L.y, L.x, L.x, L.y, 0, -1), V(L.y, -L.x, L.x, L.y, 0, 1));
                continue;
              }
              if (s) {
                n(R, S),
                  (b = R.x),
                  (A = R.y),
                  (1 !== d && 0 !== d) ||
                    (V(S.y, -S.x, -S.x, -S.y, 0, -1), V(-S.y, S.x, -S.x, -S.y, 0, 1)),
                  2 === d &&
                    (V(S.y - S.x, -S.x - S.y, -S.x, -S.y, 0, -1),
                    V(-S.y - S.x, S.x - S.y, -S.x, -S.y, 0, 1)),
                  1 === d &&
                    (V(S.y - S.x, -S.x - S.y, -S.x, -S.y, 1, -1),
                    V(-S.y - S.x, S.x - S.y, -S.x, -S.y, 1, 1));
                continue;
              }
            }
            let r,
              g,
              M = ((z = L), -((H = S).x * z.y - H.y * z.x));
            if (Math.abs(M) < 0.01)
              u(S, L) > 0
                ? ((R.x = S.x), (R.y = S.y), (M = 1), (r = Number.MAX_VALUE), (g = !0))
                : (o(R, L), (M = 1), (r = 1), (g = !1));
            else {
              (R.x = (S.x + L.x) / M), (R.y = (S.y + L.y) / M), (r = h(R));
              const e = (r - 1) * f * _;
              g = r > 4 || (e > U && e > G);
            }
            (b = R.x), (A = R.y);
            let B = p;
            switch (p) {
              case 0:
                r < 1.05 && (B = 2);
                break;
              case 1:
                r < y && (B = 2);
                break;
              case 2:
                r > m && (B = 0);
            }
            switch (B) {
              case 2:
                if ((V(R.x, R.y, -S.x, -S.y, 0, -1), V(-R.x, -R.y, -S.x, -S.y, 0, 1), s)) break;
                if (v) {
                  const e = q ? 0 : F;
                  (k = this.writeVertex(E, T, b, A, L.x, L.y, R.x, R.y, 0, -1, e)),
                    (C = this.writeVertex(E, T, b, A, L.x, L.y, -R.x, -R.y, 0, 1, e));
                }
                break;
              case 0: {
                const e = M < 0;
                let t, i, r, h;
                if (e) {
                  const e = k;
                  (k = C), (C = e), (t = I), (i = O);
                } else (t = O), (i = I);
                if (g)
                  (r = e ? o(this.innerPrev, S) : n(this.innerPrev, S)),
                    (h = e ? n(this.innerNext, L) : o(this.innerNext, L));
                else {
                  const t = e ? a(this.inner, R) : l(this.inner, R);
                  (r = t), (h = t);
                }
                const u = e ? n(this.bevelStart, S) : o(this.bevelStart, S);
                V(r.x, r.y, -S.x, -S.y, t.x, t.y);
                const x = V(u.x, u.y, -S.x, -S.y, i.x, i.y);
                if (s) break;
                const _ = e ? o(this.bevelEnd, L) : n(this.bevelEnd, L);
                if (g) {
                  const e = this.writeVertex(E, T, b, A, -S.x, -S.y, 0, 0, 0, 0, F);
                  (k = this.writeVertex(E, T, b, A, L.x, L.y, h.x, h.y, t.x, t.y, F)),
                    (C = this.writeVertex(E, T, b, A, L.x, L.y, _.x, _.y, i.x, i.y, F)),
                    this.writeTriangle(x, e, C);
                } else {
                  if (v) {
                    const e = this.bevelMiddle;
                    (e.x = (u.x + _.x) / 2),
                      (e.y = (u.y + _.y) / 2),
                      c(D, e, -S.x, -S.y),
                      V(e.x, e.y, -S.x, -S.y, D.x, D.y),
                      c(D, e, L.x, L.y),
                      (k = this.writeVertex(E, T, b, A, L.x, L.y, e.x, e.y, D.x, D.y, F)),
                      (C = this.writeVertex(E, T, b, A, L.x, L.y, h.x, h.y, t.x, t.y, F));
                  } else {
                    const e = k;
                    (k = C), (C = e);
                  }
                  V(_.x, _.y, L.x, L.y, i.x, i.y);
                }
                if (e) {
                  const e = k;
                  (k = C), (C = e);
                }
                break;
              }
              case 1: {
                const e = M < 0;
                let t, i;
                if (e) {
                  const e = k;
                  (k = C), (C = e), (t = I), (i = O);
                } else (t = O), (i = I);
                const h = e ? a(this.inner, R) : l(this.inner, R);
                let x, _;
                g
                  ? ((x = e ? o(this.innerPrev, S) : n(this.innerPrev, S)),
                    (_ = e ? n(this.innerNext, L) : o(this.innerNext, L)))
                  : ((x = h), (_ = h));
                const d = e ? n(this.roundStart, S) : o(this.roundStart, S),
                  p = e ? o(this.roundEnd, L) : n(this.roundEnd, L),
                  m = V(x.x, x.y, -S.x, -S.y, t.x, t.y),
                  y = V(d.x, d.y, -S.x, -S.y, i.x, i.y);
                if (s) break;
                const f = this.writeVertex(E, T, b, A, -S.x, -S.y, 0, 0, 0, 0, F);
                g || this.writeTriangle(k, C, f);
                const N = a(this.outer, h),
                  w = this.writeVertex(E, T, b, A, L.x, L.y, p.x, p.y, i.x, i.y, F);
                let U, G;
                const P = r > 2;
                if (P) {
                  let t;
                  r !== Number.MAX_VALUE
                    ? ((N.x /= r), (N.y /= r), (t = u(S, N)), (t = (r * (t * t - 1) + 1) / t))
                    : (t = -1),
                    (U = e ? n(this.startBreak, S) : o(this.startBreak, S)),
                    (U.x += S.x * t),
                    (U.y += S.y * t),
                    (G = e ? o(this.endBreak, L) : n(this.endBreak, L)),
                    (G.x += L.x * t),
                    (G.y += L.y * t);
                }
                c(D, N, -S.x, -S.y);
                const B = this.writeVertex(E, T, b, A, -S.x, -S.y, N.x, N.y, D.x, D.y, F);
                c(D, N, L.x, L.y);
                const q = v ? this.writeVertex(E, T, b, A, L.x, L.y, N.x, N.y, D.x, D.y, F) : B,
                  H = f,
                  z = v ? this.writeVertex(E, T, b, A, L.x, L.y, 0, 0, 0, 0, F) : f;
                let W = -1,
                  Z = -1;
                if (
                  (P &&
                    (c(D, U, -S.x, -S.y),
                    (W = this.writeVertex(E, T, b, A, -S.x, -S.y, U.x, U.y, D.x, D.y, F)),
                    c(D, G, L.x, L.y),
                    (Z = this.writeVertex(E, T, b, A, L.x, L.y, G.x, G.y, D.x, D.y, F))),
                  v
                    ? P
                      ? (this.writeTriangle(H, y, W),
                        this.writeTriangle(H, W, B),
                        this.writeTriangle(z, q, Z),
                        this.writeTriangle(z, Z, w))
                      : (this.writeTriangle(H, y, B), this.writeTriangle(z, q, w))
                    : P
                    ? (this.writeTriangle(f, y, W),
                      this.writeTriangle(f, W, Z),
                      this.writeTriangle(f, Z, w))
                    : (this.writeTriangle(f, y, B), this.writeTriangle(f, q, w)),
                  g
                    ? ((k = this.writeVertex(E, T, b, A, L.x, L.y, _.x, _.y, t.x, t.y, F)), (C = w))
                    : ((k = v ? this.writeVertex(E, T, b, A, L.x, L.y, _.x, _.y, t.x, t.y, F) : m),
                      this.writeTriangle(k, z, w),
                      (C = w)),
                  e)
                ) {
                  const e = k;
                  (k = C), (C = e);
                }
                break;
              }
            }
          }
          var H, z;
        }
      }
    },
    11545: (e, t, i) => {
      'use strict';
      i.d(t, { e: () => o });
      var s,
        r,
        n = { exports: {} };
      (s = n),
        void 0 !==
          (r = (function () {
            function e(e, i, r) {
              r = r || 2;
              var n,
                o,
                l,
                h,
                u,
                c,
                x,
                g = i && i.length,
                _ = g ? i[0] * r : e.length,
                d = t(e, 0, _, r, !0),
                p = [];
              if (!d || d.next === d.prev) return p;
              if ((g && (d = a(e, i, d, r)), e.length > 80 * r)) {
                (n = l = e[0]), (o = h = e[1]);
                for (var m = r; m < _; m += r)
                  (u = e[m]) < n && (n = u),
                    (c = e[m + 1]) < o && (o = c),
                    u > l && (l = u),
                    c > h && (h = c);
                x = 0 !== (x = Math.max(l - n, h - o)) ? 1 / x : 0;
              }
              return s(d, p, r, n, o, x), p;
            }
            function t(e, t, i, s, r) {
              var n, o;
              if (r === U(e, t, i, s) > 0) for (n = t; n < i; n += s) o = w(n, e[n], e[n + 1], o);
              else for (n = i - s; n >= t; n -= s) o = w(n, e[n], e[n + 1], o);
              return o && y(o, o.next) && (S(o), (o = o.next)), o;
            }
            function i(e, t) {
              if (!e) return e;
              t || (t = e);
              var i,
                s = e;
              do {
                if (((i = !1), s.steiner || (!y(s, s.next) && 0 !== m(s.prev, s, s.next))))
                  s = s.next;
                else {
                  if ((S(s), (s = t = s.prev) === s.next)) break;
                  i = !0;
                }
              } while (i || s !== t);
              return t;
            }
            function s(e, t, a, h, u, c, g) {
              if (e) {
                !g && c && x(e, h, u, c);
                for (var _, d, p = e; e.prev !== e.next; )
                  if (((_ = e.prev), (d = e.next), c ? n(e, h, u, c) : r(e)))
                    t.push(_.i / a),
                      t.push(e.i / a),
                      t.push(d.i / a),
                      S(e),
                      (e = d.next),
                      (p = d.next);
                  else if ((e = d) === p) {
                    g
                      ? 1 === g
                        ? s((e = o(i(e), t, a)), t, a, h, u, c, 2)
                        : 2 === g && l(e, t, a, h, u, c)
                      : s(i(e), t, a, h, u, c, 1);
                    break;
                  }
              }
            }
            function r(e) {
              var t = e.prev,
                i = e,
                s = e.next;
              if (m(t, i, s) >= 0) return !1;
              for (var r = e.next.next; r !== e.prev; ) {
                if (d(t.x, t.y, i.x, i.y, s.x, s.y, r.x, r.y) && m(r.prev, r, r.next) >= 0)
                  return !1;
                r = r.next;
              }
              return !0;
            }
            function n(e, t, i, s) {
              var r = e.prev,
                n = e,
                o = e.next;
              if (m(r, n, o) >= 0) return !1;
              for (
                var l = r.x < n.x ? (r.x < o.x ? r.x : o.x) : n.x < o.x ? n.x : o.x,
                  a = r.y < n.y ? (r.y < o.y ? r.y : o.y) : n.y < o.y ? n.y : o.y,
                  h = r.x > n.x ? (r.x > o.x ? r.x : o.x) : n.x > o.x ? n.x : o.x,
                  u = r.y > n.y ? (r.y > o.y ? r.y : o.y) : n.y > o.y ? n.y : o.y,
                  c = g(l, a, t, i, s),
                  x = g(h, u, t, i, s),
                  _ = e.prevZ,
                  p = e.nextZ;
                _ && _.z >= c && p && p.z <= x;

              ) {
                if (
                  _ !== e.prev &&
                  _ !== e.next &&
                  d(r.x, r.y, n.x, n.y, o.x, o.y, _.x, _.y) &&
                  m(_.prev, _, _.next) >= 0
                )
                  return !1;
                if (
                  ((_ = _.prevZ),
                  p !== e.prev &&
                    p !== e.next &&
                    d(r.x, r.y, n.x, n.y, o.x, o.y, p.x, p.y) &&
                    m(p.prev, p, p.next) >= 0)
                )
                  return !1;
                p = p.nextZ;
              }
              for (; _ && _.z >= c; ) {
                if (
                  _ !== e.prev &&
                  _ !== e.next &&
                  d(r.x, r.y, n.x, n.y, o.x, o.y, _.x, _.y) &&
                  m(_.prev, _, _.next) >= 0
                )
                  return !1;
                _ = _.prevZ;
              }
              for (; p && p.z <= x; ) {
                if (
                  p !== e.prev &&
                  p !== e.next &&
                  d(r.x, r.y, n.x, n.y, o.x, o.y, p.x, p.y) &&
                  m(p.prev, p, p.next) >= 0
                )
                  return !1;
                p = p.nextZ;
              }
              return !0;
            }
            function o(e, t, s) {
              var r = e;
              do {
                var n = r.prev,
                  o = r.next.next;
                !y(n, o) &&
                  f(n, r, r.next, o) &&
                  T(n, o) &&
                  T(o, n) &&
                  (t.push(n.i / s), t.push(r.i / s), t.push(o.i / s), S(r), S(r.next), (r = e = o)),
                  (r = r.next);
              } while (r !== e);
              return i(r);
            }
            function l(e, t, r, n, o, l) {
              var a = e;
              do {
                for (var h = a.next.next; h !== a.prev; ) {
                  if (a.i !== h.i && p(a, h)) {
                    var u = N(a, h);
                    return (
                      (a = i(a, a.next)),
                      (u = i(u, u.next)),
                      s(a, t, r, n, o, l),
                      void s(u, t, r, n, o, l)
                    );
                  }
                  h = h.next;
                }
                a = a.next;
              } while (a !== e);
            }
            function a(e, s, r, n) {
              var o,
                l,
                a,
                c = [];
              for (o = 0, l = s.length; o < l; o++)
                (a = t(e, s[o] * n, o < l - 1 ? s[o + 1] * n : e.length, n, !1)) === a.next &&
                  (a.steiner = !0),
                  c.push(_(a));
              for (c.sort(h), o = 0; o < c.length; o++) r = i((r = u(c[o], r)), r.next);
              return r;
            }
            function h(e, t) {
              return e.x - t.x;
            }
            function u(e, t) {
              var s = (function (e, t) {
                var i,
                  s = t,
                  r = e.x,
                  n = e.y,
                  o = -1 / 0;
                do {
                  if (n <= s.y && n >= s.next.y && s.next.y !== s.y) {
                    var l = s.x + ((n - s.y) * (s.next.x - s.x)) / (s.next.y - s.y);
                    if (l <= r && l > o) {
                      if (((o = l), l === r)) {
                        if (n === s.y) return s;
                        if (n === s.next.y) return s.next;
                      }
                      i = s.x < s.next.x ? s : s.next;
                    }
                  }
                  s = s.next;
                } while (s !== t);
                if (!i) return null;
                if (r === o) return i;
                var a,
                  h = i,
                  u = i.x,
                  x = i.y,
                  g = 1 / 0;
                s = i;
                do {
                  r >= s.x &&
                    s.x >= u &&
                    r !== s.x &&
                    d(n < x ? r : o, n, u, x, n < x ? o : r, n, s.x, s.y) &&
                    ((a = Math.abs(n - s.y) / (r - s.x)),
                    T(s, e) &&
                      (a < g || (a === g && (s.x > i.x || (s.x === i.x && c(i, s))))) &&
                      ((i = s), (g = a))),
                    (s = s.next);
                } while (s !== h);
                return i;
              })(e, t);
              if (!s) return t;
              var r = N(s, e),
                n = i(s, s.next);
              return i(r, r.next), t === s ? n : t;
            }
            function c(e, t) {
              return m(e.prev, e, t.prev) < 0 && m(t.next, e, e.next) < 0;
            }
            function x(e, t, i, s) {
              var r = e;
              do {
                if (
                  (null === r.z && (r.z = g(r.x, r.y, t, i, s)),
                  r.prev.next !== r || r.next.prev !== r)
                )
                  return (r.prev.next = r), (r.next.prev = r), x(e, t, i, s);
                (r.prevZ = r.prev), (r.nextZ = r.next), (r = r.next);
              } while (r !== e);
              (r.prevZ.nextZ = null),
                (r.prevZ = null),
                (function (e) {
                  var t,
                    i,
                    s,
                    r,
                    n,
                    o,
                    l,
                    a,
                    h = 1;
                  do {
                    for (i = e, e = null, n = null, o = 0; i; ) {
                      for (o++, s = i, l = 0, t = 0; t < h && (l++, (s = s.nextZ)); t++);
                      for (a = h; l > 0 || (a > 0 && s); )
                        0 !== l && (0 === a || !s || i.z <= s.z)
                          ? ((r = i), (i = i.nextZ), l--)
                          : ((r = s), (s = s.nextZ), a--),
                          n ? (n.nextZ = r) : (e = r),
                          (r.prevZ = n),
                          (n = r);
                      i = s;
                    }
                    (n.nextZ = null), (h *= 2);
                  } while (o > 1);
                })(r);
            }
            function g(e, t, i, s, r) {
              return (
                (e =
                  1431655765 &
                  ((e =
                    858993459 &
                    ((e =
                      252645135 &
                      ((e = 16711935 & ((e = 32767 * (e - i) * r) | (e << 8))) | (e << 4))) |
                      (e << 2))) |
                    (e << 1))) |
                ((t =
                  1431655765 &
                  ((t =
                    858993459 &
                    ((t =
                      252645135 &
                      ((t = 16711935 & ((t = 32767 * (t - s) * r) | (t << 8))) | (t << 4))) |
                      (t << 2))) |
                    (t << 1))) <<
                  1)
              );
            }
            function _(e) {
              var t = e,
                i = e;
              do {
                (t.x < i.x || (t.x === i.x && t.y < i.y)) && (i = t), (t = t.next);
              } while (t !== e);
              return i;
            }
            function d(e, t, i, s, r, n, o, l) {
              return (
                (r - o) * (t - l) - (e - o) * (n - l) >= 0 &&
                (e - o) * (s - l) - (i - o) * (t - l) >= 0 &&
                (i - o) * (n - l) - (r - o) * (s - l) >= 0
              );
            }
            function p(e, t) {
              return (
                e.next.i !== t.i &&
                e.prev.i !== t.i &&
                !(function (e, t) {
                  var i = e;
                  do {
                    if (
                      i.i !== e.i &&
                      i.next.i !== e.i &&
                      i.i !== t.i &&
                      i.next.i !== t.i &&
                      f(i, i.next, e, t)
                    )
                      return !0;
                    i = i.next;
                  } while (i !== e);
                  return !1;
                })(e, t) &&
                ((T(e, t) &&
                  T(t, e) &&
                  (function (e, t) {
                    var i = e,
                      s = !1,
                      r = (e.x + t.x) / 2,
                      n = (e.y + t.y) / 2;
                    do {
                      i.y > n != i.next.y > n &&
                        i.next.y !== i.y &&
                        r < ((i.next.x - i.x) * (n - i.y)) / (i.next.y - i.y) + i.x &&
                        (s = !s),
                        (i = i.next);
                    } while (i !== e);
                    return s;
                  })(e, t) &&
                  (m(e.prev, e, t.prev) || m(e, t.prev, t))) ||
                  (y(e, t) && m(e.prev, e, e.next) > 0 && m(t.prev, t, t.next) > 0))
              );
            }
            function m(e, t, i) {
              return (t.y - e.y) * (i.x - t.x) - (t.x - e.x) * (i.y - t.y);
            }
            function y(e, t) {
              return e.x === t.x && e.y === t.y;
            }
            function f(e, t, i, s) {
              var r = E(m(e, t, i)),
                n = E(m(e, t, s)),
                o = E(m(i, s, e)),
                l = E(m(i, s, t));
              return (
                (r !== n && o !== l) ||
                !(0 !== r || !v(e, i, t)) ||
                !(0 !== n || !v(e, s, t)) ||
                !(0 !== o || !v(i, e, s)) ||
                !(0 !== l || !v(i, t, s))
              );
            }
            function v(e, t, i) {
              return (
                t.x <= Math.max(e.x, i.x) &&
                t.x >= Math.min(e.x, i.x) &&
                t.y <= Math.max(e.y, i.y) &&
                t.y >= Math.min(e.y, i.y)
              );
            }
            function E(e) {
              return e > 0 ? 1 : e < 0 ? -1 : 0;
            }
            function T(e, t) {
              return m(e.prev, e, e.next) < 0
                ? m(e, t, e.next) >= 0 && m(e, e.prev, t) >= 0
                : m(e, t, e.prev) < 0 || m(e, e.next, t) < 0;
            }
            function N(e, t) {
              var i = new L(e.i, e.x, e.y),
                s = new L(t.i, t.x, t.y),
                r = e.next,
                n = t.prev;
              return (
                (e.next = t),
                (t.prev = e),
                (i.next = r),
                (r.prev = i),
                (s.next = i),
                (i.prev = s),
                (n.next = s),
                (s.prev = n),
                s
              );
            }
            function w(e, t, i, s) {
              var r = new L(e, t, i);
              return (
                s
                  ? ((r.next = s.next), (r.prev = s), (s.next.prev = r), (s.next = r))
                  : ((r.prev = r), (r.next = r)),
                r
              );
            }
            function S(e) {
              (e.next.prev = e.prev),
                (e.prev.next = e.next),
                e.prevZ && (e.prevZ.nextZ = e.nextZ),
                e.nextZ && (e.nextZ.prevZ = e.prevZ);
            }
            function L(e, t, i) {
              (this.i = e),
                (this.x = t),
                (this.y = i),
                (this.prev = null),
                (this.next = null),
                (this.z = null),
                (this.prevZ = null),
                (this.nextZ = null),
                (this.steiner = !1);
            }
            function U(e, t, i, s) {
              for (var r = 0, n = t, o = i - s; n < i; n += s)
                (r += (e[o] - e[n]) * (e[n + 1] + e[o + 1])), (o = n);
              return r;
            }
            return (
              (e.deviation = function (e, t, i, s) {
                var r = t && t.length,
                  n = r ? t[0] * i : e.length,
                  o = Math.abs(U(e, 0, n, i));
                if (r)
                  for (var l = 0, a = t.length; l < a; l++) {
                    var h = t[l] * i,
                      u = l < a - 1 ? t[l + 1] * i : e.length;
                    o -= Math.abs(U(e, h, u, i));
                  }
                var c = 0;
                for (l = 0; l < s.length; l += 3) {
                  var x = s[l] * i,
                    g = s[l + 1] * i,
                    _ = s[l + 2] * i;
                  c += Math.abs(
                    (e[x] - e[_]) * (e[g + 1] - e[x + 1]) - (e[x] - e[g]) * (e[_ + 1] - e[x + 1]),
                  );
                }
                return 0 === o && 0 === c ? 0 : Math.abs((c - o) / o);
              }),
              (e.flatten = function (e) {
                for (
                  var t = e[0][0].length,
                    i = { vertices: [], holes: [], dimensions: t },
                    s = 0,
                    r = 0;
                  r < e.length;
                  r++
                ) {
                  for (var n = 0; n < e[r].length; n++)
                    for (var o = 0; o < t; o++) i.vertices.push(e[r][n][o]);
                  r > 0 && ((s += e[r - 1].length), i.holes.push(s));
                }
                return i;
              }),
              e
            );
          })()) && (s.exports = r);
      var o = n.exports;
    },
  },
]);
