UNPKG

@adguard/agtree

Version:
55 lines (53 loc) 1.37 kB
/* * AGTree v3.4.3 (build date: Thu, 11 Dec 2025 13:43:19 GMT) * (c) 2025 Adguard Software Ltd. * Released under the MIT license * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme */ /** * Type map for binary serialization. * * @note Values should be fit into 8 bits. */ const BinaryTypeMarshallingMap = { // Basic types Null: 1, // AGTree nodes FilterListNode: 8, EmptyRule: 9, InvalidRule: 10, CommentRuleNode: 11, AgentNode: 12, AgentRuleNode: 13, HintNode: 14, HintRuleNode: 15, MetadataCommentRuleNode: 16, ConfigCommentRuleNode: 17, PreProcessorCommentRuleNode: 18, ConfigNode: 19, NetworkRuleNode: 20, HostRuleNode: 21, ElementHidingRule: 22, CssInjectionRule: 23, ScriptletInjectionRule: 24, JsInjectionRule: 25, HtmlFilteringRule: 26, ScriptletInjectionRuleBodyNode: 27, ElementHidingRuleBody: 28, CssInjectionRuleBody: 29, ValueNode: 32, ModifierNode: 34, ModifierListNode: 35, ParameterListNode: 36, DomainListNode: 37, DomainNode: 38, MethodNode: 40, StealthOptionNode: 42, AppNode: 44, HostnameListNode: 45, InvalidRuleErrorNode: 46, ExpressionVariableNode: 47, ExpressionOperatorNode: 48, ExpressionParenthesisNode: 49, }; export { BinaryTypeMarshallingMap };