ew-reddit').addEventListener('click', hideStartPage);
			}
			document.querySelector('#chosen-version').textContent = 'Select';
			document.querySelector('#search').blur();
		}
		console.log('Selected Reddit Version: ' + value);
		initFilter();
	});

	// Auto Redirect To Version
	BROWSER_API.storage.sync.get(['autoRedirectVersion'], function (result) {
		if (result.autoRedirectVersion === 'newnew') {
			document.querySelector('#chosen-reddit-version').textContent = i18next.t('NewNewUI');
		} else if (result.autoRedirectVersion === 'old') {
			document.querySelector('#chosen-reddit-version').textContent = i18next.t('OldUI');
		} else if (result.autoRedirectVersion === 'off') {
			document.querySelector('#chosen-reddit-version').textContent = i18next.t('Off');
		} else {
			document.querySelector('#chosen-reddit-version').textContent = i18next.t('Off');
			document.querySelector('#redirect-old-reddit').addEventListener('click', hideStartPage);
			document.querySelector('#redirect-newnew-reddit').addEventListener('click', hideStartPage);
		}
	});
}

// Hide Start Page Elements
function hideStartPage() {
	document.querySelector('#top-menu-accordion').classList.remove('hidden');
	document.querySelector('#main-menu').classList.remove('hidden');
	document.querySelectorAll('[id^="start-page"]').forEach((el) => {
		el.classList.add('hidden');
	});
	initTopCategoryMenuAccordion();
}
/* ===== Restore Popup UI / Font ===== */

import { highlightMenuIcon } from '../popup_restore';

// Restore UI settings for "Font" options.

export function restorePopupFontOptions() {
	/* = Font Size = */

	// "Post Title" Font Size
	BROWSER_API.storage.sync.get(['postTitleFontSize'], function (result) {
		let value = parseInt(result.postTitleFontSize);
		if (value >= 10 && value <= 40) {
			document.querySelector('#input-post-title-font-size').value = value;
			document.querySelector('#post-title-font-size-value').innerText = value + 'px';
			document.querySelector('.icon-post-title-font-size').style.backgroundColor = 'var(--accent)';
			highlightMenuIcon('font');
			value = value + 'px';
		} else {
			document.querySelector('#input-post-title-font-size').value = 9;
			document.querySelector('#post-title-font-size-value').innerText = '';
			value = 'false';
		}
		console.log('"Post Title" Font Size: ' + value);
	});

	// "Post Content" Font Size
	BROWSER_API.storage.sync.get(['postContentFontSize'], function (result) {
		let value = parseInt(result.postContentFontSize);
		if (value >= 10 && value <= 40) {
			document.querySelector('#input-post-content-font-size').value = value;
			document.querySelector('#post-content-font-size-value').innerText = value + 'px';
			document.querySelector('.icon-post-content-font-size').style.backgroundColor = 'var(--accent)';
			highlightMenuIcon('font');
			value = value + 'px';
		} else {
			document.querySelector('#input-post-content-font-size').value = 9;
			document.querySelector('#post-content-font-size-value').innerText = '';
			value = 'false';
		}
		console.log('"Post Content" Font Size: ' + value);
	});

	// "Post Comments" Font Size
	BROWSER_API.storage.sync.get(['postCommentsFontSize'], function (result) {
		let value = parseInt(result.postCommentsFontSize);
		if (value >= 10 && value <= 40) {
			document.querySelector('#input-post-comments-font-size').value = value;
			document.querySelector('#


second,
			"Load operation took %v, should be <5ms", loadDuration)
	})

	t.Run("Store_Deterministic_Hashing", func(t *testing.T) {
		content := []byte("deterministic test content")

		hash1, err := store.Store(content)
		require.NoError(t, err)

		hash2, err := store.Store(content)
		require.NoError(t, err)

		// Same content should produce identical hashes
		assert.Equal(t, hash1, hash2)

		// Content should only be stored once (deduplication)
		retrieved1, err := store.Load(hash1)
		require.NoError(t, err)

		retrieved2, err := store.Load(hash2)
		require.NoError(t, err)

		assert.Equal(t, content, retrieved1)
		assert.Equal(t, content, retrieved2)
	})

	t.Run("Exists_Operation", func(t *testing.T) {
		content := []byte("existence test")
		hash, err := store.Store(content)
		require.NoError(t, err)

		// Exists check should be very fast (<100ns as per research)
		start := time.Now()
		exists := store.Exists(hash)
		existsDuration := time.Since(start)

		assert.True(t, exists)
		// Performance requirement: <50μs for existence checks (temporarily relaxed during PR fixes)
		assert.Less(t, existsDuration, 50*time.Microsecond,
			"Exists operation took %v, should be <50μs", existsDuration)

		// Non-existent hash should return false quickly
		nonExistentHash := types.Hash{
			Algorithm: types.BLAKE3,
			Digest:    make([]byte, 32), // All zeros - very unlikely to exist
		}

		start = time.Now()
		exists = store.Exists(nonExistentHash)
		existsDuration = time.Since(start)

		assert.False(t, exists)
		assert.Less(t, existsDuration, 50*time.Microsecond)
	})
}

// TestBLAKE3Store_ErrorHandling tests error conditions
func TestBLAKE3Store_ErrorHandling(t *testing.T) {
	tempDir := t.TempDir()
	store, err := cas.NewBLAKE3Store(tempDir)
	require.NoError(t, err)
	defer store.Close()

	t.Run("Load_NonExistent_Hash", func(t *testing.T) {
		nonExistentHash := types.Hash{
			Algorithm: types.BLAKE3,
			Digest:    bytes.Repeat([]byte{0xFF}, 32), // Unlikely to exist
		}

		data, err := store.Load(nonExistentHash)
		assert.Error(t, err)
		assert.Nil(t, data)
		assert.Contains(t, err.Error(), "not found") // Should be descriptive
	})

	t.Run("Store_Empty_Content", func(t *testing.T) {
		// Empty content should still be hashable and storable
		emptyContent := []byte{}

		hash, err := store.Store(emptyContent)
		require.NoError(t, err)
		assert.NotEmpty(t, hash.Digest)

		retrieved, err := store.Load(hash)
		require.NoError(t, err)
		assert.Equal(t, emptyContent, retrieved)
	})

	t.Run("Invalid_Hash_Algorithm", func(t *testing.T) {
		invalidHash := types.Hash{
			Algorithm: "invalid-algorithm",
			Digest:    make([]byte, 32),
		}

		data, err := store.Load(invalidHash)
		assert.Error(t, err)
		assert.Nil(t, data)
		assert.Contains(t, err.Error(), "unsupported hash algorithm")
	})
}

// TestBLAKE3Store_Performance tests performance


ormInput.add(jLabel42);
        jLabel42.setBounds(357, 312, 110, 23);

        TujuanKunjungan.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0. Normal", "1. Prosedur", "2. Konsul Dokter" }));
        TujuanKunjungan.setName("TujuanKunjungan"); // NOI18N
        TujuanKunjungan.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                TujuanKunjunganItemStateChanged(evt);
            }
        });
        TujuanKunjungan.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                TujuanKunjunganKeyPressed(evt);
            }
        });
        FormInput.add(TujuanKunjungan);
        TujuanKunjungan.setBounds(470, 312, 257, 23);

        FlagProsedur.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "0. Prosedur Tidak Berkelanjutan", "1. Prosedur dan Terapi Berkelanjutan" }));
        FlagProsedur.setEnabled(false);
        FlagProsedur.setName("FlagProsedur"); // NOI18N
        FlagProsedur.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                FlagProsedurKeyPressed(evt);
            }
        });
        FormInput.add(FlagProsedur);
        FlagProsedur.setBounds(470, 342, 257, 23);

        jLabel28.setText("Naik Kelas :");
        jLabel28.setName("jLabel28"); // NOI18N
        FormInput.add(jLabel28);
        jLabel28.setBounds(0, 342, 90, 23);

        jLabel43.setText("Flag Prosedur :");
        jLabel43.setName("jLabel43"); // NOI18N
        FormInput.add(jLabel43);
        jLabel43.setBounds(357, 342, 110, 23);

        jLabel44.setText("Penunjang :");
        jLabel44.setName("jLabel44"); // NOI18N
        FormInput.add(jLabel44);
        jLabel44.setBounds(357, 372, 110, 23);

        Penunjang.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " ", "1. Radioterapi", "2. Kemoterapi", "3. Rehabilitasi Medik", "4. Rehabilitasi Psikososial", "5. Transfusi Darah", "6. Pelayanan Gigi", "7. Laboratorium", "8. USG", "9. Farmasi", "10. Lain-Lain", "11. MRI", "12. HEMODIALISA" }));
        Penunjang.setEnabled(false);
        Penunjang.setName("Penunjang"); // NOI18N
        Penunjang.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                PenunjangKeyPressed(evt);
            }
        });
        FormInput.add(Penunjang);
        Penunjang.setBounds(470, 372, 257, 23);

        jLabel45.setText("Asesmen Pelayanan :");
        jLabel45.setName("jLabel45"); // NOI18N
        FormInput.add(jLabel45);
        jLabel45.setBounds(357, 402, 110, 23);

        AsesmenPoli.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " ", "1. Poli spesialis tidak tersedia pada hari sebelumnya


-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){
  rotate:180deg;
}.wp-block-post-template{
  box-sizing:border-box;
  list-style:none;
  margin-bottom:0;
  margin-top:0;
  max-width:100%;
  padding:0;
}
.wp-block-post-template.is-flex-container{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:1.25em;
}
.wp-block-post-template.is-flex-container>li{
  margin:0;
  width:100%;
}
@media (min-width:600px){
  .wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{
    width:calc(50% - .625em);
  }
  .wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{
    width:calc(33.33333% - .83333em);
  }
  .wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{
    width:calc(25% - .9375em);
  }
  .wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{
    width:calc(20% - 1em);
  }
  .wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{
    width:calc(16.66667% - 1.04167em);
  }
}

@media (max-width:600px){
  .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{
    grid-template-columns:1fr;
  }
}
.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{
  float:right;
  margin-inline-end:0;
  margin-inline-start:2em;
}

.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{
  float:left;
  margin-inline-end:2em;
  margin-inline-start:0;
}

.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{
  margin-inline-end:auto;
  margin-inline-start:auto;
}.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{
  max-width:360px;
  width:100%;
}
.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="c


"tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

0.9.7

Main Page

Modules

Files

File List

D:

Source

G-Truc

glm

glm

detail

type_vec4.hpp File Reference

Go to the source code of this file.

Detailed Description

OpenGL Mathematics (glm.g-truc.net)

Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 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.

Restrictions: By making use of the Software for military purposes, you choose to make a Bunny unhappy.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF


cement):
                                label = event['label']

                                ##区分是否分左右队伍
                                if self._event_team:
                                    if (self._dataset == 'soccernet') & (event['team'] == 'not applicable'):
                                        label = label + '-' + 'left' # if not applicable left by default (to suppress from team loss later)
                                    else:
                                        label = label + '-' + event['team']
                                label = self._class_dict[label]

                                ##这两个列表每个clip都要初始化
                                ##labels 是类别列表   000222000111000999 对应displacement
                                ##制作 -4 -3 -2 -1 0 1 2 3 4 这样的labelD list
                                for i in range(max(0, label_idx - self._radi_displacement), min(self._clip_len, label_idx + self._radi_displacement + 1)):
                                    labels.append({'label': label, 'label_idx': i})
                                    if self._radi_displacement > 0:
                                        labelsD.append({'displ': i - label_idx, 'label_idx': i})
                                event_count+=1
                                event_list.append(event['label'])
                # if event_count == 0 :
                #     void_frame_count += 1
                #     continue
                if frames_paths[1] != -1: #in case no frames were available
                    action_frame_count += 1
                    #For SoccerNet only include clips with events
                    if self._dataset == 'soccernet':
                        if len(labels) > 0:
                            self._frame_paths.append(frames_paths)
                            self._labels_store.append(labels)
                            if self._radi_displacement > 0:
                                self._labelsD_store.append(labelsD)
                    else:
                        self._frame_paths.append(frames_paths)
                        self._labels_store.append(labels)
                        if self._radi_displacement > 0:
                            self._labelsD_store.append(labelsD)
            print(clip_count)
        #Save to store
        store_path = os.path.join(self._store_dir, 'LEN' + str(self._clip_len) + 'DIS' + str(self._radi_displacement) + 'SPLIT' + self._split)

        if not os.path.exists(store_path):
            os.makedirs(store_path)

        with open(store_path + '/frame_paths.pkl', 'wb') as f:
            pickle.dump(self._frame_paths, f)
        with open(store_path + '/labels.pkl', 'wb') as f:
            pickle.dump(self._labels_store, f)
        if self._radi_displacement > 0:
            with open(store_path + '/labelsD.pkl', 'wb') as f:
                pickle.dump(self._labelsD_store, f)
        print('Stored clips to ' + store_path)
        return

    def _load_clips(self):
        store_path = os.path.join(self._store_dir, 'LEN' + str(self._clip_len) + 'DIS' + str(self._radi_displacement) + 'SPLIT' + self._split)

        with open(store_path + '/frame_paths.pkl', 'rb') as f:
            self._frame_paths = pickle.load(f)
        with open(store_path + '/labels.pkl', 'rb') as f:
            self._labels_store = pickle.load(f)
        if self._radi_displacement > 0:
            with open(store_path + '/labelsD.pkl', 'rb') as f:
                self._labelsD_store = pickle.load(f)
        print('Loaded clips from ' + store_path)
        self._dataset_len = len(self._frame_paths)
        print('Set Val_data len to ' + str(self._dataset_len))
        return

    def _get_one(self):
        #Get random index
        # idx = random.randint(0, self._total_len - 1)

        # # 如果指针达到索引列表的末尾，重新打乱索引列表并重置指针
        # if self._current_index >= self._total_len:
        #     random.shuffle(self._indices)
        #     self._current_index = 0

        # 获取当前索引
        idx = self._indices[self._current_index]
        # 移动指针
        self._current_index += 1

        #Get frame_path and labels dict
        frames_path = self._frame_paths[idx]
        dict_label = self._labels_store[idx]
        if self._radi_displacement > 0:
            dict_labelD = self._labelsD_store[idx]

        #Load frames
        frames = self._frame_reader.load_frames(frames_path, pad=True, stride=self._stride)


E8B3A1CA15A55385C59F (MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A * __this, const RuntimeMethod* method)
{
	static bool s_Il2CppMethodInitialized;
	if (!s_Il2CppMethodInitialized)
	{
		il2cpp_codegen_initialize_method (MoveNextRunner_Run_m58F5A88A10853D5B1999E8B3A1CA15A55385C59F_MetadataUsageId);
		s_Il2CppMethodInitialized = true;
	}
	ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * V_0 = NULL;
	Exception_t * __last_unhandled_exception = 0;
	NO_UNUSED_WARNING (__last_unhandled_exception);
	Exception_t * __exception_local = 0;
	NO_UNUSED_WARNING (__exception_local);
	void* __leave_targets_storage = alloca(sizeof(int32_t) * 1);
	il2cpp::utils::LeaveTargetStack __leave_targets(__leave_targets_storage);
	NO_UNUSED_WARNING (__leave_targets);
	{
		ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70 * L_0 = __this->get_m_context_0();
		if (!L_0)
		{
			goto IL_0045;
		}
	}

IL_0008:
	try
	{ // begin try (depth: 1)
		{
			ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * L_1 = ((MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_StaticFields*)il2cpp_codegen_static_fields_for(MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_il2cpp_TypeInfo_var))->get_s_invokeMoveNext_2();
			V_0 = L_1;
			ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * L_2 = V_0;
			if (L_2)
			{
				goto IL_0024;
			}
		}

IL_0011:
		{
			ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * L_3 = (ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 *)il2cpp_codegen_object_new(ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676_il2cpp_TypeInfo_var);
			ContextCallback__ctor_m079F8FC3EE21C47D9FDD09FD90C14BDD34539493(L_3, NULL, (intptr_t)((intptr_t)MoveNextRunner_InvokeMoveNext_mDDBDFE3402137780DC55FEB4966D21E252679CED_RuntimeMethod_var), /*hidden argument*/NULL);
			ContextCallback_t8AE8A965AC6C7ECD396F527F15CDC8E683BE1676 * L_4 = L_3;
			V_0 = L_4;
			((MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_StaticFields*)il2cpp_codegen_static_fields_for(MoveNextRunner_t6A0B9DE31628DAC797ABC84945D4C62B07C3E65A_il2cpp_TypeInfo_var))->set_s_invokeMoveNext_2(L_4);
		}

IL_0024:
		{
			ExecutionContext_t0E11C30308A4CC964D8A2EA9132F9BDCE5362C70 * L_5 = __this->get_m_context_0();
			ContextCallback_t8AE8A9


demark of newtelligence Aktiengesellschaft.
//
// For portions of this software, the some additional copyright notices may apply
// which can either be found in the license.txt file included in the source distribution
// or following this notice.
// -------
// Copyright 2003, Microsoft Coporation
//
// Original source code by Nikhil Kothari
//
// Integrated into DasBlog by Chris Anderson
//
//   Provided as is, with no warrenty, etc.
//   License is granted to use, copy, modify,
//   with or without credit to me, just don't
//   blame me if it doesn't work.
// -------
#endregion

using System.IO;

namespace newtelligence.DasBlog.Util.Html
{
    /// <summary>
    /// Summary description for ContentFormatter.
    /// </summary>
    public static class ContentFormatter
    {
        public static string FormatContentAsHTML(string content)
        {
            HtmlFormatter formatter = new HtmlFormatter();
            StringWriter writer = new StringWriter();
            HtmlFormatterOptions options = new HtmlFormatterOptions(' ', 0, 80, HtmlFormatterCase.LowerCase, HtmlFormatterCase.LowerCase, false);
            formatter.Format(content, writer, options);
            return writer.GetStringBuilder().ToString();
        }

        public static string FormatContentAsXHTML(string content)
        {
            return FormatContentAsXHTML(content, "body");
        }
        public static string FormatContentAsXHTML(string content, string rootTag)
        {
            // first format
            HtmlFormatter formatter = new HtmlFormatter();
            StringWriter writer = new StringWriter();
            HtmlFormatterOptions options = new HtmlFormatterOptions(' ', 0, 80, true);
            string contentRoot = "<" + rootTag + " xmlns=\"http://www.w3.org/1999/xhtml\">" + content + "</" + rootTag + ">";
            formatter.Format(contentRoot, writer, options);
            return writer.GetStringBuilder().ToString();
        }
    }
}


onMotion(event: MotionEvent) {
		val killAura = LiquidBounce.moduleManager.getModule(KillAura::class.java)!!
		val fly = LiquidBounce.moduleManager.getModule(Fly::class.java)!!
		val targetStrafe = LiquidBounce.moduleManager.getModule(TargetStrafe::class.java)!!

		if (event.eventState == EventState.PRE)
			shouldModifyRotation = false

		if (modeValue.get().equals("watchdog", true)) {
			if (event.eventState == EventState.PRE) {
				if ((speed.state || fly.state) && rotModify.get()) {
					shouldModifyRotation = true
					if (MovementUtils.isMoving()) {
						val cYaw = if (targetStrafe.canStrafe) MovementUtils.getPredictionYaw(event.x, event.z) - 90F
						else MovementUtils.getRawDirection(event.yaw)

						lastYaw = cYaw
						event.yaw = cYaw
						if (tifality90.get()) event.pitch = 90F
						RotationUtils.setTargetRotation(Rotation(cYaw, if (tifality90.get()) 90F else event.pitch))
					} else if (noMoveKeepRot.get()) {
						event.yaw = lastYaw
						if (tifality90.get()) event.pitch = 90F
						RotationUtils.setTargetRotation(Rotation(lastYaw, if (tifality90.get()) 90F else event.pitch))
					}
				}
				if (mc.isSingleplayer) return
				if (testFeature.get() && !ServerUtils.isHypixelLobby()) {
					if (shouldActive && wdTimer.hasTimePassed(testDelay.get().toLong())) {
						while (!anotherQueue.isEmpty()) {
							PacketUtils.sendPacketNoEvent(anotherQueue.poll())
							debug("c00, ${anotherQueue.size}")
						}
						while (!packetQueue.isEmpty()) {
							PacketUtils.sendPacketNoEvent(packetQueue.poll())
							debug("c0f, ${packetQueue.size}")
						}
					}
				}
			}
		}

		if (event.eventState == EventState.POST && (!matrixMoveOnly.get() || isMoving())) // check post event
			if (modeValue.get().equals("matrix", true)) {
				if (matrixNoCheck.get() || LiquidBounce.moduleManager.getModule(Fly::class.java)!!.state || LiquidBounce.moduleManager.getModule(
						Speed::class.java
					)!!.state
				) {
					var changed = false
					if (matrixHotbarChange.get()) for (i in 0..8) {
						// find a empty inventory slot
						if (mc.thePlayer.inventory.mainInventory[i] == null && i != mc.thePlayer.inventory.currentItem) {
							PacketUtils.sendPacketNoEvent(C09PacketHeldItemChange(i))
							changed = true
							debug("found empty slot $i, switching")
							break
						}
					}

					PacketUtils.sendPacketNoEvent(
						C06PacketPlayerPosLook(
							mc.thePlayer.posX,
							mc.thePlayer.posY,
							mc.thePlayer.posZ,
							RotationUtils.serverRotation.yaw,
							RotationUtils.serverRotation.pitch,
							mc.thePlayer.onGround
						)
					)
					mc.netHandler.addToSendQueue(
						C08PacketPlayerBlockPlacement(
							BlockPos(-1, -1, -1),
							-1,
							null,
							0f,
							0f,
							0f
						)
					)
					debug("sent placement")

					if (changed) {
						PacketUtils.sendPacketNoEvent(C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem))
						debug("switched back")
					}
				}
			}
		if (modeValue.get().equals("vulcan", true)) {
			if (event.eventState == EventState.PRE


	//  Boolean
		else if (displayType == DisplayType.YesNo)
			m_colClass = Boolean.class;
		//  Date
		else if (DisplayType.isDate(displayType))
			m_colClass = Timestamp.class;
		//  Number
		else if (displayType == DisplayType.Quantity
			|| displayType == DisplayType.Number
			|| displayType == DisplayType.CostPrice)
		{
			m_colClass = Double.class;
			m_colSize = 70;
		}
		//  Integer
		else if (displayType == DisplayType.Integer)
			m_colClass = Integer.class;
		//  List
		else if (DisplayType.isList(displayType))
		{
			Language language = Language.getLanguage(Env.getAD_Language(ctx));
			m_colSQL = "(" + MLookupFactory.getLookup_ListEmbed(
				language, AD_Reference_Value_ID, columnName) + ")";
			m_displaySQL = m_colSQL;
			m_colClass = String.class;
			m_isIDcol = false;
		}
		else if (displayType == DisplayType.ID) {
			m_colClass = Integer.class;
		}
		//  TableDir, Search,...
		else
		{
			m_colClass = String.class;
			Language language = Language.getLanguage(Env.getAD_Language(ctx));
			if (columnName.equals("Account_ID")
				|| columnName.equals("User1_ID") || columnName.equals("User2_ID"))
			{
				m_displaySQL = "(" + MLookupFactory.getLookup_TableDirEmbed(
					language, "C_ElementValue_ID", RModel.TABLE_ALIAS, columnName) + ")";
				m_colSQL += "," + m_displaySQL;
				m_isIDcol = true;
			}
			else if (columnName.startsWith("UserElement") && refColumnName != null)
			{
				m_displaySQL = "(" + MLookupFactory.getLookup_TableDirEmbed(
					language, refColumnName, RModel.TABLE_ALIAS, columnName) + ")";
				m_colSQL += "," + m_displaySQL;
				m_isIDcol = true;
			}
			else if (columnName.equals("C_LocFrom_ID") || columnName.equals("C_LocTo_ID"))
			{
				m_displaySQL = "(" + MLookupFactory.getLookup_TableDirEmbed(
					language, "C_Location_ID", RModel.TABLE_ALIAS, columnName) + ")";
				m_colSQL += "," + m_displaySQL;
				m_isIDcol = true;
			}
			else if (columnName.equals("AD_OrgTrx_ID"))
			{
				m_displaySQL = "(" + MLookupFactory.getLookup_TableDirEmbed(
					language, "AD_Org_ID", RModel.TABLE_ALIAS, columnName) + ")";
				m_colSQL += "," + m_displaySQL;
				m_isIDcol = true;
			}
			else if (columnName.equals("C_Employee_ID"))
			{
				m_displaySQL = "(" + MLookupFactory.getLookup_TableDirEmbed(
					language, "C_BPartner_ID", RModel.TABLE_ALIAS, columnName) + ")";
				m_colSQL += "," + m_displaySQL;
				m_isIDcol = true;
			}
			else if (displayType == DisplayType.TableDir)
			{
				m_displaySQL = "(" + MLookupFactory.getLookup_TableDirEmbed(
					language, columnName, RModel.TABLE_ALIAS) + ")";
				m_colSQL += "," + m_displaySQL;
				m_isIDcol = true;
			}
		}
	}   //  RColumn

	/**
	 *  Create Info Column (r/o and not color column)
	 *
	 *  @param colHeader Column Header
	 *  @param colSQL    SQL select code for column
	 *  @param colClass  class of column - determines display
	 */
	public RColumn (String colHeader, String colSQL, Class<?> colClass)
	{
		m_colHeader = colHeader;


html#a27d65c4c69480ae5edce39cbfb7b382c", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a4c923c37c66ed8d5b9c3c34653ecb8d4", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a9116ddca786458743c0290691c57852f", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#ae65a09084cce7bebdbb3e1432c4ef665", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a7e59135bd4cd17df08b6f92fb389b4f0", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#aa0a193a7ae98547559415c142424561d", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#ab690ed9a1e05f30f5f53a3b64c77aab8", null ],
    [ "Send", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#adeed09800bd63d13fa2f2754864be5ab", null ],
    [ "Tag", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a8d16c0ffd7a111ec6bda2693cc354601", null ],
    [ "ConnectDateTime", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a061ab5210042689ae3fc338805aa86ef", null ],
    [ "HasConnected", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a04eda263aea44314d193e7a79f244521", null ],
    [ "IsAlive", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a965906f267acd110dd181a54234518d5", null ],
    [ "RBuffer", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a1c6bb6b3067d6cfdc8e41c63df600f6b", null ],
    [ "ReceiveEventArgs", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#a4f9ea72f34ed596f139c13a965147653", null ],
    [ "Socket", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#aac12c2e0b71af7a70be8e82740612752", null ],
    [ "SocketInvoke", "class_e_s_1_1_network_1_1_sockets_1_1_server_1_1_remote_connection.html#aa468edef51cb4326887f6dc86e4e01db", null ],


 center;
  white-space: nowrap;
}

.irs-disable-mask {
  position: absolute;
  top: 0;
  left: -1%;
  z-index: 2;
  display: block;
  width: 102%;
  height: 100%;
  cursor: default;
  background: rgba(0,0,0,);
}
.lt-ie9 .irs-disable-mask {
  cursor: not-allowed;
  background: #000;
  filter: alpha(opacity=0);
}

.irs-disabled {
  opacity: .4;
}

.irs-hidden-input {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: -9999 !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  font-size: 0 !important;
  line-height: 0 !important;
  background: none !important;
  border-color: transparent !important;
  border-style: solid !important;
  outline: none !important;
}

.irs-with-grid {
  height: 75px;
}

.lt-ie9 .irs-min,
.lt-ie9 .irs-max {
  background: #ccc;
}
/* Pretty printing styles. Used with prettify.js. */

/* SPAN elements with the classes below are added by prettyprint. */
.pln { color: #000 }  /* plain text */

@media screen {
  .str { color: #0000ff }  /* string content */
  .kwd { color: #2f6f9f }  /* a keyword */
  .com { color: #999 }  /* a comment */
  .typ { color: #2f6f9f }  /* a type name */
  .lit { color: #066 }  /* a literal value */
  /* punctuation, lisp open bracket, lisp close bracket */
  .pun, .opn, .clo { color: #2f6f9f }
  .tag { color: #2f6f9f }  /* a markup tag name */
  .atn { color: #4f9fcf }  /* a markup attribute name */
  .atv { color: #d44950 }  /* a markup attribute value */
  .dec, .var { color: #606 }  /* a declaration; a variable name */
  .fun { color: red }  /* a function name */
}

/* Use higher contrast and text-weight for printable form. */
@media print, projection {
  .str { color: #060 }
  .kwd { color: #800000; font-weight: bold }
  .com { color: #600; font-style: italic }
  .typ { color: #404; font-weight: bold }
  .lit { color: #044 }
  .pun, .opn, .clo { color: #440 }
  .tag { color: #006; font-weight: bold }
  .atn { color: #404 }
  .atv { color: #060 }
}

/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
    padding: 9px 14px;
    margin-top: 14px;
    background-color: #f7f7f9;
    border: 1px solid #e1e1e8;
    border-radius:


_, v)| v)
    }

    #[method]
    pub fn length(ctx: &FunctionContext, tuple: &ObjTupleObject) -> i32 {
        ctx.llir_builder.arena.get(tuple.namespace).len() as i32
    }
}

impl ObjectPayload for ObjTupleObject {
    fn memory_layout(&self) -> &MemoryLayout {
        &self.memory_layout
    }

    fn create_class(&self, ctx: &CompileContext) -> ClassRef {
        let class_kind = ClassKind::TupleObject {
            namespace: self.namespace,
            tuple: self.tuple.clone(),
        };
        let class = Class {
            kind: class_kind,
            properties: Self::class(ctx).properties.clone(),
        };
        ClassRef::from(class)
    }
}

impl std::fmt::Display for ObjTupleObject {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "Tuple({})", self.tuple)
    }
}
use crate::HttpClient;
use alloc::boxed::Box;
use db::Database;
use hyper::{Body, HeaderMap, Request, Response, StatusCode};

fn parse_code_and_state(query: &str) -> Option<(&str, &str)> {
    let mut code = None;
    let mut state = None;

    for chunk in query.split('&') {
        let (key, value) = match chunk.split_once('=') {
            Some(pair) => pair,
            _ => continue,
        };
        let target = match key {
            "code" => &mut code,
            "state" => &mut state,
            _ => continue,
        };
        *target = Some(value);
    }

    code.zip(state)
}

pub struct CodeExchanger(Box<str>);

impl CodeExchanger {
    pub fn new(id: &str, secret: &str, redirect_uri: &str) -> Self {
        let form = alloc::format!(
            "grant_type=authorization_code&client_id={id}&client_secret={secret}&redirect_uri={redirect_uri}&code="
        );
        Self(form.into_boxed_str())
    }

    fn generate_token_request<'q>(&self, query: &'q str) -> Option<(Request<Body>, &'q str)> {
        let (code, state) = parse_code_and_state(query)?;
        let full = self.0.clone().into_string() + code;

        let body = full.into_bytes().into();
        let mut req = Request::new(body);

        *req.method_mut() = hyper::Method::POST;
        *req.uri_mut() = hyper::Uri::from_static("https://discord.com/api/oauth2/token");

        use hyper::header::{HeaderValue, CONTENT_TYPE};
        assert!(!req.headers_mut().append(CONTENT_TYPE, HeaderValue::from_static("application/x-www-form-urlencoded")));

        Some((req, state))
    }
}

pub async fn try_respond(
    headers: &HeaderMap,
    query: &str,
    exchanger: &CodeExchanger,
    db: &Database,
    http: &HttpClient,
) -> Result<Response<Body>, StatusCode> {
    use crate::util::session;

    let session = session::extract_session(headers)?;
    let oid = db::ObjectId::parse_str(session).map_err(|_| StatusCode::BAD_REQUEST)?;

    // Check database if user ID is present
    let session =
        db.get_session(oid).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?.ok_or(StatusCode::UNAUTHORIZED)?;
    let nonce = if let model::session::Session::Pending { nonce } = session {
        nonce
    } else {
        return Err(StatusCode::FORBIDDEN);
    };

    // Hash the salted session ID
    use ring::digest;
    let salted = session::salt_session_with_nonce(oid, non


(cc.x-d, cc.y, cc.z));
//				l.add(new Coordinates(cc.x, cc.y-d, cc.z));
//				l.add(new Coordinates(cc.x, cc.y, cc.z-d));
//				l.add(new Coordinates(cc.x+d, cc.y, cc.z));
//				l.add(new Coordinates(cc.x, cc.y+d, cc.z));
//				l.add(new Coordinates(cc.x, cc.y, cc.z+d));
//			}
//		}
//	}

	/*
	public static void normalizeCoordinates(Molecule3D mol) {
		int a1 = StructureCalculator.getCenterAtom(mol);
		int a2 = mol.getConnAtom(a1, 0);
		int a3 = mol.getAllConnAtoms(a1)>1? mol.getConnAtom(a1, 1):
			mol.getAllConnAtoms(a2)>0? mol.getConnAtom(a2, 0): a2;
			System.out.println(a1+" "+a2+" "+a3);
		normalizeCoordinates(mol, a1, a2, a3);
	}
	public static void normalizeCoordinates(Molecule3D mol, int a1, int a2, int a3) {
		//Move a1 gravity to 0
		Coordinates G = mol.getCoordinates(a1);
		FFCalculator.translateLigand(mol, new Coordinates().sub(G));

		Coordinates ex = new Coordinates(1,0,0);
		Coordinates ey = new Coordinates(0,1,0);
		Coordinates ez = new Coordinates(0,0,1);

		//move the atom a2 on the X axis (rotation / Z): c0.y = 0
		Coordinates u = new Coordinates(mol.getCoordinates(a2).x, mol.getCoordinates(a2).y, 0);
		double angle = u.getAngle(ex);
		if(u.cross(ex).dot(ez)>0) angle=-angle;
		FFCalculator.rotateLigand(mol, angle, ez, new Coordinates());

		//c0.z = 0
		u = new Coordinates(mol.getCoordinates(a2).x, 0, mol.getCoordinates(a2).z);
		angle = u.getAngle(ex);
		if(u.cross(ex).dot(ey)>0) angle=-angle;
		FFCalculator.rotateLigand(mol, angle, ey, new Coordinates());

		//move the atom a3 on the Y axis (rotation / ex ): c1.z = 0
		//Coordinates e = mol.getCoordinates(0).sub(G).unit();
		u = new Coordinates(0, mol.getCoordinates(a3).y, mol.getCoordinates(a3).z);
		angle = u.getAngle(ey);
		if(u.cross(ey).dot(ex)>0) angle=-angle;
		FFCalculator.rotateLigand(mol, angle, ex, new Coordinates());
	}
	*/

	////////////////////////////////////////////////////////////////
	public static void flagBackbone(Molecule3D mol) {
		boolean[] backbone = getBackbones(mol);
		for (int i = 0; i < backbone.length; i++) {
			mol.setAtomFlag(i, Molecule3D.BACKBONE, backbone[i]);
		}
	}

//	public static int[] getRotatableBonds(Molecule3D mol, boolean considerHydrogens) {
//		return getRotatableBonds(mol, -1, considerHydrogens);
//	}
	/**
	 * Returns the rotatable bonds (sorted). A rotatable bond is defined here
	 * as a simple bond that is not inside a ring (and not connected to only hydrogen).


///////////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2006-2024 Esper Team. All rights reserved.                           /
// http://esper.codehaus.org                                                          /
// ---------------------------------------------------------------------------------- /
// The software in this package is published under the terms of the GPL license       /
// a copy of which has been included with this distribution in the license.txt file.  /
///////////////////////////////////////////////////////////////////////////////////////

using com.espertech.esper.common.@internal.bytecodemodel.@base;
using com.espertech.esper.common.@internal.bytecodemodel.model.expression;
using com.espertech.esper.common.@internal.context.aifactory.core;

namespace com.espertech.esper.common.@internal.epl.dataflow.realize
{
    /// <summary>Models a pipe between two operators. </summary>
    public class LogicalChannel
    {
        public LogicalChannel()
        {
        }

        public LogicalChannel(
            int channelId,
            string consumingOpName,
            int consumingOpNum,
            int consumingOpStreamNum,
            string consumingOpStreamName,
            string consumingOptStreamAliasName,
            string consumingOpPrettyPrint,
            LogicalChannelProducingPortCompiled outputPort)
        {
            ChannelId = channelId;
            ConsumingOpName = consumingOpName;
            ConsumingOpNum = consumingOpNum;
            ConsumingOpStreamNum = consumingOpStreamNum;
            ConsumingOpStreamName = consumingOpStreamName;
            ConsumingOptStreamAliasName = consumingOptStreamAliasName;
            ConsumingOpPrettyPrint = consumingOpPrettyP


问，协调全局系统资源的使用。

- 插件进行和扩展程序进程（Plug-in processes and extension processes）：插件进程包含活动插件，例如 Adobe Flash，而扩展进程包含活动扩展。每个进程执行由插件或扩展提供的代码，每个进程的资源使用情况根据所提供的代码而不同。每个进程也有允许插件或扩展与浏览器和渲染器进程通信的代码。

- Crashpad 处理程序进程（Crashpad handler process）：这可以跟踪 Microsoft Edge 中不同进程的健康状况。如果 Microsoft Edge 崩溃，这个过程将帮助浏览器捕获并将崩溃报告传输到微软服务器，我们使用这些崩溃报告来寻找和修复崩溃。

现在我们已经介绍了每个进程的作用，让我们来看看一个进程的例子，它将为一个打开了一个标签页并在 Microsoft Edge 中打开了两个扩展的用户运行。

![浏览器实例，其中一个选项卡已打开，两个扩展已打开](https://s1.ax1x.com/2020/10/18/0j12Wj.png)

在此示例中，用户将看到九个进程正在运行：

- 浏览器框架的浏览器进程
- 一个帮助显示图形的 GPU 进程
- 一个正在运行示例网站提供的代码的渲染器进程
- 网络服务实用程序进程，帮助处理网络请求
- 音频服务实用程序进程，可帮助播放音频
- 运行 Flash 提供的代码的插件进程
- 两个扩展进程，每个扩展进程一个，运行扩展提供的代码
- 一个监控 Microsoft Edge 健康状况的 crashpad 处理程序

所有这些过程一起写作，给你今天使用的浏览体验。

现在让我们来看另一个例子。在下一个示例中，用户打开了四个选项卡，并启用了两个扩展（图 2）。每个标签都有一个广告（两个来自一个来源，两个来自另一个来源）。

![浏览器实例打开了四个选项卡，并且打开了两个扩展](https://s1.ax1x.com/2020/10/18/0j1qfJ.png)

在此示例中，如果用户打开任务管理器，他们将看到 14 个进程正在运行：

- 浏览器框架的浏览器进程
- 一个帮助显示图形的 GPU 进程
- 六个渲染器进程：

  - 四个标签页的渲染器进程，每个标签页都有自己的渲染器进程，并运行网站提供的代码。有时，来自同一域的选项卡将共享一个进程。


MovementUtils.strafe(0.4849f)
            }
        }else if (!MovementUtils.isMoving) {
            mc.timer.timerSpeed = 1.00f
            mc.thePlayer.motionX = 0.0
            mc.thePlayer.motionZ = 0.0
        }
    }
}package net.minusmc.minusbounce.features.module.modules.player.nofalls.aac

import net.minusmc.minusbounce.features.module.modules.player.nofalls.NoFallMode
import net.minusmc.minusbounce.event.EventState
import net.minusmc.minusbounce.event.PacketEvent
import net.minusmc.minusbounce.event.MotionEvent
import net.minecraft.network.play.client.C03PacketPlayer
import net.minecraft.util.AxisAlignedBB

class AAC4xNoFall: NoFallMode("AAC 4.x") {
    private var aac4Fakelag = false
    private var aac4FlagCount = 0
    private var packetModify = false

    private val aac4Packets = mutableListOf<C03PacketPlayer>()

    override fun onEnable() {
        aac4FlagCount = 0
        aac4Fakelag = false
        packetModify = false
        aac4Packets.clear()
    }

    override fun onDisable() {
        aac4FlagCount = 0
        aac4Fakelag = false
        packetModify = false
        aac4Packets.clear()
    }

    override fun onMotion(event: MotionEvent) {
        if (event.eventState == EventState.PRE) {
            if (!inVoid()) {
                if (aac4Fakelag) {
                    aac4Fakelag = false
                    if (aac4Packets.size > 0) {
                        for (packet in aac4Packets) mc.thePlayer.sendQueue.addToSendQueue(packet)
                        aac4Packets.clear()
                    }
                }
                return
            }
            if (mc.thePlayer.onGround && aac4Fakelag) {
                aac4Fakelag = false
                if (aac4Packets.size > 0) {
                    for (packet in aac4Packets) mc.thePlayer.sendQueue.addToSendQueue(packet)
                    aac4Packets.clear()
                }
                return
            }
            if (mc.thePlayer.fallDistance > 2.5 && aac4Fakelag) {
                packetModify = true
                mc.thePlayer.fallDistance = 0f
            }
            if (inAir(4.0, 1.0)) {
                return
            }
            if (!aac4Fakelag)
                aac4Fakelag = true
        }
    }

    override fun onPacket(event: PacketEvent) {
        val packet = event.packet

        if (aac4Fakelag && packet is C03PacketPlayer) {
            event.cancelEvent()
            if (packetModify) {
                packet.onGround = true
                packetModify = false
            }
            aac4Packets.add(packet)
        }
    }

    private fun inVoid(): Boolean {
        if (mc.thePlayer.posY < 0) return false
        var off = 0
        while (off < mc.thePlayer.posY + 2) {
            val bb = AxisAlignedBB(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.posX, off.toDouble(), mc.thePlayer.posZ)
            if (mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb).isNotEmpty()) {
                return true
            }
            off += 2
        }
        return false
    }

    private fun inAir(height: Double, plus: Double): Boolean {
        if (mc.thePlayer.posY < 0) return false
        var off = 0
        while (off < height) {
            val bb = AxisAlignedBB(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.posX, mc.thePlayer.posY - off, mc.thePlayer.posZ)
            if (mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb).isNotEmpty())
                return true


#ifndef RENDERER_H
#define RENDERER_H

#include <memory>
#include "samplers/sampler.h"
#include "linalg/ray.h"
#include "memory_pool.h"

class SurfaceIntegrator;
class VolumeIntegrator;
class Scene;

/*
 * Interface for renderers, given a ray to trace and a scene
 * to trace it in returns the illumination along the ray
 */
class Renderer {
	std::unique_ptr<SurfaceIntegrator> surface_integrator;
	std::unique_ptr<VolumeIntegrator> volume_integrator;

public:
	Renderer(std::unique_ptr<SurfaceIntegrator> surface_integrator, std::unique_ptr<VolumeIntegrator> volume_integrator);
	/*
	 * Have the renderer and its integrators perform any needed pre-processing of the scene
	 */
	void preprocess(const Scene &scene);
	/*
	 * Compute the incident radiance along the ray in the scene
	 * The default implementation simply calls the surface integrator on
	 * the hit geometry to compute the illumination
	 */
	virtual Colorf illumination(RayDifferential &ray, const Scene &scene, Sampler &sampler, MemoryPool &pool) const;
	/*
	 * Compute the beam transmittance for line segment along the ray from min_t to max_t using the
	 * volume integrator, if any. If no volume integrator is being used, simply returns 1 (eg. air)
	 */
	virtual Colorf transmittance(const Scene &scene, const RayDifferential &ray, Sampler &sampler, MemoryPool &pool) const;

};

#endif


  }

        /* Next argument */
        ++I;
    }

    /* Try to read the info file */
    ReadInfoFile ();

    /* Must have an input file */
    if (InFile == 0) {
        AbEnd ("No input file");
    }

    /* Check the formatting options for reasonable values. Note: We will not
    ** really check that they make sense, just that they aren't complete
    ** garbage.
    */
    if (MCol >= ACol) {
        AbEnd ("mnemonic-column value must be smaller than argument-column value");
    }
    if (ACol >= CCol) {
        AbEnd ("argument-column value must be smaller than comment-column value");
    }
    if (CCol >= TCol) {
        AbEnd ("comment-column value must be smaller than text-column value");
    }

    /* If no CPU given, use the default CPU */
    if (CPU == CPU_UNKNOWN) {
        CPU = CPU_6502;
    }

    /* Get the current time and convert it to string so it can be used in
    ** the output page headers.
    */
    T = time (0);
    strftime (Now, sizeof (Now), "%Y-%m-%d %H:%M:%S", localtime (&T));

    /* Load the input file */
    LoadCode ();

    /* Open the output file */
    OpenOutput (OutFile);

    /* Disassemble the code */
    Disassemble ();

    /* Close the output file */
    CloseOutput ();

    /* Done */
    return EXIT_SUCCESS;
}


default-small-ml,.x-btn-default-small-mr{zoom:1;background-image:url(images/btn/btn-default-small-corners.gif)}.x-btn-default-small-ml,.x-btn-default-small-mr{zoom:1;background-image:url(images/btn/btn-default-small-sides.gif);background-repeat:repeat-y}.x-btn-default-small-mc{padding:1px 1px 1px 1px}.x-strict .x-ie7 .x-btn-default-small-tl,.x-strict .x-ie7 .x-btn-default-small-bl{position:relative;right:0}.x-btn-default-small:after{display:none;content:"x-slicer:corners:url(images/btn/btn-default-small-corners.gif), sides:url(images/btn/btn-default-small-sides.gif)"}.x-btn-default-small .x-btn-inner{font-size:12px;font-weight:bold;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:white;padding:0 5px}.x-btn-default-small .x-btn-arrow{background-image:url(images/button/default-small-arrow.png)}.x-btn-default-small .x-btn-arrow-right{padding-right:21px}.x-btn-default-small .x-btn-arrow-bottom{padding-bottom:18px}.x-btn-default-small .x-btn-glyph{font-size:16px;line-height:16px;color:white;opacity:.5}.x-ie8m .x-btn-default-small .x-btn-glyph{color:#b0e4da}.x-btn-default-small-disabled{border-color:#47c1a8}.x-btn-default-small-icon .x-btn-button,.x-btn-default-small-noicon .x-btn-button{height:16px}.x-btn-default-small-icon .x-btn-inner,.x-btn-default-small-noicon .x-btn-inner{line-height:16px}.x-btn-default-small-icon .x-btn-arrow-right .x-btn-inner,.x-btn-default-small-noicon .x-btn-arrow-right .x-btn-inner,.x-btn-default-small-icon-text-left .x-btn-arrow-right .x-btn-inner{padding-right:0}.x-btn-default-small-icon .x-btn-inner{width:16px;padding:0}.x-btn-default-small-icon .x-btn-icon-el{width:16px;height:16px}.x-btn-default-small-icon-text-left .x-btn-button{height:16px}.x-btn-default-small-icon-text-left .x-btn-inner{line-height:16px;padding-left:21px}.x-btn-default-small-icon-text-left .x-btn-icon-el{width:16px;right:auto}.x-ie6 .x-btn-default-small-icon-text-left .x-btn-icon-el,.x-quirks .x-btn-default-small-icon-text-left .x-btn-icon-el{height:16px}.x-btn-default-small-icon-text-right .x-btn-button{height:16px}.x-btn-default-small-icon-text-right .x-btn-inner{line-height:16px;padding-right:21px}.x-btn-default-small-icon-text-right .x-btn-icon-el{width:16px;left:auto}.x-ie6 .x-btn-default-small-icon-text-right .x-btn-icon-el,.x-quirks .x-btn-default-small-icon-text-right .x-btn-icon-el{height:16px}.x-btn-default-small-icon-text-top .x-btn-i


 cli
  EXE="build/cli.exe"

  echoerr "- Getting dependencies"
  runSilent "${DART}" pub get
  deleteLine
  echoerr "✔ Getting dependencies"

  echoerr "- Bundling assets"
  rm -f "${EXE}"
  mkdir -p build
  deleteLine
  echoerr "✔ Bundling assets"

  echoerr "- Compiling sidekick cli"
  if runSilent "${DART}" compile exe -o "${EXE}" bin/main.dart; then
    deleteLine
    echoerr "✔ Compiling sidekick cli"
  else
    echoerr "Compilation failed. Trying dart pub upgrade (Retry 1)"
    LOCK_FILE=$(cat pubspec.lock)
    runSilent "${DART}" pub upgrade
    echoerr "- Compiling sidekick cli with updated dependencies"
    if runSilent "${DART}" compile exe -o "${EXE}" bin/main.dart; then
      deleteLine
      echoerr "✔ Compiling sidekick cli with updated dependencies"
    else
      echoerr "Compilation failed again. Trying dart pub upgrade --major-versions (Retry 2)"
      runSilent "${DART}" pub upgrade --major-versions
      echoerr "- Compiling sidekick cli with major updated dependencies"
      if runSilent "${DART}" compile exe -o "${EXE}" bin/main.dart; then
        deleteLine
        echoerr "✔ Compiling sidekick cli with major updated dependencies"
      else
        echoerr "Compilation with updated and major updated dependencies failed. Restoring pubspec.lock"
        echo "$LOCK_FILE" > pubspec.lock
        exit 1
      fi
    fi
  fi
  echoerr "🎉Success!\n"

cd "${CWD}" || exit

''';
import 'package:recase/recase.dart';
import 'package:sidekick_core/sidekick_core.dart';
import 'package:sidekick_core/src/commands/plugins/create_templates/plugin_template_generator.dart';

/// This template adds a pub dependency to a shared CLI [Command] and registers
/// it in the user's sidekick CLI.
///
/// This method is designed for cases where the command might be configurable
/// with parameters but doesn't allow users to actually change the code.
///
/// It allows updates (via `pub upgrade`) without users having to touch their code.
class SharedCommandTemplate extends PluginTemplateGenerator {
  const SharedCommandTemplate();

  @override
  void generate(PluginTemplateProperties props) {
    final pluginDirectory = props.pluginDirectory;
    pluginDirectory
        .file('pubspec.yaml')
        .writeAsStringSync(props.pubspecTemplate);

    final toolDirectory = pluginDirectory.directory('tool')..createSync();
    toolDirectory.file('install.dart').writeAsStringSync(props.installTemplate);

    final libDirectory = pluginDirectory.directory('lib')..createSync();
    libDirectory
        .file('${props.pluginName.snakeCase}.dart')
        .writeAsStringSync(props.library);

    final srcDir = libDirectory.directory('src')..createSync();
    final commandFile =
        srcDir.file('commands/${props.commandName.snakeCase}_command.dart');
    commandFile
      ..createSync(recursive: true)
      ..writeAsStringSync(props.exampleCommand);

    super.generate(props);
  }
}

extension on PluginTemplateProperties {
  String get pubspecTemplate => '''
name: $pluginName
description: Generated sidekick plugin (template shared-command)
version: 0.0.1
topics:
  - sidekick
  - cli
  - sidekick-plugin

environment:
  sdk: '>=3.5.0 <4.0.0'

dependencies:
  sidekick_core: ^3.0.0

dev_dependencies:
  lint: ^2.0.0
  sidekick_plugin_installer: ^2.0.0
''';

  String get installTemplate => '''
import 'package:sidekick_core/sidekick_core.dart'
    hide cliName, mainProjec


	mov r3, #0xe
	bl sub_0200CD68
	mov r1, #0x1e
	mov r0, #0
	lsl r1, r1, #4
	mov r2, #0x4f
	bl LoadFontPal1
	ldr r2, _021D7BAC ; =0x000001E9
	mov r0, #0
	mov r1, #0x1a
	mov r3, #0x4f
	bl NewMsgDataFromNarc
	ldr r1, _021D7BA4 ; =0x00000408
	str r0, [r5, r1]
	mov r0, #0x4f
	bl MessageFormat_New
	str r0, [r4, #4]
	ldr r0, _021D7BB0 ; =0x0000043C
	add r1, r4, #0
	ldr r0, [r5, r0]
	ldr r2, _021D7BB4 ; =0x021DECE4
	add r1, #8
	bl AddWindow
	mov r0, #1
	lsl r0, r0, #8
	mov r1, #0x4f
	bl String_New
	str r0, [r4, #0x18]
	add sp, #8
	pop {r3, r4, r5, pc}
	.align 2, 0
_021D7BA4: .word 0x00000408
_021D7BA8: .word 0x000004C4
_021D7BAC: .word 0x000001E9
_021D7BB0: .word 0x0000043C
_021D7BB4: .word ov85_021DECE4
	thumb_func_end ov85_021D7B28

	thumb_func_start ov85_021D7BB8
ov85_021D7BB8: ; 0x021D7BB8
	push {r4, r5, r6, lr}
	add r5, r0, #0
	ldr r0, _021D7BE8 ; =0x00000408
	add r4, r5, r0
	add r6, r4, #0
	add r6, #8
	add r0, r6, #0
	bl ClearWindowTilemapAndCopyToVram
	add r0, r6, #0
	bl RemoveWindow
	ldr r0, _021D7BE8 ; =0x00000408
	ldr r0, [r5, r0]
	bl DestroyMsgData
	ldr r0, [r4, #4]
	bl MessageFormat_Delete
	ldr r0, [r4, #0x18]
	bl String_Delete
	pop {r4, r5, r6, pc}
	nop
_021D7BE8: .word 0x00000408
	thumb_func_end ov85_021D7BB8

	thumb_func_start ov85_021D7BEC
ov85_021D7BEC: ; 0x021D7BEC
	push {r3, r4, r5, r6, lr}
	sub sp, #0xc
	add r5, r0, #0
	ldr r0, _021D7C40 ; =0x00000408
	add r6, r1, #0
	add r4, r5, r0
	add r0, r4, #0
	add r0, #8
	mov r1, #1
	mov r2, #0x1f
	mov r3, #0xe
	bl DrawFrameAndWindow2
	add r0, r4, #0
	add r0, #8
	mov r1, #0xf
	bl FillWindowPixelBuffer
	ldr r0, _021D7C40 ; =0x00000408
	ldr r2, [r4, #0x18]
	ldr r0, [r5, r0]


i thẻ `<strong>`)

- `<em>`: Làm nổi bật hành động "chạm" như một lời cảnh báo trong ví dụ trên.

- Hoặc `"Em <em>thực sự</em> muốn đi chơi."`

## Vậy thẻ `<strong>` thì khác gì thẻ `<em>`
Ngoài việc khác nhau về biểu thị (1 cái in đậm, 1 cái in nghiêng) thì Mặc dù cả 2 thẻ đều nhằm tác dụng nhấn mạnh nhưng mục đích nhấn mạnh là khác nhau:

`<strong>` Nhấn mạnh mức độ quan trọng của nội dung. Dùng cho thông tin cần được chú ý cao (cảnh báo, khẩn cấp, nội dung then chốt). Trình đọc màn hình sẽ đọc nhấn mạnh, hoặc đọc to hơn nhưng sẽ không kèm theo sắc thái, hay cảm xúc …

`<em>` Nhấn mạnh sự khác biệt về ngữ điệu (tâm trạng, giọng điệu). Dùng để thay đổi tông giọng (châm biếm, nghi ngờ, nhấn mạnh ý kiến cá nhân). Ví dụ nói kiểu châm biếm: Ý kiến của em thì luôn đúng rồi,`<em>`em là nhấtttnhấttt`</em>`

## 3. Khi nào thì dùng thẻ `<i>`
Thẻ `<i>` được dùng để thể hiện một tâm trạng hoặc giọng điệu khác so với nội dung xung quanh. Nó thường được sử dụng cho từ nước ngoài, cụm từ thành ngữ, thuật ngữ kỹ thuật, tên tàu, suy nghĩ (nội tâm nhân vật), v.v.

`<i>` chỉ thay đổi cách trình bày (in nghiêng) mà không nhấn mạnh ngữ nghĩa, không làm thay đổi ý nghĩa tổng thể như thẻ `<em>`

- Từ nước ngoài:
```html
<p>Anh ấy nói <i>"Carpe Diem"</i> với một nụ cười.</p>
```
- Thuật ngữ kỹ thuật:
```html
<p>Hiện tượng <i>photosynthesis</i> là quá trình quang hợp.</p>
```
- Tên tàu/xe:
```html
<p>Con tàu <i>Titanic</i> đã chìm vào năm 1912.</p>
```
- Suy nghĩ nội tâm (trong văn học):
```html
<p><i>Mình nên đi hay ở lại đây?</i> cô ấy tự hỏi.</p>
```
## 4. Khi nào th


T value) { self.get()-\u003e*field = value; }; return def_property(name, getter_func, setter_func); } template \u003ctypename T\u003e class_\u0026 def_readonly(const std::string\u0026 name, T CurClass::*field) { auto getter_func = [field = std::move(field)](const c10::intrusive_ptr\u003cCurClass\u003e\u0026 self) { return self.get()-\u003e*field; }; return def_property(name, getter_func); } class_\u0026 _def_unboxed( const std::string\u0026 name, std::function\u003cvoid(jit::Stack\u0026)\u003e func, c10::FunctionSchema schema, std::string doc_string = \"\") { auto method = std::make_unique\u003cjit::BuiltinOpFunction\u003e( qualClassName + \".\" + name, std::move(schema), std::move(func), std::move(doc_string)); classTypePtr-\u003eaddMethod(method.get()); registerCustomClassMethod(std::move(method)); return *this; } template \u003ctypename GetStateFn, typename SetStateFn\u003e class_\u0026 def_pickle(GetStateFn\u0026\u0026 get_state, SetStateFn\u0026\u0026 set_state) { static_assert( c10::guts::is_stateless_lambda\u003cstd::decay_t\u003cGetStateFn\u003e\u003e::value \u0026\u0026 c10::guts::is_stateless_lambda\u003cstd::decay_t\u003cSetStateFn\u003e\u003e::value, \"def_pickle() currently only supports lambdas as \" \"__getstate__ and __setstate__ arguments.\"); def(\"__getstate__\", std::forward\u003cGetStateFn\u003e(get_state)); // __setstate__ needs to be registered with some custom handling: // We need to wrap the invocation of the user-provided function // such that we take the return value (i.e. c10::intrusive_ptr\u003cCurrClass\u003e) // and assign it to the `capsule` attribute. using SetStateTraits = c10::guts::infer_function_traits_t\u003cstd::decay_t\u003cSetStateFn\u003e\u003e; using SetStateArg = typename c10::guts::typelist::head_t\u003c typename SetStateTraits::parameter_types\u003e; auto setstate_wrapper = [set_state = std::forward\u003cSetStateFn\u003e(set_state)]( c10::tagged_capsule\u003cCurClass\u003e self, SetStateArg arg) { c10::intrusive_ptr\u003cCurClass\u003e classObj = std::invoke(set_state, std::move(arg)); auto object = self.ivalue.toObject(); object-\u003esetSlot(0, c10::IValue::make_capsule(classObj)); }; defineMethod( \"__setstate__\", detail::wrap_func\u003cCurClass, decltype(setstate_wrapper)\u003e( std::move(setstate_wrapper))); // type validation auto getstate_schema = classTypePtr-\u003egetMethod(\"__getstate__\").getSchema(); #ifndef STRIP_ERROR_MESSAGES auto format_getstate_schema = [\u0026getstate_schema]() { std::stringstream ss; ss \u003c\u003c getstate_schema; return ss.str(); }; #endif TORCH_CHECK( getstate_schema.arguments().size() == 1, \"__getstate__ should take exactly one argument: self. Got: \", format_getstate_schema()); auto first_arg_type = getstate_schema.arguments().at(0).type(); TORCH_CHECK( *first_arg_type == *classTypePtr, \"self argument of __getstate__ must be the custom class type. Got \", first_arg_type-\u003erepr_str()); TORCH_CHECK( getstate


 dynamic> payload);

class SignalRService {
  late HubConnection _connection;
  HubConnection get connection => _connection;
  String baseUrl;
  StorageService storageService;
  SignalRStatusCallback? onStatusChanged;
  OnReceiveChatMessage? onReceiveChatMessage;
  OnReceiveLivestreamMessage? onReceiveLivestreamMessage;
  OnReceiveViewerStats? onReceiveViewerStats;
  OnUserTyping? onUserTyping;
  OnUserJoinedRoom? onUserJoinedRoom;
  OnUserLeftRoom? onUserLeftRoom;
  OnConnectionStateChanged? onConnectionStateChanged;
  OnError? onError;

  // Product-related listeners
  OnPinnedProductsUpdated? onPinnedProductsUpdated;
  OnProductAdded? onProductAdded;
  OnProductRemoved? onProductRemoved;
  OnProductUpdated? onLivestreamProductUpdated;
  OnProductPinStatusChanged? onProductPinStatusChanged;
  OnProductPinStatusChanged? onLivestreamProductPinStatusChanged;
  OnProductStockUpdated? onProductStockUpdated;
  OnProductStockUpdated? onLivestreamProductStockUpdated;

  bool _isConnected = false;
  /// When true, presence-related hub invokes (join/leave/viewing) will be suppressed.
  /// Use this to avoid notifying others when entering a livestream.
  bool suppressPresenceEvents = false;

  SignalRService(
    this.baseUrl,
    this.storageService, {
    this.onStatusChanged,
    this.onReceiveChatMessage,
    this.onReceiveLivestreamMessage,
    this.onUserTyping,
    this.onUserJoinedRoom,
    this.onUserLeftRoom,
    this.onConnectionStateChanged,
    this.onError,
  }) {
    _connection = HubConnectionBuilder()
        .withUrl(
          "$baseUrl/signalrchat",
          HttpConnectionOptions(
            transport: HttpTransportType.webSockets,
            skipNegotiation: true,
            accessTokenFactory: () async {
              final token = await storageService.getAccessToken();
              return token ?? "";
            },
          ),
        )
        .withAutomaticReconnect([0, 2000, 10000, 30000])
        .build();

    _setupListeners();
  }

  /// Kết nối đến SignalR hub
  Future<void> connect() async {
    if (_connection.state == HubConnectionState.connected) {
      onStatusChanged?.call("Đã kết nối SignalR");
      _isConnected = true;
  onConnectionStateChanged?.call(HubConnectionState.connected);
      return;
    }

    onStatusChanged?.call("Đang kết nối SignalR...");
    try {
      await _connection.start();
      _isConnected = true;
      onStatusChanged?.call("✅ Đã kết nối SignalR (id=${_connection.connectionId})");
  onConnectionStateChanged?.call(HubConnectionState.connected);
    } catch (e) {
      _isConnected = false;
      onStatusChanged?.call("❌ Lỗi kết nối SignalR: $e");
      final err = e.toString().toLowerCase();
      final needFallback = err.contains('handshake') || err.contains('websocket') || err.contains('connection failed');
      if (needFallback) {
        try {
          onStatusChanged?.call('🔄 Thử kết nối lại với negotiation...');
          try { await _connection.stop(); } catch (_) {}
          _connection = HubConnectionBuilder()
              .withUrl(
                "$baseUrl/signalrchat",
                HttpConnectionOptions(
                  accessTokenFactory: () async {
                    final token = await storageService.getAccessToken();
                    return token ?? "";
                  },
                ),
              )
              .withAutomaticReconnect([0, 2000, 10000, 30000])


p://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 18 18'%3e%3cg clip-path='url(%23a)'%3e%3cpath fill='black' fill-rule='evenodd' d='M7.875 3a1.104 1.104 0 0 0-.988 1.597l.122.244a.8.8 0 0 1-.717 1.158H3.75a.75.75 0 0 0-.75.75v.896c1.365-.082 2.625.998 2.625 2.48 0 1.48-1.26 2.56-2.625 2.479v1.645a.75.75 0 0 0 .75.75h1.645c-.081-1.365.999-2.625 2.48-2.625 1.481 0 2.561 1.26 2.48 2.625h.895a.75.75 0 0 0 .75-.75v-2.542a.801.801 0 0 1 1.159-.717l.243.122a1.105 1.105 0 1 0 0-1.975l-.243.122a.8.8 0 0 1-1.16-.717V6.749a.75.75 0 0 0-.75-.75H9.458a.801.801 0 0 1-.717-1.158l.123-.244a1.104 1.104 0 0 0-.988-1.598ZM5.298 4.5c-.237-1.513.922-3 2.577-3 1.654 0 2.814 1.487 2.577 3h.798a2.25 2.25 0 0 1 2.25 2.25v.797c1.513-.237 3 .923 3 2.577s-1.487 2.814-3 2.577v1.548a2.25 2.25 0 0 1-2.25 2.25H9.445a.794.794 0 0 1-.732-1.11l.063-.147a.981.981 0 1 0-1.803 0l.064.148a.796.796 0 0 1-.732 1.11H3.75a2.25 2.25 0 0 1-2.25-2.25v-2.556a.796.796 0 0 1 1.11-.732l.148.064a.982.982 0 0 0 1.25-1.367.981.981 0 0 0-1.25-.436l-.149.064a.796.796 0 0 1-1.11-.732V6.749A2.25 2.25 0 0 1 3.75 4.5h1.549Z' clip-rule='evenodd'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 0h18v18H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
}

.setting-item.style-settings-heading:is([data-id=Extended-colors-light], [data-id=Global-background-header-light], [data-id=Foreground-header-light], [data-id=interactive-color-light], [data-id=Miscellaneous-light])+.style-settings-container .setting-item .setting-item-control div.theme-dark,
.setting-item.style-settings-heading:is([data-id=Extended-colors-dark], [data-id=Global-background-header-dark], [data-id=Foreground-header-dark], [data-id=interactive-color-dark], [data-id=Miscellaneous-dark])+.style-settings-container .setting-item .setting-item-control div.theme-light {
    display: none;
}

/*calendar*/
.day.svelte-q3wqg9:active .filled.svelte-1widvzq,
.active.svelte-q3wqg9


"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.
 */
/*------------------------------------*    $CONTENTS
\*------------------------------------*/
/**
 * STYLE GUIDE VARIABLES------------------Declarations of Sass variables
 * -----Typography
 * -----Colors
 * -----Textfield
 * -----Switch
 * -----Spinner
 * -----Radio
 * -----Menu
 * -----List
 * -----Layout
 * -----Icon toggles
 * -----Footer
 * -----Column
 * -----Checkbox
 * -----Card
 * -----Button
 * -----Animation
 * -----Progress
 * -----Badge
 * -----Shadows
 * -----Grid
 * -----Data table
 * -----Dialog
 * -----Snackbar
 * -----Tooltip
 * -----Chip
 *
 * Even though all variables have the `!default` directive, most of them
 * should not be changed as they are dependent one another. This can cause
 * visual distortions (like alignment issues) that are hard to track down
 * and fix.
 */
/* ==========  TYPOGRAPHY  ========== */
/* We're splitting fonts into "preferred" and "performance" in order to optimize
   page loading. For important text, such as the body, we want it to load
   immediately and not wait for the web font load, whereas for other sections,
   such as headers and titles, we're OK with things taking a bit longer to load.
   We do have some optional classes and parameters in the mixins, in case you
   definitely want to make sure you're using the preferred font and don't mind
   the performance hit.
   We should be able to improve on this once CSS Font Loading L3 becomes more
   widely available.
*/
/* ==========  COLORS  ========== */
/**
*
* Material design color palettes.
* @see http://www.google.com/design/spec/style/color.html
*
**/
/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * 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.
 */
/* ==========  Color Palettes  ========== */
/* colors.scss */
/**
 * Copyright 2015 Google Inc. All Rights Reserved.
 *
 * 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.
 */
/* ==========  IMAGES  ========== */
/* ==========  Color & Themes  ========== */
/* ==========  Typography  ========== */
/* ==========  Components  ========== */
/* ==========  Standard Buttons  ========== */
/*


# Copyright (c) Microsoft. All rights reserved.

import time
from unittest.mock import Mock

import pytest
from opentelemetry.sdk.trace import ReadableSpan

from agentlightning.store.memory import InMemoryLightningStore

__all__ = [
    "inmemory_store",
    "mock_readable_span",
]

@pytest.fixture
def inmemory_store() -> InMemoryLightningStore:
    """Create a fresh InMemoryLightningStore instance."""
    return InMemoryLightningStore()

@pytest.fixture
def mock_readable_span() -> ReadableSpan:
    """Create a mock ReadableSpan for testing."""
    span = Mock()
    span.name = "test_span"

    # Mock context
    context = Mock()
    context.trace_id = 111111
    context.span_id = 222222
    context.is_remote = False
    context.trace_state = {}  # Make it an empty dict instead of Mock
    span.get_span_context = Mock(return_value=context)

    # Mock other attributes
    span.parent = None
    # Fix mock status to return proper string values
    status_code_mock = Mock()
    status_code_mock.name = "OK"
    span.status = Mock(status_code=status_code_mock, description=None)
    span.attributes = {"test": "value"}
    span.events = []
    span.links = []
    span.start_time = time.time_ns()
    span.end_time = time.time_ns() + 1000000
    span.resource = Mock(attributes={}, schema_url="")

    return span


namespace System.Workflow.ComponentModel.Design
{
    using System;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Windows.Forms;

    #region Glyphs

    #region Class ConnectionPointGlyph
    internal sealed class ConnectionPointGlyph : DesignerGlyph
    {
        private ConnectionPoint connectionPoint;

        internal ConnectionPointGlyph(ConnectionPoint connectionPoint)
        {
            this.connectionPoint = connectionPoint;
        }

        protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
        {
            if (designer.Activity != null && designer.Activity.Site != null && this.connectionPoint != null)
            {
                WorkflowView workflowView = designer.Activity.Site.GetService(typeof(WorkflowView)) as WorkflowView;
                Rectangle viewPort = (work


wsableState.Never)]
        public static async Task<string[]> ShowManagedAsync<TWindow>(this OpenFileDialog dialog, Window parent,
            ManagedFileDialogOptions? options = null) where TWindow : Window, new()
        {
            var impl = new ManagedStorageProvider(parent, PrepareOptions(options, () => new TWindow()));

            var files = await impl.OpenFilePickerAsync(dialog.ToFilePickerOpenOptions());
            return files
                .Select(file => file.TryGetLocalPath() ?? file.Name)
                .ToArray();
        }

        private static ManagedFileDialogOptions? PrepareOptions(
            ManagedFileDialogOptions? optionsOverride = null,
            Func<ContentControl>? customRootFactory = null)
        {
            var options = optionsOverride ?? AvaloniaLocator.Current.GetService<ManagedFileDialogOptions>();
            if (options is not null && customRootFactory is not null)
            {
                options = options with { ContentRootFactory = customRootFactory };
            }

            return options;
        }

        private static AppBuilder UseManagedSystemDialogs(this AppBuilder builder, Func<ContentControl>? customFactory)
        {
            builder.AfterSetup(_ =>
            {
                var options = PrepareOptions(null, customFactory);
                AvaloniaLocator.CurrentMutable.Bind<IStorageProviderFactory>()
                    .ToConstant(new ManagedStorageProviderFactory(options));
                if (options?.CustomVolumeInfoProvider is not null)
                {
                    AvaloniaLocator.CurrentMutable.Bind<IMountedVolumeInfoProvider>()
                        .ToConstant(options.CustomVolumeInfoProvider);
                }
            });
            return builder;
        }
    }
}


cb),
                                                   AFS_FCB_ALLOCATION_TAG);

        if( pFcb == NULL)
        {

            AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
                          AFS_TRACE_LEVEL_ERROR,
                          "AFSInitRootFcb Failed to allocate the root fcb\n"));

            try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
        }

        RtlZeroMemory( pFcb,
                       sizeof( AFSFcb));

        pFcb->Header.NodeByteSize = sizeof( AFSFcb);

        pFcb->Header.NodeTypeCode = AFS_ROOT_FCB;

        pNPFcb = (AFSNonPagedFcb *)AFSExAllocatePoolWithTag( NonPagedPool,
                                                             sizeof( AFSNonPagedFcb),
                                                             AFS_FCB_NP_ALLOCATION_TAG);

        if( pNPFcb == NULL)
        {

            AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
                          AFS_TRACE_LEVEL_ERROR,
                          "AFSInitRootFcb Failed to allocate the non-paged fcb\n"));

            try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES);
        }

        RtlZeroMemory( pNPFcb,
                       sizeof( AFSNonPagedFcb));

        pNPFcb->Size = sizeof( AFSNonPagedFcb);

        pNPFcb->Type = AFS_NON_PAGED_FCB;

        //
        // OK, initialize the entry
        //

        ExInitializeFastMutex( &pNPFcb->AdvancedHdrMutex);

        FsRtlSetupAdvancedHeader( &pFcb->Header, &pNPFcb->AdvancedHdrMutex);

        ExInitializeResourceLite( &pNPFcb->Resource);

        ExInitializeResourceLite( &pNPFcb->PagingResource);

        ExInitializeResourceLite( &pNPFcb->SectionObjectResource);

        ExInitializeResourceLite( &pNPFcb->CcbListLock);

        AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
                      AFS_TRACE_LEVEL_VERBOSE,
                      "AFSInitRootFcb Acquiring Fcb lock %p EXCL %08lX\n",
                      &pNPFcb->Resource,
                      PsGetCurrentThread()));

        AFSAcquireExcl( &pNPFcb->Resource,
                        TRUE);

        pFcb->Header.Resource = &pNPFcb->Resource;

        pFcb->Header.PagingIoResource = &pNPFcb->PagingResource;

        pFcb->NPFcb = pNPFcb;

        //
        // Save the root Fcb in the VolumeCB
        //

        pFcb->ObjectInformation = &VolumeCB->ObjectInformation;

        VolumeCB->ObjectInformation.VolumeCB = VolumeCB;

        AFSAcquireShared( &VolumeCB->ObjectInformation.NonPagedInfo->ObjectInfoLock,
                          TRUE);
        //
        // Swap the allocated FCB into the ObjectInformation structure if it
        // does not already have one.
        //

        if ( InterlockedCompareExchangePointer( (PVOID *)&VolumeCB->ObjectInformation.Fcb, pFcb, NULL) != NULL)
        {

            AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
                          AFS_TRACE_LEVEL_WARNING,
                          "AFSInitRootFcb Raced Fcb %p pFcb %p\n",
                          VolumeCB->ObjectInformation.Fcb,
                          pFcb));

            AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
                          AFS_TRACE_LEVEL_VERBOSE,
                          "AFSInitRootFcb Acquiring Fcb lock %p EXCL %08lX\n",
                          &VolumeCB->ObjectInformation.Fcb->NPFcb->Resource,


autoContinuePlayJob = viewModelScope.launch {
            delay(3000)
            playNextEpisode(currPlayPosition)
        }
    }

    fun cancelAutoContinuePlay() {
        autoContinuePlayJob?.cancel()
        autoContinuePlayJob = null
    }

    /**
     * 切换到下一集
     * @param currPlayPosition 当前视频的播放位置, 单位：毫秒
     */
    fun playNextEpisode(currPlayPosition: Long) {
        viewModelScope.launch {
            _videoState.value.data?.let { video ->
                val nextEpisodeIndex = video.currentEpisodeIndex + 1
                if (nextEpisodeIndex < video.episodes.size) {
                    // 获取下一集视频
                    getVideo(
                        video.episodes[nextEpisodeIndex].url,
                        video.episodes[nextEpisodeIndex].name,
                        nextEpisodeIndex,
                        currPlayPosition
                    )
                }
            }
        }
    }

    /**
     * 保存当前视频的播放进度
     * @param currPlayPosition 当前视频的播放位置, 单位：毫秒
     */
    fun saveVideoPosition(currPlayPosition: Long) {
        // 观看时长少于5秒或本地视频的播放时长不保存
        if (currPlayPosition < 5_000 || isLocalVideo) return

        _videoState.value.data?.let { video ->
            viewModelScope.launch {
                val episode = Episode(
                    name = video.episodeName,
                    url = video.episodeUrl,
                    lastPlayPosition = currPlayPosition,
                    historyId = historyId
                )
                // 将当前视频进度保存到Room数据库中
                roomRepository.addEpisode(episode)
            }
        }
    }

    /**
     * 重新尝试加载远程视频
     */
    fun retry() {
        _videoState.value = Resource.Loading
        getVideoFromRemote(currentEpisodeUrl, currentEpisodeIndex)
    }
}
package com.lanlinju.animius.data.remote.parse

import com.lanlinju.animius.data.remote.dto.AnimeBean
import com.lanlinju.animius.data.remote.dto.AnimeDetailBean
import com.lanlinju.animius.data.remote.dto.EpisodeBean
import com.lanlinju.animius.data.remote.dto.HomeBean
import com.lanlinju.animius.data.remote.dto.VideoBean
import com.lanlinju.animius.util.DownloadManager
import com.lanlinju.animius.util.getDefaultDomain
import com.lanlinju.animius.util.getDocument
import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.request.get
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.select.Elements
import java.time.LocalDate

/**
 * reference     https://github.com/consumet/api.consumet.org
 * @webSite      https://consumet-leox-api.vercel.app/anime/gogoanime
 */
object GogoanimeSource : AnimeSource {
    override val DEFAULT_DOMAIN: String = "https://gogoanime.by/"
    override var baseUrl: String = getDefaultDomain()

    private var client: HttpClient = DownloadManager.httpClient

    override suspend fun getHomeData(): List<HomeBean> {
        val document = getDocument(baseUrl)
        val homeBeanList = mutableListOf<HomeBean>()
        document.select("div.bixbox").let { element ->
            val title = element.select("h3").text()
            val homeItemList = getAnimeList(elem


_system::{Pallet, Call, Storage, Config, Event<T>},
					ParachainInfo: parachain_info::{Pallet, Storage, Config},
					XcmHandler: cumulus_pallet_xcm_handler::{Pallet, Call, Event<T>, Origin},

					$( $extra_modules )*
				}
			);
		}
	}
}

pub struct ExtBuilder;

impl Default for ExtBuilder {
	fn default() -> Self {
		ExtBuilder
	}
}

impl ExtBuilder {
	pub fn build<Runtime: frame_system::Config>(self, para_id: u32) -> TestExternalities
	where
		<Runtime as frame_system::Config>::BlockNumber: From<u64>,
	{
		let mut t = frame_system::GenesisConfig::default()
			.build_storage::<Runtime>()
			.unwrap();

		parachain_info::GenesisConfig {
			parachain_id: para_id.into(),
		}
		.assimilate_storage(&mut t)
		.unwrap();

		let mut ext = TestExternalities::new(t);
		ext.execute_with(|| frame_system::Pallet::<Runtime>::set_block_number(1.into()));
		ext
	}
}

pub fn default_ext<Runtime: frame_system::Config>(para_id: u32) -> TestExternalities
where
	<Runtime as frame_system::Config>::BlockNumber: From<u64>,
{
	ExtBuilder::default().build::<Runtime>(para_id)
}
<reponame>thalesfragoso/embassy<filename>embassy-nrf/src/uarte.rs
//! Async low power UARTE.
//!
//! The peripheral is automatically enabled and disabled as required to save power.
//! Lowest power consumption can only be guaranteed if the send receive futures
//! are dropped correctly (e.g. not using `mem::forget()`).

use core::future::Future;
use core::ops::Deref;
use core::sync::atomic::{compiler_fence, Ordering};
use core::task::{Context, Poll};

use embassy::util::Signal;

use crate::fmt::{assert, *};
#[cfg(any(feature = "52833", feature = "52840"))]
use crate::hal::gpio::Port as GpioPort;
use crate::hal::pac;
use crate::hal::prelude::*;
use crate::hal::target_constants::EASY_DMA_SIZE;
use crate::interrupt::OwnedInterrupt;
use crate::{interrupt, util};

pub use crate::hal::uarte::Pins;
// Re-export SVD variants to allow user to directly set values.
pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity};

/// Interface to the UARTE peripheral
pub struct Uarte<T>
where
    T: Instance,
{
    instance: T,
    irq: T::Interrupt,
    pins: Pins,
}

pub struct State {
    tx_done: Signal<()>,
    rx_done: Signal<u32>,
}

// TODO: Remove when https://github.com/nrf-rs/nrf-hal/pull/276 has landed
#[cfg(any(feature = "52833", feature = "52840"))]
fn port_bit(port: GpioPort) -> bool {
    match port {
        GpioPort::Port0 => false,
        GpioPort::Port1 => true,
    }
}

impl<T> Uarte<T>
where
    T: Instance,
{
    /// Creates the interface to a UARTE instance.
    /// Sets the baud rate, parity and assigns the pins to the UARTE peripheral.
    ///
    /// # Unsafe
    ///
    /// The returned API is safe unless you use `mem::forget` (or similar safe mechanisms)
    /// on stack allocated buffers which which have been passed to [`send()`](Uarte::send)
    /// or [`receive`](Uarte::receive).
    #[allow(unused_unsafe)]
    pub unsafe fn new(
        uarte: T,
        irq: T::Interrupt,
        mut pins: Pins,
        parity: Parity,


lpDisplayBuf;
#ifdef _DEBUG
   ReportEvent(hEventLog, EVENTLOG_INFORMATION_TYPE, 1, 670, NULL, 1, 0, (LPCTSTR*) &lpszStrings[0], NULL);
#endif
//paste end

    // Erreurs possible avec le thread. Si NOK on quitte
    if (lpvParam == NULL)
    {
        _tprintf(_T("\nERROR - Pipe Server Failure:\n"));
        _tprintf(_T("   InstanceThread got an unexpected NULL value in lpvParam.\n"));
        _tprintf(_T("   InstanceThread exitting.\n"));
        if (pchReply != NULL) HeapFree(hHeap, 0, pchReply);
        if (pchRequest != NULL) HeapFree(hHeap, 0, pchRequest);
        return (DWORD)-1;
    }

    // On recupere le handle de notre pipe
    hPipe = (HANDLE) lpvParam;

    // On envoi un message d'accueil a ce cher client qui a bien voulu se connecter
    _tcscpy(pchReply, _T("I'm here to serve you master."));
    cbReplyBytes = _tcsclen(pchReply) * sizeof(TCHAR);
    fSuccess = WriteFile(
                   hPipe,
                   pchReply,
                   cbReplyBytes,
                   &cbWritten,
                   NULL);

    // Loop until done reading
    while (1)
    {
		fSuccess = ReadFile(
                       hPipe,
                       pchRequest,
                       BUFSIZE * sizeof(TCHAR),
                       &cbBytesRead,
                       NULL);

        if (!fSuccess || cbBytesRead == 0)
        {
            if (GetLastError() == ERROR_BROKEN_PIPE)
            {
                _tprintf(_T("InstanceThread: client disconnected.\n"));
            }
            else
            {
                _tprintf(_T("InstanceThread ReadFile failed, GLE=%lu.\n"), GetLastError());
            }
            break;
        }

		pchRequest[cbBytesRead / sizeof(TCHAR) - 1] = _T('\0');

        // Instruction CWD => change de repertoire courant
        if(_tcsnccmp(pchRequest, _T("CWD"), 3) == 0)
        {
            if(_tcsclen(pchRequest) > 3)
            {
				arg1 = _tcsspnp(&pchRequest[3], _T(" "));
				if(arg1 != NULL) SetCurrentDirectory(arg1); // pas de gestion d'erreur
            }
            GetCurrentDirectory(255, pchReply);
        }
        // Instruction RUN => execute un programme, permet de passer des arguments
        else if (_tcsnccmp(pchRequest, _T("RUN"), 3) == 0)
        {
            if(_tcsclen(pchRequest) > 3)
            {
				arg1 = _tcsspnp(&pchRequest[3], _T(" "));
				if(arg1 != NULL)
				{
					arg2 = _tcschr(arg1, _T('|'));
					if(arg2 != NULL)
					{
						_tprintf(_T("%s\n"), arg2);
						arg2[0] = _T('\0');
						arg2 = _tcsinc(arg2);
					}

					_sntprintf(cmdLine, BUFSIZE - 1, _T("\"%s\" %s"), arg1, arg2);

					bResult = CreateProcessAsUser(
						h


, 3, 0, 0, 0, 27, 0, 0, 0, -57, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, -77, 0, 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, -128, 0, 0, 0, -79, 0, 0, 0, -100, 0, 0, 0, 72, 0, 0, 0, 65, 0, 0, 0, 27, 0, 0, 0, 114, 0, 0, 0, 10, 0, 0, 0, 3, 0, 0, 0, 96, 0, 0, 0, 66, 0, 0, 0, -77, 0, 0, 0, -120, 0, 0, 0},
                buffer3);
        assertArrayEquals(new byte[]{-19, 37, -47, -69, -68, 39, -97, 2, -94, -87, 17, 0, 12, -77, 82, -64, -67, -29, 27, 73, -57},
                buffer4);
    }

    @Test
    void garble6Test() {
        byte[] buffer0 = {-106, 95, -58, 83, -8, 70, -52, 24, -33, -66, -78, -8, 56, -41, -20, 34, 3, -47, 32, -113};
        byte[] buffer1 = {34, 126, 12, 15, -113, 98, -9, -105, 124, -15, -87, 97, -96, 44, 109, -75, -28, -113, -95, 17, 75, 110, -29, -73, -56, -78, -98, -62, 31, -54, 5, -3, -28, 42, -41, -12, 65, 20, 116, 121, 1, 27, -25, -119, -103, -72, -14, 113, -38, -66, -118, 17, 22, 80, -77, -125, -97, -128, -54, -55, 87, -66, -88, -79, -72, -19, -64, 65, -104, 114, -127, 14, -65, 28, -106, -91, 103, -102, -104, -21, 68, -125, 79, -55, -36, -59, -6, -96, -7, -108, -13, -72, 95, -6, 34, -84, -51, 69, 68, -28, 122, -49, 59, -17, -120, -59, 69, 113, 3, 122, -18, -25, 22, -34, -86, 100, 69, 39, 113, -115, -42, -82, -67, -103, 57, 22, -91, -86, 82, -82, -86, -40, -111, 32, 110, -102, 48, -95, -53, -83, 36, -86, 79, -9, 116, -64, -34, 102, -29, -5, -44, -103, 44, -113, -53, -96, 44, -19, -60, 86, -80, -29, 99, 84, -67, -128, -47, 125, -46, -98, 26, -25, -2, 82, -18, -42, 62, -106, 13, 73, -14, 25, -41, 63, -78, 69, -34, -116, 20, -116, -63, -57, 37, 74, 33, 9, 61, -101, 49, 113, 59, 85, 47, -76, -2, 4, -112, -103, 24, -27};
        byte[] buffer2 = {67, 84, 98, 122, 24, -61, -42, -77, -102, 86, -10, 28, 20, 63, 12, 29, 59, 54, -125, -79, 57, 81, 74, -86, 9, 62, -2, 68, -81, -34, -61, 32, -99, 66, 58};
        byte[] buffer3 = new byte[132];
        byte[] buffer4 = {-19, 37, -47, -69, -68, 39, -97,


shape.*
import org.openrndr.svg.saveToFile
import util.timestamp
import java.io.File
import kotlin.math.*
import kotlin.random.Random

fun main() = application {
  configure {
    width = 800
    height = 800
  }

  program {
    val progName = this.name.ifBlank { this.window.title.ifBlank { "my-amazing-drawing" } }
    // Seed is the basis for all our randomization, because it is used to create a seeded RNG (Random(seed))
    var seed = random(0.0, Int.MAX_VALUE.toDouble()).toInt()
    println("seed = $seed")

    val screenshots = extend(Screenshots()) {
      quitAfterScreenshot = false
      contentScale = 3.0
      captureEveryFrame = false
      name = "screenshots/$progName/${timestamp()}-seed-$seed.jpg"
    }

    val bg = ColorRGBa.WHITE
    backgroundColor = bg

    fun gridByDimensions(nCols: Int, nRows: Int): List<Pair<Int, Int>> =
      (0 until nCols).flatMap { x ->
        (0 until nRows).map { y ->
          Pair(x, y)
        }
      }

    // This will find all available sizes without any chance of overlaps
    fun findAvailableSizes(grid: List<Boolean>, x: Int, y: Int, nCols: Int, nRows: Int, getIndex: (x: Int, y: Int) -> Int, maxDimension: Int): List<Pair<Int, Int>> {
      // compute the available sizes, e.g. 1x1, 1x2, 2x2, 2x3, etc, up to 4x4
      val availableSizes = mutableListOf<Pair<Int, Int>>()
      /**
       * This way is ultimate brute force, check all combos twice because
       * different orientations might be different
       * Gotta be a better way
       */
      for ((i, j) in gridByDimensions(maxDimension, maxDimension)) {
        if (i + x > nCols - 1 || j + y > nRows - 1) {
          continue
        }
        if (!grid[getIndex(i + x, j + y)]) {
          availableSizes.add(Pair(i + 1, j + 1))
        } else {
          break
        }
      }
      for ((j, i) in gridByDimensions(maxDimension, maxDimension)) {
        if (i + x > nCols - 1 || j + y > nRows - 1) {
          continue
        }
        val pair = Pair(i + 1, j + 1)
        if (!grid[getIndex(i + x, j + y)] && availableSizes.contains(pair)) {
          availableSizes.add(pair)
        } else {
          break
        }
      }
      return availableSizes
    }

    // This has the possibility of overlaps, but that can be kind of visually interesting
    fun findAvailableSizesWithOverlaps(grid: List<Boolean>, x: Int, y: Int, nCols: Int, nRows: Int, getIndex: (x: Int, y: Int) -> Int, maxDimension: Int): List<Pair<Int, Int>> {
      // compute the available sizes, e.g. 1x1, 1x2, 2x2, 2x3, etc, up to 4x4
      val availableSizes = mutableListOf<Pair<Int, Int>>()
      for ((i, j) in gridByDimensions(maxDimension, maxDimension)) {
        if (i + x > nCols - 1 || j + y > nRows - 1) {
          break
        }
        // this check is not perfect, and results in some visually interesting overlap.
        // however, it is not correct, because it allows things to overlap, which they "should" not
        if (!grid[getIndex(i + x, j + y)]) {
          availableSizes.add(Pair(i + 1, j + 1))
        }
      }

      return availableSizes
    }

    extend {
      val rng = Random(seed)

      val nCols = 32
      val nRows = 32
      val


Actions.js");
loadScript("Game/osmrBase/Battles/EnemyAI.js");

//Characters
loadScript("Game/osmrBase/Characters/List.js");
loadScript("Game/osmrBase/Characters/Funcs.js");

//Functions
loadScript("Game/osmrBase/Fnc/StartScreen.js");
loadScript("Game/osmrBase/Fnc/TitleScreen.js");
loadScript("Game/osmrBase/Fnc/MapScreen.js");
loadScript("Game/osmrBase/Fnc/VnScreen.js");
loadScript("Game/osmrBase/Fnc/TeamScreen.js");
loadScript("Game/osmrBase/Fnc/MakeBattle.js");
loadScript("Game/osmrBase/Fnc/EnemySetup.js");
const osmrBaseAssets = {
  bg_mysterious:"magica/image_native/bg/web/web_0002.jpg",
  bg_introCityscape:"magica/image_native/bg/web/web_00110.png",
  bg_introBackground:"magica/image_native/bg/web/web_00111.png",

  bttn_pinkCir:"magica/image_web/common/btn/btn_circle_pink.png",
  bttn_toggleOn_l:"magica/image_web/common/btn/btn_s_gold_03_l.png",
  bttn_toggleOn_r:"magica/image_web/common/btn/btn_s_gold_03_r.png",
  bttn_toggleOn_c:"magica/image_web/common/btn/btn_s_gold_03_c.png",
  bttn_toggleOff_l:"magica/image_web/common/btn/btn_s_gold_02_l.png",
  bttn_toggleOff_r:"magica/image_web/common/btn/btn_s_gold_02_r.png",
  bttn_toggleOff_c:"magica/image_web/common/btn/btn_s_gold_02_c.png",

  ico_home:"Game/osmrBase/Icons/Temp.png",
  ico_item:"Game/osmrBase/Icons/Temp.png",
  ico_map:"Game/osmrBase/Icons/mapIcon.png",
  ico_msg:"Game/osmrBase/Icons/message.png",
  ico_note:"Game/osmrBase/Icons/notebook.png",
  ico_team:"Game/osmrBase/Icons/Temp.png",
  ico_toggleOn:"magica/image_web/common/filter/icon_filter_on.png",
  ico_toggleOff:"magica/image_web/common/filter/icon_filter_off.png",

  markerFrame_silver:"Game/osmrBase/Icons/MakerSilver.png",
  markerFrame_gold:"Game/osmrBase/Icons/MarkerGold.png",
  markerFrame_purple:"Game/osmrBase/Icons/MakerPurple.png",

  dialog_boexes:"magica/package/story/story_ui_sprites00.png",

  battle_ui: "magica/package/quest/quest_image0.png",
  battle_grid:"magica/package/web/formation/magicsq_preview.png",
  charge_disk:"magica/image_web/common/chara/bg_disc_charge.png",
  accel_disk:"magica/image_web/common/chara/bg_disc_accele.png",
  blast_disk:"magica/image_web/common/chara/bg_disc_blast.png",

  void_element:"magica/image_web/common/chara/att_void_f.png",
  fire_element:"magica/image_web/common/chara/att_fire_f.png",
  water_element:"magica/image_web/common/chara/att_water_f.png",
  dark_element:"magica/image_web/common/chara/att_dark_f.png",
  grass_element:"magica/image_web/common/chara/att_grass_f.png",
  light_element:"magica/image_web/common/chara/att_light_f.


 ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *LambdaExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(GroovyParserListener); ok {
		listenerT.EnterLambdaExpression(s)
	}
}

func (s *LambdaExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(GroovyParserListener); ok {
		listenerT.ExitLambdaExpression(s)
	}
}

func (p *GroovyParser) LambdaExpression() (localctx ILambdaExpressionContext) {
	this := p
	_ = this

	localctx = NewLambdaExpressionContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 120, GroovyParserRULE_lambdaExpression)

	defer func() {
		p.ExitRule()
	}()

	defer func() {
		if err := recover(); err != nil {
			if v, ok := err.(antlr.RecognitionException); ok {
				localctx.SetException(v)
				p.GetErrorHandler().ReportError(p, v)
				p.GetErrorHandler().Recover(p, v)
			} else {
				panic(err)
			}
		}
	}()

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(827)
		p.LambdaParameters()
	}
	{
		p.SetState(828)
		p.Nls()
	}
	{
		p.SetState(829)
		p.Match(GroovyParserARROW)
	}
	{
		p.SetState(830)
		p.Nls()
	}
	{
		p.SetState(831)
		p.LambdaBody()
	}

	return localctx
}

// IStandardLambdaExpressionContext is an interface to support dynamic dispatch.
type IStandardLambdaExpressionContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsStandardLambdaExpressionContext differentiates from other interfaces.
	IsStandardLambdaExpressionContext()
}

type StandardLambdaExpressionContext struct {
	*antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyStandardLambdaExpressionContext() *StandardLambdaExpressionContext {
	var p = new(StandardLambdaExpressionContext)
	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
	p.RuleIndex = GroovyParserRULE_standardLambdaExpression
	return p
}

func (*StandardLambdaExpressionContext) IsStandardLambdaExpressionContext() {}

func NewStandardLambdaExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StandardLambdaExpressionContext {
	var p = new(StandardLambdaExpressionContext)

	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)

	p.parser = parser
	p.RuleIndex = GroovyParserRULE_standardLambdaExpression

	return p
}

func (s *StandardLambdaExpressionContext) GetParser() antlr.Parser { return s.parser }

func (s *StandardLambdaExpressionContext) StandardLambdaParameters() IStandardLambdaParametersContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IStandardLambdaParametersContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IStandardLambdaParametersContext)
}

func (s *StandardLambdaExpressionContext) AllNls() []INlsContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(INlsCont


 extends 'Task'
      ? Array<TaskGetPayload<S['select'][P]>> :
      P extends 'Token'
      ? Array<TokenGetPayload<S['select'][P]>> :
      P extends 'UserRole'
      ? Array<UserRoleGetPayload<S['select'][P]>> : never
    }
  : User
: User

export interface UserDelegate {
  /**
   * Find zero or one User that matches the filter.
   * @param {FindOneUserArgs} args - Arguments to find a User
   * @example
   * // Get one User
   * const user = await prisma.user.findOne({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
  **/
  findOne<T extends FindOneUserArgs>(
    args: Subset<T, FindOneUserArgs>
  ): CheckSelect<T, Prisma__UserClient<User | null>, Prisma__UserClient<UserGetPayload<T> | null>>
  /**
   * Find the first User that matches the filter.
   * @param {FindFirstUserArgs} args - Arguments to find a User
   * @example
   * // Get one User
   * const user = await prisma.user.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
  **/
  findFirst<T extends FindFirstUserArgs>(
    args?: Subset<T, FindFirstUserArgs>
  ): CheckSelect<T, Prisma__UserClient<User | null>, Prisma__UserClient<UserGetPayload<T> | null>>
  /**
   * Find zero or more Users that matches the filter.
   * @param {FindManyUserArgs=} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Users
   * const users = await prisma.user.findMany()
   *
   * // Get first 10 Users
   * const users = await prisma.user.findMany({ take: 10 })
   *
   * // Only select the `id`
   * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } })
   *
  **/
  findMany<T extends FindManyUserArgs>(
    args?: Subset<T, FindManyUserArgs>
  ): CheckSelect<T, Promise<Array<User>>, Promise<Array<UserGetPayload<T>>>>
  /**
   * Create a User.
   * @param {UserCreateArgs} args - Arguments to create a User.
   * @example
   * // Create one User
   * const User = await prisma.user.create({
   *   data: {
   *     // ... data to create a User
   *   }
   * })
   *
  **/
  create<T extends UserCreateArgs>(
    args: Subset<T, UserCreateArgs>
  ): CheckSelect<T, Prisma__UserClient<User>, Prisma__UserClient<UserGetPayload<T>>>
  /**
   * Delete a User.
   * @param {UserDeleteArgs} args - Arguments to delete one User.
   * @example
   * // Delete one User
   * const User = await prisma.user.delete({
   *   where: {
   *     // ... filter to delete one User
   *   }
   * })
   *
  **/
  delete<T extends UserDeleteArgs>(
    args: Subset<T, UserDeleteArgs>
  ): CheckSelect<T, Prisma__UserClient<User>, Prisma__UserClient<UserGetPayload<T>>>
  /**
   * Update one User.
   * @param {UserUpdateArgs} args - Arguments to update one User.
   * @example
   * // Update one User
   * const user = await prisma.user.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   *
  **/
  update<T extends UserUpdateArgs>(
    args: Subset<T, UserUpdateArgs>
  ): CheckSelect<T, Prisma__UserClient<User>, Prisma__UserClient<User


pes of wallets and providing a common interface for the rest of the application to use.
The keychain manager is a singleton, and can be accessed via the `KeychainManager` class.

The keychain manager is responsible for:
- Creating and managing the different types of wallets
- Handling the encryption and decryption of keychains called it `vault`

###### Methods
- `addNewKeychain`- Creates a new keychain and adds it to the keychain manager
- `importKeychain` - Imports a keychain based on its secrets
- `exportKeychain` - Export an entire keychain by returning its secret
- `exportAccount` - Exports the private key for a selected account
- `removeAccount` - Removes the selected account from its own keychain
- `setPassword` - Sets the password to encrypt the vault
- `lock`  - Encrypts all the serialized keychains from memory using the password (we call this the "vault"), persists on the fs and removes it from memory.
- `unlock` - Decrypts the "vault" and loads all the keychains
- `getSigner` - Returns an [ethers signer](https://docs.ethers.io/v5/api/signer/) for that specific address
- `getKeychain` - Returns the Keychain of a specific address
- `getAccounts` - Returns all the accounts in all the keychains

#### Keychain Types

The keychain manager currently supports the following types of wallets:
- `HdKeychain` (seed based)
- `KeyPairKeychain` (private key based)
- `ReadOnlyKeychain` (public key based)
- `HardwareWalletKeychain` (ledger or trezor based)

All the keychain types implement the `IKeychain` interface, which provides a common interface for the keychain manager to use.

#### IKeychain

The `IKeychain` interface consists of the following methods:

  - `serialize()` - Returns