policy. At work, he often seeks advice from his co-worker, Hiiragi Rena, about his peculiar situation. Yet, something about Hiiragi feels strangely familiar...\n

\n(Source: Manga UP! Global)",
          "bannerImage": null,
          "coverImage": {
            "large":
                "https://s4.anilist.co/file/anilistcdn/media/manga/cover/medium/bx146028-2mYv0im9a1Yx.jpg"
          },
          "averageScore": 56
        },
        {
          "id": 46765,
          "title": {"romaji": "Kingdom", "english": null, "native": "キングダム"},
          "description":
              "Millions of years have passed since the times of legends, when the worlds of man and gods were still the same. In these times it was the desires of man that moved the world. It is the period of the 500 year war: the Era of Warring States. Kingdom is the story of a young boy who grew into a great general and all the trials and bloodshed that led him there.\n",
          "bannerImage":
              "https://s4.anilist.co/file/anilistcdn/media/manga/banner/46765-8DqCBEYyt9yP.jpg",
          "coverImage": {
            "large":
                "https://s4.anilist.co/file/anilistcdn/media/manga/cover/medium/nx46765-KPXir4sRqJBW.png"
          },
          "averageScore": 88
        },
        {
          "id": 30642,
          "title": {
            "romaji": "Vinland Saga",
            "english": "Vinland Saga",
            "native": "ヴィンランド・サガ"
          },
          "description":
              "As a child, Thorfinn sat at the feet of the great Leif Ericson and thrilled to wild tales of a land far to the west. But his youthful fantasies were shattered by a mercenary raid. Raised by the Vikings who murdered his father, Thorfinn became a terrifying warrior, forever seeking to kill the band's leader, Askeladd, and avenge his father. Sustaining Thorfinn through his ordeal are his pride in his family and his dreams of a fertile westward land, a land without war or slavery … the land Leif called Vinland.\n

\n(Source: Kodansha USA)\n

\nNotes:
\n- Won the Grand Prize at the Japan Media Arts Festival in 2009.
\n- Winner of the 36th Kodansha Manga Award in the General category in 2012.",
          "bannerImage":
              "https://s4.anilist.co/file/anilistcdn/media/manga/banner/30642-MeizzL2WDv6C.jpg",
          "coverImage": {
            "large":
                "https://s4.anilist.co/file/anilistcdn/media/manga/cover/medium/bx30642-1l7lI2LIt1LV.jpg"
          },
          "averageScore": 90
        },
        {
          "id": 117195,
          "title": {
            "romaji": "[Oshi no Ko]",
            "english": "[Oshi no Ko]",
            "native": "【推しの子】"
          },
          "description":
              "Gorou is a gynecologist and idol fan who’s in shock after his favorite star, Ai, announces an impromptu hiatus. Little does Gorou realize that he’s about to forge a bond with her that defies all common sense! Lies are an idol’s weapon! \n

\n(Source: Yen Press)\n

\nAwards:
\n- Nominated for the 14th and 15th Manga Taisho.
\n- Winner of the 7th Next Manga Award in the print category.
\n- Nominated for the 26th Tezuka Osamu Cultural Prize.
\n- Nominated for t


!("'{}' is being skipped because it is ignored.", path.as_ref().display());
			return None;
		}

		// Skip anything that isn't a symlink, regular file, or directory.
		if symlink_path.is_none() && !metadata.is_file() && !metadata.is_dir() {
			warn!("Skipping '{}' because it is not a symlink, directory, or regular file.", path.as_ref().display());
			return None;
		}

		let filesize = if symlink_path.is_none() && metadata.is_file() {
			metadata.len()
		} else {
			0
		};

		let canonical_path = match path.as_ref().canonicalize() {
			Ok(canonical_path) => Some(canonical_path),
			Err(_) => None,
		};

		// The path stored in the archive is relative to the archive's base_path
		let filepath = match path.as_ref().strip_prefix(&self.base_path) {
			Ok(filepath) => match filepath.to_str () {
				Some(filepath) => filepath.to_string(),
				None => {
					warn!("Unable to read path of '{}' as UTF-8 string.  It will not be included in the archive.", path.as_ref().display());
					return None
				}
			},
			Err(_) => {
				warn!("An internal error occured involving strip_prefix.  The file '{}' will not be included in the archive.", path.as_ref().display());
				return None
			}
		};

		// Handle hardlinks
		let hardlink_id = if metadata.nlink() > 1 && !metadata.is_dir() {
			let key = FileIdentifier {
				devid: metadata.dev(),
				inode: metadata.ino(),
			};

			let next_hardlink_id = self.last_hardlink_id;

			let entry = self.hardlink_map.entry(key).or_insert_with(|| {
				HardLink {
					expected_links: metadata.nlink(),
					id: next_hardlink_id,
					example_path: PathBuf::from(path.as_ref()),
				}
			});

			if entry.id == self.last_hardlink_id {
				self.last_hardlink_id += 1;
			}

			Some(entry.id)
		} else {
			None
		};

		Some(ArchiveBuilderFile {
			file: archive::File {
				path: filepath,
				is_dir: metadata.is_dir(),
				symlink: symlink_path,
				hardlink_id: hardlink_id,
				mode: metadata.mode(),
				mtime: metadata.mtime(),
				mtime_nsec: metadata.mtime_nsec(),
				uid: metadata.uid(),
				gid: metadata.gid(),
				size: filesize,
				blocks: Vec::new(),
			},
			missing: false,
			canonical_path: canonical_path,
		})
	}

	/// Assuming that path is a directory, this function returns a list of
	/// all entries inside that directory.
	fn list_directory_children<P: AsRef<Path>>(&mut self, path: P) -> Vec<PathBuf> {
		let mut children = Vec::new();

		let entries = match path.as_ref().read_dir() {
			Ok(entries) => entries,
			Err(err) => {
				warn!("Unable to read directory '{}'.  The following error was received: {}", path.as_ref().display(), err);
				return Vec::new();
			}
		};

		for entry in entries {
			let entry = match entry {
				Ok(x) => x,
				Err(err) => {
					warn!("Unable to read contents of directory '{}'.  The following error was received: {}", path.as_ref().display(), err);
					return Vec::new();
				}
			};

			children.push(entry.path());
		}

		children
	}

	/// Determine if the given path should be ignored, given the settings.
	fn should_ignore<P: AsRef<Path>>(&


TEXT,__text
.globl	_fe_mul_x64
.p2align	4
_fe_mul_x64:
#endif /* __APPLE__ */
        pushq	%r12
        pushq	%r13
        pushq	%r14
        pushq	%r15
        pushq	%rbx
        movq	%rdx, %rcx
        # Multiply
        #  A[0] * B[0]
        movq	(%rcx), %rax
        mulq	(%rsi)
        movq	%rax, %r8
        movq	%rdx, %r9
        #  A[0] * B[1]
        movq	8(%rcx), %rax
        mulq	(%rsi)
        xorq	%r10, %r10
        addq	%rax, %r9
        adcq	%rdx, %r10
        #  A[1] * B[0]
        movq	(%rcx), %rax
        mulq	8(%rsi)
        xorq	%r11, %r11
        addq	%rax, %r9
        adcq	%rdx, %r10
        adcq	$0x00, %r11
        #  A[0] * B[2]
        movq	16(%rcx), %rax
        mulq	(%rsi)
        addq	%rax, %r10
        adcq	%rdx, %r11
        #  A[1] * B[1]
        movq	8(%rcx), %rax
        mulq	8(%rsi)
        xorq	%r12, %r12
        addq	%rax, %r10
        adcq	%rdx, %r11
        adcq	$0x00, %r12
        #  A[2] * B[0]
        movq	(%rcx), %rax
        mulq	16(%rsi)
        addq	%rax, %r10
        adcq	%rdx, %r11
        adcq	$0x00, %r12
        #  A[0] * B[3]
        movq	24(%rcx), %rax
        mulq	(%rsi)
        xorq	%r13, %r13
        addq	%rax, %r11
        adcq	%rdx, %r12
        adcq	$0x00, %r13
        #  A[1] * B[2]
        movq	16(%rcx), %rax
        mulq	8(%rsi)
        addq	%rax, %r11
        adcq	%rdx, %r12
        adcq	$0x00, %r13
        #  A[2] * B[1]
        movq	8(%rcx), %rax
        mulq	16(%rsi)
        addq	%rax, %r11
        adcq	%rdx, %r12
        adcq	$0x00, %r13
        #  A[3] * B[0]
        movq	(%rcx), %rax
        mulq	24(%rsi)
        addq	%rax, %r11
        adcq	%rdx, %r12
        adcq	$0x00, %r13
        #  A[1] * B[3]
        movq	24(%rcx), %rax
        mulq	8(%rsi)
        xorq	%r14, %r14
        addq	%rax, %r12
        adcq	%rdx, %r13
        adcq	$0x00, %r14
        #  A[2] * B[2]
        movq	16(%rcx), %rax
        mulq	16(%rsi)
        addq	%rax, %r12
        adcq	%rdx, %r13
        adcq	$0x00, %r14
        #  A[3] * B[1]
        movq	8(%rcx), %r


yType(), Nullable

/**
 * A not null FloatArray [StandardType].
 */
open class FloatArrayType: StandardType(type = StandardTypeMap.FLOAT_ARRAY)

/**
 * A nullable FloatArray [StandardType].
 */
open class NullableFloatArrayType: FloatArrayType(), Nullable

/**
 * A not null DoubleArray [StandardType].
 */
open class DoubleArrayType: StandardType(type = StandardTypeMap.DOUBLE_ARRAY)

/**
 * A nullable LongArray [StandardType].
 */
open class NullableDoubleArrayType: DoubleArrayType(), Nullable

/**
 * A not null List [StandardType].
 */
open class ListType(
    val child: AbstractType? = null,
): StandardType(type = StandardTypeMap.LIST), Nested

/**
 * A nullable List [StandardType].
 */
open class NullableListType(
    child: AbstractType? = null
): ListType(child), Nullable

/**
 * A not null Map [StandardType].
 */
open class MapType(
    val key: AbstractType? = null,
    val value: AbstractType? = null,
): StandardType(type = StandardTypeMap.MAP), Nested

/**
 * A nullable LongArray [StandardType].
 */
open class NullableMapType(
    key: AbstractType? = null,
    value: AbstractType? = null,
): MapType(key, value), Nullable/* Copyright (c) 2021 - 2022 Buijs Software
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */
package dev.buijs.klutter.kore.tasks.project

import dev.buijs.klutter.kore.common.Either

typealias GroupName = Either<String, String>

fun toGroupName(value: String) = value.toInput()

/**
 * Validate a Klutter group name with the following constraints:
 * - All characters are lowercase
 * - All characters are:
 * - alphabetic or
 * - numeric or
 * - '_' or
 * - '.'
 *
 * - Group contains at least 2 parts (e.g. there is minimally 1 dot)
 * - Should start with an alphabetic character
 */
private fun String.toInput(): GroupName {

    if(!contains("."))
        return GroupName.nok("GroupName error: Should contain at least 2 parts ('com.example').")

    if(contains("_."))
        return GroupName.nok("GroupName error: Characters . and _ can not precede each other.")

    if(contains("._"))
        return GroupName.nok("GroupName error: Characters . and _ can not precede each other.")

    if(!"""^[a-z][a-z0-9._]+[a-z]$""".toRegex().matches(this))
        return GroupName.nok("GroupName error: Should be lowercase alphabetic separated by dots ('com.example').")

    return GroupName.ok(this)
}/* Copyright (c) 2021 - 2023 Buijs Software
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy,


criptor
import kotlinx.serialization.descriptors.listSerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder

/**
 * Serializer for MutableStateList (SnapshotStateList).
 * MutableStateList can be treated as a normal MutableList, thus it can be serialized by using the built-in
 * serializer, but using the built-in serializer causes the deserialized value to be just a MutableList.
 * This serializer is to keep using MutableStateList for the deserialized value.
 *
 * Falls back to the built-in MutableList serializer when the MutableStateList cannot be deserialized.
 */
@OptIn(ExperimentalSerializationApi::class)
private class FallbackMutableStateListSerializerInternal<T>(
    private val dataSerializer: KSerializer<T>,
) : KSerializer<MutableList<T>> {
    override val descriptor = listSerialDescriptor(dataSerializer.descriptor)

    override fun serialize(
        encoder: Encoder,
        value: MutableList<T>,
    ) = ListSerializer(dataSerializer).serialize(encoder, value.toList())

    override fun deserialize(decoder: Decoder): MutableList<T> =
        try {
            ListSerializer(dataSerializer).deserialize(decoder).toMutableStateListEqualsOverride()
        } catch (e: SerializationException) {
            Logger.e { "Failed to deserialize list: ${e.message}, returning empty list" }
            listOf<T>().toMutableStateListEqualsOverride()
        }
}

/**
 * Location-aware FallbackMutableStateListSerializer class that can be used in @Serializable annotations.
 * Provides enhanced error reporting with precise location information when state list parsing fails.
 */
class FallbackMutableStateListSerializer<T>(
    dataSerializer: KSerializer<T>,
) : KSerializer<MutableList<T>> {
    private val delegate =
        FallbackMutableStateListSerializerInternal(dataSerializer).withLocationAwareExceptions()

    override val descriptor: SerialDescriptor = delegate.descriptor

    override fun serialize(
        encoder: Encoder,
        value: MutableList<T>,
    ) {
        delegate.serialize(encoder, value)
    }

    override fun deserialize(decoder: Decoder): MutableList<T> = delegate.deserialize(decoder)
}

package io.github.composefluent.icons.regular

import androidx.compose.ui.graphics.vector.ImageVector
import io.github.composefluent.icons.Icons
import io.github.composefluent.icons.fluentIcon
import io.github.composefluent.icons.fluentPath

public val Icons.Regular.ResizeSmall: ImageVector
    get() {
        if (_resizeSmall != null) {
            return _resizeSmall!!
        }
        _resizeSmall = fluentIcon(name = "Regular.ResizeSmall") {
            fluentPath {
                moveTo(6.25f, 4.5f)
                curveToRelative(-0.97f, 0.0f, -1.75f, 0.78f, -1.75f, 1.75f)
                verticalLineToRelative(1.5f)
                arcToRelative(0.75f, 0.75f, 0.0f, false, true, -1.5f, 0.0f)
                verticalLineToRelative(-1.5f)
                curveTo(3.0f, 4.45f, 4.46f, 3.0f, 6.25f, 3.0f)
                horizontalLineToRelative(1.5f)
                arcToRelative(0.75f, 0.75f, 0.0f, false, true, 0.0f, 1.5f)
                horizontalLineToRelative(-1.5f)
                close()
                moveTo(7.95f, 10.25f)
                curveToRelative(0.0f, -1.24f, 1.0f


lseif Config.Framework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(src)
        if Player and Player.PlayerData.job2 then
            return Player.PlayerData.money['cash']
        end
    end

    return nil
end

function Utils.GetBank(src)
    if Config.Framework == 'oldesx' or Config.Framework == 'newesx' then
        local Player = Framework.GetPlayerFromId(src)
        if Player then
            local account = Player.getAccount('bank')
            return account and account.money
        end
    elseif Config.Framework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(src)
        if Player and Player.PlayerData.job2 then
            return Player.PlayerData.money['bank']
        end
    end

    return nil
end

function Utils.GetBlackMoney(src)
    if Config.Framework == 'oldesx' or Config.Framework == 'newesx' then
        local Player = Framework.GetPlayerFromId(src)
        if Player then
            local account = Player.getAccount('black_money')
            return account and account.money
        end
    elseif Config.Framework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(src)
        if Player and Player.PlayerData.job2 then
            return Player.PlayerData.money['black_money']
        end
    end

    return nil
end

function Utils.GetVIPMoney(src)
    if Config.Framework == 'oldesx' or Config.Framework == 'newesx' then
        local Player = Framework.GetPlayerFromId(src)
        if Player then
            local account = Player.getAccount('vip')
            return account and account.money
        end
    elseif Config.Framework == 'qbcore' then
        local Player = Framework.Functions.GetPlayer(src)
        if Player then
            return Player.PlayerData.money['vip']
        end
    end

    return nil
end

function Utils.GetNumPlayers()
    return #GetPlayers()
end

function Utils.GetMaxPlayers()
    return GetConvar("sv_maxClients", 0)
end

Jobs = {}

RegisterNetEvent('tm1_pausemenu:playerLoaded', function()
    Jobs[source] = Utils.GetJobName(source)
end)

RegisterNetEvent('tm1_pausemenu:jobChanged', function()
    Jobs[source] = Utils.GetJobName(source)
end)

AddEventHandler('playerDropped', function()
    Jobs[source] = nil
end)

function Utils.GetJobCount(name)
    local count = 0

    for i,v in pairs(Jobs) do
        if v == name then
            count = count + 1
        end
    end

    return count
end


#ifndef MATH_ANIM_FILE_SYSTEM_WATCHER
#define MATH_ANIM_FILE_SYSTEM_WATCHER
#include "core.h"

namespace MathAnim
{
	enum NotifyFilters
	{
		FileName = 1,
		DirectoryName = 2,
		Attributes = 4,
		Size = 8,
		LastWrite = 16,
		LastAccess = 32,
		CreationTime = 64,
		Security = 256
	};

	class FileSystemWatcher
	{
	public:
		FileSystemWatcher();
		~FileSystemWatcher() { stop(); }
		void start();
		void stop();

		void poll();

	public:
		typedef void (*OnChanged)(const std::filesystem::path& file);
		typedef void (*OnRenamed)(const std::filesystem::path& file);
		typedef void (*OnDeleted)(const std::filesystem::path& file);
		typedef void (*OnCreated)(const std::filesystem::path& file);

		OnChanged onChanged = nullptr;
		OnRenamed onRenamed = nullptr;
		OnDeleted onDeleted = nullptr;
		OnCreated onCreated = nullptr;

		int notifyFilters = 0;
		bool includeSubdirectories = false;
		std::string filter = "";
		std::filesystem::path path = "";

	private:
		bool enableRaisingEvents = true;
		std::thread fileWatcherThread;
		void* stopEventHandle;

		std::set<std::filesystem::path> changedQueue;
		std::set<std::filesystem::path> renamedQueue;
		std::set<std::filesystem::path> deletedQueue;
		std::set<std::filesystem::path> createdQueue;

		std::set<std::filesystem::path> prevChangedQueue;
		std::set<std::filesystem::path> prevRenamedQueue;
		std::set<std::filesystem::path> prevDeletedQueue;
		std::set<std::filesystem::path> prevCreatedQueue;

		std::mutex queueMtx;

	private:
		void startThread();
	};
}

#endif


kalendar.foundation.color.asSolidChartColor

data class KalendarDayKonfig(
    val size: Dp,
    val selectedTextColor: KalendarColor,
    val borderColor: KalendarColor,
    val indicatorColor: KalendarColor,
    val textStyle: TextStyle,
    val selectedBackgroundColor: KalendarColor,
) {
    companion object {

        fun default() = KalendarDayKonfig(
            size = 56.dp,
            textStyle = TextStyle(
                fontSize = 16.sp,
                brush = Brush.linearGradient(
                    listOf(
                        Color(0xFF413D4B),
                        Color(0xFFD8A29E)
                    )
                ),
            ),
            indicatorColor = Color(0xFFD8A29E).asSolidChartColor(),
            selectedTextColor = Color(0xFF413D4B).asSolidChartColor(),
            borderColor = Color(0xFFC39EA1).asSolidChartColor(),
            selectedBackgroundColor = Color(0xFFF7CFD3).asSolidChartColor(),
        )
    }
}
package com.himanshoe.pluck.util
/*
* MIT License
*
* Copyright (c) 2022 Himanshu Singh
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import android.content.ContentResolver
import android.content.ContentUris
import android.content.Context
import android.database.Cursor
import android.os.Build
import android.provider.MediaStore
import androidx.core.os.bundleOf
import com.himanshoe.pluck.data.PluckImage

private val projection = arrayOf(
    MediaStore.Images.Media._ID,
    MediaStore.Images.Media.DISPLAY_NAME,
    MediaStore.Images.Media.DATE_TAKEN,
    MediaStore.Images.Media.BUCKET_DISPLAY_NAME
)

internal fun Context.createCursor(limit: Int, offset: Int): Cursor? {
    return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
        val bundle = bundleOf(
            ContentResolver.QUERY_ARG_OFFSET to offset,
            ContentResolver.QUERY_ARG_LIMIT to limit,
            ContentResolver.QUERY_ARG_SORT_COLUMNS to arrayOf(MediaStore.Images.Media.DATE_ADDED),
            ContentResolver.QUERY_ARG_SORT_DIRECTION to ContentResolver.QUERY_SORT_DIRECTION_DESCENDING
        )
        contentResolver.query(
            MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
            projection,
            bundle,
            null
        )
    } else {
        contentResolver.query(
            MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
            projection,
            null,
            null,
            "${MediaStore.Images.Media.DATE_ADDED} DESC LIMIT $limit OFFSET $offset",
            null
        )
    }
}

internal fun Conte


rue }).then(files =>
    files.forEach(file => {
      const dest = path.join(src, file.name)
      if (file.isDirectory()) {
        mkDir(dest)
        cpDir(dest)
      } else if (file.name.startsWith('.')) {
        log('cyan', 'ignore file', dest)
      } else {
        cpFile(dest)
      }
    })
  )

const mkDir = (
  src: string,
  {
    dest = [path.join('src/routes', src.slice(6)), path.join('static', src.slice(6)), path.join('src/static', src.slice(6))]
  } = {}
) => {
  dest.forEach(path =>
    fs
      .mkdir(path)
      .then(() => log('green', 'make dir', path))
      .catch(error)
  )
}

const rmDir = (
  src: string,
  {
    dest = [path.join('src/routes', src.slice(6)), path.join('static', src.slice(6)), path.join('src/static', src.slice(6))]
  } = {}
) => {
  dest.forEach(path =>
    fs
      .rm(path, { force: true, recursive: true })
      .then(() => log('yellow', 'remove dir', path))
      .catch(error)
  )
}

const cleanDir = (src: string) =>
  fs.readdir(src, { withFileTypes: true }).then(files => {
    files.forEach(file => {
      const dest = path.join(src, file.name)
      file.isDirectory() ? rmDir(dest) : file.name.startsWith('.') ? log('cyan', 'ignore file', dest) : rmFile(dest)
    })
  })

const build = () => {
  mkDir('static', { dest: ['static'] })
  mkDir('src/static', { dest: ['src/static'] })
  cpDir('urara')
}

const clean = () => {
  cleanDir('urara')
  rmDir('static', { dest: ['static'] })
  rmDir('src/static', { dest: ['src/static'] })
}

switch (process.argv[2]) {
  case 'watch':
    {
      const watcher = chokidar.watch('urara', {
        ignored: (file: string) => path.basename(file).startsWith('.')
      })
      watcher
        .on('add', file => cpFile(file))
        .on('change', file => cpFile(file, { stat: 'update' }))
        .on('unlink', file => rmFile(file))
        .on('addDir', dir => mkDir(dir))
        .on('unlinkDir', dir => rmDir(dir))
        .on('error', error => log('red', 'error', error))
        .on('ready', () => log('cyan', 'copy complete. ready for changes'))
      process
        .on('SIGINT', () => {
          log('red', 'sigint')
          clean()
          watcher?.close()
        })
        .on('SIGTERM', () => {
          log('red', 'sigterm')
          watcher?.close()
        })
        .on('exit', () => {
          log('red', 'exit')
        })
    }
    break
  case 'build':
    build()
    break
  case 'clean':
    clean()
    break
  default:
    log('red', 'error', 'invalid arguments')
    break
}
import { GameConfig } from "../configs/GameConfig";
import { Directions } from "../enums/GameEnums"
import IPosition from "./IPosition";

interface IGhostAI {
    readonly speed: number;
    readonly targetPosition: IPosition;

    pickDirection(): Directions;
    changeSpeed(speed: number): void;
};

const getOrderedDirections = (filter?: (dir: Directions) => boolean) => {
    const dirs = [Directions.Up, Directions.Left, Directions.Down, Directions.Right];

    if (!


onse = chain.proceed(requestBuilder.build())

    cookieJar.receiveHeaders(userRequest.url, networkResponse.headers)

    val responseBuilder = networkResponse.newBuilder()
        .request(userRequest)

    if (transparentGzip &&
        "gzip".equals(networkResponse.header("Content-Encoding"), ignoreCase = true) &&
        networkResponse.promisesBody()) {
      val responseBody = networkResponse.body
      if (responseBody != null) {
        val gzipSource = GzipSource(responseBody.source())
        val strippedHeaders = networkResponse.headers.newBuilder()
            .removeAll("Content-Encoding")
            .removeAll("Content-Length")
            .build()
        responseBuilder.headers(strippedHeaders)
        val contentType = networkResponse.header("Content-Type")
        responseBuilder.body(RealResponseBody(contentType, -1L, gzipSource.buffer()))
      }
    }

    return responseBuilder.build()
  }

  /** Returns a 'Cookie' HTTP request header with all cookies, like `a=b; c=d`. */
  private fun cookieHeader(cookies: List<Cookie>): String = buildString {
    cookies.forEachIndexed { index, cookie ->
      if (index > 0) append("; ")
      append(cookie.name).append('=').append(cookie.value)
    }
  }
}
/*
 * Copyright (C) 2013 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package okhttp3.internal.http2

import okhttp3.internal.format
import okio.ByteString.Companion.encodeUtf8

object Http2 {
  @JvmField
  val CONNECTION_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".encodeUtf8()

  /** The initial max frame size, applied independently writing to, or reading from the peer. */
  const val INITIAL_MAX_FRAME_SIZE = 0x4000 // 16384

  const val TYPE_DATA = 0x0
  const val TYPE_HEADERS = 0x1
  const val TYPE_PRIORITY = 0x2
  const val TYPE_RST_STREAM = 0x3
  const val TYPE_SETTINGS = 0x4
  const val TYPE_PUSH_PROMISE = 0x5
  const val TYPE_PING = 0x6
  const val TYPE_GOAWAY = 0x7
  const val TYPE_WINDOW_UPDATE = 0x8
  const val TYPE_CONTINUATION = 0x9

  const val FLAG_NONE = 0x0
  const val FLAG_ACK = 0x1 // Used for settings and ping.
  const val FLAG_END_STREAM = 0x1 // Used for headers and data.
  const val FLAG_END_HEADERS = 0x4 // Used for headers and continuation.
  const val FLAG_END_PUSH_PROMISE = 0x4
  const val FLAG_PADDED = 0x8 // Used for headers and data.
  const val FLAG_PRIORITY = 0x20 // Used for headers.
  const val FLAG_COMPRESSED = 0x20 // Used for data.

  /** Lookup table for valid frame types. */
  private val FRAME_NAMES = arrayOf(
      "DATA", "HEADERS", "PRIORITY", "RST_STREAM", "SETTINGS", "PUSH_PROMISE", "PING", "GOAWAY",
      "WINDOW_UPDATE", "CONTINUATION"
  )

  /**
   * Lookup table for valid flags for DATA, HEADERS, CONTINUATION. Invalid combinations are
   * represented in binary.
   */
  private val FLAGS = arrayOfNulls<String>(0x40) // Highest bit flag is 0x20.
  private val BINARY = Array(256) {
    format("%8s", Integer.toBinaryString(it)).replace(' ', '0')
  }

  init {
    FLAGS[FLAG_


4f31b2356?w=1029&h=988&f=png&s=328964)
而事务的ACID是通过InnoDB日志和锁来保证。事务的隔离性是通过数据库锁的机制实现的，持久性通过redo log（重做日志）来实现，原子性和一致性通过Undo log来实现。UndoLog的原理很简单，为了满足事务的原子性，在操作任何数据之前，首先将数据备份到一个地方（这个存储数据备份的地方称为UndoLog）。然后进行数据的修改。如果出现了错误或者用户执行了ROLLBACK语句，系统可以利用Undo Log中的备份将数据恢复到事务开始之前的状态。
和Undo Log相反，RedoLog记录的是新数据的备份。在事务提交前，只要将RedoLog持久化即可，不需要将数据持久化。当系统崩溃时，虽然数据没有持久化，但是RedoLog已经持久化。系统可以根据RedoLog的内容，将所有数据恢复到最新的状态。
对具体实现过程有兴趣的同学可以去自行搜索扩展。
# 分布式事务
## 什么是分布式事务
分布式事务就是指事务的参与者、支持事务的服务器、资源服务器以及事务管理器分别位于不同的分布式系统的不同节点之上。简单的说，就是一次大的操作由不同的小操作组成，这些小的操作分布在不同的服务器上，且属于不同的应用，分布式事务需要保证这些小操作要么全部成功，要么全部失败。本质上来说，分布式事务就是为了保证不同数据库的数据一致性。
## 分布式事务产生的原因
从上面本地事务来看，我们可以看为两块，一个是service产生多个节点，另一个是resource产生多个节点。

### service多个节点
随着互联网快速发展，微服务，SOA等服务架构模式正在被大规模的使用，举个简单的例子，一个公司之内，用户的资产可能分为好多个部分，比如余额，积分，优惠券等等。在公司内部有可能积分功能由一个微服务团队维护，优惠券又是另外的团队维护
![](https://user-gold-cdn.xitu.io/2018/7/26/164d6783a9e3f959?w=592&h=431&f=png&s=28160)
这样的话就无法保证积分扣减了之后，优惠券能否扣减成功。
### resource多个节点
同样的，互联网发展得太快了，我们的Mysql一般来说装


        // 03:00am // skip 2am because the hour does not exist
        // ...
        // Similarly, leaving DST, we should see:
        // 01:30am
        // 01:45am
        // 01:00am // repeat 1am because that's the change over
        // 01:30am
        // 01:45am
        // 02:00am
        // ....
        //
        case this.MILLI:
          if (preventDstAdjust) {
            d.setMilliseconds(d.getMilliseconds() + value);
          } else {
            d.setTime(d.getTime() + value);
          }

          break;

        case this.SECOND:
          if (preventDstAdjust) {
            d.setSeconds(d.getSeconds() + value);
          } else {
            d.setTime(d.getTime() + value * 1000);
          }

          break;

        case this.MINUTE:
          if (preventDstAdjust) {
            d.setMinutes(d.getMinutes() + value);
          } else {
            d.setTime(d.getTime() + value * 60 * 1000);
          }

          break;

        case this.HOUR:
          if (preventDstAdjust) {
            d.setHours(d.getHours() + value);
          } else {
            d.setTime(d.getTime() + value * 60 * 60 * 1000);
          }

          break;

        case this.DAY:
          if (preventDstAdjust === false) {
            d.setTime(d.getTime() + value * 24 * 60 * 60 * 1000);
          } else {
            d.setDate(d.getDate() + value);
          }

          break;

        case this.MONTH:
          day = date.getDate();

          if (day > 28) {
            /* eslint-disable-next-line max-len */
            day = Math.min(
              day,
              this.getLastDateOfMonth(
                this.add(this.getFirstDateOfMonth(date), this.MONTH, value)
              ).getDate()
            );
          }

          d.setDate(day);
          d.setMonth(date.getMonth() + value);

          break;

        case this.YEAR:
          day = date.getDate();

          if (day > 28) {
            /* eslint-disable-next-line max-len */
            day = Math.min(
              day,
              this.getLastDateOfMonth(
                this.add(this.getFirstDateOfMonth(date), this.YEAR, value)
              ).getDate()
            );
          }

          d.setDate(day);
          d.setFullYear(date.getFullYear() + value);

          break;
      }
    }

    if (decimalValue) {
      switch (interval.toLowerCase()) {
        /* eslint-disable no-multi-spaces */
        case this.MILLI:
          base = 1;
          break;
        case this.SECOND:
          base = 1000;
          break;
        case this.MINUTE:
          base = 1000 * 60;
          break;
        case this.HOUR:
          base = 1000 * 60 * 60;
          break;
        case this.DAY:
          base = 1000 * 60 * 60 * 24;
          break;
        /* eslint-enable no-multi-spaces */

        case this.MONTH:
          day = this.getDaysInMonth(d);
          base = 1000 * 60 * 60 * 24 * day;
          break;

        case this.YEAR:
          day = this.isLeapYear(d) ? 366 : 365;
          base = 1000 * 60 * 60 * 24 * day;
          break;
      }

      if (base) {
        d.setTime(d.getTime() + base * decimalValue);
      }


= "GREENSIGHT_FotOG",
  /**
   *
The King in the North
Neutral.
Kingdom.
While a
   * player does not control a King character, he or she cannot trigger
   * abilities on characters, locations, or attachments..
Favor of the Old Gods.

   **/
  TheKingInTheNorthFotOg = "THE_KING_IN_THE_NORTH_FotOG",
  /**
   *
Arya Stark (TFM)
House Stark.
Lady.
While Arya
   * Stark is standing, characters cannot be saved..
The Faith
   * Militant.

   **/
  AryaStarkTfm = "ARYA_STARK_TFM",
  /**
   *
I Am No One
House Stark.
Action: Choose a character you
   * control with printed cost 3 or lower. Until the end of the phase, that
   * character loses all faction affiliations and Traits, gains insight and
   * stealth, and does not kneel when declared as an attacker..
The Faith
   * Militant.

   **/
  IAmNoOneTfm = "I_AM_NO_ONE_TFM",
  /**
   *
Highgarden Refugee
House Tyrell.
Ally.
While there
   * is a Summer plot card revealed, reduce the cost to marshal Highgarden
   * Refugee by 1..
The Faith Militant.

   **/
  HighgardenRefugeeTfm = "HIGHGARDEN_REFUGEE_TFM",
  /**
   *
Arbor Queen
House Tyrell.
Warship.
Action:
   * Kneel Arbor Queen to choose a [tyrell] character and a non-[tyrell] character.
   * Until the end of the phase, each of those characters gets +2 STR..
The
   * Faith Militant.

   **/
  ArborQueenTfm = "ARBOR_QUEEN_TFM",
  /**
   *
Coldhands
The Night's Watch.
The North.
Coldhands
   * cannot be saved.Reaction: After you marshal Coldhands, choose 1 other
   * non-Army character controlled by each player. Remove each of those
   * characters from the game until Coldhands leaves play..
The Faith
   * Militant.

   **/
  ColdhandsTfm = "COLDHANDS_TFM",
  /**
   *
The Bay of Seals
The Night's Watch.
The
   * North.
Action: Kneel The Bay of Seals to choose and stand a
   * character owned by an opponent..
The Faith Militant.

   **/
  TheBayOfSealsTfm = "THE_BAY_OF_SEALS_TFM",
  /**
   *
King's Men
House Baratheon.
Ally. The
   * Seven.
Reaction: After a phase begins, choose a kneeling
   * character. Until the end of the phase, treat that character as if its printed
   * text box were blank (except for Traits). (Limit once per
   * round.).
The Faith Militant.

   **/
  KingsMenTfm = "KINGS_MEN_TFM",
  /**
   *
Sacrificed to the Red God
House
   * Bar


re[0][1]=pinters->iFeature[1][0]; pinters->iFeature[1][0]=iFeature;
	return res;
}

int box_box_intersection(const box *pbox1, const box *pbox2, prim_inters *pinters)
{
	vectorr center[2],axes[3],dp,pt0;
	vectori axsg;
	matrix3x3RM &Basis21((matrix3x3RM&)axes[0]);
	int ibox,i,idir,iEdge,bBest,sg,bLocInters[2];
	quotient t[2],t1[2];
	const box *pbox[2] = { pbox1,pbox2 };

	center[0] = pbox1->Basis*(pbox2->center-pbox1->center);
	center[1] = pbox2->Basis*(pbox1->center-pbox2->center);
	Basis21 = pbox2->Basis*pbox1->Basis.T();
	pinters->nborderpt = 0;

	for(ibox=0; ibox<2; ibox++) {
		for(iEdge=0;iEdge<12;iEdge++) {
			idir = iEdge>>2; axsg[idir]=-1; axsg[inc_mod3[idir]]=((iEdge&1)<<1)-1; axsg[dec_mod3[idir]]=(iEdge&2)-1;
			pt0 = center[ibox] + axes[0]*(pbox[ibox^1]->size.x*axsg.x) + axes[1]*(pbox[ibox^1]->size.y*axsg.y) + axes[2]*(pbox[ibox^1]->size.z*axsg.z);
			dp = axes[idir];

			t[0].set(0,1); t[1].set(pbox[ibox^1]->size[idir]*2,1);
			for(i=bLocInters[0]=bLocInters[1]=0; i<3; i++) {
				idir = isneg(dp[i]); sg = 1-(idir<<1);
				t1[idir]. set((-pbox[ibox]->size[i]-pt0[i])*sg, fabs_tpl(dp[i]));
				t1[idir^1].set((pbox[ibox]->size[i]-pt0[i])*sg, fabs_tpl(dp[i]));
				bLocInters[0] |= (bBest = isneg(t[0]-t1[0]));	// t[0] = max(t[0],t1[0]);
				t[0].x = t[0].x*(bBest^1) + t1[0].x*bBest;
				t[0].y = t[0].y*(bBest^1) + t1[0].y*bBest;
				bLocInters[1] |= (bBest = isneg(t1[1]-t[1]));	// t[1] = min(t[1],t1[1]);
				t[1].x = t[1].x*(bBest^1) + t1[1].x*bBest;
				t[1].y = t[1].y*(bBest^1) + t1[1].y*bBest;
			}
			if (t[0]<t[1]) {
				if (bLocInters[0])
					pinters->ptborder[pinters->nborderpt++] = (pt0+dp*t[0].val())*pbox[ibox]->Basis + pbox[ibox]->center;
				if (bLocInters[1])
					pinters->ptborder[pinters->nborderpt++] = (pt0+dp*t[1].val())*pbox[ibox]->Basis + pbox[ibox]->center;
			}
		}
		Basis21.Transpose();
	}

	if (!pinters->nborderpt)
		return 0;

	pinters->pt[0] = pinters->pt[1] = pinters->ptborder[0


attribs['data-src'];
        }
        const parsedContent = turndownService.turndown(
            $('div.rich_media_content').html());

        // 处理元数据 —— 标题、封面
        const metadata = opengraph({ data, url },mid);
        const { title } = metadata;

        let parsedCoverRaw : string|null = null;
        // 试图从 OpenGraph 读取 封面信息
        if (metadata.image) {
            // Yay! 再也不用regex匹配了
            parsedCoverRaw = metadata.image;
        } else if (data.match(/msg_cdn_url = "http:\/\/mmbiz\.qpic\.cn\/mmbiz_jpg\/[0-9a-zA-Z]{10,100}\/0\?wx_fmt=jpeg"/)
            || data.match(/msg_cdn_url = "http:\/\/mmbiz\.qpic\.cn\/mmbiz\/[0-9a-zA-Z]{10,100}\/0\?wx_fmt=jpeg"/)) {
            parsedCoverRaw = data;
        }
        // const parsedCover = parsedCoverRaw.substring(15, parsedCoverRaw.length - 1);
        const parsedCover : (string|null) = parsedCoverRaw;
        const coverLocation = parsedCover ? await mid.image(parsedCover) : null;
        // console.log(parsedTitle);
        // console.log(parsedCover);
        // console.log(parsedContent);

        const articleObj = {
            title,
            cover: coverLocation,
            content: parsedContent,
        };

        return articleObj;
    }

    @matchUrl(/https:\/\/www\.chainnews\.com\/articles\/[0-9]{8,14}\.htm/)
    async handleChainnews({ data, url }: Page, mid: Middlewares): Promise<Article> {
        // 处理元数据 —— 标题、封面
        const metadata = opengraph({ url, data },mid);
        const { title, image } = metadata;
        // Parser 处理， 转化为markdown， 因平台而异
        const $ = cheerio.load(data);
        const parsedContent = $('div.post-content.markdown');
        const images = $('img', parsedContent);
        for (const image of images.toArray()) {
            const originSrc = $(image).attr('src');
            const uploadUrl = originSrc ? await mid.image(originSrc):null;
            if (uploadUrl) {
                $(image).attr('src', uploadUrl);
            } else {
                mid.logger('ArticleCrawler:: handleChinanews: upload Image failed, ignored');
            }
        }
        // const coverRe = new RegExp(//);
        const turndownService = new turndown();
        const articleContent = turndownService.turndown(parsedContent.html());

        const coverLocation = await mid.image(image.substring(0, image.length - 6));

        const articleObj = {
            title,
            cover: coverLocation,
            content: articleContent,
        };

        return articleObj;
    }
    @matchUrl(/https:\/\/orange\.xyz\/p\/[0-9]{1,6}/)
    async handleOrange({ data, url }: Page, mid: Middlewares): Promise<Article> {
        const { title } = opengraph({ data, url },mid);

        // console.log(rawPage);
        // Parser 处理， 转化为markdown， 因平台而异
        const $ = cheerio.load(data);
        const parsedContent = $('div.article-content');
        const parsedCover = $('div.img-center-cropped.float-img').attr('style');
        const


ame)
        {
            if (version != reference)
            {
                if (api.Side == EnumAppSide.Server)
                {
                    Exception e = new Exception(Lang.Get("versionmismatch-server", modName + ".dll"));
                    ((ICoreServerAPI)api).Server.ShutDown();
                    throw e;
                } else
                {
                    Exception e = new Exception(Lang.Get("versionmismatch-client", modName + ".dll"));
                    ((ICoreClientAPI)api).Event.EnqueueMainThreadTask(() => throw e, "killgame");
                }
            }
        }

    }
}


FIFOHashMap', () {
    final map = FIFOHashMap<Item, String>(capacity: 5);
    map[Item('BTCUSDT-15m', 0)] = 'BTCUSDT-15m-List-0';

    map[Item('ETHUSDT-15m', 2)] = 'ETHUSDT-15m-List-2';
    map[Item('A10000-15m', 3)] = 'A10000-15m-List-3';
    map[Item('A10000-1h', 4)] = 'A10000-1h-List-4';
    map[Item('A10000-1h', 5)] = 'A10000-1h-List-5';
    map[Item('SOLUSDT-1h', 6)] = 'SOLUSDT-1h-List-6';
    map[Item('BTCUSDT-15m', 1)] = 'BTCUSDT-15m-List-1';
    printMap(map);
    logMsg('---');
    map[Item('OKBUSDT-1h', 7)] = 'OKBUSDT-1h-List-7';

    printMap(map);
  });

  test('merger addAll', () {
    final list1 = List.filled(100000000, fillData1);
    final list2 = List.filled(100000000, fillData2);

    logMsg('merger addAll');
    final newList = List.of(list1, growable: true)..addAll(list2);

    assert(newList.length == 200000000);
  });

  test('merger ...', () {
    final list1 = List.filled(100000000, fillData1);
    final list2 = List.filled(100000000, fillData2);

    logMsg('merger ...');
    final newList = List.of([...list1, ...list2]);

    assert(newList.length == 200000000);
  });

  test('merger insertAll', () {
    final list1 = List.filled(100000000, fillData1, growable: true);
    final list2 = List.filled(100000000, fillData2);

    logMsg('merger insertAll');
    final newList = List.of(list1, growable: true);
    newList.insertAll(newList.length, list2);
    assert(newList.length == 200000000);
  });

  test('test list is null or empty', () {
    final list = List<int?>.filled(3, null);

    logMsg('list.len:${list.length}');
    logMsg('list.len:${list.isEmpty}');
  });

  test('test secondWhereOrNull', () {
    final list = [0, 1, 2];
    var result = list.secondWhereOrNull((item) => item > 0);
    logMsg('result:$result');
    expect(result, 2);

    result = list.secondWhereOrNull((item) => item > 1);
    logMsg('result:$result');
    expect(result, isNull);

    result = list.secondWhereOrNull((item) => item > 2);
    logMsg('result:$result');
    expect(result, isNull);
  });

  test('test range', () {
    var list = <double>[];
    var result = list.range(1);
    logMsg('iter: $result');
    expect(result, isEmpty);

    list = [1, 2, 3];
    result = list.range(1);
    logMsg('iter: $result');
    expect(result, [2, 3]);
  });
}

const fillData1 = 'AAABBBCCC';
const fillData2 = 'XXXYYYZZZ';
// Copyright 2024 Andy.Zhao
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed


solid transparent}.table-1 .table-1{position:relative;bottom:-1px}.edit-mode li,.edit-mode p,.edit-mode tbody td,.edit-mode tbody tr{cursor:pointer}.edit-mode li.disabled,.edit-mode p.disabled,.edit-mode tbody td.disabled,.edit-mode tbody tr.disabled{color:#ccc}table.edit-mode .checkbox-1{display:block;margin:0 auto}.td-num,.th-num{text-align:right !important}.table-scroller-wrap{padding:0 40px}.table-scroller-wrap th,.table-scroller-wrap td{display:none}.table-scroller-wrap th.show,.table-scroller-wrap td.show{display:table-cell}.table-scroller{position:relative}.table-scroller .scroller{max-height:280px;overflow:scroll;border-bottom:1px solid #e6e6e6;padding-right:1px}.table-scroller .scroller .table-2{border-bottom:0;table-layout:fixed}.table-scroller .scroller .table-2 tr:last-child{border-bottom:0}.table-scroller .scroller ul{*zoom:1;border-right:1px solid #e6e6e6}.table-scroller .scroller ul:before,.table-scroller .scroller ul:after{content:" ";display:table}.table-scroller .scroller ul:after{clear:both}.table-scroller .scroller ul:after,.table-scroller .scroller ul:before{content:'';height:0;line-height:0;font-size:0;display:block;clear:both}.table-scroller .scroller ul li{float:left;width:25%;display:none}.table-scroller .scroller ul li p{height:20px;padding:10px;border-left:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;color:#575757}.table-scroller .scroller ul li p.disabled{background:#f8f8f8}.table-scroller .scroller ul li p.selected{background:#f76985;color:#fff}.table-scroller .scroller ul li.show{display:table-cell}.table-scroller .s-prev,.table-scroller .s-next{position:absolute;top:-35px;font-family:"icon_club" !important;font-size:16px;font-style:normal;color:#697a8e;display:inline-block;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;min-width:20px;text-align:center;width:30px;height:30px;border:1px solid #e6e6e6;border-radius:100%;color:#7e746a;font-size:20px;line-height:30px;cursor:pointer}.table-scroller .s-prev{left:-40px}.table-scroller .s-next{right:-40px}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, 90deg);-webkit-transition-timing-function:ease-in;opacity:0;filter:alpha(opacity=0)}40%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, -20deg);-webkit-transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:100;filter:alpha(opacity=100)}80%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}100%{-webkit-transform:perspectiv


SC1, cax=cbar_ax)

        #CB = matplotlib.pyplot.colorbar(SC2)
        # CB.solids.set_rasterized(True)
        # ax2.yaxis.set_visible(False)

        # [x0,y0,width,height]
        #cbar_ax = fig.add_axes([0.95, 0.00, 0.05, 1.00])
        #CB = fig.colorbar(SC2, ax=[ax1,ax2], cax=cbar_ax)
        # CB.solids.set_rasterized(True)

        #from mpl_toolkits.axes_grid1 import make_axes_locatable
        #divider = make_axes_locatable(ax2)
        #cbar_ax = divider.append_axes("right", "5%", pad="0%")
        #CB = plt.colorbar(SC2, cax=cbar_ax)
        # CB.solids.set_rasterized(True)

        #CB = fig.colorbar(SC2)
        # CB.solids.set_rasterized(True)

        from mpl_toolkits.axes_grid1 import make_axes_locatable
        divider = make_axes_locatable(ax2)
        ax_cb = divider.new_horizontal(size="5%", pad=0.05)
        #fig1 = ax.get_figure()
        fig.add_axes(ax_cb)
        CB = fig.colorbar(SC2, cax=ax_cb)

        #aspect = 5./2.
        # ax1.set_aspect(aspect)
        # ax2.set_aspect(aspect)

        CB.solids.set_rasterized(True)

        if out == 'D':
            CB.set_label(r'$\|\rho/\rho\mathdefault{_{EOS}-1\|\times 100}$ [%]')
        elif out == 'T':
            CB.set_label(r'$\|T/T\mathdefault{_{EOS}-1\|\times 100}$ [%]')
        elif out == 'C':
            CB.set_label(r'$\|c\mathdefault{_p}/c\mathdefault{_{p,EOS}-1\|\times 100}$ [%]')

        # The plot is finished, now we add an ellipse
        # circle=plt.Circle((5,5),.5,color='b',fill=False)
        # A scale-free ellipse.
        # xy - center of ellipse
        # width - total length (diameter) of horizontal axis
        # height - total length (diameter) of vertical axis
        #angle - rotation in degrees (anti-clockwise)
        p_op_min = 1e5
        p_op_max = 3e5
        h_op_min = CP.PropsSI('H', 'T', 400 + 273.15, 'P', p_op_max, Ref)
        h_op_max = CP.PropsSI('H', 'T', 25 + 273.15, 'P', p_op_max, Ref)

        p_op_cen = (p_op_min + p_op_max) / 2.0
        h_op_cen = (h_op_min + h_op_max) / 2.0

        p_op_hei = p_op_max - p_op_min
        h_op_wid = h_op_max - h_op_min

        # for ax in [ax1, ax2]:
        ##x,y = 10,0
        # use the axis scale tform to figure out how far to translate
        ##circ_offset = ScaledTranslation(x,y,ax.transScale)
        # construct the composite tform
        ##circ_tform = circ_offset + ax.transLimits + ax.transAxes
        # ellipse = Ellipse(xy=(h_op_cen,p_op_cen), width=h_op_wid, height=p_op_hei, angle=15, color='black')#, transform=circ_tform)
        # ax.add_artist(ellipse)

#        font_def = font_manager.FontProperties(family='Helvetica', style='normal',
#    size=sizeOfFont, weight='normal', stretch='normal')
#
#        for a in fig.axes:
#            for label in [a.get_xticklabels(), a.get_yticklabels()]:
#                label.set_fontproperties(ticks_font

        #plt.savefig(out+'_'+colourmap+'_TTSE_BICUBIC.png', dpi = 300, transparent = True)
        # plt.savefig(out+'_'+colourmap+'_TTSE_BICUBIC.eps')
        #    plt.savefig(out+'_'+colourmap+'_TTSE_BICUBIC.pdf')
        plt.tight_layout()
        plt.savefig('check_TTSE_' + colourmap + '.pdf')
        #tikz_save(  'check_TTSE.tikz')
        #plt.savefig(out+'_'+colourmap+'_TTSE_BICUBIC.jpg', dpi = 1200)
        plt.close()


ws an exception if there was no value for any [FieldDef] without a default value,
 * or if [JsonReader] met unexpected token for the given [Schema.type].
 */
@Suppress("UNCHECKED_CAST")
fun <T> TokenStream.readAs(type: DataType<T>): T {
    val type = if (type is DataType.Nullable<*, *>) {
        if (peek() == Token.Null) return poll(Token.Null) as T
        type.actualType
    } else type

    return when (type) {
        is DataType.Nullable<*, *> -> throw AssertionError()
        is DataType.NotNull.Simple -> {
            val token =
                if (type.hasStringRepresentation) Token.Str
                else kindToToken[type.kind]!! // !! exhaustive mapping
            type.load(poll(token)!!) as T // !! we never pass Token.Null so source must not return `null`s
        }
        is DataType.NotNull.Collect<*, *, *> -> {
            type.load(readListOf(type.elementType)) as T
        }
        is DataType.NotNull.Partial<*, *> -> {
            poll(Token.BeginDictionary)
            val sch = type.schema
            val struct = readPartial(
                type as DataType.NotNull.Partial<Any?, NullSchema>, fieldValues,
                { nextField(sch) }, { readAs(it) }
            )
            poll(Token.EndDictionary)
            struct as T
        }
    }
}

internal/*accessed from a class*/ fun TokenStream.nextField(sch: Schema<*>): Byte {
    while (peek() != Token.EndDictionary) {
        sch.fieldByName(poll(Token.Str) as CharSequence,
                { return it.ordinal },
                { skipValue() /* unsupported value */ }
        )
    }
    return -1
}

private val fieldValues = ThreadLocal<ArrayList<Any?>>()
/**
 * Collect these tokens as a sequence of [type] to a [List].
 * This asserts that next token is [Token.BeginSequence] and consumes the whole bracket sequence.
 *
 * Each value is read using [readAs].
 *
 * @see readAs
 * @see iteratorOf
 * @see iteratorOfTransient
 */
fun <T> TokenStream.readListOf(type: DataType<T>): List<T> {
    // TODO: when [type] is primitive, use specialized collections

    poll(Token.BeginSequence)
    val list = if (peek() == Token.EndSequence) emptyList() else {
        val first = readAs(type)

        if (peek() == Token.EndSequence) listOf(first) else {
            val list = ArrayList<T>()
            list.add(first)

            do list.add(readAs(type))
            while (peek() != Token.EndSequence)

            list
        }
    }
    poll(Token.EndSequence)

    return list
}

/**
 * A view on [TokenStream] as a sequence of [type].
 * This asserts that next token is [Token.BeginSequence] and consumes the whole bracket sequence.
 * @see readAs
 * @see readListOf
 * @see iteratorOfTransient
 */
@Suppress("NOTHING_TO_INLINE")
inline fun <T> TokenStream.iteratorOf(type: DataType<T>): CloseableIterator<T> =
        TokensIterator(this, type, NullSchema)

/**
 * A view on [TokenStream] as a sequence of __transient structs__ of type [schema].
 * This asserts that next token is [Token.BeginSequence]
 * and consumes the whole bracket sequence by the last `next()` call.
 * A [Struct] is __transient__ when it is owned by an [Iterator].
 * Such a [Struct] is valid only until [Iterator.next] or [CloseableIterator.close] call.
 * Never store, collect, or let them escape the for-loop.
 * Sorting, finding min, max, distinct also won't work because
 * these operations require looking back at previous [Struct]s


,
  Question(Box<Expr<'a>>),
  Neg(Box<Expr<'a>>),
  Not(Box<Expr<'a>>),

  Cast {
    value: Box<Expr<'a>>,
    to: Type<'a>,
  },

  BinaryOp {
    op: BinaryOp,
    lhs: Box<Expr<'a>>,
    rhs: Box<Expr<'a>>,
  },

  Assign {
    op: Option<ArithOp>,
    lhs: Box<Expr<'a>>,
    rhs: Box<Expr<'a>>,
  },

  Path(PathInExpr<'a>),
  Loop {
    cond: LoopCond<'a>,
    label: Option<&'a str>,
    body: Box<Expr<'a>>,
  },

  If {
    cond: IfCond<'a>,
    body: Box<Expr<'a>>,
    else_arm: Option<Box<Expr<'a>>>,
  },

  Match {
    from: Box<Expr<'a>>,
    arms: Vec<(MatchArm<'a>, Expr<'a>)>,
  },

  Nothing,
}

#[derive(Debug, Clone)]
pub enum BinaryOp {
  ArithOp(ArithOp),
  LogicalOp(LogicalOp),
}

#[derive(Debug, Clone)]
pub enum ArithOp {
  Add,
  Sub,
  Mul,
  Div,
  Mod,
  BitAnd,
  BitOr,
  BitXor,
  BitLS,
  BitRS,
}

impl ArithOp {
  pub fn from(input: &str) -> Self {
    Self::try_from(input).unwrap()
  }

  pub fn from_char(input: char) -> Self {
    // TODO: one less allocation
    Self::from(&input.to_string())
  }

  fn try_from(input: &str) -> Option<Self> {
    match input {
      "+" => Some(Self::Add),
      "-" => Some(Self::Sub),
      "*" => Some(Self::Mul),
      "/" => Some(Self::Div),
      "%" => Some(Self::Mod),

      "&" => Some(Self::BitAnd),
      "|" => Some(Self::BitOr),
      "^" => Some(Self::BitXor),
      "<<" => Some(Self::BitLS),
      ">>" => Some(Self::BitRS),
      _ => None,
    }
  }
}

#[derive(Debug, Clone)]
pub enum LogicalOp {
  And,
  Or,
  Eq,
  Ne,
  L,
  G,
  Le,
  Ge,
}

impl LogicalOp {
  pub fn from(input: &str) -> Self {
    Self::try_from(input).unwrap()
  }
  fn try_from(input: &str) -> Option<Self> {
    match input {
      "==" => Some(Self::Eq),
      "!=" => Some(Self::Ne),
      ">" => Some(Self::G),
      "<" => Some(Self::L),
      ">=" => Some(Self::Ge),
      "<=" => Some(Self::Le),

      "&&" => Some(Self::And),
      "||" => Some(Self::Or),
      _ => None,
    }
  }
}

impl Into<BinaryOp> for ArithOp {
  fn into(self) -> BinaryOp {
    BinaryOp::ArithOp(self)
  }
}

impl Into<BinaryOp> for LogicalOp {
  fn into(self) -> BinaryOp {
    BinaryOp::LogicalOp(self)
  }
}

#[derive(Debug, Clone)]
pub enum LoopCond<'a> {
  Infty,
  For(Pat<'a>, Box


parent)
{
  RGWUserInfo *info = static_cast<RGWUserInfo *>(parent);
  key.dump(f, info->user_id.to_str(), false);
}

static void user_info_dump_swift_key(const char *name, const RGWAccessKey& key, Formatter *f, void *parent)
{
  RGWUserInfo *info = static_cast<RGWUserInfo *>(parent);
  key.dump(f, info->user_id.to_str(), true);
}

void RGWUserInfo::dump(Formatter *f) const
{

  encode_json("user_id", user_id.to_str(), f);
  encode_json("display_name", display_name, f);
  encode_json("email", user_email, f);
  encode_json("suspended", (int)suspended, f);
  encode_json("max_buckets", (int)max_buckets, f);

  encode_json_map("subusers", NULL, "subuser", NULL, user_info_dump_subuser,(void *)this, subusers, f);
  encode_json_map("keys", NULL, "key", NULL, user_info_dump_key,(void *)this, access_keys, f);
  encode_json_map("swift_keys", NULL, "key", NULL, user_info_dump_swift_key,(void *)this, swift_keys, f);

  encode_json("caps", caps, f);

  char buf[256];
  op_type_to_str(op_mask, buf, sizeof(buf));
  encode_json("op_mask", (const char *)buf, f);

  if (system) { /* no need to show it for every user */
    encode_json("system", (bool)system, f);
  }
  if (admin) {
    encode_json("admin", (bool)admin, f);
  }
  encode_json("default_placement", default_placement.name, f);
  encode_json("default_storage_class", default_placement.storage_class, f);
  encode_json("placement_tags", placement_tags, f);
  encode_json("bucket_quota", bucket_quota, f);
  encode_json("user_quota", user_quota, f);
  encode_json("temp_url_keys", temp_url_keys, f);

  string user_source_type;
  switch ((RGWIdentityType)type) {
  case TYPE_RGW:
    user_source_type = "rgw";
    break;
  case TYPE_KEYSTONE:
    user_source_type = "keystone";
    break;
  case TYPE_LDAP:
    user_source_type = "ldap";
    break;
  case TYPE_NONE:
    user_source_type = "none";
    break;
  default:
    user_source_type = "none";
    break;
  }
  encode_json("type", user_source_type, f);
  encode_json("mfa_ids", mfa_ids, f);
}

static void decode_access_keys(map<string, RGWAccessKey>& m, JSONObj *o)
{
  RGWAccessKey k;
  k.decode_json(o);
  m[k.id] = k;
}

static void decode_swift_keys(map<string, RGWAccessKey>& m, JSONObj *o)
{
  RGWAccessKey k;
  k.decode_json(o, true);
  m[k.id] = k;
}

static void decode_subusers(map<string, RGWSubUser>& m, JSONObj *o)
{
  RGWSubUser u;
  u.decode_json(o);
  m[u.name] = u;
}

void RGWUserInfo::decode_json(JSONObj *obj)
{
  string uid;

  JSONDecoder::decode_json("user_id", uid, obj, true);
  user_id.from_str(uid);

  JSONDecoder::decode_json("display_name", display_name, obj);
  JSONDecoder::decode_json("email", user_email, obj);
  bool susp = false;
  JSONDecoder::decode_json("suspe


..vec..into_iter..IntoIter$LT$std..ffi..os_str..OsString$GT$$GT$17hf6bd7982db6a1ab5E, .Lfunc_end41-_ZN4core3ptr86drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$std..ffi..os_str..OsString$GT$$GT$17hf6bd7982db6a1ab5E
	.cfi_endproc

	.section	".text._ZN4core3ptr8non_null16NonNull$LT$T$GT$13new_unchecked18precondition_check17ha2a24e272d14c505E","ax",@progbits
	.p2align	4, 0x90
	.type	_ZN4core3ptr8non_null16NonNull$LT$T$GT$13new_unchecked18precondition_check17ha2a24e272d14c505E,@function
_ZN4core3ptr8non_null16NonNull$LT$T$GT$13new_unchecked18precondition_check17ha2a24e272d14c505E:
	.cfi_startproc
	pushq	%rax
	.cfi_def_cfa_offset 16
	cmpq	$0, %rdi
	jne	.LBB42_2
	leaq	.L__unnamed_10(%rip), %rdi
	movq	_ZN4core9panicking14panic_nounwind17h19ec6ef7ab4baa43E@GOTPCREL(%rip), %rax
	movl	$93, %esi
	callq	*%rax
.LBB42_2:
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end42:
	.size	_ZN4core3ptr8non_null16NonNull$LT$T$GT$13new_unchecked18precondition_check17ha2a24e272d14c505E, .Lfunc_end42-_ZN4core3ptr8non_null16NonNull$LT$T$GT$13new_unchecked18precondition_check17ha2a24e272d14c505E
	.cfi_endproc

	.section	".text._ZN4core3ptr9const_ptr33_$LT$impl$u20$$BP$const$u20$T$GT$7sub_ptr17h4f8c88dcc015f813E","ax",@progbits
	.p2align	4, 0x90
	.type	_ZN4core3ptr9const_ptr33_$LT$impl$u20$$BP$const$u20$T$GT$7sub_ptr17h4f8c88dcc015f813E,@function
_ZN4core3ptr9const_ptr33_$LT$impl$u20$$BP$const$u20$T$GT$7sub_ptr17h4f8c88dcc015f813E:
	.cfi_startproc
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movq	%rdi, (%rsp)
	movq	%rsi, 8(%rsp)
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	callq	_ZN4core3ptr9const_ptr33_$LT$impl$u20$$BP$const$u20$T$GT$7sub_ptr18precondition_check17h004ce445661bfd41E
	jmp	.LBB43_3
.LBB43_3:
	jmp	.LBB43_4
.LBB43_4:
	movq	8(%rsp), %rcx
	movq	(%rsp), %rax
	subq	%rcx, %rax
	movl	$24, %ecx
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, 16(%rsp)
	movq	16(%rsp),


.corpus_tools.annis.ApiException;
import org.corpus_tools.annis.JSON;
import org.corpus_tools.annis.api.SearchApi;
import org.corpus_tools.annis.api.model.BadRequestError;
import org.corpus_tools.annis.api.model.CorpusConfiguration;
import org.corpus_tools.annis.api.model.CountQuery;
import org.corpus_tools.annis.api.model.QueryAttributeDescription;
import org.corpus_tools.annis.gui.components.ExceptionDialog;
import org.corpus_tools.annis.gui.controller.CountCallback;
import org.corpus_tools.annis.gui.controller.ExportBackgroundJob;
import org.corpus_tools.annis.gui.controller.FrequencyBackgroundJob;
import org.corpus_tools.annis.gui.controller.SpecificPagingCallback;
import org.corpus_tools.annis.gui.controlpanel.QueryPanel;
import org.corpus_tools.annis.gui.exporter.ExporterPlugin;
import org.corpus_tools.annis.gui.frequency.FrequencyQueryPanel;
import org.corpus_tools.annis.gui.frequency.UserGeneratedFrequencyEntry;
import org.corpus_tools.annis.gui.media.MediaController;
import org.corpus_tools.annis.gui.objects.ContextualizedQuery;
import org.corpus_tools.annis.gui.objects.DisplayedResultQuery;
import org.corpus_tools.annis.gui.objects.ExportQuery;
import org.corpus_tools.annis.gui.objects.ExportQueryGenerator;
import org.corpus_tools.annis.gui.objects.FrequencyQuery;
import org.corpus_tools.annis.gui.objects.FrequencyTableQuery;
import org.corpus_tools.annis.gui.objects.Match;
import org.corpus_tools.annis.gui.objects.PagedResultQuery;
import org.corpus_tools.annis.gui.objects.Query;
import org.corpus_tools.annis.gui.objects.QueryLanguage;
import org.corpus_tools.annis.gui.objects.QueryUIState;
import org.corpus_tools.annis.gui.resultfetch.ResultFetchJob;
import org.corpus_tools.annis.gui.resultfetch.SingleResultFetchJob;
import org.corpus_tools.annis.gui.resultview.ResultViewPanel;
import org.corpus_tools.annis.gui.resultview.VisualizerContextChanger;
import org.corpus_tools.annis.gui.visualizers.IFrameResourceMap;
import org.corpus_tools.salt.common.SaltProject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * A controller to modifiy the query UI state. s
 *
 * @author Thomas Krause {@literal <krauseto@hu-berlin.de>}
 */
public class QueryController implements Serializable {

  /**
   *
   */
  private static final long serialVersionUID = -5746215715915616348L;

  private static final Logger log = LoggerFactory.getLogger(QueryController.class);

  /**
   * Only changes the value of the property if it is not equals to the old one.
   *
   * @param <T>
   * @param prop
   * @param newValue
   */
  private static <T> void setIfNew(ListDataProvider<T> prop, Collection<T> newValue) {
    if (!Objects.equals(prop.getItems(), newValue)) {
      prop.getItems().clear();
      prop.getItems().addAll(newValue);
    }
  }

  /**
   * Only changes the value of the property if it is not equals to the old one.
   *
   * @param <T>
   * @param prop
   * @param newValue
   */
  private static <T> void setIfNew(Property<T> prop, T newValue) {
    if (!Objects.equals(prop.getValue(), newValue)) {
      prop.setValue(newValue);
    }
  }

  private final AnnisUI ui;

  private final SearchView searchView;

  private final QueryUIState state;

  private final Binder<QueryUIState> binder;

  public Q


(checkInIntervals, checkOutIntervals)
    }

    private fun PipelineBuildStage.checkInOutMonitorIntervals(
        userId: String,
        inOrOut: Boolean,
        checkTime: LocalDateTime?,
        buildInfo: BuildInfo
    ): Long {

        val pauseCheck = if (inOrOut) checkIn else checkOut
        if (pauseCheck?.manualTrigger != true && pauseCheck?.ruleIds.isNullOrEmpty()) {
            return Timeout.STAGE_MAX_MILLS
        }

        var hours = pauseCheck?.timeout ?: Timeout.DEFAULT_STAGE_TIMEOUT_HOURS
        if (hours <= 0 || hours > Timeout.MAX_HOURS) {
            hours = Timeout.MAX_HOURS.toInt()
        }

        val timeoutMills = TimeUnit.HOURS.toMillis(hours.toLong())
        val usedTimeMills: Long = if (checkTime != null) {
            System.currentTimeMillis() - checkTime.timestampmilli()
        } else {
            0
        }

//        buildLogPrinter.addDebugLine(
//            buildId = buildId,
//            message = "Monitor| check stage review($inOrOut) timeout($hours hours), " +
//                "running: ${TimeUnit.MILLISECONDS.toMinutes(usedTimeMills)}) minutes!",
//            tag = stageId,
//            jobId = "",
//            executeCount = executeCount
//        )

        val interval = timeoutMills - usedTimeMills
        if (interval <= 0) {
            buildLogPrinter.addRedLine(
                buildId = buildId,
                message = "Stage Review timeout $hours hours. Shutdown build!",
                tag = stageId,
                containerHashId = "",
                executeCount = executeCount,
                jobId = null,
                stepId = null
            )

            // #5654 如果是红线待审核状态则取消红线审核
            if (pauseCheck?.status == BuildStatus.QUALITY_CHECK_WAIT.name) {
                pipelineStageService.qualityTriggerStage(
                    userId = userId,
                    buildStage = this,
                    qualityRequest = StageQualityRequest(
                        position = ControlPointPosition.BEFORE_POSITION,
                        pass = false,
                        checkTimes = executeCount
                    ),
                    inOrOut = inOrOut,
                    check = pauseCheck,
                    timeout = true
                )
            }
            // #5654 如果是待人工审核则取消人工审核
            else if (pauseCheck?.groupToReview() != null) {
                val pipelineInfo =
                    pipelineRepositoryService.getPipelineInfo(buildInfo.projectId, buildInfo.pipelineId)
                pipelineStageService.cancelStage(
                    userId = userId,
                    triggerUserId = buildInfo.triggerUser,
                    pipelineName = pipelineInfo?.pipelineName,
                    buildNum = buildInfo.buildNum,
                    buildStage = this,
                    reviewRequest = StageReviewRequest(
                        reviewParams = listOf(),
                        id = pauseCheck.groupToReview()?.id,
                        suggest = "TIMEOUT"
                    ),
                    timeout = true,
                    debug = buildInfo.debug,
                    system = true
                )
            }
        }

        return interval
    }

    @Suppress("LongMethod")
    private fun monitorQueueBuild(event: PipelineBuildMonitorEvent, buildInfo: BuildInfo): Boolean {
        // 判断是否超时
        if (pipelineSettingService.isQueueTimeout(event.projectId, event.pipelineId, buildInfo.queueTime)) {
            val exitQueue = pipelineRuntimeExtService.changeBuildStatus(
                projectId = event.projectId,
                pipelineId = event.pipelineId,
                buildId = event.buildId,
                oldBuildStatus = buildInfo.status,
                newBuildStatus = BuildStatus.UNEXEC
            )
            LOG.info("ENGINE|${event.buildId}|BUILD_QUEUE_MONITOR_TIMEOUT|queue timeout|exitQueue=$exitQueue")
            val errorInfo = I18nUtil.generateRespons


t(linear,left top,left bottom,color-stop(0%,#ededed),color-stop(100%,#fff));background:-webkit-linear-gradient(top,#ededed 0,#fff 100%);background:-o-linear-gradient(top,#ededed 0,#fff 100%);background:-ms-linear-gradient(top,#ededed 0,#fff 100%);background:linear-gradient(to bottom,#ededed 0,#fff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed',endColorstr='#ffffff',GradientType=0)}.cke_hc a.cke_dialog_tab:hover,.cke_hc a.cke_dialog_tab_selected{border:3px solid;padding:2px 6px}a.cke_dialog_tab_disabled{color:#bababa;cursor:default}.cke_single_page .cke_dialog_tabs{display:none}.cke_single_page .cke_dialog_contents{padding-top:5px;margin-top:0;border-top:0}.cke_dialog_close_button{background-image:url(images/close.png);background-repeat:no-repeat;background-position:50%;position:absolute;cursor:pointer;text-align:center;height:20px;width:20px;top:5px;z-index:5;opacity:.8;filter:alpha(opacity = 80)}.cke_dialog_close_button:hover{opacity:1;filter:alpha(opacity = 100)}.cke_hidpi .cke_dialog_close_button{background-image:url(images/hidpi/close.png);background-size:16px}.cke_dialog_close_button span{display:none}.cke_hc .cke_dialog_close_button span{display:inline;cursor:pointer;font-weight:bold;position:relative;top:3px}.cke_ltr .cke_dialog_close_button{right:5px}.cke_rtl .cke_dialog_close_button{left:6px}.cke_dialog_close_button{top:4px}div.cke_disabled .cke_dialog_ui_labeled_content div *{background-color:#ddd;cursor:default}.cke_dialog_ui_vbox table,.cke_dialog_ui_hbox table{margin:auto}.cke_dialog_ui_vbox_child{padding:5px 0}.cke_dialog_ui_hbox{width:100%}.cke_dialog_ui_hbox_first,.cke_dialog_ui_hbox_child,.cke_dialog_ui_hbox_last{vertical-align:top}.cke_ltr .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_ui_hbox_child{padding-right:10px}.cke_rtl .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_ui_hbox_child{padding-left:10px}.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_ltr .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-right:5px}.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_first,.cke_rtl .cke_dialog_footer_buttons .cke_dialog_ui_hbox_child{padding-left:5px;padding-right:0}.cke_hc div.cke_dialog_ui_input_text,.cke_hc div.cke_dialog_ui_input_password,.cke_hc div.cke_dialog_ui_input_textarea,.cke_hc div.cke_dialog_ui_input_select,.cke_hc div.cke_dialog_ui_input_file{border:1px solid}textarea.cke_dialog_ui_input_textarea{overflow:auto;resize:none}input.cke_dialog_ui_input_text,input.cke_dialog_ui_input_password,textarea.cke_dialog_ui_input_textarea{background-color:#fff;border:1px solid #c9cccf;border-top-color:#aeb3b9;padding:4px 6px;outline:0;width:100%;*width:95%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-


(`Connected to Discord Rooms: [${guildNames}]` );

    client.guilds.cache.map(async g => {
      await g.members.fetch();
      g.members.cache.map(m => {
        `${m.id} - ${m.nickname} - ${m.displayName}`
      });
    });
  });

  client.on('guildUpdate', (oldGuild, newGuild) => {
    const {log} = logger();
    if (oldGuild.available === false && newGuild.available === true) {
      log(`Discord "${newGuild.name}" (ID: ${newGuild.id}) is now CONNECTED.`);
    } else if (oldGuild.available === true && newGuild.available === false) {
      log(`Discord "${newGuild.name}" (ID: ${newGuild.id}) is now DISCONNECTED.`);
    }
  });

  client.on('presenceUpdate', async (_oldPresence, newPresence) => {
    const {log, error} = logger();
    if (!flags.upgradesEnabled) {
      log(`User upgrades are disabled. Event 'presenceUpdate' is ignored. To enable, initialize Levin with UPGRADES_ENABLED=true`);
      return;
    }
    if (newPresence.status === 'offline' || !newPresence.member) {
      return;
    }

    const member = newPresence.member;

    if (!member.joinedTimestamp) {
      error(`User ${member.displayName} (id: ${member.id}) does not have joinedTimestamp. Weird.`);
      return;
    }

    const guildLevelRoles = member.guild.roles.cache.filter(role => USER_LEVEL_ROLE_NAMES.includes(role.name));
    const memberLevelRoles = member.roles.cache.filter(role => USER_LEVEL_ROLE_NAMES.includes(role.name));

    if (guildLevelRoles.size !== USER_LEVEL_ROLE_NAMES.length) {
      error(`The list of roles in Discord "${member.guild.name}" (ID: ${member.guild.id}) must match with [${USER_LEVEL_ROLE_NAMES.join(', ')}]. Make sure all of these roles exist.`);
      return;
    }

    if (memberLevelRoles.size === 0) {
      if (flags.automaticFirstLevel) {
        // If user has none of the GuildLevels role => assign the lowest one.
        const lowestLevelRole = guildLevelRoles.find(r => r.name === FIRST_LEVEL.name) as Discord.Role;
        await member.roles.add(lowestLevelRole);
        log(`User ${member.displayName} (ID: ${member.id}) had none of the roles "${USER_LEVEL_ROLE_NAMES.join(', ')}" set. Role "${FIRST_LEVEL.name}" was set to this user.`);
        return;
      } else {
        log(`User ${member.displayName} (ID: ${member.id}) has none of "${USER_LEVEL_ROLE_NAMES.join(', ')}" set and "automaticFirstLevel" flag is disabled. Doing nothing with this user.`);
        return;
      }
    }

    const highestCurrentRole = maxBy(memberLevelRoles.array(), (memberRole) => {
      return (
        GuildLevels.find((level) => level.name === memberRole.name) as GuildLevel
      ).value;
    }) as Discord.Role;
    const highestCurrentLevel = GuildLevels.find((level) => level.name === highestCurrentRole.name) as GuildLevel;
    const nextLevel = GuildLevels.find((level) => level.value > highestCurrentLevel.value);

    if (!nextLevel) {
      // User is already on the highest level.
      log(`User "${member.displayName}" (ID: ${member.id}) has the maximum level. Doing nothing with this user.`);
      return;
    }

    const nextLevelRole


ange: 0 to 127
    /// - default: 127
    /// - version: v1
    /// - info: [xfout_lovel](https://sfzformat.com/opcodes/xfout_lovel)
    ///
    xfout_lovel(u8),

    ///
    /// - range: 0 to 127
    /// - default: 127
    /// - version: v1
    /// - info: [xfout_hivel](https://sfzformat.com/opcodes/xfout_hivel)
    ///
    xfout_hivel(u8),

    ///
    /// - range: 0.001 to 4 octaves
    /// - default: 1
    /// - version: v1
    /// - info: [eqN_bw](https://sfzformat.com/opcodes/eqN_bw)
    ///
    eqN_bw(f32),

    ///
    /// - range: -4 to 4 octaves
    /// - default: 0
    /// - version: v1
    /// - info: [eqN_bwccX](https://sfzformat.com/opcodes/eqN_bwccX)
    ///
    eqN_bwccX(f32),

    ///
    /// - range: 0 to 30000 Hz
    /// - default: eq1_freq=50 | eq1_freq=500 | eq1_freq=5000
    /// - version: v1
    /// - info: [eqN_freq](https://sfzformat.com/opcodes/eqN_freq)
    ///
    eqN_freq(f32),

    ///
    /// - range: -30000 to 30000 Hz
    /// - default: 0
    /// - version: v1
    /// - info: [eqN_freqccX](https://sfzformat.com/opcodes/eqN_freqccX)
    ///
    eqN_freqccX(f32),

    ///
    /// - range: -30000 to 30000 Hz
    /// - default: 0
    /// - version: v1
    /// - info: [eqN_vel2freq](https://sfzformat.com/opcodes/eqN_vel2freq)
    ///
    eqN_vel2freq(f32),

    ///
    /// - range: -96 to 24 dB
    /// - default: 0
    /// - version: v1
    /// - info: [eqN_gain](https://sfzformat.com/opcodes/eqN_gain)
    ///
    eqN_gain(f32),

    ///
    /// - range: -96 to 24 dB
    /// - default: 0
    /// - version: v1
    /// - info: [eqN_gainccX](https://sfzformat.com/opcodes/eqN_gainccX)
    ///
    eqN_gainccX(f32),

    ///
    /// - range: -96 to 24 dB
    /// - default: 0
    /// - version: v1
    /// - info: [eqN_vel2gain](https://sfzformat.com/opcodes/eqN_vel2gain)
    ///
    eqN_vel2gain(f32),

    ///
    /// - range: 0 to SampleRate / 2 Hz
    /// - default: filter disabled
    /// - version: v1
    /// - info: [cutoff](https://sfzformat.com/opcodes/cutoff)
    ///
    cutoff(f32),

    ///
    /// - range: -9600 to 9600 cents
    /// - default: 0
    /// - version: v1
    /// - info: [cutoff_ccN](https://sfzformat.com/opcodes/cutoff_ccN)
    ///
    cutoff_ccN(i16),

    ///
    /// - range: -9600 to 9600 cents
    /// - default: 0
    /// - version: v1
    /// - info: [cutoff_chanaft](https://sfzformat.com/opcodes/cutoff_chanaft)
    ///
    cutoff_chanaft(i16),

    ///
    /// - range: -9600 to 9600 cents
    /// - default: 0
    /// - version: v1
    ///


dest.push(&self.address);
        dest.push(&self.attributes);
    }

    fn size_hint(&self) -> usize {
        self.nonce.size_hint() + self.address.size_hint() + self.attributes.size_hint()
    }
}

#[cfg(not(feature = "new-txid"))]
impl TransactionId for UnjailTx {}

#[cfg(feature = "new-txid")]
impl From<UnjailTx> for TaggedTransaction {
    fn from(tx: UnjailTx) -> TaggedTransaction {
        TaggedTransaction::UnjailTx(tx)
    }
}

impl UnjailTx {
    /// constructs a new unjail transaction from the provided components
    #[inline]
    pub fn new(
        nonce: Nonce,
        address: StakedStateAddress,
        attributes: StakedStateOpAttributes,
    ) -> Self {
        Self {
            nonce,
            address,
            attributes,
        }
    }
}

impl fmt::Display for UnjailTx {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        writeln!(f, "unjailed: {} (nonce: {})", self.address, self.nonce)?;
        write!(f, "")
    }
}
// Copyright 2021 UINB Technologies Pte. Ltd.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 	http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#![cfg_attr(not(feature = "std"), no_std)]
use frame_support::{
    decl_event, decl_module, decl_storage,
    traits::{Currency, Get, ReservableCurrency},
    weights::Weight,
};
use sp_runtime::traits::{One, Saturating, Zero};
use sp_runtime::Perbill;
use sp_std::vec::Vec;

#[cfg(test)]
mod mock;

#[cfg(test)]
mod tests;

pub type BalanceOf<T> =
    <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;

pub trait Trait: frame_system::Trait {
    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;

    type UnlockDelay: Get<Self::BlockNumber>;

    type UnlockPeriod: Get<Self::BlockNumber>;

    type UnlockRatioEachPeriod: Get<Perbill>;

    type Currency: ReservableCurrency<Self::AccountId>;
}

decl_storage! {
    trait Store for Module<T: Trait> as Foundation {
        pub Foundation get(fn foundation): map hasher(blake2_128_concat)
            T::AccountId => BalanceOf<T>;
    }
    add_extra_genesis {
        config(fund): Vec<(T::AccountId, BalanceOf<T>)>;
        build(|config: &GenesisConfig<T>| {
            for (account, balance) in &config.fund {
                Foundation::<T>::insert(account, balance);
            }
        })
    }
}

decl_event! {
    pub enum Event<T>
    where
        <T as frame_system::Trait>::AccountId,
        Balance = BalanceOf<T>,
    {
        PreLockedFundUnlocked(AccountId, Balance),
        UnlockedFundAllBalance(AccountId),
    }
}

decl_module! {
    pub struct Module<T: Trait> for enum Call where origin: T::Origin {

        fn deposit_event() = default;

        const UnlockDelay: T::BlockNumber = T::UnlockDelay::get();


ap(image, hand, width, height, builder).sendTo(this)
}

/**
 * 调整图片分辨率
 * 地图最佳显示分辨率为128*128
 */
@Deprecated("停止维护")
fun BufferedImage.zoomed(width: Int = 128, height: Int = 128): BufferedImage {
    val tag = BufferedImage(width, height, BufferedImage.TYPE_INT_RGB)
    tag.graphics.drawImage(this, 0, 0, width, height, null)
    return tag
}

/**
 * 地图发包工具
 * 支持 1.8 - 1.17.1
 * @author xbaimiao, sky
 */
class NMSMap(val image: BufferedImage, var hand: Hand = Hand.MAIN, val builder: ItemBuilder.() -> Unit = {}) {

    enum class Hand {

        MAIN, OFF
    }

    companion object {

        val classPacketPlayOutSetSlot = nmsClass("PacketPlayOutSetSlot")
        val classPacketPlayOutMap = nmsClass("PacketPlayOutMap")
        val classCraftItemStack = obcClass("inventory.CraftItemStack")
        val classMapIcon by unsafeLazy { nmsClass("MapIcon") }
        /**
         * 鸣谢 [YsGqHY](https://github.com/YsGqHY) 提供的包寻找方法
         */
        val classMapData: Class<*> by unsafeLazy {
            try {
                // 尝试找Spigot的WorldMap.b
                Class.forName("net.minecraft.world.level.saveddata.maps.WorldMap\$b")
            } catch (e: ClassNotFoundException) {
                // 没有找到Spigot的WorldMap.b，尝试找Paper的MapItemSavedData.MapPatch
                Class.forName("net.minecraft.world.level.saveddata.maps.MapItemSavedData\$MapPatch")
            }
        }
        // 高版本把MapId改成了，这个东西主要是对1.20+的兼容
        val classMapId: Class<*> by unsafeLazy { Class.forName("net.minecraft.world.level.saveddata.maps.MapId") }
    }

    val mapRenderer = object : MapRenderer() {

        var rendered = false

        override fun render(mapView: MapView, mapCanvas: MapCanvas, player: Player) {
            if (rendered) {
                return
            }
            mapCanvas.drawImage(0, 0, image)
            rendered = true
        }
    }

    val mapView by unsafeLazy {
        val mapView = Bukkit.createMap(Bukkit.getWorlds()[0])
        mapView.addRenderer(mapRenderer)
        mapView
    }

    val mapItem by unsafeLazy {
        val map = if (MinecraftVersion.isHigherOrEqual(MinecraftVersion.V1_13)) {
            buildItem(XMaterial.FILLED_MAP, builder)
        } else {
            buildItem(XMaterial.FILLED_MAP) {
                damage = mapView.invokeMethod<Short>("getId")!!.toInt()
                builder(this)
            }
        }
        if (MinecraftVersion.isHigherOrEqual(MinecraftVersion.V1_13)) {
            map.modifyMeta<MapMeta> { mapView = this@NMSMap.mapView }
        } else {
            map


ng | string[]) {
  return obj.length;
};
export const getReverse = function (obj: string | string[]): string | string[] {
  if (typeof obj === "string") {
    return [obj];
  } else {
    return obj[0];
  }
};
import {
  Component,
  OnChanges,
  OnInit,
  DoCheck,
  AfterContentInit,
  AfterContentChecked,
  AfterViewInit,
  AfterViewChecked,
  OnDestroy
} from '@angular/core';

@Component({
  selector: 'app-lifecycle',
  templateUrl: './lifecycle.component.html',
  styleUrls: ['./lifecycle.component.css']
})
export class LifecycleComponent implements
  OnChanges, OnInit, DoCheck, AfterContentInit, AfterContentChecked, AfterViewInit, AfterViewChecked, OnDestroy {

  todaysWinner = undefined;
  todaysWinningNumber = undefined
  ticketHolders = [ 'Wayne', 'Ivan', 'Renae', 'Lachlan', 'Aaron', 'Rhylee', 'Bubba' ];

  constructor() {
    this.logMethodState('Constructor');
  }

  ngOnChanges() {
    this.logMethodState('ngOnChanges');
  }

  ngOnInit() {
    this.logMethodState('ngOnInit');
  }

  ngDoCheck() {
    this.logMethodState('ngDoCheck');
  }

  ngAfterContentInit() {
    this.logMethodState('ngAfterContentInit');
  }

  ngAfterContentChecked() {
    this.logMethodState('ngAfterContentChecked');
  }

  ngAfterViewInit() {
    /*
     * Need to introduce a delay here or an error will occur: ExpressionChangedAfterItHasBeenCheckedError
     * This arises because within one change detection cycle, the value has changed after it has been checked.
     * By introducing a slight delay, it will allow the change to occur after the first change detection.
     */
    setTimeout(() => {
      this.logMethodState('ngAfterViewInit');
    }, 1);
  }

  ngAfterViewChecked() {
    /*
     * Changing this.todaysWinningNumber here will result in an infinite loop. ngAfterViewChecked is called after
     * each execution of ngAfterContentChecked, which in turn is executed after each ngDoCheck. The reason for
     * the infinite loop is that changing the value here triggers change detection which eventually ends up back
     * here, which triggers another change detection ad infinitum.
     *
     */
    this.logMethodState('ngAfterViewChecked', false)
  }

  ngOnDestroy() {
    this.logMethodState('ngOnDestroy');
  }

  private logMethodState(method: string, changeRequested: boolean = true): void {
    console.log(`${method}. Ticket holders: ${this.ticketHolders}`);
    console.log(`${method}. Today's winning number: ${this.todaysWinningNumber}`);
    console.log(`${method}. Today's winner: ${this.todaysWinner}`);
    console.log(`${method}. Picking today's winner...`);
    if (changeRequested) {
      this.todaysWinningNumber = this.getWinningNumber();
    }
    console.log(`${method}. Today's winning number: ${this.todaysWinningNumber}`);
    this.todaysWinner = this.ticketHolders[this.todaysWinningNumber];
    console.log(`${method}. Today's winner is: ${this.todaysWinner}`);
    console.log(`${method} says goodbye...`);
  }

  private getWinningNumber() {
    return Math.floor(Math.random() * this.ticketHolders.length);
  }

}import type { Nullable } from '@silverhand/essentials';

import type { Requester } from '../types/index.js';

type Identity = {
  userId: string;
  details?: Record<string, unknown>;
};

export type UserInfoResponse = {
  sub: string;
  name?: Nullable<string>;
  username?:


)<'l7*(lN*)lZ*@)lw*)l|*)l**l*l+l*+l*+l+,l+$,l+D,l'+,l/+,l+/l+/l+/lW0lz8hlzDhlzLhl z|hl"zhl%zhl*zhl{xll'~xlt~yll'4l;l>lNl^@lll
l
llAlJ
lll lll l	  l6( l9 l= lV l	$l:	$l	&l	&l
(l
(l
0(l
T(l4
d(l;
(l@
(l}
)l6,lV-ls-lI0lG@lpAlBl@ClCl5Dl@DlFl@GlZl[lo#	l/4@	l9j lEo<lo@=lo<>l0@
rrr)l 0)llv
lljll0C)PVALIDCONTEXTJCONTEXTON)__version__scripts
joining_typescodepoint_classesrrb/home/tom/ab/renpy-build-fix/tmp/install.linux-x86_64/lib/python3.9/site-packages/idna/idnadata.py<module>s.#R~]


_ENTRY_ID, 0 # u32
.set SSPLB_SOUND_ENTRY_LOC, SSPLB_SOUND_ENTRY_ID + 4 # u32
.set SSPLB_SOUND_ENTRY_SIZE, SSPLB_SOUND_ENTRY_LOC + 4

.set SOUND_ENTRY_COUNT, 16

.set SSPLB_SOUND_ENTRIES, 0 # SOUND_ENTRY_COUNT * SSPLB_SOUND_ENTRY_SIZE
.set SSPLB_SIZE, SSPLB_SOUND_ENTRIES + SOUND_ENTRY_COUNT * SSPLB_SOUND_ENTRY_SIZE

################################################################################
# Savestate Control Buffer
################################################################################
.set SSCB_WRITE_INDEX, 0 # u8, next index to write savestate at
.set SSCB_SSDB_COUNT, SSCB_WRITE_INDEX + 1 # u8
.set SSCB_SSDB_START, SSCB_SSDB_COUNT + 1 # SSDB_SIZE * ROLLBACK_MAX_FRAME_COUNT
.set SSCB_SSPLB_START, SSCB_SSDB_START + SSDB_SIZE * ROLLBACK_MAX_FRAME_COUNT # SSPLB_SIZE
.set SSCB_SIZE, SSCB_SSPLB_START + SSPLB_SIZE

################################################################################
# SFX Storage
################################################################################
.set MAX_SOUNDS_PER_FRAME, 0x10

# The entry is the data needed to keep track of for a given sound every frame
.set SFXS_ENTRY_SOUND_ID, 0 # u16, ID of the sound played
.set SFXS_ENTRY_INSTANCE_ID, SFXS_ENTRY_SOUND_ID + 2 # u32
.set SFXS_ENTRY_SIZE, SFXS_ENTRY_INSTANCE_ID + 4

# A log keeps tracks of sounds on a given frame, the index is effectively how
# many sounds have been encountered so far
.set SFXS_LOG_INDEX, 0 # u8, Index where we are in the frame
.set SFXS_LOG_ENTRIES, SFXS_LOG_INDEX + 1 # SFXS_ENTRY_SIZE * MAX_SOUNDS_PER_FRAME
.set SFXS_LOG_SIZE, SFXS_LOG_ENTRIES + SFXS_ENTRY_SIZE * MAX_SOUNDS_PER_FRAME

# Pending log keeps track of all inputs during execution of a frame
# Stable log is copied from the pending log at the end of the frame
# Both are needed because as a frame is processing, we need to check if the last
# time this frame was played, whether our sound was executed. This is the purpose
# of the stable log, the pending log is needed to keep track of the latest frame
# sound execution such that on the next frame, it can be used as the stable log
.set SFXS_FRAME_PENDING_LOG, 0 # SFXS_LOG_SIZE
.set SFXS_FRAME_STABLE_LOG, SFXS_FRAME_PENDING_LOG + SFXS_LOG_SIZE # SFXS_LOG_SIZE
.set SFXS_FRAME_SIZE, SFXS_FRAME_STABLE_LOG + SFXS_LOG_SIZE

# Write index increments every frame we process
.set SFXDB_WRITE_INDEX, 0 # u8
.set SFXDB_FRAMES, SFXDB_WRITE_INDEX + 1 # SFXS_FRAME_SIZE * ROLLBACK_MAX_FRAME_COUNT
.set SFXDB_SIZE, SFXDB_FRAMES + SFXS_FRAME_SIZE * ROLLBACK_MAX_FRAME_COUNT

################################################################################
# Desync Recovery
################################################################################
# Desync Fighter Recovery Entry
.set DFRE_STOCKS_REMAINING, 0 # byte
.set DFRE_PERCENT, DFRE_STOCKS_REMAINING + 1 # u16
.set DFRE_S


text-align: center;
            margin-top: 20px;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
        }

        .contact-item {
            background-color: #2c2c2c;
            padding: 30px;
            margin: 20px;
            border-radius: 10px;
            width: 400px;
            display: flex;
            align-items: center;
            flex-direction: column;
            box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
            transition: transform 0.3s;
        }

        .contact-item:hover {
            transform: scale(1.05);
        }

        .contact-icon {
            max-width: 60px;
            margin-bottom: 20px;
        }

        .contact-text {
            font-size: 20px;
            margin: 0;
        }

        footer {
            background-color: #1a1a1a;
            padding: 20px;
            text-align: center;
            width: 100%;
            position: absolute;
            bottom: 0;
            box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
        }
    </style>

SPARTAN GAME

        Inicio
        Eventos
        Miembros
        Contacto

 TikTok: @spartangame

 Facebook: SpartanGameOfficial

 WhatsApp: +123 456 789

  Instagram: @spartangame_official

© 2024 SPARTAN GAME

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/png" href="logo.png">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css">
    <title>SPARTAN GAME - Regalo Mensual</title>


eFormData.mediumPriorityBounds);
      }
      if (completeFormData.lowPriorityBounds && priorityType !== "low") {
        updatePriorityBounds("low", completeFormData.lowPriorityBounds);
      }
    }
  }, [props.formContext?.formData, priorityType, updatePriorityBounds]);

  // Show map if there are existing polygons
  useEffect(() => {
    if (Array.isArray(formData) && formData.length > 0) {
      setIsMapVisible(true);
    }
  }, [formData]);

  // Reset zoom flag when map becomes visible or data changes
  useEffect(() => {
    if (isMapVisible) {
      setHasZoomed(false);
    }
  }, [isMapVisible]);

  // Close tooltip when clicking outside
  useEffect(() => {
    const handleClickOutside = (event) => {
      if (showTooltip && !event.target.closest(".tooltip-container")) {
        setShowTooltip(false);
      }
    };

    document.addEventListener("click", handleClickOutside);
    return () => document.removeEventListener("click", handleClickOutside);
  }, [showTooltip]);

  const handleChange = (newData) => {
    if (typeof props.onChange === "function") {
      props.onChange(Array.isArray(newData) ? [...newData] : newData);
    }
  };

  // Handle file upload
  const handleFileUpload = async (file) => {
    setUploadFeedback(null);

    const validExtensions = [".json", ".geojson"];
    const fileExtension = file.name.toLowerCase().substring(file.name.lastIndexOf("."));

    if (!validExtensions.includes(fileExtension)) {
      setUploadFeedback({ type: "error", message: messages.fileTypeError });
      return;
    }

    try {
      const text = await file.text();
      const geoJson = JSON.parse(text);

      if (!isFeature(geoJson) && !isFeatureCollection(geoJson)) {
        throw new Error("Input must be a valid GeoJSON Feature or FeatureCollection");
      }

      const features = getType(geoJson) === "Feature" ? [geoJson] : geoJson.features || [];

      const polygonFeatures = features.filter(
        (feature) =>
          feature.type === "Feature" && feature.geometry && feature.geometry.type === "Polygon",
      );

      if (polygonFeatures.length === 0) {
        throw new Error("No valid Polygon features found");
      }

      const newData = [...formData, ...polygonFeatures];
      handleChange(newData);

      setUploadFeedback({
        type: "success",
        message: messages.uploadSuccess,
        count: polygonFeatures.length,
      });

      if (!isMapVisible) {
        setIsMapVisible(true);
      }

      setHasZoomed(false);

      setTimeout(() => setUploadFeedback(null), 3000);
    } catch (error) {
      setUploadFeedback({
        type: "error",
        message: messages.invalidGeoJSON,
        details: error.message,
      });
    }
  };

  // Handle drag and drop
  const handleDragOver = (e) => {
    e.preventDefault();
    setIsDragOver(true);
  };

  const handleDragLeave = (e) => {
    e.preventDefault();
    setIsDragOver(false);
  };

  const handleDrop = (e) => {
    e.preventDefault();
    setIsDragOver(false);

    const files = Array.from(e.dataTransfer.files);
    if (files.length > 0) {
      handleFileUpload(files[0]);
    }
  };

  // Handle file input change
  const handleFileInputChange = (e) => {
    const files = Array.from(e.target.files);
    if (files.length > 0) {
      handleFileUpload(files[0]);
    }
    // Reset input value to allow same file to be selected again
    e.target.value = "";
  };

  return (

 e.stopPropagation()}>

        <


_KEEPALIVE_TIMEOUT_MS/2;

        ta.enqueue_packet(vec![ 0; MAX_FRAGMENT_SIZE ].into_boxed_slice(), 0, SendMode::Unreliable);
        let frames = ta.emit_frames(now_ms, rtt_ms, 10000);
        assert_eq!(frames.len(), 1);

        now_ms += MIN_SYNC_TIMEOUT_MS;

        let frames = ta.emit_frames(now_ms, rtt_ms, 10000);
        assert_eq!(frames.len(), 1);
        test_sync_frame(&frames[0], frame::SyncFrame { next_frame_id: Some(1), next_packet_id: Some(1) });

        ta.receive_ack(frame::AckFrame { frame_acks: Vec::new(), frame_window_base_id: 1, packet_window_base_id: 1 });

        now_ms += MIN_SYNC_KEEPALIVE_TIMEOUT_MS;

        let frames = ta.emit_frames(now_ms, rtt_ms, 10000);
        assert_eq!(frames.len(), 1);
        test_sync_frame(&frames[0], frame::SyncFrame { next_frame_id: None, next_packet_id: None });
    }

    // No two packets in a frame receive window may have the same ID
    #[test]
    fn packet_unambiguity() {
        let now_ms = 0;
        let rtt_ms = INITIAL_RTT_ESTIMATE_MS;

        let mut ta = TestApparatus::new();

        use frame::serial::{DATA_FRAME_OVERHEAD, DATA_FRAME_MAX_DATAGRAM_COUNT, MIN_DATAGRAM_OVERHEAD};
        use crate::packet_id;

        // Here we assume that sending hundreds of zero-length packets reaches the datagram limit,
        // not the frame size limit.
        assert!(DATA_FRAME_OVERHEAD + DATA_FRAME_MAX_DATAGRAM_COUNT * MIN_DATAGRAM_OVERHEAD <= MAX_FRAME_SIZE);

        let mut max_id: usize = 0;

        let receive_window_size = 2*MAX_FRAME_WINDOW_SIZE as usize;

        for _ in 0 .. receive_window_size {
            for _ in 0 .. DATA_FRAME_MAX_DATAGRAM_COUNT as usize {
                ta.enqueue_packet(Vec::new().into_boxed_slice(), 0, SendMode::Unreliable);
            }

            let frames = ta.emit_frames(now_ms, rtt_ms, MAX_FRAME_SIZE as isize);
            assert_eq!(frames.len(), 1);

            use frame::serial::Serialize;
            let data_frame = match frame::Frame::read(&frames[0]) {
                Some(frame::Frame::DataFrame(data_frame)) => data_frame,
                _ => panic!(),
            };

            for datagram in data_frame.datagrams.iter() {
                // If the sequence IDs of packets wrap back around to zero, this will fail. If this
                // does not fail, we do not wrap, and therefore have unique packets throughout the
                // frame receive window.
                assert_eq!(datagram.sequence_id as usize, max_id);
                max_id += 1;
            }

            // Keep the windows happy
            ta.receive_ack(frame::AckFrame {
                frame_acks: Vec::new(),
                frame_window_base_id: data_frame.sequence_id,
                packet_window_base_id: max_id as u32,
            });
        }

        println!("max_id: {}", max_id);
        println!("packet_id::SPAN: {}", packet_id::SPAN);
    }

    fn bandwidth_trial(send_rate: u32) {
        use frame::serial::Serialize;

        let step_interval


top span.icon::before {
  content: "";
  /* Chevron up icon */
  background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KCS5zdDF7ZmlsbDpub25lO30KPC9zdHlsZT4KPHRpdGxlPnVwY2hldnJvbjwvdGl0bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik04LDUuMWwtNy4zLDcuM0wwLDExLjZsOC04bDgsOGwtMC43LDAuN0w4LDUuMXoiLz4KPHJlY3QgY2xhc3M9InN0MSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ii8+Cjwvc3ZnPgo=');
  width: 1.2rem;
  height: 1.2rem;
  position: absolute;
  left: calc(50% - 1.2rem / 2);
  top: calc(50% - 1.2rem / 2);
}.col-1 { width: (1 / 12 * 100%); }
.col-2 { width: (2 / 12 * 100%); }
.col-3 { width: (3 / 12 * 100%); }
.col-4 { width: (4 / 12 * 100%); }
.col-5 { width: (5 / 12 * 100%); }
.col-6 { width: (6 / 12 * 100%); }
.col-7 { width: (7 / 12 * 100%); }
.col-8 { width: (8 / 12 * 100%); }
.col-9 { width: (9 / 12 * 100%); }
.col-10 { width: (10 / 12 * 100%); }
.col-11 { width: (11 / 12 * 100%); }
.col-12 { width: 100%; }

@each $breakpoint in map-keys($breakpoints) {
  @include breakpoint($breakpoint) {
    .col-#{$breakpoint}-1 { width: ( 1 / 12 * 100%); }
    .col-#{$breakpoint}-2 { width: ( 2 / 12 * 100%); }
    .col-#{$breakpoint}-3 { width: ( 3 / 12 * 100%); }
    .col-#{$breakpoint}-4 { width: ( 4 / 12 * 100%); }
    .col-#{$breakpoint}-5 { width: ( 5 / 12 * 100%); }
    .col-#{$breakpoint}-6 { width: ( 6 / 12 * 100%); }
    .col-#{$breakpoint}-7 { width: ( 7 / 12 * 100%); }
    .col-#{$breakpoint}-8 { width: ( 8 / 12 * 100%); }
    .col-#{$breakpoint}-9 { width: ( 9 / 12 * 100%); }
    .col-#{$breakpoint}-10 { width: ( 10 / 12 * 100%); }
    .col-#{$breakpoint}-11 { width: ( 11 / 12 * 100%); }
    .col-#{$breakpoint}-12 { width: 100%; }
  }
}// stylelint-disable
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */

/**
 * 1. Change the default font family in all browsers (opinionated).
 * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
 */

html {
  font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -we