  List<String> loadout;
  String ref;

  ItemRefWithLoadout({
    required this.loadout,
    required this.ref,
  });

  factory ItemRefWithLoadout.fromJson(Map<String, dynamic> json) => ItemRefWithLoadout(
    loadout: List<String>.from(json["loadout"].map((x) => x)),
    ref: json["ref"],
  );

  Map<String, dynamic> toJson() => {
    "loadout": List<dynamic>.from(loadout.map((x) => x)),
    "ref": ref,
  };
}import 'package:provider/provider.dart';
import 'package:wolt_modal_sheet/wolt_modal_sheet.dart';
import 'package:flutter/material.dart';
import '../../../datasource/models/shop/upgrade_ship_info.dart';
import 'package:cached_network_image/cached_network_image.dart';

List<int> getSkuPrice(UpgradeShipInfo ship) {
  int leastPrice = 0;
  int mostPrice = 0;

  for (var sku in ship.skus!) {
    if (sku.price! < leastPrice || leastPrice == 0) {
      leastPrice = sku.price!;
    }
    if (sku.price! > mostPrice) {
      mostPrice = sku.price!;
    }
  }

  if (ship.shipAlias != null) {
    return [leastPrice ~/ 100, ship.shipAlias!.getHighestSku() ~/ 100];
  }

  return [leastPrice ~/ 100, mostPrice ~/ 100];
}

class ShipItem extends StatelessWidget {
  final UpgradeShipInfo ship;
  final Function(UpgradeShipInfo) onSelected;
  bool isFromShip = false;

  ShipItem(this.ship, this.onSelected, this.isFromShip);

  Widget getPriceWidget(BuildContext context) {
    if (ship.skus == null) {
      if (ship.shipAlias != null) {
        return Row(
          children: [
            Text('\$',
                style: TextStyle(fontSize: 12, color: Theme.of(context).hintColor)),
            Text(
              (ship.shipAlias!.getHighestSku() ~/ 100).toString(),
              style: TextStyle(fontSize: 20),
            ),
          ],
        );
      }
      return const Text('无价格');
    }
    if (!isFromShip && ship.skus != null && ship.skus!.length > 1) {
      return Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          if (ship.skus != null && ship.skus!.length > 1)
            Row(
              children: [
                Text(
                  '\$${getSkuPrice(ship)[1]}',
                  style: TextStyle(
                    fontSize: 14,
                    color: Theme.of(context).hintColor,
                    decoration: TextDecoration.lineThrough,
                  ),

                ),
              ],
            ),
          Row(
            children: [
              Text('\$',
                  style: TextStyle(
                      fontSize: 12, color: Theme.of(context).hintColor)),
              Text(
                getSkuPrice(ship)[0].toString(),
                style: TextStyle(fontSize: 20),
              ),
            ],
          ),
        ],
      );
    } else {
      return Row(
        children: [
          Text('\$',
              style: TextStyle(fontSize: 12, color: Theme.of(context).hintColor)),
          Text(
            getSkuPrice(ship)[1].toString(),
            style: TextStyle(fontSize: 20),
          ),
        ],
      );
    }
  }

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        onSelected(ship);
      },
      child: Stack(
        children: [
          Card(
              elevation: 0,
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Container(
                      height: 80,
                      width: 120,
                      child: CachedNetworkImage(
                          imageUrl: ship.medias!.productThumbMediumAndSmall!,
                          errorWidget: (context, url, error) => Icon(Icons.error),
                          imageBuilder: (context, imageProvider) => Container(
                            decoration: BoxDecoration(
                                image: DecorationImage(


tents depending on data format
    if (os.format() == IOstream::ASCII || !contiguous<Type>())
    {
        if (mn)
        {
            bool uniform = false;

            const Type* v = M.v_;

            if (mn > 1 && contiguous<Type>())
            {
                uniform = true;

                for (label i=0; i<mn; i++)
                {
                    if (v[i] != v[0])
                    {
                        uniform = false;
                        break;
                    }
                }
            }

            if (uniform)
            {
                // Write size of list and start contents delimiter
                os  << token::BEGIN_BLOCK;

                // Write list contents
                os << v[0];

                // Write end of contents delimiter
                os << token::END_BLOCK;
            }
            else if (mn < 10 && contiguous<Type>())
            {
                // Write size of list and start contents delimiter
                os  << token::BEGIN_LIST;

                label k = 0;

                // loop over rows
                for (label i=0; i<M.m(); i++)
                {
                    os  << token::BEGIN_LIST;

                    // Write row
                    for (label j=0; j< M.n(); j++)
                    {
                        if (j > 0) os << token::SPACE;
                        os << v[k++];
                    }

                    os << token::END_LIST;
                }

                // Write end of contents delimiter
                os << token::END_LIST;
            }
            else
            {
                // Write size of list and start contents delimiter
                os  << nl << token::BEGIN_LIST;

                label k = 0;

                // loop over rows
                for (label i=0; i<M.m(); i++)
                {
                    os  << nl << token::BEGIN_LIST;

                    // Write row
                    for (label j=0; j< M.n(); j++)
                    {
                        os << nl << v[k++];
                    }

                    os << nl << token::END_LIST;
                }

                // Write end of contents delimiter
                os << nl << token::END_LIST << nl;
            }
        }
        else
        {
            os  << token::BEGIN_LIST << token::END_LIST << nl;
        }
    }
    else
    {
        if (mn)
        {
            os.write(reinterpret_cast<const char*>(M.v_), mn*sizeof(Type));
        }
    }

    // Check state of IOstream
    os.check("Ostream& operator<<(Ostream&, const Matrix&)");

    return os;
}

// ************************************************************************* //


alue tags for the EC2 Transit Gateway Connect. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        /// </summary>
        public InputMap<string> Tags
        {
            get => _tags ?? (_tags = new InputMap<string>());
            set => _tags = value;
        }

        [Input("tagsAll")]
        private InputMap<string>? _tagsAll;

        /// <summary>
        /// A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        /// </summary>
        public InputMap<string> TagsAll
        {
            get => _tagsAll ?? (_tagsAll = new InputMap<string>());
            set => _tagsAll = value;
        }

        /// <summary>
        /// Boolean whether the Connect should be associated with the EC2 Transit Gateway association default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
        /// </summary>
        [Input("transitGatewayDefaultRouteTableAssociation")]
        public Input<bool>? TransitGatewayDefaultRouteTableAssociation { get; set; }

        /// <summary>
        /// Boolean whether the Connect should propagate routes with the EC2 Transit Gateway propagation default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: `true`.
        /// </summary>
        [Input("transitGatewayDefaultRouteTablePropagation")]
        public Input<bool>? TransitGatewayDefaultRouteTablePropagation { get; set; }

        /// <summary>
        /// Identifier of EC2 Transit Gateway.
        /// </summary>
        [Input("transitGatewayId")]
        public Input<string>? TransitGatewayId { get; set; }

        /// <summary>
        /// The underlaying VPC attachment
        /// </summary>
        [Input("transportAttachmentId")]
        public Input<string>? TransportAttachmentId { get; set; }

        public ConnectState()
        {
        }
        public static new ConnectState Empty => new ConnectState();
    }
}


::{convert_group_concat, convert_normal_aggregate_fn_call, convert_subquery_fn};

#[derive(Clone, Debug, Copy)]
pub enum AggregateFunction {
    Average,
    Sum,
    BitAnd,
    BitOr,
    BitXor,
    Count,
    CountDistinct,
    GroupConcat,
    Max,
    Min,
}

unsafe impl Send for AggregateFunction {}
unsafe impl Sync for AggregateFunction {}

#[derive(Clone, Debug, Copy)]
pub enum SubqueryFunction {
    Any,
    All,
}

unsafe impl Send for SubqueryFunction {}
unsafe impl Sync for SubqueryFunction {}

#[derive(Clone, Debug, Copy)]
pub enum Function {
    Aggregate(AggregateFunction),
    Subquery(SubqueryFunction),
}

unsafe impl Send for Function {}
unsafe impl Sync for Function {}

#[derive(Clone, Debug)]
pub enum FunctionCall {
    Aggregate(AggregateFunctionCall),
    Subquery(SubqueryFunctionCall),
}

#[derive(Clone, Debug)]
pub enum AggregateFunctionCall {
    Normal(NormalAggregateFunctionCall),
    GroupConcat(GroupConcatFunctionCall),
}

#[derive(Clone, Debug)]
pub struct NormalAggregateFunctionCall {
    pub function: AggregateFunction,
    pub param: Expr,
}

unsafe impl Send for NormalAggregateFunctionCall {}
unsafe impl Sync for NormalAggregateFunctionCall {}

#[derive(Clone, Debug)]
pub struct GroupConcatFunctionCall {
    pub expr: Expr,
    pub order_by: Vec<OrderByItem>,
    pub separator: Option<String>,
}

unsafe impl Send for GroupConcatFunctionCall {}
unsafe impl Sync for GroupConcatFunctionCall {}

#[derive(Clone, Debug)]
pub struct SubqueryFunctionCall {
    pub function: SubqueryFunction,
    pub subquery: SelectQuery,
}

unsafe impl Send for SubqueryFunctionCall {}
unsafe impl Sync for SubqueryFunctionCall {}

impl Display for NormalAggregateFunctionCall {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        match self.function {
            AggregateFunction::Average => write!(f, "AVG({})", self.param),
            AggregateFunction::Sum => write!(f, "Sum({})", self.param),
            AggregateFunction::BitAnd => write!(f, "BIT_AND({})", self.param),
            AggregateFunction::BitOr => write!(f, "BIT_OR({})", self.param),
            AggregateFunction::BitXor => write!(f, "BIT_XOR({})", self.param),
            AggregateFunction::Count => write!(f, "COUNT({})", self.param),
            AggregateFunction::CountDistinct => write!(f, "COUNT(DISTINCT {})", self.param),
            AggregateFunction::Max => write!(f, "MAX({})", self.param),
            AggregateFunction::Min => write!(f, "MIN({})", self.param),
            _ => unreachable!("unsupported aggregate function"),
        }
    }
}

impl ToSql for NormalAggregateFunctionCall {
    fn to_sql(&self, state: &mut QueryBuildState) -> std::fmt::Result {
        convert_normal_aggregate_fn_call(self, state)
    }
}

impl<'q, DB: Database> BindArgs<'q, DB> for NormalAggregateFunctionCall
where
    DatabaseValue: for<'p> AppendToArgs<'p, DB>,
{
    fn bind_args(self, query: QueryOf<'q, DB>) -> QueryOf<'q, DB> {
        self.param.bind_args(query)
    }
}

imp


:{{ input.amount }} ZRZ

                    {% endif %}

                {% endfor %}
            {% else %}

No hay entradas (transacción coinbase).

            {% endif %}

Salidas ({{ transaction.outputs | length }})

            {% for output in transaction.outputs %}

 {# Añadir card a cada item de entrada/salida para mejor visualización #}

Monto:{{ output.amount }} ZRZ

ScriptPubKey (Hex):{{ output.script_pub_key_hex | truncate(length=30) }}...

                {% if output.address %}

Dirección:{{ output.address | truncate(length=30) }}...

                {% endif %}

            {% endfor %}

        {% else %}

Transacción no encontrada o error al cargar.

Asegúrate de que la TXID es correcta o que el demonio está indexando transacciones.

        {% endif %}

<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Transacción {{ txid }} - Zarza Explorer</title>
    <link rel="stylesheet" href="/static/style.css">

← Volver al inicio

Detalles de la Transacción

        {% if transaction %}

TXID:{{ transaction.txid }}

WTXID:{{ transaction.wtxid }}

Versión:{{ transaction.version }}

Locktime:{{ transaction.lock_time }}

            {% if transaction.is_coinbase %}

Tipo:Coinbase

            {% else %}

Tipo:Estándar

Valor Total Entrada:{{ transaction.total_input_value }} ZRZ

Valor Total Salida:{{ transaction.total_output_value }} ZRZ

Tarifa:{{ transaction.fee }} ZRZ

            {% endif %}
            {% if transaction.block_height == 0 %}

Estado:PENDIENTE (Mempool)

            {% else %}

Confirmado en Bloque:{{ transaction.block_height }}

                {# Para calcular confirmaciones en el cliente, se necesitaría la altura actual de la cadena

Confirmaciones:{{ info.current_height - transaction.block_height + 1 }}

                #}
            {% endif %}

Entradas ({{ transaction.inputs | length }})

            {% if transaction.inputs | length > 0 %}
                {% for input


ngsPageController>();
        controller.setFinalGradeType(type);
      },
    );
  }
}
// Copyright (c) 2024 Sharezone UG (haftungsbeschränkt)
// Licensed under the EUPL-1.2-or-later.
//
// You may obtain a copy of the Licence at:
// https://joinup.ec.europa.eu/software/page/eupl
//
// SPDX-License-Identifier: EUPL-1.2

import 'package:crash_analytics/crash_analytics.dart';
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
import 'package:flutter/material.dart';
import 'package:sharezone/grades/grades_service/grades_service.dart';
import 'package:sharezone/grades/pages/create_term_page/create_term_analytics.dart';
import 'package:sharezone/grades/pages/create_term_page/create_term_page_view.dart';

class CreateTermPageController extends ChangeNotifier {
  final GradesService gradesService;
  final CreateTermAnalytics analytics;
  final CrashAnalytics crashAnalytics;

  CreateTermPageView view = const CreateTermPageView(
    name: null,
    isActiveTerm: true,
    nameErrorText: null,
    gradingSystem: GradingSystem.oneToSixWithPlusAndMinus,
  );

  CreateTermPageController({
    required this.gradesService,
    required this.analytics,
    required this.crashAnalytics,
  });

  void setName(String name) {
    view = view.copyWith(name: name);
    _validateName();
    notifyListeners();
  }

  void _validateName() {
    if (view.name == null || view.name!.isEmpty) {
      view = view.copyWith(nameErrorText: () => 'Bitte gib einen Namen ein.');
    } else {
      view = view.copyWith(nameErrorText: () => null);
    }
  }

  void setIsCurrentTerm(bool isCurrentTerm) {
    view = view.copyWith(isActiveTerm: isCurrentTerm);
    notifyListeners();
  }

  Future<void> save() async {
    _validateName();
    if (!view.isNameValid) {
      throw InvalidTermNameException();
    }

    try {
      gradesService.addTerm(
        name: view.name!,
        isActiveTerm: view.isActiveTerm,
        finalGradeType: GradeType.schoolReportGrade.id,
        gradingSystem: view.gradingSystem,
        gradeTypeWeights: IMap({
          GradeType.writtenExam.id: const Weight.percent(50),
          GradeType.oralParticipation.id: const Weight.percent(50),
        }),
      );
      analytics.logCreateTerm();
    } catch (e, s) {
      crashAnalytics.recordError('Could not save term: $e', s);
      throw CouldNotSaveTermException('$e');
    }
  }

  void setGradingSystem(GradingSystem system) {
    view = view.copyWith(gradingSystem: system);
    notifyListeners();
  }
}

sealed class TermException implements Exception {}

class CouldNotSaveTermException implements TermException {
  final String message;

  CouldNotSaveTermException(this.message);
}

class InvalidTermNameException implements TermException {
  InvalidTermNameException();
}
// Copyright (c) 2024 Sharezone UG (haftungsbeschränkt)
// Licensed under the EUPL-1.2-or-later.
//
// You may obtain a copy of the Licence at:
// https://joinup.ec.europa.eu/software/page/eupl
//
// SPDX-License-Identifier: EUPL-1.2

import 'package:flutter/material.dart';
import 'package:sharezone/grades/models/term_id.dart';
import 'package:sharezone/grades/pages/grades_view.dart';
import 'package:sharezone/grades/pages/term_settings_page/term_settings_page.dart';

class TermTile extends StatelessWidget {
  const TermTile({
    super.key,
    required this.displayName,
    required this.avgGrade,
    required this.title,
    required this.termId,
    this.showEditButton = true,
  });

  final TermId termId;
  final bool showEditButton;
  final String title;
  final Display


= "Das Bellen der Gnolle";
		   ["objective"] = "Tötet 10 Schläger der Rotkammgnolle und 8 Mystiker der Rotkammgnolle und kehrt anschließend zu Verner Gutmark zurück.";
		};
		[125] = {
		   ["name"] = "Die verlorenen Werkzeuge";
		   ["objective"] = "Großknecht Oslow aus Seenhain möchte, dass Ihr seinen Werkzeugkasten vom Grunde des Immerruhsees heraufholt.";
		};
		[126] = {
		   ["name"] = "Geheul in den Hügeln";
		   ["objective"] = "Bringt Jaulers Tatze nach Seenhain zu Verner Gutmark.";
		};
		[127] = {
		   ["name"] = "Fischhandel";
		   ["objective"] = "Bringt 10 gefleckte Sonnenfische nach Seenhain zu Dockmeister Baren.";
		};
		[128] = {
		   ["name"] = "Kopfgeld auf den Schwarzfelsklan";
		   ["objective"] = "Tötet 15 Helden des Schwarzfels, dann erhaltet Ihr von Wache Howe aus Seenhain eine Belohnung.";
		};
		[129] = {
		   ["name"] = "Ein geschenktes Mittagessen";
		   ["objective"] = "Bringt Parkers Mittagessen zu Wache Parker. Er ist auf der Straße nach Dunkelhain auf Patrouille.";
		};
		[130] = {
		   ["name"] = "Besuch im Kräuterladen";
		   ["objective"] = "Sprecht mit der Kräuterkundigen des Rotkammgebirges, Martie Jainrose.";
		};
		[131] = {
		   ["name"] = "Narzissen für eine Dame";
		   ["objective"] = "Gebt Darcy den Narzissenstrauß.";
		};
		[132] = {
		   ["name"] = "Die Bruderschaft der Defias";
		   ["objective"] = "Bringt Wileys Nachricht nach Westfall zu Gryan Starkmantel.";
		};
		[133] = {
		   ["name"] = "Ein Ghulbildnis";
		   ["objective"] = "Sammelt 7 Ghulrippen und bringt sie zu Calvinius in seiner Hütte.";
		};
		[134] = {
		   ["name"] = "Ogerdiebe";
		   ["objective"] = "Bringt Calvinius' Kiste zu Calvinius.";
		};
		[135] = {
		   ["name"] = "Die Bruderschaft der Defias";
		   ["objective"] = "Bringt Wileys Nachricht nach Sturmwind zu Mathias Shaw.";
		};
		[136] = {
		   ["name"] = "Käpt'n Sanders' versteckter Schatz";
		   ["objective"] = "Findet Käpt'n Sanders Schließkiste und durchsucht sie, um den nächsten Hinweis zu erhalten.";
		};
		[138] = {
		   ["name"] = "Käpt'n Sanders' versteckter Schatz";
		   ["objective"] = "Findet das alte Fass in der Nähe des verfallenen Kamins und durchsucht es nach Eurem nächsten Hinweis.";
		};
		[139] = {
		   ["name"] = "Käpt'n Sanders' versteckter Schatz";
		   ["objective"] = "Durchsucht den leeren Henkelkrug neben der Windmühle nach dem nächsten Hinweis.";
		};
		[140] = {
		   ["name"] = "Käpt'n Sanders' versteckter Schatz";
		   ["objective"] = "Findet Käpt'n Sanders' Truhe und öffnet sie. Darin befindet sich Eure Belohnung.";
		};
		[141] = {
		   ["name"] = "Die Bruderschaft der Defias";
		   ["objective"] = "Bringt Shaws Bericht nach Westfall zu Gryan Starkma


.isAnalContentEnabled() && Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.ANUS, true)) {
									exposeMap.putIfAbsent(Main.game.getPlayer(), new ArrayList<>());
									exposeMap.get(Main.game.getPlayer()).add(CoverableArea.ANUS);
								}

								return exposeMap;
							}
						},
						null,
						null,
						AFTER_LILAYA_AND_ROSE_AS_DOMS,
						UtilText.parseFromXMLFile("places/dominion/lilayasHome/lilayasRoom", "LILAYA_AND_ROSE_AS_DOMS")) {
					@Override
					public List<InitialSexActionInformation> getInitialSexActions() {
						return Util.newArrayListOfValues(
								Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.MOUTH, true)
									?new InitialSexActionInformation(Main.game.getPlayer(), Main.game.getNpc(Lilaya.class), TongueVagina.CUNNILINGUS_START, false, true)
									:null,
								Main.game.getPlayer().hasVagina() && Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.VAGINA, true)
									?new InitialSexActionInformation(Main.game.getNpc(Rose.class), Main.game.getPlayer(), PenisVagina.PENIS_FUCKING_START, false, true)
									:(Main.game.isAnalContentEnabled() && Main.game.getPlayer().isAbleToAccessCoverableArea(CoverableArea.ANUS, true)
										?new InitialSexActionInformation(Main.game.getNpc(Rose.class), Main.game.getPlayer(), PenisAnus.PENIS_FUCKING_START, false, true)
										:null));
					}
					@Override
					public void effects() {
						if(Main.game.getNpc(Rose.class).getClothingInSlot(InventorySlot.GROIN)!=null) {
							Main.game.getNpc(Rose.class).unequipClothingIntoVoid(Main.game.getNpc(Rose.class).getClothingInSlot(InventorySlot.GROIN), true, Main.game.getNpc(Rose.class));
						}
						Main.game.getNpc(Rose.class).displaceClothingForAccess(CoverableArea.PENIS, null);
						Main.game.getNpc(Rose.class).equipClothingFromNowhere(Main.game.getItemGen().generateClothing("innoxia_bdsm_penis_strapon", PresetColour.CLOTHING_PURPLE_DARK, false), true, Main.game.getNpc(Rose.class));
					}
				};

			} else if(index==2) {
				return new ResponseSex("Lilaya's cock", "Tell Rose that you want Lilaya to grow a cock for you to suck.",
						true, false,
						new SMAllFours(
								Util.newHashMapOfValues(
										new Value<>(Main.game.getNpc(Rose.class), SexSlotAllFours.BEHIND),
										new Value<>(Main.game.getNpc(Lilaya.class), SexSlotAllFours.IN_FRONT)),
								Util.newHashMapOfValues(
										new Value<>(Main.game.getPlayer(), SexSlotAllFours.ALL_FOURS))) {
							@Override
							public boolean isPartnerWantingToStopSex(GameCharacter partner) {
								return partner.equals(Main.game.getNpc(Rose.class)) && Main.sex.isSatisfiedFromOrgasms(Main.game.getNpc(Rose.class), true) && Main.sex.isSatisfiedFromOrgasms(Main.game.getNpc(Lilaya.class), true);
							}
							@Override
							public SexType getForeplayPreference(GameCharacter character, GameCharacter targetedCharacter) {
								if(targetedCharacter.isPlayer()) {
									return getMainSexPreference(character, targetedCharacter);
								}
								return super.getForeplayPreference(character, targetedCharacter);
							}
							@Override
							public SexType getMainSexPreference(GameCharacter character, GameC


// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using MSAst = System.Linq.Expressions;

using System;
using System.Diagnostics;
using System.Dynamic;

using Microsoft.Scripting;
using Microsoft.Scripting.Runtime;

using IronPython.Runtime.Binding;
using IronPython.Runtime.Operations;

using AstUtils = Microsoft.Scripting.Ast.Utils;

namespace IronPython.Compiler.Ast {
    using Ast = MSAst.Expression;

    public class NameExpression : Expression {
        private readonly string _name;
        private PythonReference _reference;
        private bool _assigned;                  // definitely assigned

        public NameExpression(string name) {
            _name = name;
        }

        public string Name {
            get { return _name; }
        }

        internal PythonReference Reference {
            get { return _reference; }
            set { _reference = value; }
        }

        internal bool Assigned {
            get { return _assigned; }
            set { _assigned = value; }
        }

        public override string ToString() {
            return base.ToString() + ":" + _name;
        }

        public override MSAst.Expression Reduce() {
            MSAst.Expression read;

            if (_reference.PythonVariable == null) {
                read = Ast.Call(
                    AstMethods.LookupName,
                    Parent.LocalContext,
                    Ast.Constant(_name)
                );
            } else {
                read = Parent.GetVariableExpression(_reference.PythonVariable);
            }

            if (!_assigned && !(read is IPythonGlobalExpression)) {
                read = Ast.Call(
                    AstMethods.CheckUninitialized,
                    read,
                    Ast.Constant(_name)
                );
            }

            return read;
        }

        internal override MSAst.Expression TransformSet(SourceSpan span, MSAst.Expression right, PythonOperationKind op) {
            MSAst.Expression assignment;

            if (op != PythonOperationKind.None) {
                right = GlobalParent.Operation(
                    typeof(object),


ARCH_TESTS +
    LEVEL_3_USER_LDIF__SEARCH_TESTS;

  // ou=inner,ou=acitest,dc=example,dc=com and everything under it
  private static final String INNER_OU_FULL_LDIF__SEARCH_TESTS =
    INNER_OU_LDIF__SEARCH_TESTS +
    LEVEL_2_USER_LDIF__SEARCH_TESTS +
    LEAF_OU_FULL_LDIF__SEARCH_TESTS;

  // ou=acitest,dc=example,dc=com and everything under it
  private static final String BASE_OU_FULL_LDIF__SEARCH_TESTS =
    BASE_OU_LDIF__SEARCH_TESTS  +
    LEVEL_1_USER_LDIF__SEARCH_TESTS +
    INNER_OU_FULL_LDIF__SEARCH_TESTS;

  private static final String BASIC_LDIF__SEARCH_TESTS =
          ADMIN_LDIF__SEARCH_TESTS +
          USER_LDIF__SEARCH_TESTS +
          BASE_OU_FULL_LDIF__SEARCH_TESTS;

   private static final String BASIC_LDIF__GROUP_SEARCH_TESTS =
            ADMIN_LDIF__SEARCH_TESTS +
            USER_LDIF__SEARCH_TESTS +
            BASE_OU_LDIF__SEARCH_TESTS  +
            MANAGER__SEARCH_TESTS +
            MANAGER_NEW__SEARCH_TESTS +
            SALES__SEARCH_TESTS +
            SALES_USER_1__SEARCH_TESTS +
            SALES_USER_2__SEARCH_TESTS +
            SALES_USER_3__SEARCH_TESTS +
            GROUP_LDIF__SEARCH_TESTS +
            GROUP_1_LDIF__SEARCH_TESTS +
            GROUP_2_LDIF__SEARCH_TESTS +
            LEVEL_1_USER_LDIF__SEARCH_TESTS +
            PROXY_USER_LDIF__SEARCH_TESTS +
            INNER_OU_FULL_LDIF__SEARCH_TESTS;

  private static final String NO_ACIS_LDIF = "";

  // ------------------------------------------------------------
  //  THESE ALL WILL RETURN NO RESULTS FOR ADMINS AND ANONYMOUS
  // ------------------------------------------------------------

  private static final String ALLOW_ALL_BASE_DENY_ALL_BASE_LDIF =
          makeAddAciLdif(OU_BASE_DN, ALLOW_ALL_TO_ALL) +
          makeAddAciLdif(OU_BASE_DN, DENY_ALL_TO_ALL);

  private static final String ALLOW_ALL_BASE_DENY_READ_BASE_LDIF =
          makeAddAciLdif(OU_BASE_DN, ALLOW_ALL_TO_ALL) +
          makeAddAciLdif(OU_BASE_DN, DENY_READ_TO_ALL);

  private static final String ALLOW_READ_BASE_DENY_ALL_BASE_LDIF =
          makeAddAciLdif(OU_BASE_DN, ALLOW_READ_TO_ALL) +
          makeAddAciLdif(OU_BASE_DN, DENY_ALL_TO_ALL);

  private static final String ALLOW_READ_BASE_DENY_ALL_INNER_LDIF =
          makeAddAciLdif(OU_BASE_DN, ALLOW_READ_TO_ALL) +
          makeAddAciLdif(OU_INNER_DN, DENY_ALL_TO_ALL);

  private static final String ALLOW_ALL_BASE_DENY_READ_INNER_LDIF =
          makeAddAciLdif(OU_BASE_DN, ALLOW_READ_TO_ALL) +
          makeAddAciLdif(OU_INNER_DN, DENY_ALL_TO_ALL);

  private stati


//
// DownloadTransfer.h
//
// Copyright (c) Shareaza Development Team, 2002-2014.
// This file is part of SHAREAZA (shareaza.sourceforge.net)
//
// Shareaza is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2 of
// the License, or (at your option) any later version.
//
// Shareaza is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Shareaza; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//

#pragma once

#include "Transfer.h"
#include "FileFragments.hpp"

class CDownload;
class CDownloadSource;

typedef std::pair< QWORD, QWORD >	blockPair;

class CDownloadTransfer abstract : public CTransfer
{
// Construction
public:
	CDownloadTransfer(CDownloadSource* pSource, PROTOCOLID nProtocol);
	virtual ~CDownloadTransfer();

// Attributes
public:
	CDownloadTransfer*	m_pDlPrev;
	CDownloadTransfer*	m_pDlNext;

	DWORD				m_nQueuePos;
	DWORD				m_nQueueLen;
	CString				m_sQueueName;

	QWORD				m_nDownloaded;

	bool				m_bWantBackwards;
	bool				m_bRecvBackwards;	// Got "Content-Encoding: backwards"
protected:
	CDownload*					m_pDownload;
	CDownloadSource*			m_pSource;
	CTimeAverage< DWORD, 2000 >	m_AverageSpeed;
	std::vector< bool >			m_pAvailable;

	DWORD				m_tSourceRequest;		// When source request was last sent (ms)
	Fragments::Queue	m_oRequested;			// List of requested fragments (eDonkey2K and BitTorrent)

// Operations
public:
	void				SetState(int nState);
	CDownload*			GetDownload() const;	// Get owner download
	CDownloadSource*	GetSource() const;		// Get associated source
	void				DrawStateBar(CDC* pDC, CRect* prcBar, COLORREF crFill, bool bTop = false) const;

protected:
	bool				ChunkifyRequest(QWORD* pnOffset, QWORD* pnLength, DWORD nChunk, BOOL bVerifyLock) const;
	bool				SelectFragment(const Fragments::List& oPossible, QWORD& nOffset, QWORD& nLength, bool bEndGame = false) const;
private:
	blockPair			SelectBlock(const Fragments::List& oPossible, const std::vector< bool >& pAvailable, bool bEndGame) const;
	void				CheckPart(QWORD* nPart, QWORD nPartBlock, QWORD* nRange, QWORD& nRangeBlock, QWORD* nBestRange) const;
	void				CheckRange(QWORD* nRange, QWORD* nBestRange) const;

// Overides
public:
	virtual BOOL	Initiate() = 0;
	virtual void	Close(TRISTATE bKeepSource, DWORD nRetryAfter = 0);
	virtual void	Boost();
	virtual DWORD	GetAverageSpeed();
	virtual DWORD	GetMeasuredSpeed();
	virtual BOOL	SubtractRequested(Fragments::List& ppFragments) const = 0;
	virtual bool	UnrequestRange(QWORD /*nOffset*/, QWORD /*nLength*/, bool /* bSendCancel */ = true);
	virtual CString	GetStateText(BOOL bLong);
	virtual BOOL	OnRun();
protected:
	virtual bool	SendFragmentRequests() {return false;}/* = 0*/;
};

enum
{
	dtsNull, dtsKeepSource, dtsConnecting, dtsRequesting, dtsHeaders, dtsDownloading,
	dtsFlushing, dtsTiger, dtsHashset, dtsMetadata, dtsBusy, dtsEnqueue, dtsQueued,
	dtsTorrent,

	dtsCountAll = -1,
	dtsCountNotQueued = -2,
	dtsCountNotConnecting = -3,
	dtsCountTorrentAndActive = -4
};


se; // Clear flag
        } else {
          stream.skipToEnd(); // Rest of line is string
        }
        state.justMatchedKeyword = false;
        return "string"; // Token style
      } else if (stream.sol() && stream.eatSpace()) {
        if (stream.match(keyword_regex1)) {
          state.justMatchedKeyword = true;
          stream.eatSpace();
          return "keyword";
        }
        if (stream.match(html_regex1) || stream.match(html_regex2)) {
          state.justMatchedKeyword = true;
          return "variable";
        }
      } else if (stream.sol() && stream.match(keyword_regex1)) {
        state.justMatchedKeyword = true;
        stream.eatSpace();
        return "keyword";
      } else if (stream.sol() && (stream.match(html_regex1) || stream.match(html_regex2))) {
        state.justMatchedKeyword = true;
        return "variable";
      } else if (stream.eatSpace()) {
        state.justMatchedKeyword = false;
        if (stream.match(keyword_regex3) && stream.eatSpace()) {
          state.justMatchedKeyword = true;
          return "keyword";
        }
      } else if (stream.match(symbol_regex1)) {
        state.justMatchedKeyword = false;
        return "atom";
      } else if (stream.match(open_paren_regex)) {
        state.afterParen = true;
        state.justMatchedKeyword = true;
        return "def";
      } else if (stream.match(close_paren_regex)) {
        state.afterParen = false;
        state.justMatchedKeyword = true;
        return "def";
      } else if (stream.match(keyword_regex2)) {
        state.justMatchedKeyword = true;
        return "keyword";
      } else if (stream.eatSpace()) {
        state.justMatchedKeyword = false;
      } else {
        stream.next();
        if (state.justMatchedKeyword) {
          return "property";
        } else if (state.afterParen) {
          return "property";
        }
      }
      return null;
    }
  };
});

CodeMirror.defineMIME('text/x-jade', 'jade');
/**
* @file smartymixed.js
* @brief Smarty Mixed Codemirror mode (Smarty + Mixed HTML)
* @author Ruslan Osmanov <rrosmanov at gmail dot com>
* @version 3.0
* @date 05.07.2013
*/
CodeMirror.defineMode("smartymixed", function(config) {
  var settings, regs, helpers, parsers,
  htmlMixedMode = CodeMirror.getMode(config, "htmlmixed"),
  smartyMode = CodeMirror.getMode(config, "smarty"),

  settings = {
    rightDelimiter: '}',
    leftDelimiter: '{'
  };

  if (config.hasOwnProperty("leftDelimiter")) {
    settings.leftDelimiter = config.leftDelimiter;
  }
  if (config.hasOwnProperty("rightDelimiter")) {
    settings.rightDelimiter = config.rightDelimiter;
  }

  regs = {
    smartyComment: new RegExp("^" + settings.leftDelimiter + "\\*"),
    literalOpen: new RegExp(settings.leftDelimiter + "literal" + settings.rightDelimiter),
    literalClose: new RegExp(settings.leftDelimiter + "\/literal" + settings.rightDelimiter),
    hasLeftDelimeter: new RegExp(".*" + settings.leftDelim


     Comms.Send(new ErrorMessage
            {
                Message = $"Fatal error: {e}. {e.InnerResult?.AdditionalInfo}"
            });
            return 1;
        }
        catch (Exception e)
        {
            Comms.Send(new ErrorMessage
            {
                Message = $"Fatal error: {e}"
            });
            return 1;
        }

        Comms.Send(new ReadyMessage());

        while (!source.Token.IsCancellationRequested)
        {
            await foreach (var message in Comms.ListenToInput(source.Token))
            {
                if (message is ShutdownMessage)
                {
                    source.Cancel();
                }
                else if (message is ChangeValueMessage ch)
                {
                    try
                    {
                        server.NodeManager.UpdateValue(ch);
                    }
                    catch (Exception ex)
                    {
                        Comms.Send(new ErrorMessage
                        {
                            Message = $"Fatal error setting value: {ex}"
                        });
                        return 1;
                    }
                }
            }
        }

        return 0;
    }
}


      if (inst->dst.file == VGRF && split_grf[inst->dst.nr] &&
          inst->dst.offset / REG_SIZE != 0) {
         inst->dst.nr = (new_virtual_grf[inst->dst.nr] +
                         inst->dst.offset / REG_SIZE - 1);
         inst->dst.offset %= REG_SIZE;
      }
      for (int i = 0; i < 3; i++) {
         if (inst->src[i].file == VGRF && split_grf[inst->src[i].nr] &&
             inst->src[i].offset / REG_SIZE != 0) {
            inst->src[i].nr = (new_virtual_grf[inst->src[i].nr] +
                                inst->src[i].offset / REG_SIZE - 1);
            inst->src[i].offset %= REG_SIZE;
         }
      }
   }
   invalidate_analysis(DEPENDENCY_INSTRUCTION_DETAIL | DEPENDENCY_VARIABLES);
}

void
vec4_visitor::dump_instruction_to_file(const elk_backend_instruction *be_inst, FILE *file) const
{
   const vec4_instruction *inst = (const vec4_instruction *)be_inst;

   if (inst->predicate) {
      fprintf(file, "(%cf%d.%d%s) ",
              inst->predicate_inverse ? '-' : '+',
              inst->flag_subreg / 2,
              inst->flag_subreg % 2,
              elk_pred_ctrl_align16[inst->predicate]);
   }

   fprintf(file, "%s(%d)", elk_instruction_name(&compiler->isa, inst->opcode),
           inst->exec_size);
   if (inst->saturate)
      fprintf(file, ".sat");
   if (inst->conditional_mod) {
      fprintf(file, "%s", elk_conditional_modifier[inst->conditional_mod]);
      if (!inst->predicate &&
          (devinfo->ver < 5 || (inst->opcode != ELK_OPCODE_SEL &&
                                inst->opcode != ELK_OPCODE_CSEL &&
                                inst->opcode != ELK_OPCODE_IF &&
                                inst->opcode != ELK_OPCODE_WHILE))) {
         fprintf(file, ".f%d.%d", inst->flag_subreg / 2, inst->flag_subreg % 2);
      }
   }
   fprintf(file, " ");

   switch (inst->dst.file) {
   case VGRF:
      fprintf(file, "vgrf%d", inst->dst.nr);
      break;
   case FIXED_GRF:
      fprintf(file, "g%d", inst->dst.nr);
      break;
   case MRF:
      fprintf(file, "m%d", inst->dst.nr);
      break;
   case ARF:
      switch (inst->dst.nr) {
      case ELK_ARF_NULL:
         fprintf(file, "null");
         break;
      case ELK_ARF_ADDRESS:
         fprintf(file, "a0.%d", inst->dst.subnr);
         break;
      case ELK_ARF_ACCUMULATOR:
         fprintf(file, "acc%d", inst->dst.subnr);
         break;
      case ELK_ARF_FLAG:
         fprintf(file, "f%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
         break;
      default:
         fprintf(file, "arf%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
         break;
      }
      break;
   case BAD_FILE:
      fprintf(file, "(null)");
      break;
   case IMM:
   case ATTR:
   case UNIFORM:
      unreachable("not reached");
   }
   if (inst->dst.off


ں میں ان کی کیا شرکت ہے '؟ (اگر یہ نہیں بتا سکتے تو ان سے پوچھو) کیا ہم نے انہیں کوئی تحریر لکھ کر دی ہے جس کی بنا پر یہ (اپنے اس شرک کے لیے) کوئی صاف سند رکھتے ہوں؟ نہیں، بلکہ یہ ظالم ایک دوسرے کو محض فریب کے جھانسے دیے جا رہے ہیں",
  },
  {
    "surah_number": 35,
    "verse_number": 41,
    "content":
        "حقیقت یہ ہے کہ اللہ ہی ہے جو آسمانوں اور زمین کو ٹل جانے سے روکے ہوئے ہے، اور اگر وہ ٹل جائیں تو اللہ کے بعد کوئی دوسرا انہیں تھامنے والا نہیں ہے بے شک اللہ بڑا حلیم اور درگزر فرمانے والا ہے",
  },
  {
    "surah_number": 35,
    "verse_number": 42,
    "content":
        "یہ لوگ کڑی کڑی قسمیں کھا کر کہا کرتے تھے کہ اگر کوئی خبردار کرنے والا ان کے ہاں آ گیا ہوتا تو یہ دنیا کی ہر دوسری قوم سے بڑھ کر راست رو ہوتے مگر جب خبردار کرنے والا ان کے پاس آگیا تو اس کی آمد نے اِن کے اندر حق سے فرار کے سوا کسی چیز میں اضافہ نہ کیا",
  },
  {
    "surah_number": 35,
    "verse_number": 43,
    "content":
        "یہ زمین میں اور زیادہ استکبار کرنے لگے اور بری بری چالیں چلنے لگے، حالانکہ بُری چالیں اپنے چلنے والوں ہی کو لے بیٹھتی ہیں اب کیا یہ لوگ اِس کا انتظار کر رہے ہیں کہ پچھلی قوموں کے ساتھ اللہ کا جو طریقہ رہا ہے وہی اِن کے ساتھ بھی برتا جائے؟ یہی بات ہے تو تم اللہ کے طریقے می


68b-d4aa-5ed9-a289-802a00f0485d"
	m["/angel-or-sex-doll/"] = "2c408b12-dc91-5072-b309-f6113af5b3b0"
	m["/fucking-in-her-stripper-heels/"] = "a2090672-7b15-5665-89c4-08ec04efd6b5"
	m["/in-front-of-the-mirror-with-stacy-cruz/"] = "da397ffd-67fb-563f-b4e7-16b2b8f43887"
	m["/hot-heavy/"] = "11fb0bfd-b897-54de-bbb9-03f8697b6eae"
	m["/summer-hart-then-pushes-you-to-the-edge/"] = "b49f59fc-db02-553b-900a-51bca453c1b8"
	m["/bex-white/"] = "99161255-fcee-59b6-aac3-15841a15eb32"
	m["/epic-veronica/"] = "0e0933d1-8352-51cd-8bfe-640f4c4ed77f"
	m["/vivid-masturbation-of-redhead-girl/"] = "0bbb3cbd-bd49-5a78-abf3-f275acc5aae8"
	m["/cum-inside-me-scarlett-alexis/"] = "9ceff258-2a09-588c-b167-abf31a5f6cdb"
	m["/super-hero-parodies/"] = "b5d85695-29da-5ccd-97e6-be2bf992a1b3"
	m["/the-indoor-activities/"] = "98f9796e-6a16-57b2-9271-0885410d6756"
	m["/viola-costas-creampie/"] = "a11fe9a9-6e82-5873-8050-86f1cc144225"
	m["/rwby-weiss-hanjob-bj/"] = "3b098fd4-f065-5813-ad33-046f4a5831aa"
	m["/youre-my-doll/"] = "93d43ae7-7214-51ce-ae7b-176edc0bbeab"
	m["/lindsay-maddox-your-prince-is-my-daily-fucker/"] = "ee352939-2cd2-5273-897f-0fad58cfe006"
	m["/playful-girls/"] = "2bd65827-a724-503c-a7f0-2c11ef87bc52"
	m["/time-to-pay-maddie-perez/"] = "41f26080-bbb8-5c0f-a99c-b2c7cc49a503"
	m["/i-am-lola-morena-model-of-the-year-edition/"] = "8360dd73-a1c8-5e81-9375-e97a0f347b3f"
	m["/hot-asian-girls-threesome-fuckfest/"] = "4894fa60-670d-54f9-bbac-6ccc6cf30f5a"
	m["/kyra-loves-double-hard-dildo-penetration/"] = "000988c6-ebc6-53c3-8610-590780c23b88"
	m["/taylor-made/"] = "2237cd40-6879-52ca-80a3-7c9a077103e3"
	m["/sex-therapy-kylie-k/"] = "23d7d516-7ab8-54cb-b6ea-88d30ee7cfa7"
	m["/the-rebe


llm.Content {
	lc := &llm.Content{
		Role:  llm.Role(c.Role),
		Parts: make([]llm.Segment, 0, len(c.Parts)),
	}

	for i := range c.Parts {
		if c.Parts[i].Text != "" {
			lc.Parts = append(lc.Parts, llm.Text(c.Parts[i].Text))
		} else if c.Parts[i].InlineData != nil {
			lc.Parts = append(lc.Parts, &llm.InlineData{
				MIMEType: c.Parts[i].InlineData.MIMEType,
				Data:     c.Parts[i].InlineData.Data,
			})
		} else if c.Parts[i].FunctionCall != nil {
			lc.Parts = append(lc.Parts, &llm.FunctionCall{
				Name: c.Parts[i].FunctionCall.Name,
				ID:   callid.OpenAICallID(),
				Args: c.Parts[i].FunctionCall.Args,
			})
		} else if c.Parts[i].FunctionResponse != nil {
			lc.Parts = append(lc.Parts, &llm.FunctionResponse{
				Name:    c.Parts[i].FunctionResponse.Name,
				ID:      callid.OpenAICallID(),
				Content: c.Parts[i].FunctionResponse.Response,
			})
		}
	}

	return lc
}

func convertGenerativeLanguageFinishReason(stop_reason genai.FinishReason) llm.FinishReason {
	switch stop_reason {
	case genai.FinishReasonStop:
		return llm.FinishReasonStop
	case genai.FinishReasonMaxTokens:
		return llm.FinishReasonMaxTokens
	case genai.FinishReasonSafety:
		return llm.FinishReasonSafety
	case genai.FinishReasonRecitation:
		return llm.FinishReasonRecitation
	case genai.FinishReasonOther:
		return llm.FinishReasonUnknown
	}

	return llm.FinishReasonUnknown
}

func (g *generativeLanguageModel) GenerateStream(ctx context.Context, chat *llm.ChatContext, input *llm.Content) *llm.StreamContent {
	if chat == nil {
		chat = &llm.ChatContext{}
	}

	contents := convertContextGenerativeLanguage(chat)
	tools := make([]*genai.FunctionDeclaration, len(chat.Tools))
	for i := range chat.Tools {
		tools[i] = convertFunctionDeclarationGenerativeLanguage(chat.Tools[i])
	}

	config := &genai.GenerateContentConfig{}
	model := g.model

	if g.config.SafetyFilterThreshold != llm.BlockDefault {
		var threshold genai.HarmBlockThreshold = genai.HarmBlockThresholdUnspecified
		switch g.config.SafetyFilterThreshold {
		case llm.BlockNone:
			threshold = genai.HarmBlockThresholdBlockNone
		case llm.BlockDefault, llm.BlockLowAndAbove:
			threshold = genai.HarmBlockThresholdBlockLowAndAbove
		case llm.BlockMediumAndAbove:
			threshold = genai.HarmBlockThresholdBlockMediumAndAbove
		case llm.BlockOnlyHigh:
			threshold = genai.HarmBlockThresholdBlockOnlyHigh
		}

		config.SafetySettings = []*genai.SafetySetting{
			{Category: genai.HarmCategoryHateSpeech, Threshold: threshold},
			{Category: genai.HarmCategoryDangerousContent, Threshold: threshold},
			{Category: genai.HarmCategoryHarassment, Threshold: threshold},
			{Category: genai.HarmCategorySexuallyExplicit, Threshold: threshold},
		}
	}

	if g.config.Temperature != nil {
		config.Temperature = g.config.Temperature
	}

	if g.config.TopK != nil {
		if g.config.TopK != nil {
			config.TopK = ptrify(float32(*g.config.TopK))
		}
	}

	if g.config.TopP != nil {
		config.TopP = g.config.


elicGreaterThan(4),
            Predicates.AnyRelic(),
            Predicates.SpellLessThan(5),
            Predicates.SpellGreaterThan(5),
            Predicates.AnySpell()
        ]
    },
    {
        name: 'Market Setup 5',
        cards: [
            Predicates.GemEquals(2),
            Predicates.GemEquals(3),
            Predicates.GemEquals(4),
            Predicates.RelicEquals(5),
            Predicates.AnyRelic(),
            Predicates.SpellEquals(4),
            Predicates.SpellEquals(5),
            Predicates.SpellEquals(6),
            Predicates.SpellGreaterThan(6)
      ]
    },
    {
        name: 'Market Setup 6',
        cards: [
            Predicates.GemEquals(3),
            Predicates.GemEquals(4),
            Predicates.RelicLessThan(4),
            Predicates.RelicGreaterThan(4),
            Predicates.AnyRelic(),
            Predicates.SpellCostInRangeInclusive(3, 4),
            Predicates.SpellCostInRangeInclusive(5, 6),
            Predicates.SpellCostInRangeInclusive(5, 6),
            Predicates.SpellGreaterThan(6)
        ]
      }
];

export const START_EXPEDITION_MARKET_CONFIGURATION: MarketConfiguration = {
  name: 'Start expedition',
  cards: [
    Predicates.AnyGem(),
    Predicates.AnyGem(),
    Predicates.AnyGem(),
    Predicates.AnyRelic(),
    Predicates.AnyRelic(),
    Predicates.AnySpell(),
    Predicates.AnySpell(),
    Predicates.AnySpell(),
    Predicates.AnySpell()
  ]
};

export const EXPEDITION_WIN_MARKET_CONFIGURATION: MarketConfiguration = {
  name: 'Won expedition battle',
  cards: [
    Predicates.AnyGem(),
    Predicates.AnyRelic(),
    Predicates.AnySpell()
  ]
};

export const EXPEDITION_LOSE_CHOOSE_GEM: MarketConfiguration = {
  name: 'Lost expedition battle and chose gem',
  cards: [
    Predicates.AnyGem(),
  ]
};

export const EXPEDITION_LOSE_CHOOSE_RELIC: MarketConfiguration = {
  name: 'Lost expedition battle and chose relic',
  cards: [
    Predicates.AnyRelic(),
  ]
};

export const EXPEDITION_LOSE_CHOOSE_SPELL: MarketConfiguration = {
  name: 'Lost expedition battle and chose spell',
  cards: [
    Predicates.AnySpell(),
  ]
};
import {
    Alternative,
    Backreference,
    CapturingGroup,
    CharacterClass,
    CharacterClassElement,
    CharacterClassRange,
    Flags,
    Group,
    RegExpLiteral,
    LookaroundAssertion,
    Pattern,
    Quantifier,
} from "./ast"
import { EcmaVersion } from "./ecma-versions"
import { HyphenMinus } from "./unicode"
import { RegExpValidator } from "./validator"

type AppendableNode =
    | Pattern
    | Alternative
    | Group
    | CapturingGroup
    | CharacterClass
    | LookaroundAssertion

const DummyPattern: Pattern = {} as any
const DummyFlags: Flags = {} as any
const DummyCapturingGroup: CapturingGroup = {} as any

class RegExpParserState {
    public readonly strict: boolean
    public readonly ecmaVersion: EcmaVersion
    private _node: AppendableNode = DummyPattern
    private _flags: Flags = DummyFlags
    private _backreferences: Backreference[] = []
    private _capturingGroups: CapturingGroup[] = []

    public source = ""

    public constructor(options?: RegExpParser.Options) {


рь|',
  [11745] = '?|Воин смерча|',
  [11746] = '?|Пустынный грохотун|',
  [11747] = '?|Пустынный яростень|',
  [11754] = '?|Мегги Молот-Шмолот|',
  [11755] = 'A|Харло Торгуместец|In front of the inn, by the road.',
  [11758] = 'B|Анди Линн|Standing on the outskirts of town, next to a bonfire.',
  [11777] = '?|Темнокаменный грохотун|',
  [11778] = '?|Темнокаменный крушитель|',
  [11781] = '?|Желтокаменный сокрушитель|',
  [11782] = '?|Желтокаменный разрушитель|',
  [11783] = '?|Терадримский осколыш|',
  [11784] = '?|Терадримский страж|',
  [11790] = '?|Сатир из племени Тлетворных|',
  [11791] = '?|Плут из племени Тлетворных|',
  [11792] = '?|Тенелов из племени Тлетворных|',
  [11793] = '?|Селебрийская дриада|',
  [11794] = '?|Келебрийская сестра|',
  [11799] = 'B|Таджарри|Standing next to a big wooden archway thing.',
  [11800] = "A|Silva Fil'naveth|You can talk to her to fly to Rut'theran Village.  This is a Druid only flight path.",
  [11801] = 'B|Рабин Сатурна|Inside a long house, standing on the balcony, overlooking the lake.',
  [11802] = 'B|Дендрит Блеск Звезд|Standing upstairs in a house, next to 2 bookshelves.',
  [11803] = '?|Хранитель Экзетер из культа Сумеречного Молота|',
  [11804] = '?|Хранитель Хавунт из культа Сумеречного Молота|',
  [11806] = '?|Часовой Ойнея|',
  [11811] = '?|Нарайн Причудень|',
  [11814] = '?|Кали Ремик|',
  [11820] = '?|Локе Окарр|',
  [11821] = '?|Дарн Цепкохват|',
  [11823] = '?|Варк Боевой Шрам|',
  [11830] = '?|Жрец из племени Хаккари|',
  [11831] = '?|Знахарь из племени Хаккари|',
  [11832] = '?|Хранитель Ремул|',
  [11833] = '?|Рахауро|',
  [11834] = '?|Маур Зловещий Тотем|',
  [11856] = '?|Кайя Плоское Копыто|',
  [11857] = 'H|Макаба Плоское Копыто|In a small camp to the side of the road.',
  [11858] = '?|Грундиг Темное Облако|',
  [11860] = 'H|Землепряд Маггран|Standing next to a stu


using System;
using Server.Mobiles;

namespace Server.Mobiles
{
	[CorpseName( "a leopard corpse" )]
	[TypeAlias( "Server.Mobiles.Snowleopard" )]
	public class SnowLeopard : BaseCreature
	{
		[Constructable]
		public SnowLeopard() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
		{
			Name = "a snow leopard";
			Body = Utility.RandomList( 64, 65 );
			BaseSoundID = 0x73;

			SetStr( 56, 80 );
			SetDex( 66, 85 );
			SetInt( 26, 50 );

			SetHits( 34, 48 );
			SetMana( 0 );

			SetDamage( 3, 9 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 20, 25 );
			SetResistance( ResistanceType.Fire, 5, 10 );
			SetResistance( ResistanceType.Cold, 30, 40 );
			SetResistance( ResistanceType.Poison, 10, 20 );
			SetResistance( ResistanceType.Energy, 20, 30 );

			SetSkill


mounted() { // 一定要记得注销事件监听
    window.removeEventListener('message', this.testEventListener)
  },
}
</script>

效果如下：

隐藏菜单

方式有很多，列举下面2个，在background.js中修改：

autoHideMenuBar: true, // 隐藏windows上面一排的菜单栏，mac上好像没用
frame: false, // 无边框

注册全局快捷键

注册全局快捷键 option + I，任何地方按下后都会给展示页面随�


  a6, a4, 124
    addi  a6, a6, -16                   # a6: dilation_x_offset - 16
    l32i  a7, a4, 128
    addi  a7, a7, -16                   # a7: dilation_y_offset - 16
                                        # a9
                                        # a10
    l32i a11, a4, 148                   # a11: filter_w_rs1_1
    l32i a12, a4, 100                   # a12: c_div_x_1
    l32i a13, a4,  64                   # a13: mac_shift
    l32i a14, a4,  76                   # a14: activation_alpha
    l32i a15, a4,  84                   # a15: activation_shift

    EE.MOVI.32.Q q7, a13, 3

    blti a12, 0, tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_c_remainder
        l32i  a8, a4, 132
        addi  a8, a8, -16               # a8: next_hw81 - 16

        EE.LD.128.USAR.IP q0, a2, 0
        rur.sar_byte a9                 # a9: output_sar_byte

        tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_c_div_x:
            beqi a9, 0, tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_128b
            beqi a9, 8, tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_64b
            tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_32b:
                tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_32b_multiple_loop:
                    EE.MOVI.32.A q7, a13, 1
                    EE.ZERO.QACC
                    tie728_s16_unaligned_depthwise_conv2d_hw81 q0, q1, q2, q3, a3, a5, a6, a7, a8, a9, a10, a11, a4, q7, a13
                    EE.MOVI.32.A q7, a13, 3
                    tie728_s16_vector_round_result  q0, a13, a9, q5
                    tie728_s16_conv2d_relu  q0, a14, a15
                    tie728_32b_aligned_vector_store  q0, a2, a9

                    addi a12, a12, -1
                    bgei a12, 0, tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_32b_multiple_loop
                j tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_c_remainder

            tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_64b:
                tie728_s16_unaligned_depthwise_conv2d_hwc1_relu_64b_multiple_loop:
                    EE.MOVI.32.A q7, a13, 1
                    EE.ZERO.QACC
                    tie728_s16_unaligned_depthwise_conv2d_hw81 q0, q1, q2, q3, a3, a5, a6, a7, a8, a9, a10, a11, a4, q7, a13
                    EE.MOVI.32.A q7, a13, 3
                    tie728_s16_vector_round_result  q0, a13, a9, q5
                    tie728_s16_conv2d_relu  q0, a14, a15
                    tie728_64b_aligned_vector_store  q0


(prop_types__WEBPACK_IMPORTED_MODULE_11___default().string)\n    ]),\n    /**\n   * The components used for each slot inside.\n   *\n   * This prop is an alias for the `slots` prop.\n   * It's recommended to use the `slots` prop instead.\n   *\n   * @default {}\n   */ components: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({\n        Input: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().elementType),\n        Root: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().elementType)\n    }),\n    /**\n   * The extra props for the slot components.\n   * You can override the existing props or add new ones.\n   *\n   * This prop is an alias for the `slotProps` prop.\n   * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.\n   *\n   * @default {}\n   */ componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({\n        input: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n        root: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object)\n    }),\n    /**\n   * The default value. Use when the component is not controlled.\n   */ defaultValue: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().any),\n    /**\n   * If `true`, the component is disabled.\n   * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n   */ disabled: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n    /**\n   * If `true`, the input will not have an underline.\n   */ disableUnderline: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n    /**\n   * End `InputAdornment` for this component.\n   */ endAdornment: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().node),\n    /**\n   * If `true`, the `input` will indicate an error.\n   * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n   */ error: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n    /**\n   * If `true`, the `input` will take up the full width of its container.\n   * @default false\n   */ fullWidth: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n    /**\n   * If `true`, the label is hidden.\n   * This is used to increase density for a `FilledInput`.\n   * Be sure to add `aria-label` to the `input` element.\n   * @default false\n   */ hiddenLabel: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n    /**\n   * The id of the `input` element.\n   */ id: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n    /**\n   * The component used for the `input` element.\n   * Either a string to use a HTML element or a component.\n   * @default 'input'\n   */ inputComponent: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().elementType),\n    /**\n   * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n   * @default {}\n   */ inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n    /**\n   * Pass a ref to the `input` element.\n   */ inputRef: _mui_utils_refType__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n    /**\n   * If `dense`, will adjust vertical spacing. This is normally obtained via context from


_2_buf16_to_gp_23333.write(gp_in0_2_buf16_gp_in0_2_buf16_ld334_c__gp_in0_2_buf16_ld335_value);

#ifndef __VIVADO_SYNTH__
#endif //__VIVADO_SYNTH__

}

inline void gp_in0_218_merged300(gp_in0_1_buf8_FIFO_buf481_cache& gp_in0_1_buf8_FIFO_buf481, gp_in0_2_buf16_cache& gp_in0_2_buf16, int d0, int d1, int d2) {
  // Dynamic address computation

	// Consume: gp_in0_1_buf8_FIFO_buf481
	auto gp_in0_1_buf8_FIFO_buf481_2_m__lp_gp_in0_218__p___m_1_rp___p___m_1_p_3_c_______2_m__lp_gp_in0_217__p___m_1_rp___p__1_p_3_value = gp_in0_1_buf8_FIFO_buf481_gp_in0_218_merged300_read_bundle_read(gp_in0_1_buf8_FIFO_buf481/* source_delay */, d0, d1, d2, 0);

#ifndef __VIVADO_SYNTH__
#endif //__VIVADO_SYNTH__

	auto compute_result = gp_in0_218_cu298(gp_in0_1_buf8_FIFO_buf481_2_m__lp_gp_in0_218__p___m_1_rp___p___m_1_p_3_c_______2_m__lp_gp_in0_217__p___m_1_rp___p__1_p_3_value);
	// Produce: gp_in0_2_buf16
	gp_in0_2_buf16_gp_in0_218_merged300_write_bundle_write(/* arg names */compute_result, gp_in0_2_buf16, d0, d1, d2, 0);

#ifndef __VIVADO_SYNTH__
#endif //__VIVADO_SYNTH__

}

// Driver function
void Extracted_gp_in0_1_buf8_to_gp_1313_ld483_gp_in0_217_gp_in0_2_buf16_ld331_gp_in0_2_buf16_ld335_gp_in0_2_buf16_ld339_(HWStream<hw_uint<32> >& /* no bundle get_args num ports = 1 */gp_in0_1_buf8_to_gp_1313, HWStream<hw_uint<32> >& /* no bundle get_args num ports = 1 */gp_in0_2_buf16_to_gp_2329, HWStream<hw_uint<32> >& /* no bundle get_args num ports = 1 */gp_in0_2_buf16_to_gp_23333, HWStream<hw_uint<32> >& /* no bundle get_args num ports = 1 */gp_in0_2_buf16_to_gp_8337) {

#ifndef __VIVADO_SYNTH__
  ofstream debug_file("Extracted_gp_in0_1_buf8_to_gp_1313_ld483_gp_in0_217_gp_in0_2_buf16_ld331_gp_in0_2_buf16_ld335_gp_in0_2_buf16_ld339__debug.csv");
  global_debug_handle = &debug_file;
#endif //__VIVADO_SYNTH__
  gp_in0_1_buf8_FIFO_buf481_cache gp_in0_1_buf8_FIFO_buf481;
#ifdef __VIVADO_SYNTH__
#endif //__VIVADO_SY


from flask import Flask, render_template
from flask_bootstrap import Bootstrap
from flask_mail import Mail
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_pagedown import PageDown
from config import config
from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class

bootstrap = Bootstrap()
mail = Mail()
moment = Moment()
db = SQLAlchemy()
login_manager = LoginManager()
photos = UploadSet("photos", IMAGES)
pagedown = PageDown()

# if set to "strong", remeber me will not work
login_manager.session_protection = "basic"
login_manager.login_view = "auth.login"

def create_app(config_name):
    app = Flask(__name__)
    app.config.from_object(config[config_name])
    config[config_name].init_app(app)

    from .main import main as main_blueprint
    from .auth import auth as auth_blueprint
    app.register_blueprint(main_blueprint)
    app.register_blueprint(auth_blueprint, url_prefix="/auth")
    bootstrap.init_app(app)
    mail.init_app(app)
    moment.init_app(app)
    db.init_app(app)
    login_manager.init_app(app)
    pagedown.init_app(app)
    configure_uploads(app,photos)
    patch_request_class(app)
    return app


TARGET_GLOW_INTENSITY,
    header = SI_INTERFACE_OPTIONS_INDICATORS,
    indentLevel = 1,
})

panelBuilder:AddSetting({
    controlName = "Options_Nameplates_InteractableGlowCheck",
    settingType = SETTING_TYPE_IN_WORLD,
    settingId = IN_WORLD_UI_SETTING_INTERACTABLE_GLOW_ENABLED,
    header = SI


_index: A, level: f32) -> vec4<f32> */
    /* fn textureSampleLevel<L : iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L) -> f32 */
    /* fn textureSampleLevel<L : iu32>(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: L, @const offset: vec2<i32>) -> f32 */
    /* fn textureSampleLevel<A : iu32, L : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L) -> f32 */
    /* fn textureSampleLevel<A : iu32, L : iu32>(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: A, level: L, @const offset: vec2<i32>) -> f32 */
    /* fn textureSampleLevel<L : iu32>(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: L) -> f32 */
    /* fn textureSampleLevel<A : iu32, L : iu32>(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A, level: L) -> f32 */
    /* num overloads */ 14,
    /* overloads */ OverloadIndex(58),
  },
  {
    /* [99] */
    /* fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
    /* fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
    /* num overloads */ 2,
    /* overloads */ OverloadIndex(394),
  },
  {
    /* [100] */
    /* fn textureStore<C : iu32>(texture: texture_storage_1d<f32_texel_format, write>, coords: C, value: vec4<f32>) */
    /* fn textureStore<C : iu32>(texture: texture_storage_2d<f32_texel_format, write>, coords: vec2<C>, value: vec4<f32>) */
    /* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<f32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<f32>) */
    /* fn textureStore<C : iu32>(texture: texture_storage_3d<f32_texel_format, write>, coords: vec3<C>, value: vec4<f32>) */
    /* fn textureStore<C : iu32>(texture: texture_storage_1d<i32_texel_format, write>, coords: C, value: vec4<i32>) */
    /* fn textureStore<C : iu32>(texture: texture_storage_2d<i32_texel_format, write>, coords: vec2<C>, value: vec4<i32>) */
    /* fn textureStore<C : iu32, A : iu32>(texture: texture_storage_2d_array<i32_texel_format, write>, coords: vec2<C>, array_index: A, value: vec4<i32>) */
    /* fn textureStore<C : iu32>(texture: texture_storage_3d<i32_texel_format, write>, coords: vec3<C>, value: vec4<i32>) */
    /* fn textureStore<C : iu32>(texture: texture_storage_1d<u32_texel_format, write>, coords: C, value: vec4<u32>) */
    /* fn text


code & 0x0F00) >> 8) as usize;
        let y = ((opcode & 0x00F0) >> 4) as usize;
        let vx = self.v[x] as u16;
        let vy = self.v[y] as u16;
        let nnn = opcode & 0x0FFF;
        let nn = (opcode & 0x00FF) as u8;
        let n = (opcode & 0x000F) as u8;

        match opcode & 0xF000 {
            0x0000 => {
                // two special opcodes that can't be determined by the
                // top four bits
                match opcode & 0x000F {
                    0x0000 => {
                        // 0x00E0; clear the screen
                        for i in 0..GRAPHICS_ARRAY_SIZE {
                            self.gfx[i as usize] = 0;
                        }

                        self.draw_flag = true;
                        self.pc += 2;
                    }
                    0x000E => {
                        // 0x00EE; returns from subroutine
                        self.sp -= 1;
                        self.pc = self.stack[self.sp as usize];
                        self.pc += 2;
                    }
                    _ => {
                        // 0x0NNN: Calls RCA 1802 program at address NNN. Not necessary for most ROMs.
                        self.pc = nnn;
                    }
                }
            }

            0x1000 => {
                // 0x1NNN: jumps to address NNN
                self.pc = nnn;
            }

            0x2000 => {
                // 0x2NNN: calls subroutine at NNN
                self.stack[self.sp as usize] = self.pc;
                self.sp += 1;
                self.pc = nnn;
            }

            0x3000 => {
                // 0x3XNN: Skips the next instruction if VX equals NN. (Usually the next instruction is a jump to skip a code block)
                if self.v[x] == nn {
                    self.pc += 4;
                } else {
                    self.pc += 2;
                }
            }

            0x4000 => {
                // 0x4XNN: Skips the next instruction if VX doesn't equal NN. (Usually the next instruction is a jump to skip a code block)
                if self.v[x] != nn {
                    self.pc += 4;
                } else {
                    self.pc += 2;
                }
            }

            0x5000 => {
                // 0x5XY0: Skips the next instruction if VX equals VY. (Usually the next instruction is a jump to skip a code block)
                if self.v[x] == self.v[y] {
                    self.pc += 4;
                } else {
                    self.pc += 2;
                }
            }

            0x6000 => {
                // 0x6XNN: Sets VX to NN.
                self.v[x] = nn;
                self.pc += 2;
            }

            0x7000 => {
                // 0x7XNN: Adds NN to VX. (Carry flag is not changed)
                self.v[x] = ((self.v[x] as u16 + nn as u16) & 0xff) as u8;
                self.pc += 2;
            }

            0x8000 => {
                match n {
                    0x0 => {
                        // 0x8XY0: Sets VX to the value of VY.
                        self.v[x] = self.v[y];
                        self.pc += 2;
                    }
                    0x1 => {
                        // 0x8XY1: Sets VX to VX or VY. (Bitwise OR operation)
                        self.v[x] |= self.v[y];
                        self.pc += 2;
                    }
                    0x2 => {
                        // 0x8XY2: Sets VX to VX and VY. (Bitwise AND operation)
                        self.v[x] &= self.v[y];
                        self.pc += 2;
                    }
                    0x3 => {
                        // 0x8XY3: Sets VX to VX xor V


ed, externalUri))
                } catch (e: Exception) {
                    Log.e(TAG, "Error reading file: ${file.name}", e)
                }
            }

            Log.d(TAG, "Loaded ${files.size} code files")
        } catch (e: Exception) {
            Log.e(TAG, "Failed to get code file list", e)
        }
        return files
    }

    /**
     * Determine programming language based on file name
     * 根据文件名确定编程语言
     * @param fileName File name
     * @return Corresponding programming language
     */
    private fun getFileLanguage(fileName: String): String {
        return when {
            fileName.endsWith(".java") -> "java"
            fileName.endsWith(".kt") -> "kotlin"
            fileName.endsWith(".py") -> "python"
            fileName.endsWith(".cpp") || fileName.endsWith(".c") -> "cpp"
            fileName.endsWith(".js") -> "javascript"
            fileName.endsWith(".html") -> "html"
            fileName.endsWith(".css") -> "css"
            fileName.endsWith(".xml") -> "xml"
            fileName.endsWith(".json") -> "json"
            fileName.endsWith(".md") -> "markdown"
            fileName.endsWith(".txt") -> "text"
            else -> "text"
        }
    }
} plugins {
    id("fabric-loom") version "1.11-SNAPSHOT"
}

base {
    archivesName = properties["archives_base_name"] as String
    version = properties["mod_version"] as String
    group = properties["maven_group"] as String
}

repositories {
    maven {
        name = "meteor-maven"
        url = uri("https://maven.meteordev.org/releases")
    }
    maven {
        name = "meteor-maven-snapshots"
        url = uri("https://maven.meteordev.org/snapshots")
    }
}

dependencies {
    // Fabric
    minecraft("com.mojang:minecraft:${properties["minecraft_version"] as String}")
    mappings("net.fabricmc:yarn:${properties["yarn_mappings"] as String}:v2")
    modImplementation("net.fabricmc:fabric-loader:${properties["loader_version"] as String}")

    // Meteor
    modImplementation("meteordevelopment:meteor-client:${properties["minecraft_version"] as String}-SNAPSHOT")
}

tasks {
    processResources {
        val propertyMap = mapOf(
            "version" to project.version,
            "mc_version" to project.property("minecraft_version"),
        )

        inputs.properties(propertyMap)

        filteringCharset = "UTF-8"

        filesMatching("fabric.mod.json") {
            expand(propertyMap)
        }
    }

    jar {
        inputs.property("archivesName", project.base.archivesName.get())

        from("LICENSE") {
            rename { "${it}_${inputs.properties["archivesName"]}" }
        }
    }

    java {
        sourceCompatibility = JavaVersion.VERSION_21
        targetCompatibility = JavaVersion.VERSION_21
    }

    withType<JavaCompile> {
        options.encoding = "UTF-8"
        options.release = 21
        options.compilerArgs.add("-Xlint:deprecation")
        options.compilerArgs.add("-Xlint:unchecked")
    }
}
plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.kotlin.compose)
}

android {
    namespace = "com.cavin.designpatterns"
    compileSdk = 35

    defaultConfig {
        applicationId = "com.cavin.designpatterns"
        minSdk = 24
        targetSdk = 35
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }


get(url, onSuccess, onError);
    }

    /**
     * @description 通过wkt查询数据
     * @param {String} wkt
     */
    queryByWkt(wkt) {}

    /**
     * @description 通过geojson查询数据
     * @param {String} geojson
     */
    queryByGeojson(geojson) {}

    /**
     * @description 通过circle查询数据
     * @param {String} circle 格式: x坐标,y坐标,半径
     */
    queryByCircle(circle) {}
    /**
     * @description 通过rect查询数据
     * @param {String} rect 格式: xmin,ymin,xmax,ymax
     */
    queryByRect(rect) {}
}

export default PostgisQueryService;
Zondy.DataStore.PostGIS.PostgisQueryService = PostgisQueryService;
import { Zondy } from '../../common/Base';
import { DataStoreService } from '../ServiceBase';

/**
 * @author 创新中心-潘卓然
 * @class module:弹性搜索服务.EsGeocodeService
 * @param gdbp 发布在igs上的pg图层gdbp地址，可以从中解析libName（数据库名）、schemas（工作空间名）、tableName（表名）
 * @param {EsGeocodeParameter} option 查询条件
 * @param {Boolean} [option.includeProperites = true] 查询结果中是否包含属性
 * @param {String} [option.where] 属性条件 （例如：id>5,id<10）
 * @param {String} [option.fields] 统计计算中用于分组字段名列表
 * @param {String} [option.geometry] 几何信息，圆、多边形等
 * @param {String} [option.geoFormat="wkt"] 几何类型，wkt、wkb、geojson、自定义等
 * @param {String} [option.sref] 动态投影坐标系 ID，支持 MapGIS 和 EPSG 标准编号，其中 MapGIS 只支持当前库中自带的坐标系的 ID，EPSG 标准请 使用 EPSG:4326 格式，若指定了该参数，则系统认为 geometry 的坐标系为此坐标系
 */
export default class EsGeocodeService extends DataStoreService {
    constructor(option) {
        super(option);

        /**
         * @member  module:弹性搜索服务.EsGeocodeService.prototype.includeProperites
         * @description 查询结果中是否包含属性
         * @type Boolean
         * @default true
         */
        this.includeProperites = option.includeProperites;
        /**
         * @member  module:弹性搜索服务.EsGeocodeService.prototype.where
         * @description 属性条件 （例如：id>5,id<10）
         * @type String
         */
        this.where = option.where;
        /**
         * @member  module:弹性搜索服务.EsGeocodeService.prototype.fields
         * @description 统计计算中用于分组字段名列表
         * @type String
         */
        this.fields = option.fields;
        /**
         * @member  module:弹性搜索服务.EsGeocodeService.prototype.geometry
         * @description 几何信息，圆、多边形等
         * @type String
         */
        this.geometry = option.geometry;
        /**
         * @member  module:弹性搜索服务.EsGeocodeService.prototype.geoFormat
         * @description 几何类型，wkt、wkb、geojson、自定义等
         * @type String
         */
        this.geoFormat = option.geoFormat;
        /**
         * @member  module:弹性搜索服务.Es


chedId) {
        const sanitizedTerm = args.searchTerm.replace(/(_|%|\\)/g, '\\$1');
        const ilikeQuery = `%${sanitizedTerm}%`;
        searchConditions.push(
          { description: { [Op.iLike]: ilikeQuery } },
          { '$fromCollective.slug$': { [Op.iLike]: ilikeQuery } },
          { '$fromCollective.name$': { [Op.iLike]: ilikeQuery } },
          { '$collective.slug$': { [Op.iLike]: ilikeQuery } },
          { '$collective.name$': { [Op.iLike]: ilikeQuery } },
        );
      }

      if (searchedId) {
        searchConditions.push({ id: parseInt(searchedId) });
      }

      where[Op.and].push({ [Op.or]: searchConditions });
    }

    // Add filters
    if (args.minAmount) {
      where['totalAmount'] = { [Op.gte]: args.minAmount };
    }
    if (args.maxAmount) {
      where['totalAmount'] = { ...where['totalAmount'], [Op.lte]: args.maxAmount };
    }
    if (args.dateFrom) {
      where['createdAt'] = { [Op.gte]: args.dateFrom };
    }
    if (args.dateTo) {
      where['createdAt'] = where['createdAt'] || {};
      where['createdAt'][Op.lte] = args.dateTo;
    }
    if (args.status) {
      where['status'] = args.status;
    }

    const order = [[args.orderBy.field, args.orderBy.direction]];
    const { offset, limit } = args;
    const result = await models.Order.findAndCountAll({ include, where, order, offset, limit });
    return {
      nodes: result.rows,
      totalCount: result.count,
      limit: args.limit,
      offset: args.offset,
    };
  },
};

export default OrdersCollectionQuery;
import { Stilling, tomStilling } from "./siste-stilling";

export enum ActionTypes {
  SETT_DEFAULT_STILLING = "SETT_DEFAULT_STILLING",
}

export type State = {
  stilling: Stilling;
};

export interface Data {
  stilling: Stilling;
}

interface Action {
  type: ActionTypes;
  data: Data;
}

const initialState = { stilling: tomStilling };

export default function (state: State = initialState, action: Action): State {
  switch (action.type) {
    case ActionTypes.SETT_DEFAULT_STILLING: {
      return { stilling: action.data.stilling };
    }
    default: {
      return state;
    }
  }
}

export function settDefaultStilling(stilling: Stilling): Action {
  return {
    type: ActionTypes.SETT_DEFAULT_STILLING,
    data: { stilling },
  };
}
import a from 'assertron'
import { mapKey } from '..'

test('predicate key can be used as indexer of the subject', () => {
  const subject = { a: 1, b: 2, c: 3 }
  const actual = mapKey(subject, key => subject[key] + 1)
  a.satisfies(actual, [2, 3, 4])
})
 export function scanRoom(room: Room) {
    let sources: Source[] = room.find(FIND_SOURCES);
     let jobs:string[]=[];
    sources.forEach(source => {
      let pos: RoomPosition = source.pos;
        let objectsAround: Terrain[]= [];
        let roomname: string = source.room.name;
      let collectionSpotCount: number = 0;
      objectsAround[0] = Game.map.getTerrainAt(pos.x + 1, pos.y + 1,roomname);
      objectsAround[2] = Game.map.getTerrainAt(pos.x + 1, pos.y + 0,roomname);
      objectsAround[1] = Game.map.getTerrainAt(pos.x + 0, pos.y + 1,r


ormation stack ARN. Specify the physical ID as `arn:[partition]:cloudformation:[region]:[account ID]:stack/[stack name]/[resource ID]`.
        /// </summary>
        public readonly string? TemplatePhysicalId;
        /// <summary>
        /// Template source as URL of the CloudFormation template in Amazon S3.
        /// </summary>
        public readonly string? TemplateUrl;
        /// <summary>
        /// Type of provisioning artifact. See [AWS Docs](https://docs.aws.amazon.com/servicecatalog/latest/dg/API_ProvisioningArtifactProperties.html) for valid list of values.
        /// </summary>
        public readonly string? Type;

        [OutputConstructor]
        private ProductProvisioningArtifactParameters(
            string? description,

            bool? disableTemplateValidation,

            string? name,

            string? templatePhysicalId,

            string? templateUrl,

            string? type)
        {
            Description = description;
            DisableTemplateValidation = disableTemplateValidation;
            Name = name;
            TemplatePhysicalId = templatePhysicalId;
            TemplateUrl = templateUrl;
            Type = type;
        }
    }
}


	0x1E291:  {0x1E291, Unicode14, WidthNarrow, CatLo, "TOTO LETTER BA"},
	0x1E292:  {0x1E292, Unicode14, WidthNarrow, CatLo, "TOTO LETTER TA"},
	0x1E293:  {0x1E293, Unicode14, WidthNarrow, CatLo, "TOTO LETTER DA"},
	0x1E294:  {0x1E294, Unicode14, WidthNarrow, CatLo, "TOTO LETTER KA"},
	0x1E295:  {0x1E295, Unicode14, WidthNarrow, CatLo, "TOTO LETTER GA"},
	0x1E296:  {0x1E296, Unicode14, WidthNarrow, CatLo, "TOTO LETTER MA"},
	0x1E297:  {0x1E297, Unicode14, WidthNarrow, CatLo, "TOTO LETTER NA"},
	0x1E298:  {0x1E298, Unicode14, WidthNarrow, CatLo, "TOTO LETTER NGA"},
	0x1E299:  {0x1E299, Unicode14, WidthNarrow, CatLo, "TOTO LETTER SA"},
	0x1E29A:  {0x1E29A, Unicode14, WidthNarrow, CatLo, "TOTO LETTER CHA"},
	0x1E29B:  {0x1E29B, Unicode14, WidthNarrow, CatLo, "TOTO LETTER YA"},
	0x1E29C:  {0x1E29C, Unicode14, WidthNarrow, CatLo, "TOTO LETTER WA"},
	0x1E29D:  {0x1E29D, Unicode14, WidthNarrow, CatLo, "TOTO LETTER JA"},
	0x1E29E:  {0x1E29E, Unicode14, WidthNarrow, CatLo, "TOTO LETTER HA"},
	0x1E29F:  {0x1E29F, Unicode14, WidthNarrow, CatLo, "TOTO LETTER RA"},
	0x1E2A0:  {0x1E2A0, Unicode14, WidthNarrow, CatLo, "TOTO LETTER LA"},
	0x1E2A1:  {0x1E2A1, Unicode14, WidthNarrow, CatLo, "TOTO LETTER I"},
	0x1E2A2:  {0x1E2A2, Unicode14, WidthNarrow, CatLo, "TOTO LETTER BREATHY I"},
	0x1E2A3:  {0x1E2A3, Unicode14, WidthNarrow, CatLo, "TOTO LETTER IU"},
	0x1E2A4:  {0x1E2A4, Unicode14, WidthNarrow, CatLo, "TOTO LETTER BREATHY IU"},
	0x1E2A5:  {0x1E2A5, Unicode14, WidthNarrow, CatLo, "TOTO LETTER U"},
	0x1E2A6:  {0x1E2A6, Unicode14, WidthNarrow, CatLo, "TOTO LETTER E"},
	0x1E2A7:  {0x1E2A7, Unicode14, WidthNarrow, CatLo, "TOTO LETTER BREATHY E"},
	0x1E2A8:  {0x1E2A8, Unicode14, WidthNarrow, CatLo, "TOTO LETTER EO"},
	0x1E2A9:  {0x1E2A9, Unicode14, WidthNarrow, CatLo, "TOTO LETTER BREATHY EO"},
	0x1E2AA:  {0x1E2AA, Unicode14, WidthNarrow, CatLo, "TOTO LETTER O"},
	0x1E2AB:  {0x1E2AB, Unicode14, WidthNarrow, CatLo, "TOTO LETTER AE"},
	0x1E2AC:  {0x1E2AC, Unicode14, WidthNarrow, CatLo, "TOTO LETTER BREATHY AE"},
	0x1E2AD:


{
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  padding-bottom: 10px;
  -webkit-box-align: center;
  -webkit-align-items: center;
          align-items: center;
}
.weui-uploader__title {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
          flex: 1;
}
.weui-uploader__info {
  color: #B2B2B2;
}
.weui-uploader__bd {
  margin-bottom: -4px;
  margin-right: -9px;
  overflow: hidden;
}
.weui-uploader__files {
  list-style: none;
}
.weui-uploader__file {
  float: left;
  margin-right: 9px;
  margin-bottom: 9px;
  width: 79px;
  height: 79px;
  background: no-repeat center center;
  background-size: cover;
}
.weui-uploader__file_status {
  position: relative;
}
.weui-uploader__file_status:before {
  content: " ";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
}
.weui-uploader__file_status .weui-uploader__file-content {
  display: block;
}
.weui-uploader__file-content {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  color: #FFFFFF;
}
.weui-uploader__file-content .weui-icon-warn {
  display: inline-block;
}
.weui-uploader__input-box {
  float: left;
  position: relative;
  margin-right: 9px;
  margin-bottom: 9px;
  width: 77px;
  height: 77px;
  border: 1px solid #D9D9D9;
}
.weui-uploader__input-box:before,
.weui-uploader__input-box:after {
  content: " ";
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  background-color: #D9D9D9;
}
.weui-uploader__input-box:before {
  width: 2px;
  height: 39.5px;
}
.weui-uploader__input-box:after {
  width: 39.5px;
  height: 2px;
}
.weui-uploader__input-box:active {
  border-color: #999999;
}
.weui-uploader__input-box:active:before,
.weui-uploader__input-box:active:after {
  background-color: #999999;
}
.weui-uploader__input {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.weui-msg {
  padding-top: 36px;
  text-align: center;
}
.weui-msg__icon-area {
  margin-bottom: 30px;
}
.weui-msg__text-area {
  margin-bottom: 25px;
  padding: 0 20px;
}
.weui-msg__text-area a {
  color: #586C94;
}
.weui-msg__title {
  margin-bottom: 5px;
  font-weight: 400;
  font-size: 20px;
}
.weui-msg


R_390_TLS_IE32    R_390 = 47
    R_390_TLS_IE64    R_390 = 48
    R_390_TLS_IEENT   R_390 = 49
    R_390_TLS_LE32    R_390 = 50
    R_390_TLS_LE64    R_390 = 51
    R_390_TLS_LDO32   R_390 = 52
    R_390_TLS_LDO64   R_390 = 53
    R_390_TLS_DTPMOD  R_390 = 54
    R_390_TLS_DTPOFF  R_390 = 55
    R_390_TLS_TPOFF   R_390 = 56
    R_390_20          R_390 = 57
    R_390_GOT20       R_390 = 58
    R_390_GOTPLT20    R_390 = 59
    R_390_TLS_GOTIE20 R_390 = 60
)

func (R_390) GoString
    ¶

func (i R_390) GoString() string

func (R_390) String
    ¶

func (i R_390) String() string

type R_AARCH64
    ¶

type R_AARCH64 int

Relocation types for AArch64 (aka arm64)


 = y;
    vertex[Z] = z;
    curveVertexCount++;

    // draw a segment if there are enough points
    if (curveVertexCount > 3) {
      curveVertexSegment(curveVertices[curveVertexCount-4][X],
                         curveVertices[curveVertexCount-4][Y],
                         curveVertices[curveVertexCount-4][Z],
                         curveVertices[curveVertexCount-3][X],
                         curveVertices[curveVertexCount-3][Y],
                         curveVertices[curveVertexCount-3][Z],
                         curveVertices[curveVertexCount-2][X],
                         curveVertices[curveVertexCount-2][Y],
                         curveVertices[curveVertexCount-2][Z],
                         curveVertices[curveVertexCount-1][X],
                         curveVertices[curveVertexCount-1][Y],
                         curveVertices[curveVertexCount-1][Z]);
    }
  }

  /**
   * Handle emitting a specific segment of Catmull-Rom curve. This can be
   * overridden by subclasses that need more efficient rendering options.
   */
  protected void curveVertexSegment(float x1, float y1,
                                    float x2, float y2,
                                    float x3, float y3,
                                    float x4, float y4) {
    float x0 = x2;
    float y0 = y2;

    PMatrix3D draw = curveDrawMatrix;

    float xplot1 = draw.m10*x1 + draw.m11*x2 + draw.m12*x3 + draw.m13*x4;
    float xplot2 = draw.m20*x1 + draw.m21*x2 + draw.m22*x3 + draw.m23*x4;
    float xplot3 = draw.m30*x1 + draw.m31*x2 + draw.m32*x3 + draw.m33*x4;

    float yplot1 = draw.m10*y1 + draw.m11*y2 + draw.m12*y3 + draw.m13*y4;
    float yplot2 = draw.m20*y1 + draw.m21*y2 + draw.m22*y3 + draw.m23*y4;
    float yplot3 = draw.m30*y1 + draw.m31*y2 + draw.m32*y3 + draw.m33*y4;

    // vertex() will reset splineVertexCount, so save it
    int savedCount = curveVertexCount;

    vertex(x0, y0);
    for (int j = 0; j < curveDetail; j++) {
      x0 += xplot1; xplot1 += xplot2; xplot2 += xplot3;
      y0 += yplot1; yplot1 += yplot2; yplot2 += yplot3;
      vertex(x0, y0);
    }
    curveVertexCount = savedCount;
  }

  /**
   * Handle emitting a specific segment of Catmull-Rom curve. This can be
   * overridden by subclasses that need more efficient rendering options.
   */
  protected void curveVertexSegment(float x1, float y1, float z1,
                                    float x2, float y2, float z2,
                                    float x3, float y3, float z3,
                                    float x4, float y4, float z4) {
    float x0 = x2;
    float y0 = y2;
    float z0 = z2;

    PMatrix3D draw = curveDrawMatrix;

    float xplot1 = draw.m10*x1 + draw.m11*x2 + draw.m12*x3 + draw.m13*x4;
    float xplot2 = draw.m20


_ioremap(&op->resource[0], 0, sizeof(u8), "d7s");
	if (!p->regs) {
		printk(KERN_ERR PFX "Cannot map chip registers\n");
		goto out;
	}

	err = misc_register(&d7s_miscdev);
	if (err) {
		printk(KERN_ERR PFX "Unable to acquire miscdevice minor %i\n",
		       D7S_MINOR);
		goto out_iounmap;
	}

	/* OBP option "d7s-flipped?" is honored as default for the
	 * device, and reset default when detached
	 */
	regs = readb(p->regs);
	opts = of_find_node_by_path("/options");
	if (opts &&
	    of_get_property(opts, "d7s-flipped?", NULL))
		p->flipped = true;

	if (p->flipped)
		regs |= D7S_FLIP;
	else
		regs &= ~D7S_FLIP;

	writeb(regs,  p->regs);

	printk(KERN_INFO PFX "7-Segment Display%pOF at [%s:0x%llx] %s\n",
	       op->dev.of_node,
	       (regs & D7S_FLIP) ? " (FLIPPED)" : "",
	       op->resource[0].start,
	       sol_compat ? "in sol_compat mode" : "");

	dev_set_drvdata(&op->dev, p);
	d7s_device = p;
	err = 0;
	of_node_put(opts);

out:
	return err;

out_iounmap:
	of_iounmap(&op->resource[0], p->regs, sizeof(u8));
	goto out;
}

static int d7s_remove(struct platform_device *op)
{
	struct d7s *p = dev_get_drvdata(&op->dev);
	u8 regs = readb(p->regs);

	/* Honor OBP d7s-flipped? unless operating in solaris-compat mode */
	if (sol_compat) {
		if (p->flipped)
			regs |= D7S_FLIP;
		else
			regs &= ~D7S_FLIP;
		writeb(regs, p->regs);
	}

	misc_deregister(&d7s_miscdev);
	of_iounmap(&op->resource[0], p->regs, sizeof(u8));

	return 0;
}

static const struct of_device_id d7s_match[] = {
	{
		.name = "display7seg",
	},
	{},
};
MODULE_DEVICE_TABLE(of, d7s_match);

static struct platform_driver d7s_driver = {
	.driver = {
		.name = DRIVER_NAME,
		.of_match_table = d7s_match,
	},
	.probe		= d7s_probe,
	.remove		= d7s_remove,
};

module_platform_driver(d7s_driver);


uire() 来处理错误
    }

    modifier checkTime(uint _time) {
        require(now >= _time);
        _;
    }

    event LogEvent(address victim); // 修正了 "aderess" 为 "address"
}
```

## 4 Solidity编译版本

在Solidity文件中第一行：

```solidity
pragma solidity ^0.4.22;
```

pragma，编译指示的意思，不是program，是为说明这个Solidity文件可以使用哪些版本的编译器编译。

上面编译指示的意思就是编译器版本version的范围是0.4.23<=version<0.5.0

也可直接指定：

```solidity
pragma solidity >=0.4.24 <0.5.0
```

## 5 IDE

### Remix 编辑器

网页版的Solidity编辑器。Remix非常强大，可直接在浏览器中使用，不用开发者自己搭建开发环境。

Remix项目现在已经迁移到remix-ide：https : /github.com/etheraml/renix-ide 找到项目。

无需本地搭建，可直接使用的服务
solidity/https ://ethereum.github.io/browser
https://remix.ethereum.org/

#### 本地构建

```bash
git clone https://github.com/ethereum/remix-ide.git
cd remix-ide
npm install
npm run setupremix
npm start
```

一般使用打包好的NPM模块即可，先执行安装remix-ide:

```bash
npm install remix-ide -g
```

启动remix-ide: remix-ide

然后在浏览器中访问http://localhost:8080就可以看到完整的Remi页面。

主要有文件管理、控制台、代码编辑、编译、运行和配置等相关模块。

## 6 常见概念

### 6.1 状态变量

类似其他语言的成员变量，因为Solidity是一门面向合约的语言，以太坊的交易本质其实是一种状态机，从一
种状态到另一种状态。

合约的本质也是在合适的条件触发交易。

```solidity
pragma solidity >=0.4.22 <0.6.0;

constant StateVar {
    string name;

    uint32 id;
}
```

### 6.2 局部变量

也叫本地变量。局部变量不仅是函数中的变量，参数也属局部变量，包括入、出参都是局部变量。

状态变量和局部变量：

- 状态变量只会出现在一个位置
- 局部变量可以是函数的入参，出参和函数体中定义的变量

```solidity
pragma solidity >=0.4.22 <0.6.0;
contract Variable {
		// 状态变量
    uint8 stateVar;
    function variableTest(uint8 inArgLocalVar) returns (uint8 outArgLocalVar){
        uint8 functionBody


ryUnavailableError: Boolean
        get() = code == VKApiCodes.CODE_SECTION_TEMPORARY_UNAVAILABLE

    val isAccessTokenExpired: Boolean
        get() = code == VKApiCodes.CODE_ACCESS_TOKEN_EXPIRED

    val captchaSid: String
        get() = extra?.getString(VKApiCodes.EXTRA_CAPTCHA_SID, "") ?: ""

    val captchaImg: String
        get() = extra?.getString(VKApiCodes.EXTRA_CAPTCHA_IMG, "") ?: ""

    val captchaHeight: Int
        get() = extra?.getInt(VKApiCodes.EXTRA_CAPTCHA_IMG_HEIGHT, -1) ?: -1

    val captchaWidth: Int
        get() = extra?.getInt(VKApiCodes.EXTRA_CAPTCHA_IMG_WIDTH, -1) ?: -1

    val captchaRatio: Double
        get() = extra?.getDouble(VKApiCodes.EXTRA_CAPTCHA_RATIO, -1.0) ?: -1.0

    val captchaAttempt: Int?
        get() = VKApiCodes.EXTRA_CAPTCHA_ATTEMPT.let { key ->
            if (extra?.containsKey(key) == true) extra.getInt(key, -1) else null
        }

    val captchaTimestamp: Double?
        get() = VKApiCodes.EXTRA_CAPTCHA_TIMESTAMP.let { key ->
            if (extra?.containsKey(key) == true) extra.getDouble(key, -1.0) else null
        }

    val captchaIsRefreshEnabled: Boolean
        get() = VKApiCodes.EXTRA_CAPTCHA_IS_REFRESH_ENABLED.let {key ->
            if (extra?.containsKey(key) == true) extra.getBoolean(VKApiCodes.EXTRA_CAPTCHA_IS_REFRESH_ENABLED, false) else false
        }

    val validationUrl: String
        get() = extra?.getString(VKApiCodes.EXTRA_VALIDATION_URL, "") ?: ""

    val userConfirmText: String
        get() = extra?.getString(VKApiCodes.EXTRA_CONFIRMATION_TEXT, "") ?: ""

    val userBanInfo: JSONObject?
        get() = extra?.getString(VKApiCodes.EXTRA_USER_BAN_INFO)?.let { JSONObject(it) }

    val extensionHash: String
        get() = extra?.getString(VKApiCodes.EXTRA_EXTENSION_HASH, null) ?: ""

    val accessToken: String?
        get() = extra?.getString(VKApiCodes.EXTRA_ACCESS_TOKEN, null)

    fun hasExtra(): Boolean {
        return extra != null && extra != Bundle.EMPTY
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (other !is VKApiExecutionException) return false
        val that = other as VKApiExecutionException?
        return if (code != that!!.code) false else !if (extra != null) extra != that.extra else that.extra != null
    }

    override fun hashCode(): Int {
        var result = code
        result = 31 * result + (extra?.hashCode() ?: 0)
        return result
    }

    override fun toString(): String {
        val printableExtra = when {
            extra?.containsKey(VKApiCodes.EXTRA_ACCESS_TOKEN) == true -> Bundle(extra).apply {
                putString(VKApiCodes.EXTRA_ACCESS_TOKEN, "hidden")
            }
            else -> extra
        }

        return "VKApiExecutionException{" +
                "code=$code" +
                ", extra=$printableExtra" +
                ", method=$apiMethod" +
                ", executeErrors=" + executeErrors?.joinToString(prefix = "[", postfix = "]") +
                ", super=" + super.toString() +
                '}'.toString()
    }

    fun hasError(errorCode: Int): Boolean {
        if (code == errorCode) return true
        if (executeErrors?.


"""
素材收集工具 - 独立通用素材版本
专门收集与主题相关但相对独立的基础创作素材
注重概念框架、文化背景、技术设定等通用内容，避免具体情节
"""
from langchain_core.language_models.chat_models import BaseChatModel
from langchain_core.messages import SystemMessage, HumanMessage

class MaterialCollectorTool:
    """素材收集工具 - 收集独立通用的基础创作素材"""

    def __init__(self, llm: BaseChatModel, verbose: bool = False):
        self.llm = llm
        self.verbose = verbose

    def _log(self, message: str):
        if self.verbose:
            print(f"[MaterialCollector LOG] {message}")

    def collect_materials(self, task_context: str) -> str:
        """
        收集独立通用的基础创作素材
        - 输入：完整任务上下文
        - 输出：主题相关但独立的通用素材列表
        - 重点：概念框架、文化背景、技术设定等基础内容
        """
        self._log(f"收集素材，上下文长度: {len(task_context)}字符")

        system_prompt = f"""你是一位专业的通用素材收集专家，核心工作流程为：
1. 先从任务上下文中理解用户可能需要的素材类型；
2. 按照推理到的素材类型一共提供3-4个素材方向和内容；
3. 可以参考素材收集重点，但需要围绕用户可能的需求。

素材收集重点（仅围绕用户要求的类型展开）：
- 概念框架：提供主题相关的核心概念、理论基础
- 文化背景：相关的历史文化、社会背景、哲学思考
- 通用设定：可复用的世界观设定、技术背景
- 参考借鉴：经典作品的处理方式、常见模式

素材特点要求：
1. **独立性**：每个素材相对独立，不依赖具体情节
2. **通用性**：可用于多种创作方向，非情节专用
3. **基础性**：提供创作框架而非具体内容
4. **贴合性**：匹配用户要求的素材类型和上下文

⚠ 避免：具体的剧情设计、场景描述、人物关系等情节性素材；偏离用户要求类型的素材内容"""

        human_prompt = f"""任务上下文：
{task_context}

请基于用户要求的素材类型收集素材，按以下格式输出：

**基础素材收集**：
▪ [素材类型][通用素材内容]
▪ [素材类型][通用素材内容]
▪ [素材类型][通用素材内容]
...

请保证内容的简洁有效性，易于用户理解，解答用户的问题，提供灵感，字数不超过200字。
"""

        messages = [
            SystemMessage(content=system_prompt),
            HumanMessage(content=human_prompt)
        ]

        try:
            response = self.llm.invoke(messages)
            return response.content
        except Exception as e:
            self._log(f"素材收集失败: {e}")
            return """**主题核心**：通用创作主题

**基础素材收集**：
▪ 概念框架：基础理论概念和核心观点
▪ 文化背景：相关历史文化和社会背景
▪ 技术设定：领域内的技术原理和发展趋势
▪ 经典参考：该主题的经典作品处理方式"""

    def execute(self, task_description: str) -> dict:
        """
        执行独立通用素材收集
        返回基础创作素材而非具体情节元素
        """
        self._log(f"执行素材收集，任务描述长度: {len(task_description)} 字符")

        # 使用task_description作为完整的上下文信息
        result = self.collect_materials(task_description)

        return {
            "result": result,
            "thought": f"基于核心主题收集了独立、通用的基础创作素材"
        }


cur(uid, recurid) ?: return null
        return LocalJtxICalObject.Factory.fromProvider(this, values)
    }

    override fun markNotDirty(flags: Int)= updateSetFlags(flags)

    override fun removeNotDirtyMarked(flags: Int) = deleteByFlags(flags)

    override fun forgetETags() = updateSetETag(null)

    object Factory: JtxCollectionFactory<LocalJtxCollection> {
        override fun newInstance(account: Account, client: ContentProviderClient, id: Long) = LocalJtxCollection(account, client, id)
    }

}/*
 * Copyright © All Contributors. See LICENSE and AUTHORS in the root directory for details.
 */

package at.bitfire.davdroid.repository

import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.Service
import at.bitfire.davdroid.db.ServiceType
import javax.inject.Inject

class DavServiceRepository @Inject constructor(
    db: AppDatabase
) {

    private val dao = db.serviceDao()

    // Read

    fun getBlocking(id: Long): Service? = dao.get(id)
    suspend fun get(id: Long): Service? = dao.getAsync(id)

    suspend fun getAll(): List<Service> = dao.getAll()

    suspend fun getByAccountAndType(name: String, @ServiceType serviceType: String): Service? =
        dao.getByAccountAndType(name, serviceType)

    fun getCalDavServiceFlow(accountName: String) =
        dao.getByAccountAndTypeFlow(accountName, Service.TYPE_CALDAV)

    fun getCardDavServiceFlow(accountName: String) =
        dao.getByAccountAndTypeFlow(accountName, Service.TYPE_CARDDAV)

    // Create & update

    fun insertOrReplaceBlocking(service: Service) =
        dao.insertOrReplace(service)

    suspend fun renameAccount(oldName: String, newName: String) =
        dao.renameAccount(oldName, newName)

    // Delete

    fun deleteAllBlocking() = dao.deleteAll()

    suspend fun deleteByAccount(accountName: String) =
        dao.deleteByAccount(accountName)

}/*
 * Copyright © All Contributors. See LICENSE and AUTHORS in the root directory for details.
 */

package at.bitfire.davdroid.repository

import android.accounts.Account
import android.content.Context
import at.bitfire.dav4jvm.DavResource
import at.bitfire.dav4jvm.XmlUtils
import at.bitfire.dav4jvm.XmlUtils.insertTag
import at.bitfire.dav4jvm.exception.GoneException
import at.bitfire.dav4jvm.exception.HttpException
import at.bitfire.dav4jvm.exception.NotFoundException
import at.bitfire.dav4jvm.property.caldav.CalendarColor
import at.bitfire.dav4jvm.property.caldav.CalendarDescription
import at.bitfire.dav4jvm.property.caldav.CalendarTimezone
import at.bitfire.dav4jvm.property.caldav.CalendarTimezoneId
import at.bitfire.dav4jvm.property.caldav.NS_CALDAV
import at.bitfire.dav4jvm.property.caldav.SupportedCalendarComponentSet
import at.bitfire.dav4jvm.property.carddav.AddressbookDescription
import at.bitfire.dav4jvm.property.carddav.NS_CARDDAV
import at.bitfire.dav4jvm.property.webdav.DisplayName
import at.bitfire.dav4jvm.property.webdav.NS_WEBDAV
import at.bitfire.dav4jvm.property.webdav.ResourceType
import at.bitfire.davdroid.Constants
import at.bitfire.davdroid.R
import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.Collection
import at.bitfire.davdroid.db.CollectionType
import at.bitfire.davdroid.db.HomeSet
import at.bitfire.davdroid.di.IoDispatcher
import at.bitfire.davdroid.network.


using DynamicFormInASPNetCore.Data;
using Microsoft.EntityFrameworkCore;

namespace DynamicFormInASPNetCore;

public class Program
{
    public static void Main(string[] args)
    {
        var builder = WebApplication.CreateBuilder(args);

        // Add services to the container.
        builder.Services.AddDbContext<DataContext>(options =>
        {
            options.UseSqlite(builder.Configuration.GetConnectionString("DefaultConnectionString"));
        });

        builder.Services.AddRazorPages();

        var app =


.3-2.2-28.8-5.4V480c0 17.7 14.3 32 32 32H416c17.7 0 32-14.3 32-32V394.6z"],
    "envelope": [512, 512, [128386, 9993, 61443], "f0e0", "M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"],
    "angles-up": [448, 512, ["angle-double-up"], "f102", "M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z"],
    "paperclip": [448, 512, [128206], "f0c6", "M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"],
    "arrow-right-to-city": [640, 512, [], "e4b3", "M288 48c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48V192h40V120c0-13.3 10.7-24 24-24s24 10.7 24 24v72h24c26.5 0 48 21.5 48 48V464c0 26.5-21.5 48-48 48H432