declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace LayoutProcessor_$0 { interface LayoutProcessor_$0 { layout(nodeContext: Vtree.NodeContext, column: Layout.Column, leadingEdge: boolean): Task.Result; createEdgeBreakPosition(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, columnBlockSize: number): Layout.BreakPosition; startNonInlineElementNode(nodeContext: Vtree.NodeContext): boolean; afterNonInlineElementNode(nodeContext: Vtree.NodeContext, stopAtOverflow: boolean): boolean; finishBreak(column: Layout.Column, nodeContext: Vtree.NodeContext, forceRemoveSelf: boolean, endOfColumn: boolean): Task.Result; clearOverflownViewNodes(column: Layout.Column, parentNodeContext: Vtree.NodeContext, nodeContext: Vtree.NodeContext, removeSelf: boolean): any; } class LayoutProcessorResolver { find(formattingContext: Vtree.FormattingContext): LayoutProcessor_$0; } class BlockLayoutProcessor implements LayoutProcessor_$0 { layout(nodeContext: Vtree.NodeContext, column: Layout.Column, leadingEdge: boolean): Task.Result; createEdgeBreakPosition(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, columnBlockSize: number): Layout.BreakPosition; startNonInlineElementNode(nodeContext: Vtree.NodeContext): boolean; afterNonInlineElementNode(nodeContext: Vtree.NodeContext, stopAtOverflow: boolean): boolean; clearOverflownViewNodes(column: Layout.Column, parentNodeContext: Vtree.NodeContext, nodeContext: Vtree.NodeContext, removeSelf: boolean): void; finishBreak(column: Layout.Column, nodeContext: Vtree.NodeContext, forceRemoveSelf: boolean, endOfColumn: boolean): Task.Result; } class BlockFormattingContext_$0 implements LayoutProcessor_$0.BlockFormattingContext_$0 { private readonly parent; formattingContextType: FormattingContextType; constructor(parent: Vtree.FormattingContext); getName(): string; isFirstTime(nodeContext: Vtree.NodeContext, firstTime: boolean): boolean; getParent(): Vtree.FormattingContext; saveState(): any; restoreState(state: any): void; } const blockLayoutProcessor: BlockLayoutProcessor; const isInstanceOfBlockFormattingContext_$0: typeof LayoutProcessor_$0.isInstanceOfBlockFormattingContext_$0; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace GeometryUtil { class Rect { x1: number; y1: number; x2: number; y2: number; constructor(x1: number, y1: number, x2: number, y2: number); } class Point { x: number; y: number; constructor(x: number, y: number); } class Insets { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } class Segment { low: Point; high: Point; winding: number; shapeId: number; constructor(low: Point, high: Point, winding: number, shapeId: number); } class Band { y1: number; y2: number; x1: number; x2: number; left: Element | null; right: Element | null; constructor(y1: number, y2: number, x1: number, x2: number); } function segmentCompare(s1: Segment, s2: Segment): number; class Shape { points: Point[]; constructor(points: Point[]); addSegments(arr: Segment[], id: number): void; withOffset(offsetX: number, offsetY: number): Shape; } function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape; function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape; function shapeForRectObj(r: Rect): Shape; class BandIntersection { x: number; winding: number; shapeId: number; lowOrHigh: number; constructor(x: number, winding: number, shapeId: number, lowOrHigh: number); } function intersectY(s: Segment, y: number): number; function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void; function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[]; function ceil(v: number, unit: number): number; function floor(v: number, unit: number): number; function rotatePoint(point: Point): Point; function rotateBox(box: Rect): Rect; function unrotateBox(box: Rect): Rect; function rotateShape(shape: Shape): Shape; function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[]; function normalize(box: Rect, bands: Band[]): void; function findBand(bands: Band[], y: number): number; function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean; function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace CssCascade_$0 { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Vgen { const frontEdgeBlackListHor: { [key: string]: string; }; const frontEdgeBlackListVert: { [key: string]: string; }; const frontEdgeUnforcedBreakBlackListHor: { [key: string]: string; }; const frontEdgeUnforcedBreakBlackListVert: { [key: string]: string; }; type CustomRenderer = (p1: Element, p2: Element, p3: { [key: string]: Css.Val; }) => Task.Result; interface CustomRendererFactory { makeCustomRenderer(xmldoc: XmlDoc.XMLDocHolder): CustomRenderer; } function initIFrame(iframe: HTMLIFrameElement): void; interface StylerProducer { getStylerForDoc(xmldoc: XmlDoc.XMLDocHolder): CssStyler_$0.AbstractStyler; } class ViewFactory extends Base.SimpleEventTarget implements Vtree_$0.LayoutContext { readonly flowName: string; readonly context: Exprs.Context; readonly viewport: Viewport; readonly styler: CssStyler_$0.Styler; readonly regionIds: string[]; readonly xmldoc: XmlDoc.XMLDocHolder; readonly docFaces: Font.DocumentFaces; readonly footnoteStyle: CssCascade_$0.ElementStyle; readonly stylerProducer: StylerProducer; readonly page: Vtree_$0.Page; readonly customRenderer: CustomRenderer; readonly fallbackMap: { [key: string]: string; }; readonly documentURLTransformer: Base.DocumentURLTransformer; private static SVG_URL_ATTRIBUTES; document: Document; exprContentListener: Vtree_$0.ExprContentListener; nodeContext: Vtree_$0.NodeContext | null; viewRoot: Element | null; isFootnote: boolean; sourceNode: Node | null; offsetInNode: number; viewNode: Node | null; constructor(flowName: string, context: Exprs.Context, viewport: Viewport, styler: CssStyler_$0.Styler, regionIds: string[], xmldoc: XmlDoc.XMLDocHolder, docFaces: Font.DocumentFaces, footnoteStyle: CssCascade_$0.ElementStyle, stylerProducer: StylerProducer, page: Vtree_$0.Page, customRenderer: CustomRenderer, fallbackMap: { [key: string]: string; }, documentURLTransformer: Base.DocumentURLTransformer); clone(): Vtree_$0.LayoutContext; createPseudoelementShadow(element: Element, isRoot: boolean, cascStyle: CssCascade_$0.ElementStyle, computedStyle: { [key: string]: Css.Val; }, styler: CssStyler_$0.AbstractStyler, context: Exprs.Context, parentShadow: Vtree_$0.ShadowContext, subShadow: Vtree_$0.ShadowContext): Vtree_$0.ShadowContext; getPseudoMap(cascStyle: CssCascade_$0.ElementStyle, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext, context: Exprs.Context): {}; createRefShadow(href: string, type: Vtree_$0.ShadowType, element: Element, parentShadow: Vtree_$0.ShadowContext, subShadow: Vtree_$0.ShadowContext): Task.Result; createShadows(element: Element, isRoot: any, cascStyle: CssCascade_$0.ElementStyle, computedStyle: { [key: string]: Css.Val; }, styler: CssStyler_$0.AbstractStyler, context: Exprs.Context, shadowContext: Vtree_$0.ShadowContext): Task.Result; setViewRoot(viewRoot: Element, isFootnote: boolean): void; computeStyle(vertical: boolean, rtl: boolean, style: CssCascade_$0.ElementStyle, computedStyle: { [key: string]: Css.Val; }): boolean; private inheritFromSourceParent; resolveURL(url: string): string; inheritLangAttribute(): void; transferPolyfilledInheritedProps(computedStyle: { [key: string]: Css.Val; }): void; resolveFormattingContext(nodeContext: Vtree_$0.NodeContext, firstTime: boolean, display: Css.Ident, position: Css.Ident, float: Css.Ident, isRoot: boolean): void; private createElementView; private processAfterIfcontinues; isSVGUrlAttribute(attributeName: string): boolean; modifyElemDimensionWithImageResolution(images: { image: HTMLElement; element: HTMLElement; fetcher: TaskUtil.Fetcher; }[], imageResolution: number, computedStyle: { [key: string]: Css.Val; }, isVertical: boolean): void; private preprocessElementStyle; private findAndProcessRepeatingElements; private processRepeatOnBreak; private createTextNodeView; private preprocessTextContent; createNodeView(firstTime: boolean, atUnforcedBreak: boolean): Task.Result; setCurrent(nodeContext: Vtree_$0.NodeContext, firstTime: boolean, atUnforcedBreak?: boolean): Task.Result; processShadowContent(pos: Vtree_$0.NodeContext): Vtree_$0.NodeContext; private nextPositionInTree; isTransclusion(element: Element, elementStyle: CssCascade_$0.ElementStyle, transclusionType: string | null): boolean; nextInTree(position: Vtree_$0.NodeContext, atUnforcedBreak?: boolean): Task.Result; addImageFetchers(bg: Css.Val): void; applyComputedStyles(target: Element, computedStyle: { [key: string]: Css.Val; }): void; applyPseudoelementStyle(nodeContext: Vtree_$0.NodeContext, pseudoName: string, target: Element): void; peelOff(nodeContext: Vtree_$0.NodeContext, nodeOffset: number): Task.Result; createElement(ns: string, tag: string): Element; applyFootnoteStyle(vertical: boolean, rtl: boolean, target: Element): boolean; processFragmentedBlockEdge(nodeContext: Vtree_$0.NodeContext): void; convertLengthToPx(numeric: Css.Numeric, viewNode: Node, clientLayout: Vtree_$0.ClientLayout): number | Css.Numeric; isSameNodePositionStep(step1: Vtree_$0.NodePositionStep, step2: Vtree_$0.NodePositionStep): boolean; isSameNodePosition(nodePosition1: Vtree_$0.NodePosition, nodePosition2: Vtree_$0.NodePosition): boolean; isPseudoelement(elem: any): boolean; } const fb2Remap: { a: string; sub: string; sup: string; table: string; tr: string; td: string; th: string; code: string; body: string; p: string; v: string; date: string; emphasis: string; strong: string; style: string; strikethrough: string; }; const propertiesNotPassedToDOM: { "box-decoration-break": boolean; "float-min-wrap-block": boolean; "float-reference": boolean; "flow-into": boolean; "flow-linger": boolean; "flow-options": boolean; "flow-priority": boolean; "footnote-policy": boolean; page: boolean; }; class DefaultClientLayout implements Vtree_$0.ClientLayout { layoutBox: Element; window: Window; constructor(viewport: Viewport); private subtractOffsets; getRangeClientRects(range: Range): ClientRect[]; getElementClientRect(element: Element): ClientRect; getElementComputedStyle(element: Element): CSSStyleDeclaration; } class Viewport { readonly window: Window; readonly fontSize: number; document: Document; root: HTMLElement; private outerZoomBox; contentContainer: HTMLElement; layoutBox: Element; width: number; height: number; constructor(window: Window, fontSize: number, opt_root?: HTMLElement, opt_width?: number, opt_height?: number); resetZoom(): void; zoom(width: number, height: number, scale: number): void; clear(): void; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace TaskUtil { class Fetcher { readonly fetch: () => Task.Result; name: string; arrived: boolean; resource: T; task: Task.Task; piggybacks: ((p1: any) => void)[] | null; constructor(fetch: () => Task.Result, opt_name?: string); start(): void; piggyback(fn: (p1: T) => void): void; get(): Task.Result; hasArrived(): boolean; } const waitForFetchers: (fetchers: Fetcher[]) => Task.Result; function loadElement(elem: Element, src: string): Fetcher; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssTokenizer { interface TokenizerHandler { error(mnemonics: string, token: Token): void; } function escapeParseSingle(str: string): string; function escapeParse(str: string): string; enum TokenType { EOF = 0, IDENT = 1, STR = 2, NUMERIC = 3, NUM = 4, INT = 5, FUNC = 6, HASH = 7, URL = 8, CLASS = 9, O_PAR = 10, C_PAR = 11, O_BRC = 12, C_BRC = 13, O_BRK = 14, C_BRK = 15, COMMA = 16, SEMICOL = 17, COLON = 18, SLASH = 19, AT = 20, PERCENT = 21, QMARK = 22, PLUS = 23, MINUS = 24, BAR_BAR = 25, AMP_AMP = 26, BANG = 31, DOLLAR = 32, HAT = 33, BAR = 34, TILDE = 35, STAR = 36, GT = 37, LT = 38, EQ = 39, BANG_EQ = 41, DOLLAR_EQ = 42, HAT_EQ = 43, BAR_EQ = 44, TILDE_EQ = 45, STAR_EQ = 46, GT_EQ = 47, LT_EQ = 48, EQ_EQ = 49, COL_COL = 50, INVALID = 51, LAST = 51 } class Token { type: TokenType; precededBySpace: boolean; num: number; text: string; position: number; constructor(); } enum Action { SPACE = 1, INT = 2, IDENT = 3, BANG = 4, HASH = 6, DOLLAR = 7, PERCENT = 8, AMP = 9, O_PAR = 10, C_PAR = 11, STAR = 12, PLUS = 13, COMMA = 14, MINUS = 15, DOT = 16, SLASH = 17, COLON = 18, SEMICOL = 19, LT = 20, EQ = 21, GT = 22, QMARK = 23, AT = 24, O_BRK = 25, C_BRK = 26, O_BRC = 27, C_BRC = 28, BSLASH = 29, HAT = 30, BAR = 31, TILDE = 32, STR1 = 33, STR2 = 34, END = 35, EQTAIL = 36, ENDINT = 37, ENDNUM = 38, CONT = 39, UNIT = 40, PCUNIT = 41, NUMBER = 42, ENDIDNT = 43, IDNTESC = 44, ENDIDES = 45, ENDSTR = 46, ENDESTR = 47, STR1ESC = 48, STR2ESC = 49, BAR_BAR = 50, AMP_AMP = 51, FUNC = 52, FUNCES = 53, COMMENT = 54, COMMST = 55, ENDNOTK = 56, MINMIN = 57, TOINT = 58, TONUM = 59, TOIDENT = 60, TOIDES = 61, KILL1 = 62, KILL2 = 63, URL = 64, URL1 = 65, URL2 = 66, ENDURL = 67, TERMURL = 68, FINURL = 69, LT_BG = 70, LT_BG_M = 71, INVALID = 72, CHKPOSS = 73, CHKPOSN = 74, URLESC = 75, IDESCH = 76, COL_COL = 77, TOCLASS = 78, CHKSP = 79, EOF = 80 } function makeActions(def: Action, spec: Action[]): Action[]; const actionsNormal: Action[]; const actionsIdent: Action[]; const actionsNumOrClass: Action[]; const actionsMinus: Action[]; const actionsIdentEsc: Action[]; const actionsInt: Action[]; const actionsNumber: Action[]; const actionsCheckEq: Action[]; const actionsColon: Action[]; const actionsBar: Action[]; const actionsAmp: Action[]; const actionsSlash: Action[]; const actionsComment: Action[]; const actionsCommentStar: Action[]; const actionsMinusMinus: Action[]; const actionsLt: Action[]; const actionsLtBang: Action[]; const actionsLtBangMinus: Action[]; const actionsIdentEscChr: Action[]; const actionsStr1: Action[]; const actionsStr2: Action[]; const actionsStr1Esc: Action[]; const actionsStr2Esc: Action[]; const actionsURL: Action[]; const actionsURLInside: Action[]; const actionsURLInside1: Action[]; const actionsURLInside2: Action[]; const actionsURLTail: Action[]; const INITIAL_INDEX_MASK = 15; class Tokenizer { input: string; readonly handler: TokenizerHandler; indexMask: number; buffer: Token[]; head: number; tail: number; curr: number; position: number; constructor(input: string, handler: TokenizerHandler); token(): Token; nthToken(n: number): Token; consume(): void; mark(): void; reset(): void; unmark(): void; hasMark(): boolean; private reallocate; private error; private fillBuffer; } } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssParser { const SPECIFICITY_USER_AGENT: number; const SPECIFICITY_USER: number; const SPECIFICITY_AUTHOR: number; const SPECIFICITY_STYLE: number; const SPECIFICITY_STYLE_IMPORTANT: number; const SPECIFICITY_AUTHOR_IMPORTANT: number; const SPECIFICITY_USER_IMPORTANT: number; enum StylesheetFlavor { USER_AGENT = "UA", USER = "User", AUTHOR = "Author" } function colorFromHash(text: string): Css.Color; class ParserHandler implements CssTokenizer.TokenizerHandler { scope: Exprs.LexicalScope; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope); getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startMediaRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; getImportantSpecificity(): number; getBaseSpecificity(): number; } class DispatchParserHandler extends ParserHandler { stack: ParserHandler[]; tokenizer: CssTokenizer.Tokenizer; slave: ParserHandler; constructor(); pushHandler(slave: ParserHandler): void; popHandler(): void; getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; errorMsg(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; } class SkippingParserHandler extends ParserHandler { owner: DispatchParserHandler; readonly topLevel: any; depth: number; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: any); getCurrentToken(): CssTokenizer.Token; error(mnemonics: string, token: CssTokenizer.Token): void; startRuleBody(): void; endRule(): void; } class SlaveParserHandler extends SkippingParserHandler { constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: boolean); report(message: string): void; reportAndSkip(message: string): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; property(name: string, value: Css.Val, important: boolean): void; } const actionsBase: Action_$0[]; const actionsStyleAttribute: Action_$0[]; const actionsSelector: Action_$0[]; const actionsSelectorInFunc: Action_$0[]; const actionsSelectorCont: Action_$0[]; const actionsSelectorStart: Action_$0[]; const actionsPropVal: Action_$0[]; const actionsExprVal: Action_$0[]; const actionsExprOp: Action_$0[]; const actionsError: Action_$0[]; const actionsErrorDecl: Action_$0[]; const actionsErrorSelector: Action_$0[]; const priority: number[]; enum Action_$0 { SELECTOR_NAME_1 = 1, SELECTOR_NAME = 2, SELECTOR_ANY_1 = 3, SELECTOR_ANY = 4, SELECTOR_ID_1 = 5, SELECTOR_ID = 6, SELECTOR_CLASS_1 = 7, SELECTOR_CLASS = 8, SELECTOR_ATTR_1 = 9, SELECTOR_ATTR = 10, SELECTOR_CHILD = 11, SELECTOR_SIBLING = 12, SELECTOR_BODY = 13, SELECTOR_PSEUDOCLASS = 14, VAL_IDENT = 15, VAL_HASH = 16, VAL_NUM = 17, VAL_INT = 18, VAL_NUMERIC = 19, VAL_STR = 20, VAL_URL = 21, VAL_COMMA = 22, VAL_SLASH = 23, VAL_FUNC = 24, VAL_C_PAR = 25, VAL_END = 26, RULE_END = 27, IDENT = 28, SELECTOR_START = 29, AT = 30, EXPR_IDENT = 31, EXPR_NUM = 32, EXPR_NUMERIC = 33, EXPR_STR = 34, EXPR_PARAM = 35, EXPR_PREFIX = 36, EXPR_INFIX = 37, EXPR_FUNC = 38, EXPR_C_PAR = 39, EXPR_O_PAR = 40, SELECTOR_NEXT = 41, SELECTOR_PSEUDOELEM = 42, EXPR_O_BRC = 43, VAL_FINISH = 44, EXPR_INFIX_NAME = 45, PROP = 46, VAL_BANG = 47, VAL_BRC = 48, EXPR_SEMICOL = 49, ERROR_PUSH = 50, ERROR_POP = 51, ERROR_POP_DECL = 52, ERROR_SEMICOL = 53, VAL_PLUS = 54, SELECTOR_PSEUDOCLASS_1 = 55, SELECTOR_FOLLOWING_SIBLING = 56, DONE = 200 } const OP_MEDIA_AND: number; enum ExprContext { PROP = 0, WHEN = 1, MEDIA = 2, IMPORT = 3 } class Parser { actions: Action_$0[]; tokenizer: CssTokenizer.Tokenizer; readonly handler: ParserHandler; baseURL: string; valStack: any[]; namespacePrefixToURI: { [key: string]: string; }; defaultNamespaceURI: string | null; propName: string | null; propImportant: boolean; exprContext: ExprContext; result: Css.Val; importReady: boolean; importURL: string | null; importCondition: Css.Expr; errorBrackets: number[]; ruleStack: string[]; regionRule: boolean; pageRule: boolean; constructor(actions: Action_$0[], tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string); extractVals(sep: string, index: number): Css.Val[]; valStackReduce(sep: string, token: CssTokenizer.Token): Css.Val; exprError(mnemonics: string, token: CssTokenizer.Token): void; exprStackReduce(op: number, token: CssTokenizer.Token): boolean; readPseudoParams(): (number | string)[]; private readNthPseudoParams; makeCondition(classes: string | null, condition: Exprs.Val): Css.Expr; isInsidePropertyOnlyRule(): boolean; runParser(count: number, parsingValue: any, parsingStyleAttr: boolean, parsingMediaQuery: any, parsingFunctionParam: any): boolean; } class ErrorHandler extends ParserHandler { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); error(mnemonics: string, token: CssTokenizer.Token): void; getScope(): Exprs.LexicalScope; } function parseStylesheet(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromText(text: string, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromURL(url: string, handler: ParserHandler, classes: string | null, media: string | null): Task.Result; function parseValue(scope: Exprs.LexicalScope, tokenizer: CssTokenizer.Tokenizer, baseURL: string): Css.Val; function parseStyleAttribute(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): void; function parseMediaQuery(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): Css.Expr; const numProp: { [key: string]: boolean; }; function takesOnlyNum(propName: string): boolean; function evaluateExprToCSS(context: Exprs.Context, val: Exprs.Val, propName: string): Css.Val; function evaluateCSSToCSS(context: Exprs.Context, val: Css.Val, propName: string): Css.Val; } declare namespace CssTokenizer { interface TokenizerHandler { error(mnemonics: string, token: Token): void; } function escapeParseSingle(str: string): string; function escapeParse(str: string): string; enum TokenType { EOF = 0, IDENT = 1, STR = 2, NUMERIC = 3, NUM = 4, INT = 5, FUNC = 6, HASH = 7, URL = 8, CLASS = 9, O_PAR = 10, C_PAR = 11, O_BRC = 12, C_BRC = 13, O_BRK = 14, C_BRK = 15, COMMA = 16, SEMICOL = 17, COLON = 18, SLASH = 19, AT = 20, PERCENT = 21, QMARK = 22, PLUS = 23, MINUS = 24, BAR_BAR = 25, AMP_AMP = 26, BANG = 31, DOLLAR = 32, HAT = 33, BAR = 34, TILDE = 35, STAR = 36, GT = 37, LT = 38, EQ = 39, BANG_EQ = 41, DOLLAR_EQ = 42, HAT_EQ = 43, BAR_EQ = 44, TILDE_EQ = 45, STAR_EQ = 46, GT_EQ = 47, LT_EQ = 48, EQ_EQ = 49, COL_COL = 50, INVALID = 51, LAST = 51 } class Token { type: TokenType; precededBySpace: boolean; num: number; text: string; position: number; constructor(); } enum Action { SPACE = 1, INT = 2, IDENT = 3, BANG = 4, HASH = 6, DOLLAR = 7, PERCENT = 8, AMP = 9, O_PAR = 10, C_PAR = 11, STAR = 12, PLUS = 13, COMMA = 14, MINUS = 15, DOT = 16, SLASH = 17, COLON = 18, SEMICOL = 19, LT = 20, EQ = 21, GT = 22, QMARK = 23, AT = 24, O_BRK = 25, C_BRK = 26, O_BRC = 27, C_BRC = 28, BSLASH = 29, HAT = 30, BAR = 31, TILDE = 32, STR1 = 33, STR2 = 34, END = 35, EQTAIL = 36, ENDINT = 37, ENDNUM = 38, CONT = 39, UNIT = 40, PCUNIT = 41, NUMBER = 42, ENDIDNT = 43, IDNTESC = 44, ENDIDES = 45, ENDSTR = 46, ENDESTR = 47, STR1ESC = 48, STR2ESC = 49, BAR_BAR = 50, AMP_AMP = 51, FUNC = 52, FUNCES = 53, COMMENT = 54, COMMST = 55, ENDNOTK = 56, MINMIN = 57, TOINT = 58, TONUM = 59, TOIDENT = 60, TOIDES = 61, KILL1 = 62, KILL2 = 63, URL = 64, URL1 = 65, URL2 = 66, ENDURL = 67, TERMURL = 68, FINURL = 69, LT_BG = 70, LT_BG_M = 71, INVALID = 72, CHKPOSS = 73, CHKPOSN = 74, URLESC = 75, IDESCH = 76, COL_COL = 77, TOCLASS = 78, CHKSP = 79, EOF = 80 } function makeActions(def: Action, spec: Action[]): Action[]; const actionsNormal: Action[]; const actionsIdent: Action[]; const actionsNumOrClass: Action[]; const actionsMinus: Action[]; const actionsIdentEsc: Action[]; const actionsInt: Action[]; const actionsNumber: Action[]; const actionsCheckEq: Action[]; const actionsColon: Action[]; const actionsBar: Action[]; const actionsAmp: Action[]; const actionsSlash: Action[]; const actionsComment: Action[]; const actionsCommentStar: Action[]; const actionsMinusMinus: Action[]; const actionsLt: Action[]; const actionsLtBang: Action[]; const actionsLtBangMinus: Action[]; const actionsIdentEscChr: Action[]; const actionsStr1: Action[]; const actionsStr2: Action[]; const actionsStr1Esc: Action[]; const actionsStr2Esc: Action[]; const actionsURL: Action[]; const actionsURLInside: Action[]; const actionsURLInside1: Action[]; const actionsURLInside2: Action[]; const actionsURLTail: Action[]; const INITIAL_INDEX_MASK = 15; class Tokenizer { input: string; readonly handler: TokenizerHandler; indexMask: number; buffer: Token[]; head: number; tail: number; curr: number; position: number; constructor(input: string, handler: TokenizerHandler); token(): Token; nthToken(n: number): Token; consume(): void; mark(): void; reset(): void; unmark(): void; hasMark(): boolean; private reallocate; private error; private fillBuffer; } } declare namespace CssValidator { interface PropertyReceiver { unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class Node { validator: PropertyValidator; success: Node; failure: Node; code: number; constructor(validator: PropertyValidator); isSpecial(): boolean; markAsStartGroup(): void; isStartGroup(): boolean; markAsEndGroup(): void; isEndGroup(): boolean; markAsStartAlternate(index: number): void; isStartAlternate(): boolean; markAsEndAlternate(index: number): void; isEndAlternate(): boolean; getAlternate(): number; } class Connection { where: number; success: boolean; what: number; constructor(where: number, success: boolean); } enum Add_$0 { FOLLOW = 1, OPTIONAL = 2, REPEATED = 3, ALTERNATE = 4 } class ValidatingGroup { nodes: Node[]; connections: Connection[]; match: number[]; nomatch: number[]; error: number[]; emptyHead: boolean; connect(arr: number[], nodeIndex: number): void; clone(): ValidatingGroup; private addSpecialToArr; endSpecialGroup(): void; startSpecialGroup(): void; endClause(clause: number): void; startClause(clause: number): void; addPrimitive(validator: PropertyValidator): void; isSimple(): boolean; isPrimitive(): boolean; addGroup(group: ValidatingGroup, how: Add_$0): void; finish(successTerminal: Node, failTerminal: Node): Node; } const ALLOW_EMPTY = 1; const ALLOW_STR = 2; const ALLOW_IDENT = 4; const ALLOW_POS_NUMERIC = 8; const ALLOW_POS_NUM = 16; const ALLOW_POS_INT = 32; const ALLOW_COLOR = 64; const ALLOW_URL = 128; const ALLOW_NEGATIVE = 256; const ALLOW_ZERO = 512; const ALLOW_ZERO_PERCENT = 1024; const ALLOW_SLASH = 2048; type ValueMap = { [key: string]: Css.Val; }; class PropertyValidator extends Css.Visitor { constructor(); validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class PrimitiveValidator extends PropertyValidator { readonly allowed: number; readonly idents: ValueMap; readonly units: ValueMap; constructor(allowed: number, idents: ValueMap, units: ValueMap); visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; combine(other: PrimitiveValidator): PrimitiveValidator; } const ALWAYS_FAIL: PrimitiveValidator; class ListValidator extends PropertyValidator { successTerminal: Node; failureTerminal: Node; first: Node; constructor(group: ValidatingGroup); validateList(arr: Css.Val[], slice: boolean, startIndex: number): Css.Val[]; validateSingle(inval: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SpaceListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class CommaListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class FuncValidator extends ListValidator { readonly name: string; constructor(name: string, group: ValidatingGroup); validateSingle(inval: Css.Val): Css.Val; visitFunc(func: Css.Func): Css.Val; } class ShorthandSyntaxNode { tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxProperty extends ShorthandSyntaxNode { readonly name: string; validator: PropertyValidator; constructor(validatorSet: ValidatorSet, name: string); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxPropertyN extends ShorthandSyntaxProperty { readonly names: string[]; constructor(validatorSet: ValidatorSet, names: string[]); success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxCompound extends ShorthandSyntaxNode { readonly nodes: ShorthandSyntaxNode[]; readonly slash: boolean; constructor(nodes: ShorthandSyntaxNode[], slash: boolean); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; } class ShorthandValidator extends Css.Visitor { syntax: ShorthandSyntaxNode[]; propList: string[]; error: boolean; values: ValueMap; validatorSet: ValidatorSet; setOwner(validatorSet: ValidatorSet): void; syntaxNodeForProperty(name: string): ShorthandSyntaxNode; clone(): this; init(syntax: ShorthandSyntaxNode[], propList: string[]): void; finish(important: boolean, receiver: PropertyReceiver): boolean; propagateInherit(important: boolean, receiver: PropertyReceiver): void; validateList(list: Css.Val[]): number; validateSingle(val: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SimpleShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class InsetsShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; createSyntaxNode(): ShorthandSyntaxPropertyN; } class InsetsSlashShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class CommaShorthandValidator extends SimpleShorthandValidator { constructor(); mergeIn(acc: { [key: string]: Css.Val[]; }, values: ValueMap): void; visitCommaList(list: Css.CommaList): Css.Val; } class FontShorthandValidator extends SimpleShorthandValidator { constructor(); init(syntax: ShorthandSyntaxNode[], propList: string[]): void; validateList(list: Css.Val[]): number; visitCommaList(list: Css.CommaList): Css.Val; visitIdent(ident: Css.Ident): Css.Val; } const shorthandValidators: { [key: string]: typeof ShorthandValidator; }; class ValidatorSet { validators: { [key: string]: PropertyValidator; }; prefixes: { [key: string]: { [key: string]: boolean; }; }; defaultValues: ValueMap; namedValidators: { [key: string]: ValidatingGroup; }; systemFonts: { [key: string]: ValueMap; }; shorthands: { [key: string]: ShorthandValidator; }; layoutProps: ValueMap; backgroundProps: ValueMap; private addReplacement; private newGroup; private addCounts; private primitive; private newFunc; initBuiltInValidators(): void; private isBuiltIn; private readNameAndPrefixes; private parseValidators; private parseDefaults; private parseShorthands; parse(text: string): void; makePropSet(propList: string[]): ValueMap; validatePropertyAndHandleShorthand(name: string, value: Css.Val, important: boolean, receiver: PropertyReceiver): void; } function baseValidatorSet(): ValidatorSet; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Matchers { function matchANPlusB(order: number, a: number, b: number): boolean; interface Matcher { matches(): boolean; } class AnyMatcher implements Matcher { readonly matchers: Matcher[]; constructor(matchers: Matcher[]); matches(): boolean; } class AllMatcher implements Matcher { readonly matchers: Matcher[]; constructor(matchers: Matcher[]); matches(): boolean; } class NthFragmentMatcher implements Matcher { readonly elementOffset: number; readonly a: number; readonly b: number; static fragmentIndices: {}; registerFragmentIndex(elementOffset: number, fragmentIndex: number, priority: number): void; clearFragmentIndices(): void; constructor(elementOffset: number, a: number, b: number); matches(): boolean; } class MatcherBuilder { buildViewConditionMatcher(elementOffset: number, viewCondition: string): Matcher; buildAllMatcher(matchers: Matcher[]): Matcher; buildAnyMatcher(matchers: Matcher[]): Matcher; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace Diff { type Change = (number | string)[]; function diffChars(originalText: string, newText: string): Change[]; function restoreOriginalText(changes: Change[]): any; function restoreNewText(changes: Change[]): any; function resolveNewIndex(changes: Change[], oldIndex: number): number; function resolveOriginalIndex(changes: Change[], newIndex: number): number; function resolveIndex(changes: Change[], index: number, coef: number): number; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace GeometryUtil { class Rect { x1: number; y1: number; x2: number; y2: number; constructor(x1: number, y1: number, x2: number, y2: number); } class Point { x: number; y: number; constructor(x: number, y: number); } class Insets { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } class Segment { low: Point; high: Point; winding: number; shapeId: number; constructor(low: Point, high: Point, winding: number, shapeId: number); } class Band { y1: number; y2: number; x1: number; x2: number; left: Element | null; right: Element | null; constructor(y1: number, y2: number, x1: number, x2: number); } function segmentCompare(s1: Segment, s2: Segment): number; class Shape { points: Point[]; constructor(points: Point[]); addSegments(arr: Segment[], id: number): void; withOffset(offsetX: number, offsetY: number): Shape; } function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape; function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape; function shapeForRectObj(r: Rect): Shape; class BandIntersection { x: number; winding: number; shapeId: number; lowOrHigh: number; constructor(x: number, winding: number, shapeId: number, lowOrHigh: number); } function intersectY(s: Segment, y: number): number; function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void; function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[]; function ceil(v: number, unit: number): number; function floor(v: number, unit: number): number; function rotatePoint(point: Point): Point; function rotateBox(box: Rect): Rect; function unrotateBox(box: Rect): Rect; function rotateShape(shape: Shape): Shape; function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[]; function normalize(box: Rect, bands: Band[]): void; function findBand(bands: Band[], y: number): number; function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean; function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace TaskUtil { class Fetcher { readonly fetch: () => Task.Result; name: string; arrived: boolean; resource: T; task: Task.Task; piggybacks: ((p1: any) => void)[] | null; constructor(fetch: () => Task.Result, opt_name?: string); start(): void; piggyback(fn: (p1: T) => void): void; get(): Task.Result; hasArrived(): boolean; } const waitForFetchers: (fetchers: Fetcher[]) => Task.Result; function loadElement(elem: Element, src: string): Fetcher; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Constants { let isDebug: boolean; function setDebug(value: boolean): void; enum PageProgression { LTR = "ltr", RTL = "rtl" } function pageProgressionOf(str: string): PageProgression; enum PageSide { LEFT = "left", RIGHT = "right" } enum ReadyState { LOADING = "loading", INTERACTIVE = "interactive", COMPLETE = "complete" } const constants: { PageProgression: typeof PageProgression; PageSide: typeof PageSide; ReadyState: typeof ReadyState; }; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace Diff { type Change = (number | string)[]; function diffChars(originalText: string, newText: string): Change[]; function restoreOriginalText(changes: Change[]): any; function restoreNewText(changes: Change[]): any; function resolveNewIndex(changes: Change[], oldIndex: number): number; function resolveOriginalIndex(changes: Change[], newIndex: number): number; function resolveIndex(changes: Change[], index: number, coef: number): number; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace GeometryUtil { class Rect { x1: number; y1: number; x2: number; y2: number; constructor(x1: number, y1: number, x2: number, y2: number); } class Point { x: number; y: number; constructor(x: number, y: number); } class Insets { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } class Segment { low: Point; high: Point; winding: number; shapeId: number; constructor(low: Point, high: Point, winding: number, shapeId: number); } class Band { y1: number; y2: number; x1: number; x2: number; left: Element | null; right: Element | null; constructor(y1: number, y2: number, x1: number, x2: number); } function segmentCompare(s1: Segment, s2: Segment): number; class Shape { points: Point[]; constructor(points: Point[]); addSegments(arr: Segment[], id: number): void; withOffset(offsetX: number, offsetY: number): Shape; } function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape; function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape; function shapeForRectObj(r: Rect): Shape; class BandIntersection { x: number; winding: number; shapeId: number; lowOrHigh: number; constructor(x: number, winding: number, shapeId: number, lowOrHigh: number); } function intersectY(s: Segment, y: number): number; function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void; function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[]; function ceil(v: number, unit: number): number; function floor(v: number, unit: number): number; function rotatePoint(point: Point): Point; function rotateBox(box: Rect): Rect; function unrotateBox(box: Rect): Rect; function rotateShape(shape: Shape): Shape; function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[]; function normalize(box: Rect, bands: Band[]): void; function findBand(bands: Band[], y: number): number; function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean; function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void; } declare namespace TaskUtil { class Fetcher { readonly fetch: () => Task.Result; name: string; arrived: boolean; resource: T; task: Task.Task; piggybacks: ((p1: any) => void)[] | null; constructor(fetch: () => Task.Result, opt_name?: string); start(): void; piggyback(fn: (p1: T) => void): void; get(): Task.Result; hasArrived(): boolean; } const waitForFetchers: (fetchers: Fetcher[]) => Task.Result; function loadElement(elem: Element, src: string): Fetcher; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace GeometryUtil { class Rect { x1: number; y1: number; x2: number; y2: number; constructor(x1: number, y1: number, x2: number, y2: number); } class Point { x: number; y: number; constructor(x: number, y: number); } class Insets { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } class Segment { low: Point; high: Point; winding: number; shapeId: number; constructor(low: Point, high: Point, winding: number, shapeId: number); } class Band { y1: number; y2: number; x1: number; x2: number; left: Element | null; right: Element | null; constructor(y1: number, y2: number, x1: number, x2: number); } function segmentCompare(s1: Segment, s2: Segment): number; class Shape { points: Point[]; constructor(points: Point[]); addSegments(arr: Segment[], id: number): void; withOffset(offsetX: number, offsetY: number): Shape; } function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape; function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape; function shapeForRectObj(r: Rect): Shape; class BandIntersection { x: number; winding: number; shapeId: number; lowOrHigh: number; constructor(x: number, winding: number, shapeId: number, lowOrHigh: number); } function intersectY(s: Segment, y: number): number; function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void; function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[]; function ceil(v: number, unit: number): number; function floor(v: number, unit: number): number; function rotatePoint(point: Point): Point; function rotateBox(box: Rect): Rect; function unrotateBox(box: Rect): Rect; function rotateShape(shape: Shape): Shape; function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[]; function normalize(box: Rect, bands: Band[]): void; function findBand(bands: Band[], y: number): number; function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean; function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } type LayoutType = Layout; declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace PageFloats_$0 { const FloatReference_$0: typeof PageFloats.FloatReference_$0; type FloatReference_$0 = PageFloats.FloatReference_$0; function floatReferenceOf(str: string): FloatReference_$0; function isPageFloat(floatReference: FloatReference_$0): boolean; function resolveInlineFloatDirection(floatSide: string, vertical: boolean, direction: string): string; class PageFloat_$0 implements PageFloats.PageFloat_$0 { readonly nodePosition: Vtree.NodePosition; readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly clearSide: string | null; readonly flowName: string; readonly floatMinWrapBlock: Css.Numeric | null; order: number | null; id: PageFloatID_$0 | null; constructor(nodePosition: Vtree.NodePosition, floatReference: FloatReference_$0, floatSide: string, clearSide: string | null, flowName: string, floatMinWrapBlock: Css.Numeric | null); getOrder(): number; getId(): PageFloatID_$0; isAllowedOnContext(pageFloatLayoutContext: PageFloatLayoutContext_$0): boolean; isAllowedToPrecede(other: PageFloat_$0): boolean; } class PageFloatStore { private floats; private nextPageFloatIndex; private nextOrder; private createPageFloatId; addPageFloat(float: PageFloat_$0): void; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; findPageFloatById(id: PageFloatID_$0): PageFloat_$0; } class PageFloatFragment_$0 implements PageFloats.PageFloatFragment_$0 { readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly continuations: PageFloatContinuation_$0[]; readonly area: Vtree.Container; readonly continues: boolean; constructor(floatReference: FloatReference_$0, floatSide: string, continuations: PageFloatContinuation_$0[], area: Vtree.Container, continues: boolean); hasFloat(float: PageFloat_$0): boolean; findNotAllowedFloat(context: PageFloatLayoutContext_$0): PageFloat_$0 | null; getOuterShape(): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; getOrder(): number; shouldBeStashedBefore(float: PageFloat_$0): boolean; addContinuations(continuations: PageFloatContinuation_$0[]): void; getFlowName(): string; } class PageFloatContinuation_$0 implements PageFloats.PageFloatContinuation_$0 { readonly float: PageFloat_$0; readonly nodePosition: Vtree.NodePosition; constructor(float: PageFloat_$0, nodePosition: Vtree.NodePosition); equals(other: PageFloatContinuation_$0 | null): boolean; } type PageFloatPlacementCondition_$0 = PageFloats.PageFloatPlacementCondition_$0; class PageFloatLayoutContext_$0 implements PageFloats.PageFloatLayoutContext_$0 { readonly parent: PageFloatLayoutContext_$0; private readonly floatReference; private container; readonly flowName: string | null; readonly generatingNodePosition: Vtree.NodePosition | null; private children; writingMode: Css.Val; direction: Css.Val; private invalidated; private floatStore; private forbiddenFloats; floatFragments: PageFloatFragment_$0[]; private stashedFloatFragments; private floatAnchors; private floatsDeferredToNext; private floatsDeferredFromPrevious; private layoutConstraints; private locked; constructor(parent: PageFloatLayoutContext_$0, floatReference: FloatReference_$0 | null, container: Vtree.Container, flowName: string | null, generatingNodePosition: Vtree.NodePosition | null, writingMode: Css.Val | null, direction: Css.Val | null); private getParent; private getPreviousSiblingOf; private getPreviousSibling; getContainer(floatReference?: FloatReference_$0): Vtree.Container; setContainer(container: Vtree.Container): void; addPageFloat(float: PageFloat_$0): void; getPageFloatLayoutContext(floatReference: FloatReference_$0): PageFloatLayoutContext_$0; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; private forbid; isForbidden(float: PageFloat_$0): boolean; addPageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; removePageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; findPageFloatFragment(float: PageFloat_$0): PageFloatFragment_$0 | null; hasFloatFragments(condition?: (p1: PageFloatFragment_$0) => boolean): boolean; hasContinuingFloatFragmentsInFlow(flowName: string): boolean; registerPageFloatAnchor(float: PageFloat_$0, anchorViewNode: Node): void; collectPageFloatAnchors(): any; isAnchorAlreadyAppeared(floatId: PageFloatID_$0): boolean; deferPageFloat(continuation: PageFloatContinuation_$0): void; hasPrecedingFloatsDeferredToNext(float: PageFloat_$0, ignoreReference?: boolean): boolean; getLastFollowingFloatInFragments(float: PageFloat_$0): PageFloat_$0 | null; getDeferredPageFloatContinuations(flowName?: string | null): PageFloatContinuation_$0[]; getPageFloatContinuationsDeferredToNext(flowName?: string | null): PageFloatContinuation_$0[]; getFloatsDeferredToNextInChildContexts(): PageFloat_$0[]; checkAndForbidNotAllowedFloat(): boolean; checkAndForbidFloatFollowingDeferredFloat(): boolean; finish(): void; hasSameContainerAs(other: PageFloatLayoutContext_$0): boolean; invalidate(): void; detachChildren(): PageFloatLayoutContext_$0[]; attachChildren(children: PageFloatLayoutContext_$0[]): void; isInvalidated(): any; validate(): void; private toLogical; private toPhysical; removeEndFloatFragments(floatSide: string): void; stashEndFloatFragments(float: PageFloat_$0): void; restoreStashedFragments(floatReference: FloatReference_$0): void; discardStashedFragments(floatReference: FloatReference_$0): void; getStashedFloatFragments(floatReference: FloatReference_$0): PageFloatFragment_$0[]; private getLimitValue; private getLimitValueInner; private getLimitValuesInner; setFloatAreaDimensions(area: LayoutType.PageFloatArea, floatReference: FloatReference_$0, floatSide: string, anchorEdge: number | null, init: boolean, force: boolean, condition: PageFloatPlacementCondition_$0): string | null; getFloatFragmentExclusions(): GeometryUtil.Shape[]; private reattachFloatFragments; getMaxReachedAfterEdge(): number; getBlockStartEdgeOfBlockEndFloats(): number; getPageFloatClearEdge(clear: string, column: LayoutType.Column): number; getPageFloatPlacementCondition(float: PageFloat_$0, floatSide: string, clearSide: string | null): PageFloatPlacementCondition_$0; getLayoutConstraints(): LayoutType.LayoutConstraint[]; addLayoutConstraint(layoutConstraint: LayoutType.LayoutConstraint, floatReference: FloatReference_$0): void; isColumnFullWithPageFloats(column: LayoutType.Column): boolean; getMaxBlockSizeOfPageFloats(): number; lock(): void; unlock(): void; isLocked(): boolean; } interface PageFloatLayoutStrategy_$0 extends PageFloats.PageFloatLayoutStrategy_$0 { } class PageFloatLayoutStrategyResolver { register(strategy: PageFloatLayoutStrategy_$0): void; findByNodeContext(nodeContext: Vtree.NodeContext): PageFloatLayoutStrategy_$0; findByFloat(float: PageFloat_$0): PageFloatLayoutStrategy_$0; } class NormalPageFloatLayoutStrategy implements PageFloatLayoutStrategy_$0 { appliesToNodeContext(nodeContext: Vtree.NodeContext): boolean; appliesToFloat(float: PageFloat_$0): boolean; createPageFloat(nodeContext: Vtree.NodeContext, pageFloatLayoutContext: PageFloatLayoutContext_$0, column: LayoutType.Column): Task.Result; createPageFloatFragment(continuations: PageFloatContinuation_$0[], floatSide: string, floatArea: LayoutType.PageFloatArea, continues: boolean): PageFloatFragment_$0; findPageFloatFragment(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): PageFloatFragment_$0 | null; adjustPageFloatArea(floatArea: LayoutType.PageFloatArea, floatContainer: Vtree.Container, column: LayoutType.Column): void; forbid(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): void; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade_$0 { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace CssStyler_$0 { class SlipRange { endStuckFixed: number; endFixed: number; endSlipped: number; constructor(endStuckFixed: any, endFixed: any, endSlipped: any); } class SlipMap { map: SlipRange[]; getMaxFixed(): number; getMaxSlipped(): number; addStuckRange(endFixed: number): void; addSlippedRange(endFixed: number): void; slippedByFixed(fixed: number): number; fixedBySlipped(slipped: number): number; } interface FlowListener { encounteredFlowChunk(flowChunk: Vtree_$0.FlowChunk, flow: Vtree_$0.Flow): any; } interface AbstractStyler_$0 extends CssStyler.AbstractStyler_$0 { } class Box { readonly context: Exprs.Context; readonly style: CssCascade_$0.ElementStyle; readonly offset: number; readonly isRoot: boolean; readonly flowChunk: Vtree_$0.FlowChunk; readonly atBlockStart: boolean; readonly atFlowStart: boolean; readonly isParentBoxDisplayed: boolean; flowName: string; isBlockValue: boolean | null; hasBoxValue: boolean | null; styleValues: { [key: string]: Css.Val; }; beforeBox: Box; afterBox: Box; breakBefore: string | null; constructor(context: Exprs.Context, style: CssCascade_$0.ElementStyle, offset: number, isRoot: boolean, flowChunk: Vtree_$0.FlowChunk, atBlockStart: boolean, atFlowStart: boolean, isParentBoxDisplayed: boolean); buildAfterPseudoElementBox(offset: number, atBlockStart: boolean, atFlowStart: boolean): void; styleValue(name: string, defaultValue?: Css.Val): Css.Val | null; displayValue(): Css.Val; isBlock(): boolean; hasBox(): boolean; getBreakValue(edge: string): string | null; } class BoxStack { readonly context: Exprs.Context; stack: Box[]; atBlockStart: boolean; atFlowStart: boolean; atStartStack: { atBlockStart: boolean; atFlowStart: boolean; }[]; constructor(context: Exprs.Context); empty(): boolean; lastBox(): Box | undefined; lastFlowName(): string | null; isCurrentBoxDisplayed(): boolean; push(style: CssCascade_$0.ElementStyle, offset: number, isRoot: boolean, newFlowChunk?: Vtree_$0.FlowChunk): Box; encounteredTextNode(node: Node): void; pop(offset: number): Box; nearestBlockStartOffset(box: Box): number; } class Styler implements AbstractStyler_$0 { readonly xmldoc: XmlDoc.XMLDocHolder; readonly scope: Exprs.LexicalScope; readonly context: Exprs.Context; readonly primaryFlows: { [key: string]: boolean; }; readonly validatorSet: CssValidator.ValidatorSet; readonly counterListener: CssCascade_$0.CounterListener; root: Element; cascadeHolder: CssCascade_$0.Cascade; last: Node; rootStyle: CssCascade_$0.ElementStyle; styleMap: { [key: string]: CssCascade_$0.ElementStyle; }; flows: { [key: string]: Vtree_$0.Flow; }; flowChunks: Vtree_$0.FlowChunk[]; flowListener: FlowListener; flowToReach: string | null; idToReach: string | null; cascade: CssCascade_$0.CascadeInstance; offsetMap: SlipMap; primary: boolean; primaryStack: boolean[]; rootBackgroundAssigned: boolean; rootLayoutAssigned: boolean; lastOffset: number; breakBeforeValues: { [key: number]: string; }; boxStack: BoxStack; bodyReached: boolean; constructor(xmldoc: XmlDoc.XMLDocHolder, cascade: CssCascade_$0.Cascade, scope: Exprs.LexicalScope, context: Exprs.Context, primaryFlows: { [key: string]: boolean; }, validatorSet: CssValidator.ValidatorSet, counterListener: CssCascade_$0.CounterListener, counterResolver: CssCascade_$0.CounterResolver); hasProp(style: CssCascade_$0.ElementStyle, map: CssValidator.ValueMap, name: string): boolean; transferPropsToRoot(srcStyle: CssCascade_$0.ElementStyle, map: CssValidator.ValueMap): void; postprocessTopStyle(elemStyle: CssCascade_$0.ElementStyle, isBody: boolean): void; getTopContainerStyle(): CssCascade_$0.ElementStyle; getAttrStyle(elem: Element): CssCascade_$0.ElementStyle; getReachedOffset(): number; replayFlowElementsFromOffset(offset: number): void; resetFlowChunkStream(flowListener: FlowListener): void; styleUntilFlowIsReached(flowName: string): void; styleUntilIdIsReached(id: string): void; private encounteredFlowElement; registerForcedBreakOffset(breakValue: string | null, offset: number, flowName: string): void; styleUntil(startOffset: number, lookup: number): number; getStyle(element: Element, deep: boolean): CssCascade_$0.ElementStyle; processContent(element: Element, styles: { [key: string]: Css.Val; }): void; } const columnProps: string[]; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace LayoutRetryers { abstract class AbstractLayoutRetryer { initialBreakPositions: Layout.BreakPosition[]; initialStateOfFormattingContext: Vtree.NodeContext; initialPosition: Vtree.NodeContext; initialFragmentLayoutConstraints: Layout.FragmentLayoutConstraint[]; layout(nodeContext: Vtree.NodeContext, column: Layout.Column): Task.Result; private tryLayout; resolveLayoutMode(nodeContext: Vtree.NodeContext): Layout.LayoutMode; prepareLayout(nodeContext: Vtree.NodeContext, column: Layout.Column): void; clearNodes(initialPosition: Vtree.NodeContext): void; saveState(nodeContext: Vtree.NodeContext, column: Layout.Column): void; restoreState(nodeContext: Vtree.NodeContext, column: Layout.Column): void; } } declare namespace BreakPosition_$0 { type BreakPosition_$0 = Layout.BreakPosition_$0; abstract class AbstractBreakPosition_$0 implements Layout.AbstractBreakPosition_$0 { findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext; getMinBreakPenalty(): number; calculateOffset(column: any): { current: number; minimum: number; }; breakPositionChosen(column: Layout.Column): void; getNodeContext(): Vtree.NodeContext; } function calculateOffset(nodeContext: Vtree.NodeContext, elementsOffsets: RepetitiveElement.ElementsOffset[]): { current: number; minimum: number; }; class EdgeBreakPosition_$0 extends AbstractBreakPosition_$0 implements Layout.EdgeBreakPosition_$0 { readonly position: Vtree.NodeContext; readonly breakOnEdge: string | null; overflows: boolean; readonly computedBlockSize: number; overflowIfRepetitiveElementsDropped: boolean; protected isEdgeUpdated: boolean; private edge; constructor(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, computedBlockSize: number); findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext; getMinBreakPenalty(): number; private updateEdge; private updateOverflows; getNodeContext(): Vtree.NodeContext; private isFirstContentOfRepetitiveElementsOwner; } } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace GeometryUtil { class Rect { x1: number; y1: number; x2: number; y2: number; constructor(x1: number, y1: number, x2: number, y2: number); } class Point { x: number; y: number; constructor(x: number, y: number); } class Insets { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } class Segment { low: Point; high: Point; winding: number; shapeId: number; constructor(low: Point, high: Point, winding: number, shapeId: number); } class Band { y1: number; y2: number; x1: number; x2: number; left: Element | null; right: Element | null; constructor(y1: number, y2: number, x1: number, x2: number); } function segmentCompare(s1: Segment, s2: Segment): number; class Shape { points: Point[]; constructor(points: Point[]); addSegments(arr: Segment[], id: number): void; withOffset(offsetX: number, offsetY: number): Shape; } function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape; function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape; function shapeForRectObj(r: Rect): Shape; class BandIntersection { x: number; winding: number; shapeId: number; lowOrHigh: number; constructor(x: number, winding: number, shapeId: number, lowOrHigh: number); } function intersectY(s: Segment, y: number): number; function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void; function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[]; function ceil(v: number, unit: number): number; function floor(v: number, unit: number): number; function rotatePoint(point: Point): Point; function rotateBox(box: Rect): Rect; function unrotateBox(box: Rect): Rect; function rotateShape(shape: Shape): Shape; function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[]; function normalize(box: Rect, bands: Band[]): void; function findBand(bands: Band[], y: number): number; function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean; function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void; } declare namespace PageFloats_$0 { const FloatReference_$0: typeof PageFloats.FloatReference_$0; type FloatReference_$0 = PageFloats.FloatReference_$0; function floatReferenceOf(str: string): FloatReference_$0; function isPageFloat(floatReference: FloatReference_$0): boolean; function resolveInlineFloatDirection(floatSide: string, vertical: boolean, direction: string): string; class PageFloat_$0 implements PageFloats.PageFloat_$0 { readonly nodePosition: Vtree.NodePosition; readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly clearSide: string | null; readonly flowName: string; readonly floatMinWrapBlock: Css.Numeric | null; order: number | null; id: PageFloatID_$0 | null; constructor(nodePosition: Vtree.NodePosition, floatReference: FloatReference_$0, floatSide: string, clearSide: string | null, flowName: string, floatMinWrapBlock: Css.Numeric | null); getOrder(): number; getId(): PageFloatID_$0; isAllowedOnContext(pageFloatLayoutContext: PageFloatLayoutContext_$0): boolean; isAllowedToPrecede(other: PageFloat_$0): boolean; } class PageFloatStore { private floats; private nextPageFloatIndex; private nextOrder; private createPageFloatId; addPageFloat(float: PageFloat_$0): void; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; findPageFloatById(id: PageFloatID_$0): PageFloat_$0; } class PageFloatFragment_$0 implements PageFloats.PageFloatFragment_$0 { readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly continuations: PageFloatContinuation_$0[]; readonly area: Vtree.Container; readonly continues: boolean; constructor(floatReference: FloatReference_$0, floatSide: string, continuations: PageFloatContinuation_$0[], area: Vtree.Container, continues: boolean); hasFloat(float: PageFloat_$0): boolean; findNotAllowedFloat(context: PageFloatLayoutContext_$0): PageFloat_$0 | null; getOuterShape(): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; getOrder(): number; shouldBeStashedBefore(float: PageFloat_$0): boolean; addContinuations(continuations: PageFloatContinuation_$0[]): void; getFlowName(): string; } class PageFloatContinuation_$0 implements PageFloats.PageFloatContinuation_$0 { readonly float: PageFloat_$0; readonly nodePosition: Vtree.NodePosition; constructor(float: PageFloat_$0, nodePosition: Vtree.NodePosition); equals(other: PageFloatContinuation_$0 | null): boolean; } type PageFloatPlacementCondition_$0 = PageFloats.PageFloatPlacementCondition_$0; class PageFloatLayoutContext_$0 implements PageFloats.PageFloatLayoutContext_$0 { readonly parent: PageFloatLayoutContext_$0; private readonly floatReference; private container; readonly flowName: string | null; readonly generatingNodePosition: Vtree.NodePosition | null; private children; writingMode: Css.Val; direction: Css.Val; private invalidated; private floatStore; private forbiddenFloats; floatFragments: PageFloatFragment_$0[]; private stashedFloatFragments; private floatAnchors; private floatsDeferredToNext; private floatsDeferredFromPrevious; private layoutConstraints; private locked; constructor(parent: PageFloatLayoutContext_$0, floatReference: FloatReference_$0 | null, container: Vtree.Container, flowName: string | null, generatingNodePosition: Vtree.NodePosition | null, writingMode: Css.Val | null, direction: Css.Val | null); private getParent; private getPreviousSiblingOf; private getPreviousSibling; getContainer(floatReference?: FloatReference_$0): Vtree.Container; setContainer(container: Vtree.Container): void; addPageFloat(float: PageFloat_$0): void; getPageFloatLayoutContext(floatReference: FloatReference_$0): PageFloatLayoutContext_$0; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; private forbid; isForbidden(float: PageFloat_$0): boolean; addPageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; removePageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; findPageFloatFragment(float: PageFloat_$0): PageFloatFragment_$0 | null; hasFloatFragments(condition?: (p1: PageFloatFragment_$0) => boolean): boolean; hasContinuingFloatFragmentsInFlow(flowName: string): boolean; registerPageFloatAnchor(float: PageFloat_$0, anchorViewNode: Node): void; collectPageFloatAnchors(): any; isAnchorAlreadyAppeared(floatId: PageFloatID_$0): boolean; deferPageFloat(continuation: PageFloatContinuation_$0): void; hasPrecedingFloatsDeferredToNext(float: PageFloat_$0, ignoreReference?: boolean): boolean; getLastFollowingFloatInFragments(float: PageFloat_$0): PageFloat_$0 | null; getDeferredPageFloatContinuations(flowName?: string | null): PageFloatContinuation_$0[]; getPageFloatContinuationsDeferredToNext(flowName?: string | null): PageFloatContinuation_$0[]; getFloatsDeferredToNextInChildContexts(): PageFloat_$0[]; checkAndForbidNotAllowedFloat(): boolean; checkAndForbidFloatFollowingDeferredFloat(): boolean; finish(): void; hasSameContainerAs(other: PageFloatLayoutContext_$0): boolean; invalidate(): void; detachChildren(): PageFloatLayoutContext_$0[]; attachChildren(children: PageFloatLayoutContext_$0[]): void; isInvalidated(): any; validate(): void; private toLogical; private toPhysical; removeEndFloatFragments(floatSide: string): void; stashEndFloatFragments(float: PageFloat_$0): void; restoreStashedFragments(floatReference: FloatReference_$0): void; discardStashedFragments(floatReference: FloatReference_$0): void; getStashedFloatFragments(floatReference: FloatReference_$0): PageFloatFragment_$0[]; private getLimitValue; private getLimitValueInner; private getLimitValuesInner; setFloatAreaDimensions(area: LayoutType.PageFloatArea, floatReference: FloatReference_$0, floatSide: string, anchorEdge: number | null, init: boolean, force: boolean, condition: PageFloatPlacementCondition_$0): string | null; getFloatFragmentExclusions(): GeometryUtil.Shape[]; private reattachFloatFragments; getMaxReachedAfterEdge(): number; getBlockStartEdgeOfBlockEndFloats(): number; getPageFloatClearEdge(clear: string, column: LayoutType.Column): number; getPageFloatPlacementCondition(float: PageFloat_$0, floatSide: string, clearSide: string | null): PageFloatPlacementCondition_$0; getLayoutConstraints(): LayoutType.LayoutConstraint[]; addLayoutConstraint(layoutConstraint: LayoutType.LayoutConstraint, floatReference: FloatReference_$0): void; isColumnFullWithPageFloats(column: LayoutType.Column): boolean; getMaxBlockSizeOfPageFloats(): number; lock(): void; unlock(): void; isLocked(): boolean; } interface PageFloatLayoutStrategy_$0 extends PageFloats.PageFloatLayoutStrategy_$0 { } class PageFloatLayoutStrategyResolver { register(strategy: PageFloatLayoutStrategy_$0): void; findByNodeContext(nodeContext: Vtree.NodeContext): PageFloatLayoutStrategy_$0; findByFloat(float: PageFloat_$0): PageFloatLayoutStrategy_$0; } class NormalPageFloatLayoutStrategy implements PageFloatLayoutStrategy_$0 { appliesToNodeContext(nodeContext: Vtree.NodeContext): boolean; appliesToFloat(float: PageFloat_$0): boolean; createPageFloat(nodeContext: Vtree.NodeContext, pageFloatLayoutContext: PageFloatLayoutContext_$0, column: LayoutType.Column): Task.Result; createPageFloatFragment(continuations: PageFloatContinuation_$0[], floatSide: string, floatArea: LayoutType.PageFloatArea, continues: boolean): PageFloatFragment_$0; findPageFloatFragment(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): PageFloatFragment_$0 | null; adjustPageFloatArea(floatArea: LayoutType.PageFloatArea, floatContainer: Vtree.Container, column: LayoutType.Column): void; forbid(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): void; } } declare namespace Matchers { function matchANPlusB(order: number, a: number, b: number): boolean; interface Matcher { matches(): boolean; } class AnyMatcher implements Matcher { readonly matchers: Matcher[]; constructor(matchers: Matcher[]); matches(): boolean; } class AllMatcher implements Matcher { readonly matchers: Matcher[]; constructor(matchers: Matcher[]); matches(): boolean; } class NthFragmentMatcher implements Matcher { readonly elementOffset: number; readonly a: number; readonly b: number; static fragmentIndices: {}; registerFragmentIndex(elementOffset: number, fragmentIndex: number, priority: number): void; clearFragmentIndices(): void; constructor(elementOffset: number, a: number, b: number); matches(): boolean; } class MatcherBuilder { buildViewConditionMatcher(elementOffset: number, viewCondition: string): Matcher; buildAllMatcher(matchers: Matcher[]): Matcher; buildAnyMatcher(matchers: Matcher[]): Matcher; } } declare namespace PseudoElement_$0 { const document: Document; const pseudoNames_$0: string[]; const PSEUDO_ATTR = "data-adapt-pseudo"; function getPseudoName(element: Element): string; function setPseudoName(element: Element, name: string): void; class PseudoelementStyler_$0 implements PseudoElement.PseudoelementStyler_$0 { readonly element: Element; style: CssCascade_$0.ElementStyle; styler: CssStyler_$0.AbstractStyler; readonly context: Exprs.Context; readonly exprContentListener: Vtree_$0.ExprContentListener; contentProcessed: { [key: string]: boolean; }; constructor(element: Element, style: CssCascade_$0.ElementStyle, styler: CssStyler_$0.AbstractStyler, context: Exprs.Context, exprContentListener: Vtree_$0.ExprContentListener); getStyle(element: Element, deep: boolean): CssCascade_$0.ElementStyle; processContent(element: Element, styles: { [key: string]: Css.Val; }): void; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace VtreeImpl { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace LayoutProcessor { interface LayoutProcessor_$0 { layout(nodeContext: Vtree.NodeContext, column: Layout.Column, leadingEdge: boolean): Task.Result; createEdgeBreakPosition(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, columnBlockSize: number): Layout.BreakPosition; startNonInlineElementNode(nodeContext: Vtree.NodeContext): boolean; afterNonInlineElementNode(nodeContext: Vtree.NodeContext, stopAtOverflow: boolean): boolean; finishBreak(column: Layout.Column, nodeContext: Vtree.NodeContext, forceRemoveSelf: boolean, endOfColumn: boolean): Task.Result; clearOverflownViewNodes(column: Layout.Column, parentNodeContext: Vtree.NodeContext, nodeContext: Vtree.NodeContext, removeSelf: boolean): any; } class LayoutProcessorResolver { find(formattingContext: Vtree.FormattingContext): LayoutProcessor_$0; } class BlockLayoutProcessor implements LayoutProcessor_$0 { layout(nodeContext: Vtree.NodeContext, column: Layout.Column, leadingEdge: boolean): Task.Result; createEdgeBreakPosition(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, columnBlockSize: number): Layout.BreakPosition; startNonInlineElementNode(nodeContext: Vtree.NodeContext): boolean; afterNonInlineElementNode(nodeContext: Vtree.NodeContext, stopAtOverflow: boolean): boolean; clearOverflownViewNodes(column: Layout.Column, parentNodeContext: Vtree.NodeContext, nodeContext: Vtree.NodeContext, removeSelf: boolean): void; finishBreak(column: Layout.Column, nodeContext: Vtree.NodeContext, forceRemoveSelf: boolean, endOfColumn: boolean): Task.Result; } class BlockFormattingContext_$0 implements LayoutProcessor_$0.BlockFormattingContext_$0 { private readonly parent; formattingContextType: FormattingContextType; constructor(parent: Vtree.FormattingContext); getName(): string; isFirstTime(nodeContext: Vtree.NodeContext, firstTime: boolean): boolean; getParent(): Vtree.FormattingContext; saveState(): any; restoreState(state: any): void; } const blockLayoutProcessor: BlockLayoutProcessor; const isInstanceOfBlockFormattingContext_$0: typeof LayoutProcessor_$0.isInstanceOfBlockFormattingContext_$0; } declare namespace LayoutRetryers { abstract class AbstractLayoutRetryer { initialBreakPositions: Layout.BreakPosition[]; initialStateOfFormattingContext: Vtree.NodeContext; initialPosition: Vtree.NodeContext; initialFragmentLayoutConstraints: Layout.FragmentLayoutConstraint[]; layout(nodeContext: Vtree.NodeContext, column: Layout.Column): Task.Result; private tryLayout; resolveLayoutMode(nodeContext: Vtree.NodeContext): Layout.LayoutMode; prepareLayout(nodeContext: Vtree.NodeContext, column: Layout.Column): void; clearNodes(initialPosition: Vtree.NodeContext): void; saveState(nodeContext: Vtree.NodeContext, column: Layout.Column): void; restoreState(nodeContext: Vtree.NodeContext, column: Layout.Column): void; } } declare namespace LayoutUtil { type LayoutIteratorState = { nodeContext: Vtree.NodeContext; atUnforcedBreak: boolean; break: boolean; leadingEdge?: boolean; breakAtTheEdge?: string | null; onStartEdges?: boolean; leadingEdgeContexts?: Vtree.NodeContext[]; lastAfterNodeContext?: Vtree.NodeContext | null; }; class LayoutIteratorStrategy { initialState(initialNodeContext: Vtree.NodeContext): LayoutIteratorState; startNonDisplayableNode(state: LayoutIteratorState): void | Task.Result; afterNonDisplayableNode(state: LayoutIteratorState): void | Task.Result; startIgnoredTextNode(state: LayoutIteratorState): void | Task.Result; afterIgnoredTextNode(state: LayoutIteratorState): void | Task.Result; startNonElementNode(state: LayoutIteratorState): void | Task.Result; afterNonElementNode(state: LayoutIteratorState): void | Task.Result; startInlineElementNode(state: LayoutIteratorState): void | Task.Result; afterInlineElementNode(state: LayoutIteratorState): void | Task.Result; startNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; afterNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; finish(state: LayoutIteratorState): void | Task.Result; } class LayoutIterator { private readonly strategy; private readonly layoutContext; constructor(strategy: LayoutIteratorStrategy, layoutContext: Vtree.LayoutContext); iterate(initialNodeContext: Vtree.NodeContext): Task.Result; } class EdgeSkipper extends LayoutIteratorStrategy { protected readonly leadingEdge?: boolean; constructor(leadingEdge?: boolean); startNonInlineBox(state: LayoutIteratorState): void | Task.Result; endEmptyNonInlineBox(state: LayoutIteratorState): void | Task.Result; endNonInlineBox(state: LayoutIteratorState): void | Task.Result; initialState(initialNodeContext: Vtree.NodeContext): LayoutIteratorState; processForcedBreak(state: LayoutIteratorState, column: Layout.Column): boolean; saveEdgeAndProcessOverflow(state: LayoutIteratorState, column: Layout.Column): boolean; processLayoutConstraint(state: LayoutIteratorState, layoutConstraint: Layout.LayoutConstraint, column: Layout.Column): boolean; startNonElementNode(state: LayoutIteratorState): void | Task.Result; startNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; afterNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } type LayoutType = Layout; declare namespace BreakPosition_$0 { type BreakPosition_$0 = Layout.BreakPosition_$0; abstract class AbstractBreakPosition_$0 implements Layout.AbstractBreakPosition_$0 { findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext; getMinBreakPenalty(): number; calculateOffset(column: any): { current: number; minimum: number; }; breakPositionChosen(column: Layout.Column): void; getNodeContext(): Vtree.NodeContext; } function calculateOffset(nodeContext: Vtree.NodeContext, elementsOffsets: RepetitiveElement.ElementsOffset[]): { current: number; minimum: number; }; class EdgeBreakPosition_$0 extends AbstractBreakPosition_$0 implements Layout.EdgeBreakPosition_$0 { readonly position: Vtree.NodeContext; readonly breakOnEdge: string | null; overflows: boolean; readonly computedBlockSize: number; overflowIfRepetitiveElementsDropped: boolean; protected isEdgeUpdated: boolean; private edge; constructor(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, computedBlockSize: number); findAcceptableBreak(column: Layout.Column, penalty: number): Vtree.NodeContext; getMinBreakPenalty(): number; private updateEdge; private updateOverflows; getNodeContext(): Vtree.NodeContext; private isFirstContentOfRepetitiveElementsOwner; } } declare namespace LayoutProcessor { interface LayoutProcessor_$0 { layout(nodeContext: Vtree.NodeContext, column: Layout.Column, leadingEdge: boolean): Task.Result; createEdgeBreakPosition(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, columnBlockSize: number): Layout.BreakPosition; startNonInlineElementNode(nodeContext: Vtree.NodeContext): boolean; afterNonInlineElementNode(nodeContext: Vtree.NodeContext, stopAtOverflow: boolean): boolean; finishBreak(column: Layout.Column, nodeContext: Vtree.NodeContext, forceRemoveSelf: boolean, endOfColumn: boolean): Task.Result; clearOverflownViewNodes(column: Layout.Column, parentNodeContext: Vtree.NodeContext, nodeContext: Vtree.NodeContext, removeSelf: boolean): any; } class LayoutProcessorResolver { find(formattingContext: Vtree.FormattingContext): LayoutProcessor_$0; } class BlockLayoutProcessor implements LayoutProcessor_$0 { layout(nodeContext: Vtree.NodeContext, column: Layout.Column, leadingEdge: boolean): Task.Result; createEdgeBreakPosition(position: Vtree.NodeContext, breakOnEdge: string | null, overflows: boolean, columnBlockSize: number): Layout.BreakPosition; startNonInlineElementNode(nodeContext: Vtree.NodeContext): boolean; afterNonInlineElementNode(nodeContext: Vtree.NodeContext, stopAtOverflow: boolean): boolean; clearOverflownViewNodes(column: Layout.Column, parentNodeContext: Vtree.NodeContext, nodeContext: Vtree.NodeContext, removeSelf: boolean): void; finishBreak(column: Layout.Column, nodeContext: Vtree.NodeContext, forceRemoveSelf: boolean, endOfColumn: boolean): Task.Result; } class BlockFormattingContext_$0 implements LayoutProcessor_$0.BlockFormattingContext_$0 { private readonly parent; formattingContextType: FormattingContextType; constructor(parent: Vtree.FormattingContext); getName(): string; isFirstTime(nodeContext: Vtree.NodeContext, firstTime: boolean): boolean; getParent(): Vtree.FormattingContext; saveState(): any; restoreState(state: any): void; } const blockLayoutProcessor: BlockLayoutProcessor; const isInstanceOfBlockFormattingContext_$0: typeof LayoutProcessor_$0.isInstanceOfBlockFormattingContext_$0; } declare namespace LayoutRetryers { abstract class AbstractLayoutRetryer { initialBreakPositions: Layout.BreakPosition[]; initialStateOfFormattingContext: Vtree.NodeContext; initialPosition: Vtree.NodeContext; initialFragmentLayoutConstraints: Layout.FragmentLayoutConstraint[]; layout(nodeContext: Vtree.NodeContext, column: Layout.Column): Task.Result; private tryLayout; resolveLayoutMode(nodeContext: Vtree.NodeContext): Layout.LayoutMode; prepareLayout(nodeContext: Vtree.NodeContext, column: Layout.Column): void; clearNodes(initialPosition: Vtree.NodeContext): void; saveState(nodeContext: Vtree.NodeContext, column: Layout.Column): void; restoreState(nodeContext: Vtree.NodeContext, column: Layout.Column): void; } } declare namespace LayoutUtil { type LayoutIteratorState = { nodeContext: Vtree.NodeContext; atUnforcedBreak: boolean; break: boolean; leadingEdge?: boolean; breakAtTheEdge?: string | null; onStartEdges?: boolean; leadingEdgeContexts?: Vtree.NodeContext[]; lastAfterNodeContext?: Vtree.NodeContext | null; }; class LayoutIteratorStrategy { initialState(initialNodeContext: Vtree.NodeContext): LayoutIteratorState; startNonDisplayableNode(state: LayoutIteratorState): void | Task.Result; afterNonDisplayableNode(state: LayoutIteratorState): void | Task.Result; startIgnoredTextNode(state: LayoutIteratorState): void | Task.Result; afterIgnoredTextNode(state: LayoutIteratorState): void | Task.Result; startNonElementNode(state: LayoutIteratorState): void | Task.Result; afterNonElementNode(state: LayoutIteratorState): void | Task.Result; startInlineElementNode(state: LayoutIteratorState): void | Task.Result; afterInlineElementNode(state: LayoutIteratorState): void | Task.Result; startNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; afterNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; finish(state: LayoutIteratorState): void | Task.Result; } class LayoutIterator { private readonly strategy; private readonly layoutContext; constructor(strategy: LayoutIteratorStrategy, layoutContext: Vtree.LayoutContext); iterate(initialNodeContext: Vtree.NodeContext): Task.Result; } class EdgeSkipper extends LayoutIteratorStrategy { protected readonly leadingEdge?: boolean; constructor(leadingEdge?: boolean); startNonInlineBox(state: LayoutIteratorState): void | Task.Result; endEmptyNonInlineBox(state: LayoutIteratorState): void | Task.Result; endNonInlineBox(state: LayoutIteratorState): void | Task.Result; initialState(initialNodeContext: Vtree.NodeContext): LayoutIteratorState; processForcedBreak(state: LayoutIteratorState, column: Layout.Column): boolean; saveEdgeAndProcessOverflow(state: LayoutIteratorState, column: Layout.Column): boolean; processLayoutConstraint(state: LayoutIteratorState, layoutConstraint: Layout.LayoutConstraint, column: Layout.Column): boolean; startNonElementNode(state: LayoutIteratorState): void | Task.Result; startNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; afterNonInlineElementNode(state: LayoutIteratorState): void | Task.Result; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } type LayoutType = Layout; declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace PageFloats_$0 { const FloatReference_$0: typeof PageFloats.FloatReference_$0; type FloatReference_$0 = PageFloats.FloatReference_$0; function floatReferenceOf(str: string): FloatReference_$0; function isPageFloat(floatReference: FloatReference_$0): boolean; function resolveInlineFloatDirection(floatSide: string, vertical: boolean, direction: string): string; class PageFloat_$0 implements PageFloats.PageFloat_$0 { readonly nodePosition: Vtree.NodePosition; readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly clearSide: string | null; readonly flowName: string; readonly floatMinWrapBlock: Css.Numeric | null; order: number | null; id: PageFloatID_$0 | null; constructor(nodePosition: Vtree.NodePosition, floatReference: FloatReference_$0, floatSide: string, clearSide: string | null, flowName: string, floatMinWrapBlock: Css.Numeric | null); getOrder(): number; getId(): PageFloatID_$0; isAllowedOnContext(pageFloatLayoutContext: PageFloatLayoutContext_$0): boolean; isAllowedToPrecede(other: PageFloat_$0): boolean; } class PageFloatStore { private floats; private nextPageFloatIndex; private nextOrder; private createPageFloatId; addPageFloat(float: PageFloat_$0): void; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; findPageFloatById(id: PageFloatID_$0): PageFloat_$0; } class PageFloatFragment_$0 implements PageFloats.PageFloatFragment_$0 { readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly continuations: PageFloatContinuation_$0[]; readonly area: Vtree.Container; readonly continues: boolean; constructor(floatReference: FloatReference_$0, floatSide: string, continuations: PageFloatContinuation_$0[], area: Vtree.Container, continues: boolean); hasFloat(float: PageFloat_$0): boolean; findNotAllowedFloat(context: PageFloatLayoutContext_$0): PageFloat_$0 | null; getOuterShape(): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; getOrder(): number; shouldBeStashedBefore(float: PageFloat_$0): boolean; addContinuations(continuations: PageFloatContinuation_$0[]): void; getFlowName(): string; } class PageFloatContinuation_$0 implements PageFloats.PageFloatContinuation_$0 { readonly float: PageFloat_$0; readonly nodePosition: Vtree.NodePosition; constructor(float: PageFloat_$0, nodePosition: Vtree.NodePosition); equals(other: PageFloatContinuation_$0 | null): boolean; } type PageFloatPlacementCondition_$0 = PageFloats.PageFloatPlacementCondition_$0; class PageFloatLayoutContext_$0 implements PageFloats.PageFloatLayoutContext_$0 { readonly parent: PageFloatLayoutContext_$0; private readonly floatReference; private container; readonly flowName: string | null; readonly generatingNodePosition: Vtree.NodePosition | null; private children; writingMode: Css.Val; direction: Css.Val; private invalidated; private floatStore; private forbiddenFloats; floatFragments: PageFloatFragment_$0[]; private stashedFloatFragments; private floatAnchors; private floatsDeferredToNext; private floatsDeferredFromPrevious; private layoutConstraints; private locked; constructor(parent: PageFloatLayoutContext_$0, floatReference: FloatReference_$0 | null, container: Vtree.Container, flowName: string | null, generatingNodePosition: Vtree.NodePosition | null, writingMode: Css.Val | null, direction: Css.Val | null); private getParent; private getPreviousSiblingOf; private getPreviousSibling; getContainer(floatReference?: FloatReference_$0): Vtree.Container; setContainer(container: Vtree.Container): void; addPageFloat(float: PageFloat_$0): void; getPageFloatLayoutContext(floatReference: FloatReference_$0): PageFloatLayoutContext_$0; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; private forbid; isForbidden(float: PageFloat_$0): boolean; addPageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; removePageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; findPageFloatFragment(float: PageFloat_$0): PageFloatFragment_$0 | null; hasFloatFragments(condition?: (p1: PageFloatFragment_$0) => boolean): boolean; hasContinuingFloatFragmentsInFlow(flowName: string): boolean; registerPageFloatAnchor(float: PageFloat_$0, anchorViewNode: Node): void; collectPageFloatAnchors(): any; isAnchorAlreadyAppeared(floatId: PageFloatID_$0): boolean; deferPageFloat(continuation: PageFloatContinuation_$0): void; hasPrecedingFloatsDeferredToNext(float: PageFloat_$0, ignoreReference?: boolean): boolean; getLastFollowingFloatInFragments(float: PageFloat_$0): PageFloat_$0 | null; getDeferredPageFloatContinuations(flowName?: string | null): PageFloatContinuation_$0[]; getPageFloatContinuationsDeferredToNext(flowName?: string | null): PageFloatContinuation_$0[]; getFloatsDeferredToNextInChildContexts(): PageFloat_$0[]; checkAndForbidNotAllowedFloat(): boolean; checkAndForbidFloatFollowingDeferredFloat(): boolean; finish(): void; hasSameContainerAs(other: PageFloatLayoutContext_$0): boolean; invalidate(): void; detachChildren(): PageFloatLayoutContext_$0[]; attachChildren(children: PageFloatLayoutContext_$0[]): void; isInvalidated(): any; validate(): void; private toLogical; private toPhysical; removeEndFloatFragments(floatSide: string): void; stashEndFloatFragments(float: PageFloat_$0): void; restoreStashedFragments(floatReference: FloatReference_$0): void; discardStashedFragments(floatReference: FloatReference_$0): void; getStashedFloatFragments(floatReference: FloatReference_$0): PageFloatFragment_$0[]; private getLimitValue; private getLimitValueInner; private getLimitValuesInner; setFloatAreaDimensions(area: LayoutType.PageFloatArea, floatReference: FloatReference_$0, floatSide: string, anchorEdge: number | null, init: boolean, force: boolean, condition: PageFloatPlacementCondition_$0): string | null; getFloatFragmentExclusions(): GeometryUtil.Shape[]; private reattachFloatFragments; getMaxReachedAfterEdge(): number; getBlockStartEdgeOfBlockEndFloats(): number; getPageFloatClearEdge(clear: string, column: LayoutType.Column): number; getPageFloatPlacementCondition(float: PageFloat_$0, floatSide: string, clearSide: string | null): PageFloatPlacementCondition_$0; getLayoutConstraints(): LayoutType.LayoutConstraint[]; addLayoutConstraint(layoutConstraint: LayoutType.LayoutConstraint, floatReference: FloatReference_$0): void; isColumnFullWithPageFloats(column: LayoutType.Column): boolean; getMaxBlockSizeOfPageFloats(): number; lock(): void; unlock(): void; isLocked(): boolean; } interface PageFloatLayoutStrategy_$0 extends PageFloats.PageFloatLayoutStrategy_$0 { } class PageFloatLayoutStrategyResolver { register(strategy: PageFloatLayoutStrategy_$0): void; findByNodeContext(nodeContext: Vtree.NodeContext): PageFloatLayoutStrategy_$0; findByFloat(float: PageFloat_$0): PageFloatLayoutStrategy_$0; } class NormalPageFloatLayoutStrategy implements PageFloatLayoutStrategy_$0 { appliesToNodeContext(nodeContext: Vtree.NodeContext): boolean; appliesToFloat(float: PageFloat_$0): boolean; createPageFloat(nodeContext: Vtree.NodeContext, pageFloatLayoutContext: PageFloatLayoutContext_$0, column: LayoutType.Column): Task.Result; createPageFloatFragment(continuations: PageFloatContinuation_$0[], floatSide: string, floatArea: LayoutType.PageFloatArea, continues: boolean): PageFloatFragment_$0; findPageFloatFragment(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): PageFloatFragment_$0 | null; adjustPageFloatArea(floatArea: LayoutType.PageFloatArea, floatContainer: Vtree.Container, column: LayoutType.Column): void; forbid(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): void; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade_$0 { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace CssValidator { interface PropertyReceiver { unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class Node { validator: PropertyValidator; success: Node; failure: Node; code: number; constructor(validator: PropertyValidator); isSpecial(): boolean; markAsStartGroup(): void; isStartGroup(): boolean; markAsEndGroup(): void; isEndGroup(): boolean; markAsStartAlternate(index: number): void; isStartAlternate(): boolean; markAsEndAlternate(index: number): void; isEndAlternate(): boolean; getAlternate(): number; } class Connection { where: number; success: boolean; what: number; constructor(where: number, success: boolean); } enum Add_$0 { FOLLOW = 1, OPTIONAL = 2, REPEATED = 3, ALTERNATE = 4 } class ValidatingGroup { nodes: Node[]; connections: Connection[]; match: number[]; nomatch: number[]; error: number[]; emptyHead: boolean; connect(arr: number[], nodeIndex: number): void; clone(): ValidatingGroup; private addSpecialToArr; endSpecialGroup(): void; startSpecialGroup(): void; endClause(clause: number): void; startClause(clause: number): void; addPrimitive(validator: PropertyValidator): void; isSimple(): boolean; isPrimitive(): boolean; addGroup(group: ValidatingGroup, how: Add_$0): void; finish(successTerminal: Node, failTerminal: Node): Node; } const ALLOW_EMPTY = 1; const ALLOW_STR = 2; const ALLOW_IDENT = 4; const ALLOW_POS_NUMERIC = 8; const ALLOW_POS_NUM = 16; const ALLOW_POS_INT = 32; const ALLOW_COLOR = 64; const ALLOW_URL = 128; const ALLOW_NEGATIVE = 256; const ALLOW_ZERO = 512; const ALLOW_ZERO_PERCENT = 1024; const ALLOW_SLASH = 2048; type ValueMap = { [key: string]: Css.Val; }; class PropertyValidator extends Css.Visitor { constructor(); validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class PrimitiveValidator extends PropertyValidator { readonly allowed: number; readonly idents: ValueMap; readonly units: ValueMap; constructor(allowed: number, idents: ValueMap, units: ValueMap); visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; combine(other: PrimitiveValidator): PrimitiveValidator; } const ALWAYS_FAIL: PrimitiveValidator; class ListValidator extends PropertyValidator { successTerminal: Node; failureTerminal: Node; first: Node; constructor(group: ValidatingGroup); validateList(arr: Css.Val[], slice: boolean, startIndex: number): Css.Val[]; validateSingle(inval: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SpaceListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class CommaListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class FuncValidator extends ListValidator { readonly name: string; constructor(name: string, group: ValidatingGroup); validateSingle(inval: Css.Val): Css.Val; visitFunc(func: Css.Func): Css.Val; } class ShorthandSyntaxNode { tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxProperty extends ShorthandSyntaxNode { readonly name: string; validator: PropertyValidator; constructor(validatorSet: ValidatorSet, name: string); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxPropertyN extends ShorthandSyntaxProperty { readonly names: string[]; constructor(validatorSet: ValidatorSet, names: string[]); success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxCompound extends ShorthandSyntaxNode { readonly nodes: ShorthandSyntaxNode[]; readonly slash: boolean; constructor(nodes: ShorthandSyntaxNode[], slash: boolean); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; } class ShorthandValidator extends Css.Visitor { syntax: ShorthandSyntaxNode[]; propList: string[]; error: boolean; values: ValueMap; validatorSet: ValidatorSet; setOwner(validatorSet: ValidatorSet): void; syntaxNodeForProperty(name: string): ShorthandSyntaxNode; clone(): this; init(syntax: ShorthandSyntaxNode[], propList: string[]): void; finish(important: boolean, receiver: PropertyReceiver): boolean; propagateInherit(important: boolean, receiver: PropertyReceiver): void; validateList(list: Css.Val[]): number; validateSingle(val: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SimpleShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class InsetsShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; createSyntaxNode(): ShorthandSyntaxPropertyN; } class InsetsSlashShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class CommaShorthandValidator extends SimpleShorthandValidator { constructor(); mergeIn(acc: { [key: string]: Css.Val[]; }, values: ValueMap): void; visitCommaList(list: Css.CommaList): Css.Val; } class FontShorthandValidator extends SimpleShorthandValidator { constructor(); init(syntax: ShorthandSyntaxNode[], propList: string[]): void; validateList(list: Css.Val[]): number; visitCommaList(list: Css.CommaList): Css.Val; visitIdent(ident: Css.Ident): Css.Val; } const shorthandValidators: { [key: string]: typeof ShorthandValidator; }; class ValidatorSet { validators: { [key: string]: PropertyValidator; }; prefixes: { [key: string]: { [key: string]: boolean; }; }; defaultValues: ValueMap; namedValidators: { [key: string]: ValidatingGroup; }; systemFonts: { [key: string]: ValueMap; }; shorthands: { [key: string]: ShorthandValidator; }; layoutProps: ValueMap; backgroundProps: ValueMap; private addReplacement; private newGroup; private addCounts; private primitive; private newFunc; initBuiltInValidators(): void; private isBuiltIn; private readNameAndPrefixes; private parseValidators; private parseDefaults; private parseShorthands; parse(text: string): void; makePropSet(propList: string[]): ValueMap; validatePropertyAndHandleShorthand(name: string, value: Css.Val, important: boolean, receiver: PropertyReceiver): void; } function baseValidatorSet(): ValidatorSet; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade_$0 { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace TaskUtil { class Fetcher { readonly fetch: () => Task.Result; name: string; arrived: boolean; resource: T; task: Task.Task; piggybacks: ((p1: any) => void)[] | null; constructor(fetch: () => Task.Result, opt_name?: string); start(): void; piggyback(fn: (p1: T) => void): void; get(): Task.Result; hasArrived(): boolean; } const waitForFetchers: (fetchers: Fetcher[]) => Task.Result; function loadElement(elem: Element, src: string): Fetcher; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace CssParser { const SPECIFICITY_USER_AGENT: number; const SPECIFICITY_USER: number; const SPECIFICITY_AUTHOR: number; const SPECIFICITY_STYLE: number; const SPECIFICITY_STYLE_IMPORTANT: number; const SPECIFICITY_AUTHOR_IMPORTANT: number; const SPECIFICITY_USER_IMPORTANT: number; enum StylesheetFlavor { USER_AGENT = "UA", USER = "User", AUTHOR = "Author" } function colorFromHash(text: string): Css.Color; class ParserHandler implements CssTokenizer.TokenizerHandler { scope: Exprs.LexicalScope; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope); getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startMediaRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; getImportantSpecificity(): number; getBaseSpecificity(): number; } class DispatchParserHandler extends ParserHandler { stack: ParserHandler[]; tokenizer: CssTokenizer.Tokenizer; slave: ParserHandler; constructor(); pushHandler(slave: ParserHandler): void; popHandler(): void; getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; errorMsg(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; } class SkippingParserHandler extends ParserHandler { owner: DispatchParserHandler; readonly topLevel: any; depth: number; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: any); getCurrentToken(): CssTokenizer.Token; error(mnemonics: string, token: CssTokenizer.Token): void; startRuleBody(): void; endRule(): void; } class SlaveParserHandler extends SkippingParserHandler { constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: boolean); report(message: string): void; reportAndSkip(message: string): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; property(name: string, value: Css.Val, important: boolean): void; } const actionsBase: Action_$0[]; const actionsStyleAttribute: Action_$0[]; const actionsSelector: Action_$0[]; const actionsSelectorInFunc: Action_$0[]; const actionsSelectorCont: Action_$0[]; const actionsSelectorStart: Action_$0[]; const actionsPropVal: Action_$0[]; const actionsExprVal: Action_$0[]; const actionsExprOp: Action_$0[]; const actionsError: Action_$0[]; const actionsErrorDecl: Action_$0[]; const actionsErrorSelector: Action_$0[]; const priority: number[]; enum Action_$0 { SELECTOR_NAME_1 = 1, SELECTOR_NAME = 2, SELECTOR_ANY_1 = 3, SELECTOR_ANY = 4, SELECTOR_ID_1 = 5, SELECTOR_ID = 6, SELECTOR_CLASS_1 = 7, SELECTOR_CLASS = 8, SELECTOR_ATTR_1 = 9, SELECTOR_ATTR = 10, SELECTOR_CHILD = 11, SELECTOR_SIBLING = 12, SELECTOR_BODY = 13, SELECTOR_PSEUDOCLASS = 14, VAL_IDENT = 15, VAL_HASH = 16, VAL_NUM = 17, VAL_INT = 18, VAL_NUMERIC = 19, VAL_STR = 20, VAL_URL = 21, VAL_COMMA = 22, VAL_SLASH = 23, VAL_FUNC = 24, VAL_C_PAR = 25, VAL_END = 26, RULE_END = 27, IDENT = 28, SELECTOR_START = 29, AT = 30, EXPR_IDENT = 31, EXPR_NUM = 32, EXPR_NUMERIC = 33, EXPR_STR = 34, EXPR_PARAM = 35, EXPR_PREFIX = 36, EXPR_INFIX = 37, EXPR_FUNC = 38, EXPR_C_PAR = 39, EXPR_O_PAR = 40, SELECTOR_NEXT = 41, SELECTOR_PSEUDOELEM = 42, EXPR_O_BRC = 43, VAL_FINISH = 44, EXPR_INFIX_NAME = 45, PROP = 46, VAL_BANG = 47, VAL_BRC = 48, EXPR_SEMICOL = 49, ERROR_PUSH = 50, ERROR_POP = 51, ERROR_POP_DECL = 52, ERROR_SEMICOL = 53, VAL_PLUS = 54, SELECTOR_PSEUDOCLASS_1 = 55, SELECTOR_FOLLOWING_SIBLING = 56, DONE = 200 } const OP_MEDIA_AND: number; enum ExprContext { PROP = 0, WHEN = 1, MEDIA = 2, IMPORT = 3 } class Parser { actions: Action_$0[]; tokenizer: CssTokenizer.Tokenizer; readonly handler: ParserHandler; baseURL: string; valStack: any[]; namespacePrefixToURI: { [key: string]: string; }; defaultNamespaceURI: string | null; propName: string | null; propImportant: boolean; exprContext: ExprContext; result: Css.Val; importReady: boolean; importURL: string | null; importCondition: Css.Expr; errorBrackets: number[]; ruleStack: string[]; regionRule: boolean; pageRule: boolean; constructor(actions: Action_$0[], tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string); extractVals(sep: string, index: number): Css.Val[]; valStackReduce(sep: string, token: CssTokenizer.Token): Css.Val; exprError(mnemonics: string, token: CssTokenizer.Token): void; exprStackReduce(op: number, token: CssTokenizer.Token): boolean; readPseudoParams(): (number | string)[]; private readNthPseudoParams; makeCondition(classes: string | null, condition: Exprs.Val): Css.Expr; isInsidePropertyOnlyRule(): boolean; runParser(count: number, parsingValue: any, parsingStyleAttr: boolean, parsingMediaQuery: any, parsingFunctionParam: any): boolean; } class ErrorHandler extends ParserHandler { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); error(mnemonics: string, token: CssTokenizer.Token): void; getScope(): Exprs.LexicalScope; } function parseStylesheet(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromText(text: string, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromURL(url: string, handler: ParserHandler, classes: string | null, media: string | null): Task.Result; function parseValue(scope: Exprs.LexicalScope, tokenizer: CssTokenizer.Tokenizer, baseURL: string): Css.Val; function parseStyleAttribute(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): void; function parseMediaQuery(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): Css.Expr; const numProp: { [key: string]: boolean; }; function takesOnlyNum(propName: string): boolean; function evaluateExprToCSS(context: Exprs.Context, val: Exprs.Val, propName: string): Css.Val; function evaluateCSSToCSS(context: Exprs.Context, val: Css.Val, propName: string): Css.Val; } declare namespace CssValidator { interface PropertyReceiver { unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class Node { validator: PropertyValidator; success: Node; failure: Node; code: number; constructor(validator: PropertyValidator); isSpecial(): boolean; markAsStartGroup(): void; isStartGroup(): boolean; markAsEndGroup(): void; isEndGroup(): boolean; markAsStartAlternate(index: number): void; isStartAlternate(): boolean; markAsEndAlternate(index: number): void; isEndAlternate(): boolean; getAlternate(): number; } class Connection { where: number; success: boolean; what: number; constructor(where: number, success: boolean); } enum Add_$0 { FOLLOW = 1, OPTIONAL = 2, REPEATED = 3, ALTERNATE = 4 } class ValidatingGroup { nodes: Node[]; connections: Connection[]; match: number[]; nomatch: number[]; error: number[]; emptyHead: boolean; connect(arr: number[], nodeIndex: number): void; clone(): ValidatingGroup; private addSpecialToArr; endSpecialGroup(): void; startSpecialGroup(): void; endClause(clause: number): void; startClause(clause: number): void; addPrimitive(validator: PropertyValidator): void; isSimple(): boolean; isPrimitive(): boolean; addGroup(group: ValidatingGroup, how: Add_$0): void; finish(successTerminal: Node, failTerminal: Node): Node; } const ALLOW_EMPTY = 1; const ALLOW_STR = 2; const ALLOW_IDENT = 4; const ALLOW_POS_NUMERIC = 8; const ALLOW_POS_NUM = 16; const ALLOW_POS_INT = 32; const ALLOW_COLOR = 64; const ALLOW_URL = 128; const ALLOW_NEGATIVE = 256; const ALLOW_ZERO = 512; const ALLOW_ZERO_PERCENT = 1024; const ALLOW_SLASH = 2048; type ValueMap = { [key: string]: Css.Val; }; class PropertyValidator extends Css.Visitor { constructor(); validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class PrimitiveValidator extends PropertyValidator { readonly allowed: number; readonly idents: ValueMap; readonly units: ValueMap; constructor(allowed: number, idents: ValueMap, units: ValueMap); visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; combine(other: PrimitiveValidator): PrimitiveValidator; } const ALWAYS_FAIL: PrimitiveValidator; class ListValidator extends PropertyValidator { successTerminal: Node; failureTerminal: Node; first: Node; constructor(group: ValidatingGroup); validateList(arr: Css.Val[], slice: boolean, startIndex: number): Css.Val[]; validateSingle(inval: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SpaceListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class CommaListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class FuncValidator extends ListValidator { readonly name: string; constructor(name: string, group: ValidatingGroup); validateSingle(inval: Css.Val): Css.Val; visitFunc(func: Css.Func): Css.Val; } class ShorthandSyntaxNode { tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxProperty extends ShorthandSyntaxNode { readonly name: string; validator: PropertyValidator; constructor(validatorSet: ValidatorSet, name: string); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxPropertyN extends ShorthandSyntaxProperty { readonly names: string[]; constructor(validatorSet: ValidatorSet, names: string[]); success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxCompound extends ShorthandSyntaxNode { readonly nodes: ShorthandSyntaxNode[]; readonly slash: boolean; constructor(nodes: ShorthandSyntaxNode[], slash: boolean); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; } class ShorthandValidator extends Css.Visitor { syntax: ShorthandSyntaxNode[]; propList: string[]; error: boolean; values: ValueMap; validatorSet: ValidatorSet; setOwner(validatorSet: ValidatorSet): void; syntaxNodeForProperty(name: string): ShorthandSyntaxNode; clone(): this; init(syntax: ShorthandSyntaxNode[], propList: string[]): void; finish(important: boolean, receiver: PropertyReceiver): boolean; propagateInherit(important: boolean, receiver: PropertyReceiver): void; validateList(list: Css.Val[]): number; validateSingle(val: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SimpleShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class InsetsShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; createSyntaxNode(): ShorthandSyntaxPropertyN; } class InsetsSlashShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class CommaShorthandValidator extends SimpleShorthandValidator { constructor(); mergeIn(acc: { [key: string]: Css.Val[]; }, values: ValueMap): void; visitCommaList(list: Css.CommaList): Css.Val; } class FontShorthandValidator extends SimpleShorthandValidator { constructor(); init(syntax: ShorthandSyntaxNode[], propList: string[]): void; validateList(list: Css.Val[]): number; visitCommaList(list: Css.CommaList): Css.Val; visitIdent(ident: Css.Ident): Css.Val; } const shorthandValidators: { [key: string]: typeof ShorthandValidator; }; class ValidatorSet { validators: { [key: string]: PropertyValidator; }; prefixes: { [key: string]: { [key: string]: boolean; }; }; defaultValues: ValueMap; namedValidators: { [key: string]: ValidatingGroup; }; systemFonts: { [key: string]: ValueMap; }; shorthands: { [key: string]: ShorthandValidator; }; layoutProps: ValueMap; backgroundProps: ValueMap; private addReplacement; private newGroup; private addCounts; private primitive; private newFunc; initBuiltInValidators(): void; private isBuiltIn; private readNameAndPrefixes; private parseValidators; private parseDefaults; private parseShorthands; parse(text: string): void; makePropSet(propList: string[]): ValueMap; validatePropertyAndHandleShorthand(name: string, value: Css.Val, important: boolean, receiver: PropertyReceiver): void; } function baseValidatorSet(): ValidatorSet; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Font { const traitProps: { [key: string]: Css.Val; }; const bogusFontData: string; let bogusFontCounter: number; function makeFontTraitKey(properties: { [key: string]: Css.Val; }): string; function fillDefaults(properties: { [key: string]: Css.Val; }): void; function prepareProperties(properties: CssCascade_$0.ElementStyle, context: Exprs.Context): { [key: string]: Css.Val; }; class Face { readonly properties: { [key: string]: Css.Val; }; fontTraitKey: string; src: string | null; blobURLs: string[]; blobs: Blob[]; family: string | null; constructor(properties: { [key: string]: Css.Val; }); traitsEqual(other: Face): boolean; makeAtRule(src: string, fontBytes: Blob): string; } class DocumentFaces { readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; familyMap: { [key: string]: string; }; constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null); registerFamily(srcFace: Face, viewFace: Face): void; filterFontFamily(val: Css.Val): Css.Val; } class Mapper { readonly head: Element; readonly body: Element; srcURLMap: { [key: string]: TaskUtil.Fetcher; }; familyPrefix: string; familyCounter: number; constructor(head: Element, body: Element, opt_familyPrefix?: string); getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string; private initFont; loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher; findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Constants { let isDebug: boolean; function setDebug(value: boolean): void; enum PageProgression { LTR = "ltr", RTL = "rtl" } function pageProgressionOf(str: string): PageProgression; enum PageSide { LEFT = "left", RIGHT = "right" } enum ReadyState { LOADING = "loading", INTERACTIVE = "interactive", COMPLETE = "complete" } const constants: { PageProgression: typeof PageProgression; PageSide: typeof PageSide; ReadyState: typeof ReadyState; }; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace CssParser { const SPECIFICITY_USER_AGENT: number; const SPECIFICITY_USER: number; const SPECIFICITY_AUTHOR: number; const SPECIFICITY_STYLE: number; const SPECIFICITY_STYLE_IMPORTANT: number; const SPECIFICITY_AUTHOR_IMPORTANT: number; const SPECIFICITY_USER_IMPORTANT: number; enum StylesheetFlavor { USER_AGENT = "UA", USER = "User", AUTHOR = "Author" } function colorFromHash(text: string): Css.Color; class ParserHandler implements CssTokenizer.TokenizerHandler { scope: Exprs.LexicalScope; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope); getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startMediaRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; getImportantSpecificity(): number; getBaseSpecificity(): number; } class DispatchParserHandler extends ParserHandler { stack: ParserHandler[]; tokenizer: CssTokenizer.Tokenizer; slave: ParserHandler; constructor(); pushHandler(slave: ParserHandler): void; popHandler(): void; getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; errorMsg(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; } class SkippingParserHandler extends ParserHandler { owner: DispatchParserHandler; readonly topLevel: any; depth: number; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: any); getCurrentToken(): CssTokenizer.Token; error(mnemonics: string, token: CssTokenizer.Token): void; startRuleBody(): void; endRule(): void; } class SlaveParserHandler extends SkippingParserHandler { constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: boolean); report(message: string): void; reportAndSkip(message: string): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; property(name: string, value: Css.Val, important: boolean): void; } const actionsBase: Action_$0[]; const actionsStyleAttribute: Action_$0[]; const actionsSelector: Action_$0[]; const actionsSelectorInFunc: Action_$0[]; const actionsSelectorCont: Action_$0[]; const actionsSelectorStart: Action_$0[]; const actionsPropVal: Action_$0[]; const actionsExprVal: Action_$0[]; const actionsExprOp: Action_$0[]; const actionsError: Action_$0[]; const actionsErrorDecl: Action_$0[]; const actionsErrorSelector: Action_$0[]; const priority: number[]; enum Action_$0 { SELECTOR_NAME_1 = 1, SELECTOR_NAME = 2, SELECTOR_ANY_1 = 3, SELECTOR_ANY = 4, SELECTOR_ID_1 = 5, SELECTOR_ID = 6, SELECTOR_CLASS_1 = 7, SELECTOR_CLASS = 8, SELECTOR_ATTR_1 = 9, SELECTOR_ATTR = 10, SELECTOR_CHILD = 11, SELECTOR_SIBLING = 12, SELECTOR_BODY = 13, SELECTOR_PSEUDOCLASS = 14, VAL_IDENT = 15, VAL_HASH = 16, VAL_NUM = 17, VAL_INT = 18, VAL_NUMERIC = 19, VAL_STR = 20, VAL_URL = 21, VAL_COMMA = 22, VAL_SLASH = 23, VAL_FUNC = 24, VAL_C_PAR = 25, VAL_END = 26, RULE_END = 27, IDENT = 28, SELECTOR_START = 29, AT = 30, EXPR_IDENT = 31, EXPR_NUM = 32, EXPR_NUMERIC = 33, EXPR_STR = 34, EXPR_PARAM = 35, EXPR_PREFIX = 36, EXPR_INFIX = 37, EXPR_FUNC = 38, EXPR_C_PAR = 39, EXPR_O_PAR = 40, SELECTOR_NEXT = 41, SELECTOR_PSEUDOELEM = 42, EXPR_O_BRC = 43, VAL_FINISH = 44, EXPR_INFIX_NAME = 45, PROP = 46, VAL_BANG = 47, VAL_BRC = 48, EXPR_SEMICOL = 49, ERROR_PUSH = 50, ERROR_POP = 51, ERROR_POP_DECL = 52, ERROR_SEMICOL = 53, VAL_PLUS = 54, SELECTOR_PSEUDOCLASS_1 = 55, SELECTOR_FOLLOWING_SIBLING = 56, DONE = 200 } const OP_MEDIA_AND: number; enum ExprContext { PROP = 0, WHEN = 1, MEDIA = 2, IMPORT = 3 } class Parser { actions: Action_$0[]; tokenizer: CssTokenizer.Tokenizer; readonly handler: ParserHandler; baseURL: string; valStack: any[]; namespacePrefixToURI: { [key: string]: string; }; defaultNamespaceURI: string | null; propName: string | null; propImportant: boolean; exprContext: ExprContext; result: Css.Val; importReady: boolean; importURL: string | null; importCondition: Css.Expr; errorBrackets: number[]; ruleStack: string[]; regionRule: boolean; pageRule: boolean; constructor(actions: Action_$0[], tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string); extractVals(sep: string, index: number): Css.Val[]; valStackReduce(sep: string, token: CssTokenizer.Token): Css.Val; exprError(mnemonics: string, token: CssTokenizer.Token): void; exprStackReduce(op: number, token: CssTokenizer.Token): boolean; readPseudoParams(): (number | string)[]; private readNthPseudoParams; makeCondition(classes: string | null, condition: Exprs.Val): Css.Expr; isInsidePropertyOnlyRule(): boolean; runParser(count: number, parsingValue: any, parsingStyleAttr: boolean, parsingMediaQuery: any, parsingFunctionParam: any): boolean; } class ErrorHandler extends ParserHandler { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); error(mnemonics: string, token: CssTokenizer.Token): void; getScope(): Exprs.LexicalScope; } function parseStylesheet(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromText(text: string, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromURL(url: string, handler: ParserHandler, classes: string | null, media: string | null): Task.Result; function parseValue(scope: Exprs.LexicalScope, tokenizer: CssTokenizer.Tokenizer, baseURL: string): Css.Val; function parseStyleAttribute(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): void; function parseMediaQuery(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): Css.Expr; const numProp: { [key: string]: boolean; }; function takesOnlyNum(propName: string): boolean; function evaluateExprToCSS(context: Exprs.Context, val: Exprs.Val, propName: string): Css.Val; function evaluateCSSToCSS(context: Exprs.Context, val: Css.Val, propName: string): Css.Val; } declare namespace CssValidator { interface PropertyReceiver { unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class Node { validator: PropertyValidator; success: Node; failure: Node; code: number; constructor(validator: PropertyValidator); isSpecial(): boolean; markAsStartGroup(): void; isStartGroup(): boolean; markAsEndGroup(): void; isEndGroup(): boolean; markAsStartAlternate(index: number): void; isStartAlternate(): boolean; markAsEndAlternate(index: number): void; isEndAlternate(): boolean; getAlternate(): number; } class Connection { where: number; success: boolean; what: number; constructor(where: number, success: boolean); } enum Add_$0 { FOLLOW = 1, OPTIONAL = 2, REPEATED = 3, ALTERNATE = 4 } class ValidatingGroup { nodes: Node[]; connections: Connection[]; match: number[]; nomatch: number[]; error: number[]; emptyHead: boolean; connect(arr: number[], nodeIndex: number): void; clone(): ValidatingGroup; private addSpecialToArr; endSpecialGroup(): void; startSpecialGroup(): void; endClause(clause: number): void; startClause(clause: number): void; addPrimitive(validator: PropertyValidator): void; isSimple(): boolean; isPrimitive(): boolean; addGroup(group: ValidatingGroup, how: Add_$0): void; finish(successTerminal: Node, failTerminal: Node): Node; } const ALLOW_EMPTY = 1; const ALLOW_STR = 2; const ALLOW_IDENT = 4; const ALLOW_POS_NUMERIC = 8; const ALLOW_POS_NUM = 16; const ALLOW_POS_INT = 32; const ALLOW_COLOR = 64; const ALLOW_URL = 128; const ALLOW_NEGATIVE = 256; const ALLOW_ZERO = 512; const ALLOW_ZERO_PERCENT = 1024; const ALLOW_SLASH = 2048; type ValueMap = { [key: string]: Css.Val; }; class PropertyValidator extends Css.Visitor { constructor(); validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class PrimitiveValidator extends PropertyValidator { readonly allowed: number; readonly idents: ValueMap; readonly units: ValueMap; constructor(allowed: number, idents: ValueMap, units: ValueMap); visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; combine(other: PrimitiveValidator): PrimitiveValidator; } const ALWAYS_FAIL: PrimitiveValidator; class ListValidator extends PropertyValidator { successTerminal: Node; failureTerminal: Node; first: Node; constructor(group: ValidatingGroup); validateList(arr: Css.Val[], slice: boolean, startIndex: number): Css.Val[]; validateSingle(inval: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SpaceListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class CommaListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class FuncValidator extends ListValidator { readonly name: string; constructor(name: string, group: ValidatingGroup); validateSingle(inval: Css.Val): Css.Val; visitFunc(func: Css.Func): Css.Val; } class ShorthandSyntaxNode { tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxProperty extends ShorthandSyntaxNode { readonly name: string; validator: PropertyValidator; constructor(validatorSet: ValidatorSet, name: string); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxPropertyN extends ShorthandSyntaxProperty { readonly names: string[]; constructor(validatorSet: ValidatorSet, names: string[]); success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxCompound extends ShorthandSyntaxNode { readonly nodes: ShorthandSyntaxNode[]; readonly slash: boolean; constructor(nodes: ShorthandSyntaxNode[], slash: boolean); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; } class ShorthandValidator extends Css.Visitor { syntax: ShorthandSyntaxNode[]; propList: string[]; error: boolean; values: ValueMap; validatorSet: ValidatorSet; setOwner(validatorSet: ValidatorSet): void; syntaxNodeForProperty(name: string): ShorthandSyntaxNode; clone(): this; init(syntax: ShorthandSyntaxNode[], propList: string[]): void; finish(important: boolean, receiver: PropertyReceiver): boolean; propagateInherit(important: boolean, receiver: PropertyReceiver): void; validateList(list: Css.Val[]): number; validateSingle(val: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SimpleShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class InsetsShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; createSyntaxNode(): ShorthandSyntaxPropertyN; } class InsetsSlashShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class CommaShorthandValidator extends SimpleShorthandValidator { constructor(); mergeIn(acc: { [key: string]: Css.Val[]; }, values: ValueMap): void; visitCommaList(list: Css.CommaList): Css.Val; } class FontShorthandValidator extends SimpleShorthandValidator { constructor(); init(syntax: ShorthandSyntaxNode[], propList: string[]): void; validateList(list: Css.Val[]): number; visitCommaList(list: Css.CommaList): Css.Val; visitIdent(ident: Css.Ident): Css.Val; } const shorthandValidators: { [key: string]: typeof ShorthandValidator; }; class ValidatorSet { validators: { [key: string]: PropertyValidator; }; prefixes: { [key: string]: { [key: string]: boolean; }; }; defaultValues: ValueMap; namedValidators: { [key: string]: ValidatingGroup; }; systemFonts: { [key: string]: ValueMap; }; shorthands: { [key: string]: ShorthandValidator; }; layoutProps: ValueMap; backgroundProps: ValueMap; private addReplacement; private newGroup; private addCounts; private primitive; private newFunc; initBuiltInValidators(): void; private isBuiltIn; private readNameAndPrefixes; private parseValidators; private parseDefaults; private parseShorthands; parse(text: string): void; makePropSet(propList: string[]): ValueMap; validatePropertyAndHandleShorthand(name: string, value: Css.Val, important: boolean, receiver: PropertyReceiver): void; } function baseValidatorSet(): ValidatorSet; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Font { const traitProps: { [key: string]: Css.Val; }; const bogusFontData: string; let bogusFontCounter: number; function makeFontTraitKey(properties: { [key: string]: Css.Val; }): string; function fillDefaults(properties: { [key: string]: Css.Val; }): void; function prepareProperties(properties: CssCascade_$0.ElementStyle, context: Exprs.Context): { [key: string]: Css.Val; }; class Face { readonly properties: { [key: string]: Css.Val; }; fontTraitKey: string; src: string | null; blobURLs: string[]; blobs: Blob[]; family: string | null; constructor(properties: { [key: string]: Css.Val; }); traitsEqual(other: Face): boolean; makeAtRule(src: string, fontBytes: Blob): string; } class DocumentFaces { readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; familyMap: { [key: string]: string; }; constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null); registerFamily(srcFace: Face, viewFace: Face): void; filterFontFamily(val: Css.Val): Css.Val; } class Mapper { readonly head: Element; readonly body: Element; srcURLMap: { [key: string]: TaskUtil.Fetcher; }; familyPrefix: string; familyCounter: number; constructor(head: Element, body: Element, opt_familyPrefix?: string); getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string; private initFont; loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher; findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result; } } declare namespace PageMaster { let keyCount: number; abstract class PageBox> { readonly name: string | null; readonly pseudoName: string | null; readonly classes: string[]; readonly parent: PageBox; specified: CssCascade.ElementStyle; children: PageBox[]; pageMaster: PageMaster; index: number; key: string; protected _scope: Exprs.LexicalScope; get scope(): Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: PageBox); createInstance(parentInstance: PageBoxInstance): PageBoxInstance; clone(param: { parent?: PageBox; pseudoName?: string; }): PageBox; copySpecified(dest: PageBox): void; cloneChildren(parent: PageBox): void; } class RootPageBox extends PageBox { constructor(scope: Exprs.LexicalScope); } class PageMasterScope extends Exprs.LexicalScope { pageMaster: PageMaster; constructor(scope: Exprs.LexicalScope, pageMaster: PageMaster); } class PageMaster> extends PageBox { readonly condition: Exprs.Val; readonly specificity: number; pageMaster: PageMaster; keyMap: { [key: string]: string; }; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: RootPageBox, condition: Exprs.Val, specificity: number); createInstance(parentInstance: any): PageBoxInstance; clone(param: any): PageMaster; resetScope(): void; } class PartitionGroup extends PageBox { pageMaster: PageMaster; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: PageBox); createInstance(parentInstance: PageBoxInstance): PageBoxInstance; clone(param: any): PartitionGroup; } class Partition extends PageBox { pageMaster: PageMaster; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: PageBox); createInstance(parentInstance: any): PageBoxInstance; clone(param: any): Partition; } function toExprIdent(scope: Exprs.LexicalScope, val: Css.Val, def: string): Exprs.Val; function toExprAuto(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprNormal(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprZero(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprZeroAuto(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprZeroBorder(scope: Exprs.LexicalScope, val: Css.Val, styleVal: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprBool(scope: Exprs.LexicalScope, val: Css.Val, def: Exprs.Val): Exprs.Val; interface InstanceHolder extends Exprs.Context { registerInstance(key: string, instance: PageBoxInstance): void; lookupInstance(key: string): PageBoxInstance; } class PageBoxInstance

> { readonly parentInstance: PageBoxInstance; readonly pageBox: P; protected cascaded: CssCascade.ElementStyle; style: { [key: string]: Css.Val; }; private autoWidth; private autoHeight; children: PageBoxInstance[]; isAutoWidth: boolean; isAutoHeight: boolean; isTopDependentOnAutoHeight: boolean; isRightDependentOnAutoWidth: boolean; private calculatedWidth; private calculatedHeight; pageMasterInstance: PageMasterInstance; namedValues: { [key: string]: Exprs.Val; }; namedFuncs: { [key: string]: Exprs.Val; }; vertical: boolean; rtl: boolean; suppressEmptyBoxGeneration: boolean; constructor(parentInstance: PageBoxInstance, pageBox: P); reset(): void; private addNamedValues; resolveName(name: string): Exprs.Val; resolveFunc(name: any): Exprs.Val; private initEnabled; boxSpecificEnabled(enabled: Exprs.Val): Exprs.Val; initHorizontal(): void; initVertical(): void; private initColumns; private depends; private init; getProp(context: Exprs.Context, name: string): Css.Val; getPropAsNumber(context: Exprs.Context, name: string): number; getSpecial(context: Exprs.Context, name: string): Css.Val[]; getActiveRegions(context: Exprs.Context): string[]; propagateProperty(context: Exprs.Context, container: Vtree_$0.Container, name: string, docFaces: Font.DocumentFaces): void; propagatePropertyToElement(context: Exprs.Context, element: Element, name: string, docFaces: Font.DocumentFaces): void; propagateDelayedProperty(context: Exprs.Context, container: Vtree_$0.Container, name: string, delayedItems: Vtree_$0.DelayedItem[]): void; assignLeftPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignRightPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignTopPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignBottomPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignBeforePosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignAfterPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignStartEndPosition(context: Exprs.Context, container: Vtree_$0.Container): void; sizeWithMaxHeight(context: Exprs.Context, container: Vtree_$0.Container): void; sizeWithMaxWidth(context: Exprs.Context, container: Vtree_$0.Container): void; prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; transferContentProps(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces): void; transferSinglUriContentProps(context: Exprs.Context, element: Element, docFaces: Font.DocumentFaces): void; finishContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, column: Vtree_$0.Container, columnCount: number, clientLayout: Vtree_$0.ClientLayout, docFaces: Font.DocumentFaces): void; applyCascadeAndInit(cascade: CssCascade.CascadeInstance, docElementStyle: CssCascade.ElementStyle): void; resolveAutoSizing(context: Exprs.Context): void; } const passPreProperties: string[]; const passPostProperties: string[]; const passContentProperties: string[]; const passSingleUriContentProperties: string[]; const delayedProperties: string[]; const userAgentPageMasterPseudo = "background-host"; class RootPageBoxInstance extends PageBoxInstance { constructor(pageBox: RootPageBox); applyCascadeAndInit(cascade: CssCascade.CascadeInstance, docElementStyle: CssCascade.ElementStyle): void; } class PageMasterInstance

>> extends PageBoxInstance

{ pageMasterInstance: PageMasterInstance; constructor(parentInstance: PageBoxInstance, pageBox: P); boxSpecificEnabled(enabled: Exprs.Val): Exprs.Val; adjustPageLayout(context: Exprs.Context, page: Vtree_$0.Page, clientLayout: Vtree_$0.ClientLayout): void; } class PartitionGroupInstance extends PageBoxInstance { pageMasterInstance: PageMasterInstance; constructor(parentInstance: PageBoxInstance, pageBox: PageBox); } class PartitionInstance

>> extends PageBoxInstance

{ pageMasterInstance: PageMasterInstance; constructor(parentInstance: PageBoxInstance, pageBox: P); processPartitionList(enabled: Exprs.Val, listVal: Css.Val, conflicting: boolean): Exprs.Val; boxSpecificEnabled(enabled: Exprs.Val): Exprs.Val; prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; } class PageBoxParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly target: PageBox; readonly validatorSet: CssValidator.ValidatorSet; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: PageBox, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PartitionParserHandler extends PageBoxParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: Partition, validatorSet: CssValidator.ValidatorSet); } class PartitionGroupParserHandler extends PageBoxParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: PartitionGroup, validatorSet: CssValidator.ValidatorSet); startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; } class PageMasterParserHandler extends PageBoxParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: PageMaster, validatorSet: CssValidator.ValidatorSet); startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade_$0 { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace CssStyler_$0 { class SlipRange { endStuckFixed: number; endFixed: number; endSlipped: number; constructor(endStuckFixed: any, endFixed: any, endSlipped: any); } class SlipMap { map: SlipRange[]; getMaxFixed(): number; getMaxSlipped(): number; addStuckRange(endFixed: number): void; addSlippedRange(endFixed: number): void; slippedByFixed(fixed: number): number; fixedBySlipped(slipped: number): number; } interface FlowListener { encounteredFlowChunk(flowChunk: Vtree_$0.FlowChunk, flow: Vtree_$0.Flow): any; } interface AbstractStyler_$0 extends CssStyler.AbstractStyler_$0 { } class Box { readonly context: Exprs.Context; readonly style: CssCascade_$0.ElementStyle; readonly offset: number; readonly isRoot: boolean; readonly flowChunk: Vtree_$0.FlowChunk; readonly atBlockStart: boolean; readonly atFlowStart: boolean; readonly isParentBoxDisplayed: boolean; flowName: string; isBlockValue: boolean | null; hasBoxValue: boolean | null; styleValues: { [key: string]: Css.Val; }; beforeBox: Box; afterBox: Box; breakBefore: string | null; constructor(context: Exprs.Context, style: CssCascade_$0.ElementStyle, offset: number, isRoot: boolean, flowChunk: Vtree_$0.FlowChunk, atBlockStart: boolean, atFlowStart: boolean, isParentBoxDisplayed: boolean); buildAfterPseudoElementBox(offset: number, atBlockStart: boolean, atFlowStart: boolean): void; styleValue(name: string, defaultValue?: Css.Val): Css.Val | null; displayValue(): Css.Val; isBlock(): boolean; hasBox(): boolean; getBreakValue(edge: string): string | null; } class BoxStack { readonly context: Exprs.Context; stack: Box[]; atBlockStart: boolean; atFlowStart: boolean; atStartStack: { atBlockStart: boolean; atFlowStart: boolean; }[]; constructor(context: Exprs.Context); empty(): boolean; lastBox(): Box | undefined; lastFlowName(): string | null; isCurrentBoxDisplayed(): boolean; push(style: CssCascade_$0.ElementStyle, offset: number, isRoot: boolean, newFlowChunk?: Vtree_$0.FlowChunk): Box; encounteredTextNode(node: Node): void; pop(offset: number): Box; nearestBlockStartOffset(box: Box): number; } class Styler implements AbstractStyler_$0 { readonly xmldoc: XmlDoc.XMLDocHolder; readonly scope: Exprs.LexicalScope; readonly context: Exprs.Context; readonly primaryFlows: { [key: string]: boolean; }; readonly validatorSet: CssValidator.ValidatorSet; readonly counterListener: CssCascade_$0.CounterListener; root: Element; cascadeHolder: CssCascade_$0.Cascade; last: Node; rootStyle: CssCascade_$0.ElementStyle; styleMap: { [key: string]: CssCascade_$0.ElementStyle; }; flows: { [key: string]: Vtree_$0.Flow; }; flowChunks: Vtree_$0.FlowChunk[]; flowListener: FlowListener; flowToReach: string | null; idToReach: string | null; cascade: CssCascade_$0.CascadeInstance; offsetMap: SlipMap; primary: boolean; primaryStack: boolean[]; rootBackgroundAssigned: boolean; rootLayoutAssigned: boolean; lastOffset: number; breakBeforeValues: { [key: number]: string; }; boxStack: BoxStack; bodyReached: boolean; constructor(xmldoc: XmlDoc.XMLDocHolder, cascade: CssCascade_$0.Cascade, scope: Exprs.LexicalScope, context: Exprs.Context, primaryFlows: { [key: string]: boolean; }, validatorSet: CssValidator.ValidatorSet, counterListener: CssCascade_$0.CounterListener, counterResolver: CssCascade_$0.CounterResolver); hasProp(style: CssCascade_$0.ElementStyle, map: CssValidator.ValueMap, name: string): boolean; transferPropsToRoot(srcStyle: CssCascade_$0.ElementStyle, map: CssValidator.ValueMap): void; postprocessTopStyle(elemStyle: CssCascade_$0.ElementStyle, isBody: boolean): void; getTopContainerStyle(): CssCascade_$0.ElementStyle; getAttrStyle(elem: Element): CssCascade_$0.ElementStyle; getReachedOffset(): number; replayFlowElementsFromOffset(offset: number): void; resetFlowChunkStream(flowListener: FlowListener): void; styleUntilFlowIsReached(flowName: string): void; styleUntilIdIsReached(id: string): void; private encounteredFlowElement; registerForcedBreakOffset(breakValue: string | null, offset: number, flowName: string): void; styleUntil(startOffset: number, lookup: number): number; getStyle(element: Element, deep: boolean): CssCascade_$0.ElementStyle; processContent(element: Element, styles: { [key: string]: Css.Val; }): void; } const columnProps: string[]; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Font { const traitProps: { [key: string]: Css.Val; }; const bogusFontData: string; let bogusFontCounter: number; function makeFontTraitKey(properties: { [key: string]: Css.Val; }): string; function fillDefaults(properties: { [key: string]: Css.Val; }): void; function prepareProperties(properties: CssCascade_$0.ElementStyle, context: Exprs.Context): { [key: string]: Css.Val; }; class Face { readonly properties: { [key: string]: Css.Val; }; fontTraitKey: string; src: string | null; blobURLs: string[]; blobs: Blob[]; family: string | null; constructor(properties: { [key: string]: Css.Val; }); traitsEqual(other: Face): boolean; makeAtRule(src: string, fontBytes: Blob): string; } class DocumentFaces { readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; familyMap: { [key: string]: string; }; constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null); registerFamily(srcFace: Face, viewFace: Face): void; filterFontFamily(val: Css.Val): Css.Val; } class Mapper { readonly head: Element; readonly body: Element; srcURLMap: { [key: string]: TaskUtil.Fetcher; }; familyPrefix: string; familyCounter: number; constructor(head: Element, body: Element, opt_familyPrefix?: string); getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string; private initFont; loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher; findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace TaskUtil { class Fetcher { readonly fetch: () => Task.Result; name: string; arrived: boolean; resource: T; task: Task.Task; piggybacks: ((p1: any) => void)[] | null; constructor(fetch: () => Task.Result, opt_name?: string); start(): void; piggyback(fn: (p1: T) => void): void; get(): Task.Result; hasArrived(): boolean; } const waitForFetchers: (fetchers: Fetcher[]) => Task.Result; function loadElement(elem: Element, src: string): Fetcher; } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace Net_$0 { enum XMLHttpRequestResponseType { DEFAULT = "", ARRAYBUFFER = "arraybuffer", BLOB = "blob", DOCUMENT = "document", JSON = "json", TEXT = "text" } type Response_$0 = Net.Response_$0; function ajax(url: string, opt_type?: XMLHttpRequestResponseType, opt_method?: string, opt_data?: string, opt_contentType?: string): Task.Result; function makeBlob(parts: (string | Blob | ArrayBuffer | ArrayBufferView)[], opt_type?: string): any; function readBlob(blob: Blob): any; function revokeObjectURL(url: string): void; function createObjectURL(blob: Blob): string; class ResourceStore_$0 implements Net.ResourceStore_$0 { readonly parser: (p1: Response_$0, p2: ResourceStore_$0) => Task.Result; readonly type: XMLHttpRequestResponseType; resources: { [key: string]: Resource; }; fetchers: { [key: string]: TaskUtil.Fetcher; }; constructor(parser: (p1: Response_$0, p2: ResourceStore_$0) => Task.Result, type: XMLHttpRequestResponseType); load(url: string, opt_required?: boolean, opt_message?: string): Task.Result; private fetchInner; fetch(url: string, opt_required?: boolean, opt_message?: string): TaskUtil.Fetcher; get(url: string): XmlDoc.XMLDocHolder; delete(url: string): void; } type JSONStore = ResourceStore_$0; function parseJSONResource(response: Response_$0, store: JSONStore): Task.Result; function newJSONStore(): JSONStore; } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Constants { let isDebug: boolean; function setDebug(value: boolean): void; enum PageProgression { LTR = "ltr", RTL = "rtl" } function pageProgressionOf(str: string): PageProgression; enum PageSide { LEFT = "left", RIGHT = "right" } enum ReadyState { LOADING = "loading", INTERACTIVE = "interactive", COMPLETE = "complete" } const constants: { PageProgression: typeof PageProgression; PageSide: typeof PageSide; ReadyState: typeof ReadyState; }; } declare namespace Counters { class TargetCounterReference { readonly targetId: string; resolved: boolean; pageCounters: CssCascade_$0.CounterValues; spineIndex: number; pageIndex: number; constructor(targetId: string, resolved: boolean); equals(other: TargetCounterReference): boolean; isResolved(): boolean; resolve(): void; unresolve(): void; } class CounterStore { readonly documentURLTransformer: Base.DocumentURLTransformer; countersById: { [key: string]: CssCascade_$0.CounterValues; }; pageCountersById: { [key: string]: CssCascade_$0.CounterValues; }; currentPageCounters: CssCascade_$0.CounterValues; previousPageCounters: CssCascade_$0.CounterValues; currentPageCountersStack: CssCascade_$0.CounterValues[]; pageIndicesById: { [key: string]: { spineIndex: number; pageIndex: number; }; }; currentPage: Vtree_$0.Page; newReferencesOfCurrentPage: TargetCounterReference[]; referencesToSolve: TargetCounterReference[]; referencesToSolveStack: TargetCounterReference[][]; unresolvedReferences: { [key: string]: TargetCounterReference[]; }; resolvedReferences: { [key: string]: TargetCounterReference[]; }; private pagesCounterExprs; constructor(documentURLTransformer: Base.DocumentURLTransformer); createCounterListener(baseURL: string): CssCascade_$0.CounterListener; createCounterResolver(baseURL: string, rootScope: Exprs.LexicalScope, pageScope: Exprs.LexicalScope): CssCascade_$0.CounterResolver; setCurrentPage(page: Vtree_$0.Page): void; private definePageCounter; forceSetPageCounter(pageNumber: number): void; updatePageCounters(cascadedPageStyle: CssCascade_$0.ElementStyle, context: Exprs.Context): void; pushPageCounters(counters: CssCascade_$0.CounterValues): void; popPageCounters(): void; resolveReference(id: string): void; saveReferenceOfCurrentPage(id: string, resolved: boolean): void; finishPage(spineIndex: number, pageIndex: number): void; getUnresolvedRefsToPage(page: Vtree_$0.Page): { spineIndex: number; pageIndex: number; pageCounters: CssCascade_$0.CounterValues; refs: TargetCounterReference[]; }[]; pushReferencesToSolve(refs: TargetCounterReference[]): void; popReferencesToSolve(): void; registerPageCounterExpr(name: string, format: (p1: number[]) => string, expr: Exprs.Val): void; getExprContentListener(): Vtree_$0.ExprContentListener; private exprContentListener; finishLastPage(viewport: Vgen.Viewport): void; createLayoutConstraint(pageIndex: number): Layout.LayoutConstraint; } const PAGES_COUNTER_ATTR = "data-vivliostyle-pages-counter"; } declare namespace Css { class Visitor { visitValues(values: Val_$0[]): any; visitEmpty(empty: Val_$0): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class FilterVisitor extends Visitor { constructor(); visitValues(values: Val_$0[]): Val_$0[]; visitStr(str: Str): Val_$0; visitIdent(ident: Ident): Val_$0; visitSlash(slash: Val_$0): Val_$0; visitNumeric(numeric: Numeric_$0): Val_$0; visitNum(num: Num): Val_$0; visitInt(num: Int): Val_$0; visitColor(color: Color): Val_$0; visitURL(url: URL): Val_$0; visitSpaceList(list: SpaceList): Val_$0; visitCommaList(list: CommaList): Val_$0; visitFunc(func: Func): Val_$0; visitExpr(expr: Expr): Val_$0; } class Val_$0 { toString(): string; stringValue(): string; toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; isExpr(): boolean; isNumeric(): boolean; isNum(): boolean; isIdent(): boolean; isSpaceList(): boolean; visit(visitor: any): any; } class Empty extends Val_$0 { private static empty; static get instance(): Empty; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const empty: Empty; class Slash extends Val_$0 { private static slash; static get instance(): Slash; private constructor(); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } const slash: Slash; class Str extends Val_$0 { str: string; constructor(str: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Ident extends Val_$0 { name: string; constructor(name: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isIdent(): boolean; } function getName(name: string): Ident; class Numeric_$0 extends Val_$0 { num: number; unit: string; constructor(num: number, unit: string); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNumeric(): boolean; } class Num extends Val_$0 { num: number; constructor(num: number); toExpr(scope: Exprs.LexicalScope, ref: Exprs.Val_$0): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isNum(): boolean; } class Int extends Num { constructor(num: number); visit(visitor: any): any; } class Color extends Val_$0 { rgb: number; constructor(rgb: number); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class URL extends Val_$0 { url: string; constructor(url: string); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } function appendList(buf: Base.StringBuffer, values: Val_$0[], separator: string, toString: boolean): void; class SpaceList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isSpaceList(): boolean; } class CommaList extends Val_$0 { values: Val_$0[]; constructor(values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Func extends Val_$0 { name: string; values: Val_$0[]; constructor(name: string, values: Val_$0[]); appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; } class Expr extends Val_$0 { expr: Exprs.Val_$0; constructor(expr: Exprs.Val_$0); toExpr(): Exprs.Val_$0; appendTo(buf: Base.StringBuffer, toString: boolean): void; visit(visitor: any): any; isExpr(): boolean; } function toNumber(val: Val_$0, context: Exprs.Context): number; function convertNumericToPx(val: Val_$0, context: Exprs.Context): Numeric_$0; const ident: { [key: string]: Ident; }; const hundredPercent: Numeric_$0; const fullWidth: Numeric_$0; const fullHeight: Numeric_$0; const numericZero: Numeric_$0; const processingOrder: { "font-size": number; color: number; }; function processingOrderFn(name1: string, name2: string): number; } declare namespace CssCascade { interface ElementStyle_$0 extends CssCascade.ElementStyle_$0 { } const inheritedProps: { azimuth: boolean; "border-collapse": boolean; "border-spacing": boolean; "caption-side": boolean; "clip-rule": boolean; color: boolean; "color-interpolation": boolean; "color-rendering": boolean; cursor: boolean; direction: boolean; elevation: boolean; "empty-cells": boolean; fill: boolean; "fill-opacity": boolean; "fill-rule": boolean; "font-kerning": boolean; "font-size": boolean; "font-size-adjust": boolean; "font-family": boolean; "font-feature-settings": boolean; "font-style": boolean; "font-stretch": boolean; "font-variant": boolean; "font-weight": boolean; "glyph-orientation-vertical": boolean; hyphens: boolean; "hyphenate-character": boolean; "hyphenate-limit-chars": boolean; "hyphenate-limit-last": boolean; "image-rendering": boolean; "image-resolution": boolean; "letter-spacing": boolean; "line-break": boolean; "line-height": boolean; "list-style-image": boolean; "list-style-position": boolean; "list-style-type": boolean; marker: boolean; "marker-end": boolean; "marker-mid": boolean; "marker-start": boolean; orphans: boolean; "overflow-wrap": boolean; "paint-order": boolean; "pointer-events": boolean; "pitch-range": boolean; quotes: boolean; richness: boolean; "ruby-align": boolean; "ruby-position": boolean; "speak-header": boolean; "speak-numeral": boolean; "speak-punctuation": boolean; "speech-rate": boolean; "shape-rendering": boolean; stress: boolean; stroke: boolean; "stroke-dasharray": boolean; "stroke-dashoffset": boolean; "stroke-linecap": boolean; "stroke-linejoin": boolean; "stroke-miterlimit": boolean; "stroke-opacity": boolean; "stroke-width": boolean; "tab-size": boolean; "text-align": boolean; "text-align-last": boolean; "text-anchor": boolean; "text-decoration-skip": boolean; "text-emphasis-color": boolean; "text-emphasis-position": boolean; "text-emphasis-style": boolean; "text-combine-upright": boolean; "text-indent": boolean; "text-justify": boolean; "text-rendering": boolean; "text-size-adjust": boolean; "text-transform": boolean; "text-underline-position": boolean; visibility: boolean; "voice-family": boolean; volume: boolean; "white-space": boolean; widows: boolean; "word-break": boolean; "word-spacing": boolean; "word-wrap": boolean; "writing-mode": boolean; }; const polyfilledInheritedProps: string[]; function getPolyfilledInheritedProps(): string[]; const supportedNamespaces: { "http://www.idpf.org/2007/ops": boolean; "http://www.w3.org/1999/xhtml": boolean; "http://www.w3.org/2000/svg": boolean; }; const coupledPatterns: string[]; const coupledExtentPatterns: string[]; const geomNames: { [key: string]: boolean; }; function buildCouplingMap(sideMap: { [key: string]: string; }, extentMap: { [key: string]: string; }): { [key: string]: string; }; const couplingMapVert: { [key: string]: string; }; const couplingMapHor: { [key: string]: string; }; const couplingMapVertRtl: { [key: string]: string; }; const couplingMapHorRtl: { [key: string]: string; }; class CascadeValue { readonly value: Css.Val; readonly priority: number; constructor(value: Css.Val, priority: number); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; evaluate(context: Exprs.Context, propName: string): Css.Val; isEnabled(context: Exprs.Context): boolean; } class ConditionalCascadeValue extends CascadeValue { readonly condition: Exprs.Val; constructor(value: Css.Val, priority: number, condition: Exprs.Val); getBaseValue(): CascadeValue; filterValue(visitor: Css.Visitor): CascadeValue; increaseSpecificity(specificity: number): CascadeValue; isEnabled(context: Exprs.Context): boolean; } function cascadeValues(context: Exprs.Context, tv: CascadeValue, av: CascadeValue): CascadeValue; type ElementStyleMap = { [key: string]: ElementStyle_$0; }; const SPECIALS: { "region-id": boolean; "fragment-selector-id": boolean; }; function isSpecialName(name: string): boolean; function isMapName(name: string): boolean; function isPropName(name: string): boolean; function isInherited(name: string): boolean; function getProp(style: ElementStyle_$0, name: string): CascadeValue; function setProp(style: ElementStyle_$0, name: string, value: CascadeValue): any; function getStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; function getMutableStyleMap(style: ElementStyle_$0, name: string): ElementStyleMap; const getViewConditionalStyleMap: (style: ElementStyle_$0) => { matcher: Matchers.Matcher; styles: ElementStyleMap; }[]; function getSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function getMutableSpecial(style: ElementStyle_$0, name: string): CascadeValue[]; function mergeIn(context: Exprs.Context, target: ElementStyle_$0, style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionMatcher: Matchers.Matcher | null): void; function mergeAll(context: Exprs.Context, styles: ElementStyle_$0[]): ElementStyle_$0; function chainActions(chain: ChainedAction[], action: CascadeAction): CascadeAction; class InheritanceVisitor extends Css.FilterVisitor { readonly props: ElementStyle_$0; readonly context: Exprs.Context; propName: string; constructor(props: ElementStyle_$0, context: Exprs.Context); setPropName(name: string): void; private getFontSize; visitNumeric(numeric: Css.Numeric): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function convertFontRelativeLengthToPx(numeric: Css.Numeric, baseFontSize: number, context: Exprs.Context): Css.Numeric; function convertFontSizeToPx(numeric: Css.Numeric, parentFontSize: number, context: Exprs.Context): Css.Numeric; type ActionTable = { [key: string]: CascadeAction; }; class CascadeAction { apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ConditionItemAction extends CascadeAction { readonly conditionItem: ConditionItem; constructor(conditionItem: ConditionItem); apply(cascadeInstance: CascadeInstance): void; } class CompoundAction extends CascadeAction { readonly list: CascadeAction[]; constructor(list: CascadeAction[]); apply(cascadeInstance: CascadeInstance): void; mergeWith(other: CascadeAction): CascadeAction; clone(): CascadeAction; } class ApplyRuleAction extends CascadeAction { readonly style: ElementStyle_$0; readonly specificity: number; readonly pseudoelement: string | null; readonly regionId: string | null; readonly viewConditionId: string | null; constructor(style: ElementStyle_$0, specificity: number, pseudoelement: string | null, regionId: string | null, viewConditionId: string | null); apply(cascadeInstance: CascadeInstance): void; } class ChainedAction extends CascadeAction { chained: CascadeAction; constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckClassAction extends ChainedAction { readonly className: string; constructor(className: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckIdAction extends ChainedAction { readonly id: string; constructor(id: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckLocalNameAction extends ChainedAction { readonly localName: string; constructor(localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNSTagAction extends ChainedAction { readonly ns: string; readonly localName: string; constructor(ns: string, localName: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckTargetEpubTypeAction extends ChainedAction { readonly epubTypePatt: RegExp; constructor(epubTypePatt: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckNamespaceAction extends ChainedAction { readonly ns: string; constructor(ns: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributePresentAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; } class CheckAttributeEqAction extends ChainedAction { readonly ns: string; readonly name: string; readonly value: string; constructor(ns: string, name: string, value: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckNamespaceSupportedAction extends ChainedAction { readonly ns: string; readonly name: string; constructor(ns: string, name: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; makePrimary(cascade: Cascade): boolean; } class CheckAttributeRegExpAction extends ChainedAction { readonly ns: string; readonly name: string; readonly regexp: RegExp; constructor(ns: string, name: string, regexp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class CheckLangAction extends ChainedAction { readonly langRegExp: RegExp; constructor(langRegExp: RegExp); apply(cascadeInstance: CascadeInstance): void; } class IsFirstAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsRootAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthAction extends ChainedAction { readonly a: number; readonly b: number; constructor(a: number, b: number); matchANPlusB(order: number): boolean; } class IsNthSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsNthLastSiblingOfTypeAction extends IsNthAction { constructor(a: number, b: number); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEmptyAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsEnabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsDisabledAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class IsCheckedAction extends ChainedAction { constructor(); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckConditionAction extends ChainedAction { readonly condition: string; constructor(condition: string); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } class CheckAppliedAction extends CascadeAction { applied: boolean; constructor(); apply(cascadeInstance: CascadeInstance): void; clone(): CascadeAction; } class NegateActionsSet extends ChainedAction { checkAppliedAction: CheckAppliedAction; firstAction: CascadeAction; constructor(list: ChainedAction[]); apply(cascadeInstance: CascadeInstance): void; getPriority(): number; } interface ConditionItem { fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AbstractConditionItem { readonly condition: string; readonly viewConditionId: string | null; readonly viewCondition: Matchers.Matcher; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); increment(cascadeInstance: CascadeInstance): void; decrement(cascadeInstance: CascadeInstance): void; buildViewConditionMatcher(cascadeInstance: CascadeInstance): Matchers.Matcher; } class DescendantConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class ChildConditionItem extends AbstractConditionItem implements ConditionItem { constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AdjacentSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class FollowingSiblingConditionItem extends AbstractConditionItem implements ConditionItem { fired: boolean; constructor(condition: string, viewConditionId: string | null, viewCondition: Matchers.Matcher); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class AfterPseudoelementItem implements ConditionItem { readonly afterprop: ElementStyle_$0; readonly element: Element; constructor(afterprop: ElementStyle_$0, element: Element); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class RestoreLangItem implements ConditionItem { readonly lang: string; constructor(lang: string); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } class QuotesScopeItem implements ConditionItem { readonly oldQuotes: Css.Str[]; constructor(oldQuotes: Css.Str[]); fresh(cascadeInstance: CascadeInstance): ConditionItem; push(cascadeInstance: CascadeInstance, depth: number): boolean; pop(cascadeInstance: CascadeInstance, depth: number): boolean; } type CounterValues = { [key: string]: number[]; }; interface CounterListener { countersOfId(id: string, counters: CounterValues): any; getExprContentListener(): Vtree_$0.ExprContentListener; } interface CounterResolver { getPageCounterVal(name: string, format: (p1: number | null) => string): Exprs.Val; getPageCountersVal(name: string, format: (p1: number[]) => string): Exprs.Val; getTargetCounterVal(url: string, name: string, format: (p1: number | null) => string): Exprs.Val; getTargetCountersVal(url: string, name: string, format: (p1: number[]) => string): Exprs.Val; setStyler(styler: any): any; } class AttrValueFilterVisitor extends Css.FilterVisitor { element: Element; constructor(element: Element); private createValueFromString; visitFunc(func: Css.Func): Css.Val; } class ContentPropVisitor extends Css.FilterVisitor { cascade: CascadeInstance; element: Element; readonly counterResolver: CounterResolver; constructor(cascade: CascadeInstance, element: Element, counterResolver: CounterResolver); visitIdent(ident: Css.Ident): Css.Val; private format; visitFuncCounter(values: Css.Val[]): Css.Val; visitFuncCounters(values: Css.Val[]): Css.Val; visitFuncTargetCounter(values: Css.Val[]): Css.Val; visitFuncTargetCounters(values: Css.Val[]): Css.Val; visitFunc(func: Css.Func): Css.Val; } function roman(num: number): string; const additiveNumbering: { roman: (string | number)[]; armenian: (string | number)[]; georgian: (string | number)[]; hebrew: (string | number)[]; }; const alphabeticNumbering: { latin: string; alpha: string; greek: string; russian: string; }; const fixed: { square: string; disc: string; circle: string; none: string; }; function additiveFormat(entries: any[], num: number): string; function expandAlphabet(str: string): string[] | null; function alphabeticFormat(alphabetStr: string, num: number): string; type ChineseNumbering = { digits: string; markers: string; negative: string; formal: boolean; }; const chineseTradInformal: ChineseNumbering; function chineseCounter(num: number, numbering: ChineseNumbering): string; const ORDER_INCREMENT: number; function copyTable(src: ActionTable, dst: ActionTable): void; class Cascade { nsCount: number; nsPrefix: { [key: string]: string; }; tags: ActionTable; nstags: ActionTable; epubtypes: ActionTable; classes: ActionTable; ids: ActionTable; pagetypes: ActionTable; order: number; clone(): Cascade; insertInTable(table: ActionTable, key: string, action: CascadeAction): void; createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance; nextOrder(): number; } class CascadeInstance { readonly context: Exprs.Context; readonly counterListener: CounterListener; readonly counterResolver: CounterResolver; code: Cascade; stack: ConditionItem[][]; conditions: { [key: string]: number; }; currentElement: Element | null; currentElementOffset: number | null; currentStyle: ElementStyle_$0 | null; currentClassNames: string[] | null; currentLocalName: string; currentNamespace: string; currentId: string; currentXmlId: string; currentNSTag: string; currentEpubTypes: string[] | null; currentPageType: string | null; isFirst: boolean; isRoot: boolean; counters: { [key: string]: number[]; }; counterScoping: { [key: string]: boolean; }[]; quotes: Css.Str[]; quoteDepth: number; lang: string; siblingOrderStack: number[]; currentSiblingOrder: number; siblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; currentFollowingSiblingOrder: number | null; followingSiblingOrderStack: (number | null)[]; followingSiblingTypeCountsStack: { [key: string]: { [key: string]: number; }; }[]; currentFollowingSiblingTypeCounts: { [key: string]: { [key: string]: number; }; }; viewConditions: { [key: string]: Matchers.Matcher[]; }; dependentConditions: string[]; elementStack: Element[]; currentDoc?: Document | null; constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string); pushConditionItem(item: ConditionItem): void; increment(condition: string, viewCondition: Matchers.Matcher): void; decrement(condition: string, viewCondition: Matchers.Matcher): void; buildViewConditionMatcher(viewConditionId: string | null): Matchers.Matcher; applyAction(table: ActionTable, key: string): void; pushRule(classes: string[], pageType: string | null, baseStyle: ElementStyle_$0): void; defineCounter(counterName: string, value: number): void; pushCounters(props: ElementStyle_$0): void; popCounters(): void; processPseudoelementProps(pseudoprops: ElementStyle_$0, element: Element): void; pushElement(element: Element, baseStyle: ElementStyle_$0, elementOffset: number): void; private applyAttrFilterInner; private applyAttrFilter; private applyActions; private pop; popRule(): void; popElement(element: Element): void; } const EMPTY: any[]; const pseudoNames: string[]; enum ParseState { TOP = 0, SELECTOR = 1, RULE = 2 } let uaBaseCascade: Cascade; function setUABaseCascade(value: Cascade): void; class CascadeParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly regionId: string | null; readonly validatorSet: CssValidator.ValidatorSet; chain: ChainedAction[]; specificity: number; elementStyle: ElementStyle_$0; conditionCount: number; pseudoelement: string | null; footnoteContent: boolean; cascade: Cascade; state: ParseState; viewConditionId: string | null; insideSelectorRule: ParseState; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, parent: CascadeParserHandler, regionId: string | null, validatorSet: CssValidator.ValidatorSet, topLevel: boolean); insertNonPrimary(action: CascadeAction): void; processChain(action: CascadeAction): void; isInsideSelectorRule(mnemonics: string): boolean; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: CssParser.StylesheetFlavor): void; startRuleBody(): void; endRule(): void; finishChain(): void; makeApplyRuleAction(specificity: number): ApplyRuleAction; special(name: string, value: Css.Val): void; property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; finish(): Cascade; startFuncWithSelector(funcName: string): void; } const nthSelectorActionClasses: { [key: string]: typeof IsNthAction; }; let conditionCount: number; class NotParameterParserHandler extends CascadeParserHandler { readonly parent: CascadeParserHandler; parentChain: ChainedAction[]; constructor(parent: CascadeParserHandler); startFuncWithSelector(funcName: string): void; startRuleBody(): void; nextSelector(): void; endFuncWithSelector(): void; error(mnemonics: string, token: CssTokenizer.Token): void; } class DefineParserHandler extends CssParser.SlaveParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler); property(name: string, value: Css.Val, important: boolean): void; } class PropSetParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly condition: Exprs.Val; readonly elementStyle: ElementStyle_$0; readonly validatorSet: CssValidator.ValidatorSet; order: number; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, condition: Exprs.Val, elementStyle: ElementStyle_$0, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PropertyParserHandler extends CssParser.ErrorHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; elementStyle: ElementStyle_$0; order: number; constructor(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } function forEachViewConditionalStyles(style: ElementStyle_$0, callback: (p1: ElementStyle_$0) => any): void; function mergeViewConditionalStyles(cascMap: { [key: string]: CascadeValue; }, context: Exprs.Context, style: ElementStyle_$0): void; function parseStyleAttribute_$0(scope: Exprs.LexicalScope, validatorSet: CssValidator.ValidatorSet, baseURL: string, styleAttrValue: string): ElementStyle_$0; function isVertical(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, vertical: boolean): boolean; function isRtl(cascaded: { [key: string]: CascadeValue; }, context: Exprs.Context, rtl: boolean): boolean; function flattenCascadedStyle(style: ElementStyle_$0, context: Exprs.Context, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext): { [key: string]: CascadeValue; }; function forEachStylesInRegion(style: ElementStyle_$0, regionIds: string[], isFootnote: boolean, callback: (p1: string, p2: ElementStyle_$0) => any): void; function mergeStyle(to: { [key: string]: CascadeValue; }, from: ElementStyle_$0, context: Exprs.Context): void; const convertToPhysical: (src: { [key: string]: CascadeValue; }, dest: { [key: string]: T; }, vertical: boolean, rtl: boolean, transform: (p1: string, p2: CascadeValue) => T) => void; } declare namespace CssParser { const SPECIFICITY_USER_AGENT: number; const SPECIFICITY_USER: number; const SPECIFICITY_AUTHOR: number; const SPECIFICITY_STYLE: number; const SPECIFICITY_STYLE_IMPORTANT: number; const SPECIFICITY_AUTHOR_IMPORTANT: number; const SPECIFICITY_USER_IMPORTANT: number; enum StylesheetFlavor { USER_AGENT = "UA", USER = "User", AUTHOR = "Author" } function colorFromHash(text: string): Css.Color; class ParserHandler implements CssTokenizer.TokenizerHandler { scope: Exprs.LexicalScope; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope); getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startMediaRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; getImportantSpecificity(): number; getBaseSpecificity(): number; } class DispatchParserHandler extends ParserHandler { stack: ParserHandler[]; tokenizer: CssTokenizer.Tokenizer; slave: ParserHandler; constructor(); pushHandler(slave: ParserHandler): void; popHandler(): void; getCurrentToken(): CssTokenizer.Token; getScope(): Exprs.LexicalScope; error(mnemonics: string, token: CssTokenizer.Token): void; errorMsg(mnemonics: string, token: CssTokenizer.Token): void; startStylesheet(flavor: StylesheetFlavor): void; tagSelector(ns: string | null, name: string | null): void; classSelector(name: string): void; pseudoclassSelector(name: string, params: (number | string)[]): void; pseudoelementSelector(name: string, params: (number | string)[]): void; idSelector(id: string): void; attributeSelector(ns: string, name: string, op: CssTokenizer.TokenType, value: string | null): void; descendantSelector(): void; childSelector(): void; adjacentSiblingSelector(): void; followingSiblingSelector(): void; nextSelector(): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startPageMarginBoxRule(name: string): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startRuleBody(): void; property(name: string, value: Css.Val, important: boolean): void; endRule(): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; } class SkippingParserHandler extends ParserHandler { owner: DispatchParserHandler; readonly topLevel: any; depth: number; flavor: StylesheetFlavor; constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: any); getCurrentToken(): CssTokenizer.Token; error(mnemonics: string, token: CssTokenizer.Token): void; startRuleBody(): void; endRule(): void; } class SlaveParserHandler extends SkippingParserHandler { constructor(scope: Exprs.LexicalScope, owner: DispatchParserHandler, topLevel: boolean); report(message: string): void; reportAndSkip(message: string): void; startSelectorRule(): void; startFontFaceRule(): void; startFootnoteRule(pseudoelem: string | null): void; startViewportRule(): void; startDefineRule(): void; startRegionRule(): void; startPageRule(): void; startWhenRule(expr: Css.Expr): void; startFlowRule(flowName: string): void; startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; startFuncWithSelector(funcName: string): void; endFuncWithSelector(): void; property(name: string, value: Css.Val, important: boolean): void; } const actionsBase: Action_$0[]; const actionsStyleAttribute: Action_$0[]; const actionsSelector: Action_$0[]; const actionsSelectorInFunc: Action_$0[]; const actionsSelectorCont: Action_$0[]; const actionsSelectorStart: Action_$0[]; const actionsPropVal: Action_$0[]; const actionsExprVal: Action_$0[]; const actionsExprOp: Action_$0[]; const actionsError: Action_$0[]; const actionsErrorDecl: Action_$0[]; const actionsErrorSelector: Action_$0[]; const priority: number[]; enum Action_$0 { SELECTOR_NAME_1 = 1, SELECTOR_NAME = 2, SELECTOR_ANY_1 = 3, SELECTOR_ANY = 4, SELECTOR_ID_1 = 5, SELECTOR_ID = 6, SELECTOR_CLASS_1 = 7, SELECTOR_CLASS = 8, SELECTOR_ATTR_1 = 9, SELECTOR_ATTR = 10, SELECTOR_CHILD = 11, SELECTOR_SIBLING = 12, SELECTOR_BODY = 13, SELECTOR_PSEUDOCLASS = 14, VAL_IDENT = 15, VAL_HASH = 16, VAL_NUM = 17, VAL_INT = 18, VAL_NUMERIC = 19, VAL_STR = 20, VAL_URL = 21, VAL_COMMA = 22, VAL_SLASH = 23, VAL_FUNC = 24, VAL_C_PAR = 25, VAL_END = 26, RULE_END = 27, IDENT = 28, SELECTOR_START = 29, AT = 30, EXPR_IDENT = 31, EXPR_NUM = 32, EXPR_NUMERIC = 33, EXPR_STR = 34, EXPR_PARAM = 35, EXPR_PREFIX = 36, EXPR_INFIX = 37, EXPR_FUNC = 38, EXPR_C_PAR = 39, EXPR_O_PAR = 40, SELECTOR_NEXT = 41, SELECTOR_PSEUDOELEM = 42, EXPR_O_BRC = 43, VAL_FINISH = 44, EXPR_INFIX_NAME = 45, PROP = 46, VAL_BANG = 47, VAL_BRC = 48, EXPR_SEMICOL = 49, ERROR_PUSH = 50, ERROR_POP = 51, ERROR_POP_DECL = 52, ERROR_SEMICOL = 53, VAL_PLUS = 54, SELECTOR_PSEUDOCLASS_1 = 55, SELECTOR_FOLLOWING_SIBLING = 56, DONE = 200 } const OP_MEDIA_AND: number; enum ExprContext { PROP = 0, WHEN = 1, MEDIA = 2, IMPORT = 3 } class Parser { actions: Action_$0[]; tokenizer: CssTokenizer.Tokenizer; readonly handler: ParserHandler; baseURL: string; valStack: any[]; namespacePrefixToURI: { [key: string]: string; }; defaultNamespaceURI: string | null; propName: string | null; propImportant: boolean; exprContext: ExprContext; result: Css.Val; importReady: boolean; importURL: string | null; importCondition: Css.Expr; errorBrackets: number[]; ruleStack: string[]; regionRule: boolean; pageRule: boolean; constructor(actions: Action_$0[], tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string); extractVals(sep: string, index: number): Css.Val[]; valStackReduce(sep: string, token: CssTokenizer.Token): Css.Val; exprError(mnemonics: string, token: CssTokenizer.Token): void; exprStackReduce(op: number, token: CssTokenizer.Token): boolean; readPseudoParams(): (number | string)[]; private readNthPseudoParams; makeCondition(classes: string | null, condition: Exprs.Val): Css.Expr; isInsidePropertyOnlyRule(): boolean; runParser(count: number, parsingValue: any, parsingStyleAttr: boolean, parsingMediaQuery: any, parsingFunctionParam: any): boolean; } class ErrorHandler extends ParserHandler { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); error(mnemonics: string, token: CssTokenizer.Token): void; getScope(): Exprs.LexicalScope; } function parseStylesheet(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromText(text: string, handler: ParserHandler, baseURL: string, classes: string | null, media: string | null): Task.Result; function parseStylesheetFromURL(url: string, handler: ParserHandler, classes: string | null, media: string | null): Task.Result; function parseValue(scope: Exprs.LexicalScope, tokenizer: CssTokenizer.Tokenizer, baseURL: string): Css.Val; function parseStyleAttribute(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): void; function parseMediaQuery(tokenizer: CssTokenizer.Tokenizer, handler: ParserHandler, baseURL: string): Css.Expr; const numProp: { [key: string]: boolean; }; function takesOnlyNum(propName: string): boolean; function evaluateExprToCSS(context: Exprs.Context, val: Exprs.Val, propName: string): Css.Val; function evaluateCSSToCSS(context: Exprs.Context, val: Css.Val, propName: string): Css.Val; } declare namespace CssStyler_$0 { class SlipRange { endStuckFixed: number; endFixed: number; endSlipped: number; constructor(endStuckFixed: any, endFixed: any, endSlipped: any); } class SlipMap { map: SlipRange[]; getMaxFixed(): number; getMaxSlipped(): number; addStuckRange(endFixed: number): void; addSlippedRange(endFixed: number): void; slippedByFixed(fixed: number): number; fixedBySlipped(slipped: number): number; } interface FlowListener { encounteredFlowChunk(flowChunk: Vtree_$0.FlowChunk, flow: Vtree_$0.Flow): any; } interface AbstractStyler_$0 extends CssStyler.AbstractStyler_$0 { } class Box { readonly context: Exprs.Context; readonly style: CssCascade_$0.ElementStyle; readonly offset: number; readonly isRoot: boolean; readonly flowChunk: Vtree_$0.FlowChunk; readonly atBlockStart: boolean; readonly atFlowStart: boolean; readonly isParentBoxDisplayed: boolean; flowName: string; isBlockValue: boolean | null; hasBoxValue: boolean | null; styleValues: { [key: string]: Css.Val; }; beforeBox: Box; afterBox: Box; breakBefore: string | null; constructor(context: Exprs.Context, style: CssCascade_$0.ElementStyle, offset: number, isRoot: boolean, flowChunk: Vtree_$0.FlowChunk, atBlockStart: boolean, atFlowStart: boolean, isParentBoxDisplayed: boolean); buildAfterPseudoElementBox(offset: number, atBlockStart: boolean, atFlowStart: boolean): void; styleValue(name: string, defaultValue?: Css.Val): Css.Val | null; displayValue(): Css.Val; isBlock(): boolean; hasBox(): boolean; getBreakValue(edge: string): string | null; } class BoxStack { readonly context: Exprs.Context; stack: Box[]; atBlockStart: boolean; atFlowStart: boolean; atStartStack: { atBlockStart: boolean; atFlowStart: boolean; }[]; constructor(context: Exprs.Context); empty(): boolean; lastBox(): Box | undefined; lastFlowName(): string | null; isCurrentBoxDisplayed(): boolean; push(style: CssCascade_$0.ElementStyle, offset: number, isRoot: boolean, newFlowChunk?: Vtree_$0.FlowChunk): Box; encounteredTextNode(node: Node): void; pop(offset: number): Box; nearestBlockStartOffset(box: Box): number; } class Styler implements AbstractStyler_$0 { readonly xmldoc: XmlDoc.XMLDocHolder; readonly scope: Exprs.LexicalScope; readonly context: Exprs.Context; readonly primaryFlows: { [key: string]: boolean; }; readonly validatorSet: CssValidator.ValidatorSet; readonly counterListener: CssCascade_$0.CounterListener; root: Element; cascadeHolder: CssCascade_$0.Cascade; last: Node; rootStyle: CssCascade_$0.ElementStyle; styleMap: { [key: string]: CssCascade_$0.ElementStyle; }; flows: { [key: string]: Vtree_$0.Flow; }; flowChunks: Vtree_$0.FlowChunk[]; flowListener: FlowListener; flowToReach: string | null; idToReach: string | null; cascade: CssCascade_$0.CascadeInstance; offsetMap: SlipMap; primary: boolean; primaryStack: boolean[]; rootBackgroundAssigned: boolean; rootLayoutAssigned: boolean; lastOffset: number; breakBeforeValues: { [key: number]: string; }; boxStack: BoxStack; bodyReached: boolean; constructor(xmldoc: XmlDoc.XMLDocHolder, cascade: CssCascade_$0.Cascade, scope: Exprs.LexicalScope, context: Exprs.Context, primaryFlows: { [key: string]: boolean; }, validatorSet: CssValidator.ValidatorSet, counterListener: CssCascade_$0.CounterListener, counterResolver: CssCascade_$0.CounterResolver); hasProp(style: CssCascade_$0.ElementStyle, map: CssValidator.ValueMap, name: string): boolean; transferPropsToRoot(srcStyle: CssCascade_$0.ElementStyle, map: CssValidator.ValueMap): void; postprocessTopStyle(elemStyle: CssCascade_$0.ElementStyle, isBody: boolean): void; getTopContainerStyle(): CssCascade_$0.ElementStyle; getAttrStyle(elem: Element): CssCascade_$0.ElementStyle; getReachedOffset(): number; replayFlowElementsFromOffset(offset: number): void; resetFlowChunkStream(flowListener: FlowListener): void; styleUntilFlowIsReached(flowName: string): void; styleUntilIdIsReached(id: string): void; private encounteredFlowElement; registerForcedBreakOffset(breakValue: string | null, offset: number, flowName: string): void; styleUntil(startOffset: number, lookup: number): number; getStyle(element: Element, deep: boolean): CssCascade_$0.ElementStyle; processContent(element: Element, styles: { [key: string]: Css.Val; }): void; } const columnProps: string[]; } declare namespace CssTokenizer { interface TokenizerHandler { error(mnemonics: string, token: Token): void; } function escapeParseSingle(str: string): string; function escapeParse(str: string): string; enum TokenType { EOF = 0, IDENT = 1, STR = 2, NUMERIC = 3, NUM = 4, INT = 5, FUNC = 6, HASH = 7, URL = 8, CLASS = 9, O_PAR = 10, C_PAR = 11, O_BRC = 12, C_BRC = 13, O_BRK = 14, C_BRK = 15, COMMA = 16, SEMICOL = 17, COLON = 18, SLASH = 19, AT = 20, PERCENT = 21, QMARK = 22, PLUS = 23, MINUS = 24, BAR_BAR = 25, AMP_AMP = 26, BANG = 31, DOLLAR = 32, HAT = 33, BAR = 34, TILDE = 35, STAR = 36, GT = 37, LT = 38, EQ = 39, BANG_EQ = 41, DOLLAR_EQ = 42, HAT_EQ = 43, BAR_EQ = 44, TILDE_EQ = 45, STAR_EQ = 46, GT_EQ = 47, LT_EQ = 48, EQ_EQ = 49, COL_COL = 50, INVALID = 51, LAST = 51 } class Token { type: TokenType; precededBySpace: boolean; num: number; text: string; position: number; constructor(); } enum Action { SPACE = 1, INT = 2, IDENT = 3, BANG = 4, HASH = 6, DOLLAR = 7, PERCENT = 8, AMP = 9, O_PAR = 10, C_PAR = 11, STAR = 12, PLUS = 13, COMMA = 14, MINUS = 15, DOT = 16, SLASH = 17, COLON = 18, SEMICOL = 19, LT = 20, EQ = 21, GT = 22, QMARK = 23, AT = 24, O_BRK = 25, C_BRK = 26, O_BRC = 27, C_BRC = 28, BSLASH = 29, HAT = 30, BAR = 31, TILDE = 32, STR1 = 33, STR2 = 34, END = 35, EQTAIL = 36, ENDINT = 37, ENDNUM = 38, CONT = 39, UNIT = 40, PCUNIT = 41, NUMBER = 42, ENDIDNT = 43, IDNTESC = 44, ENDIDES = 45, ENDSTR = 46, ENDESTR = 47, STR1ESC = 48, STR2ESC = 49, BAR_BAR = 50, AMP_AMP = 51, FUNC = 52, FUNCES = 53, COMMENT = 54, COMMST = 55, ENDNOTK = 56, MINMIN = 57, TOINT = 58, TONUM = 59, TOIDENT = 60, TOIDES = 61, KILL1 = 62, KILL2 = 63, URL = 64, URL1 = 65, URL2 = 66, ENDURL = 67, TERMURL = 68, FINURL = 69, LT_BG = 70, LT_BG_M = 71, INVALID = 72, CHKPOSS = 73, CHKPOSN = 74, URLESC = 75, IDESCH = 76, COL_COL = 77, TOCLASS = 78, CHKSP = 79, EOF = 80 } function makeActions(def: Action, spec: Action[]): Action[]; const actionsNormal: Action[]; const actionsIdent: Action[]; const actionsNumOrClass: Action[]; const actionsMinus: Action[]; const actionsIdentEsc: Action[]; const actionsInt: Action[]; const actionsNumber: Action[]; const actionsCheckEq: Action[]; const actionsColon: Action[]; const actionsBar: Action[]; const actionsAmp: Action[]; const actionsSlash: Action[]; const actionsComment: Action[]; const actionsCommentStar: Action[]; const actionsMinusMinus: Action[]; const actionsLt: Action[]; const actionsLtBang: Action[]; const actionsLtBangMinus: Action[]; const actionsIdentEscChr: Action[]; const actionsStr1: Action[]; const actionsStr2: Action[]; const actionsStr1Esc: Action[]; const actionsStr2Esc: Action[]; const actionsURL: Action[]; const actionsURLInside: Action[]; const actionsURLInside1: Action[]; const actionsURLInside2: Action[]; const actionsURLTail: Action[]; const INITIAL_INDEX_MASK = 15; class Tokenizer { input: string; readonly handler: TokenizerHandler; indexMask: number; buffer: Token[]; head: number; tail: number; curr: number; position: number; constructor(input: string, handler: TokenizerHandler); token(): Token; nthToken(n: number): Token; consume(): void; mark(): void; reset(): void; unmark(): void; hasMark(): boolean; private reallocate; private error; private fillBuffer; } } declare namespace CssValidator { interface PropertyReceiver { unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class Node { validator: PropertyValidator; success: Node; failure: Node; code: number; constructor(validator: PropertyValidator); isSpecial(): boolean; markAsStartGroup(): void; isStartGroup(): boolean; markAsEndGroup(): void; isEndGroup(): boolean; markAsStartAlternate(index: number): void; isStartAlternate(): boolean; markAsEndAlternate(index: number): void; isEndAlternate(): boolean; getAlternate(): number; } class Connection { where: number; success: boolean; what: number; constructor(where: number, success: boolean); } enum Add_$0 { FOLLOW = 1, OPTIONAL = 2, REPEATED = 3, ALTERNATE = 4 } class ValidatingGroup { nodes: Node[]; connections: Connection[]; match: number[]; nomatch: number[]; error: number[]; emptyHead: boolean; connect(arr: number[], nodeIndex: number): void; clone(): ValidatingGroup; private addSpecialToArr; endSpecialGroup(): void; startSpecialGroup(): void; endClause(clause: number): void; startClause(clause: number): void; addPrimitive(validator: PropertyValidator): void; isSimple(): boolean; isPrimitive(): boolean; addGroup(group: ValidatingGroup, how: Add_$0): void; finish(successTerminal: Node, failTerminal: Node): Node; } const ALLOW_EMPTY = 1; const ALLOW_STR = 2; const ALLOW_IDENT = 4; const ALLOW_POS_NUMERIC = 8; const ALLOW_POS_NUM = 16; const ALLOW_POS_INT = 32; const ALLOW_COLOR = 64; const ALLOW_URL = 128; const ALLOW_NEGATIVE = 256; const ALLOW_ZERO = 512; const ALLOW_ZERO_PERCENT = 1024; const ALLOW_SLASH = 2048; type ValueMap = { [key: string]: Css.Val; }; class PropertyValidator extends Css.Visitor { constructor(); validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class PrimitiveValidator extends PropertyValidator { readonly allowed: number; readonly idents: ValueMap; readonly units: ValueMap; constructor(allowed: number, idents: ValueMap, units: ValueMap); visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; combine(other: PrimitiveValidator): PrimitiveValidator; } const ALWAYS_FAIL: PrimitiveValidator; class ListValidator extends PropertyValidator { successTerminal: Node; failureTerminal: Node; first: Node; constructor(group: ValidatingGroup); validateList(arr: Css.Val[], slice: boolean, startIndex: number): Css.Val[]; validateSingle(inval: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitSlash(slash: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SpaceListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class CommaListValidator extends ListValidator { constructor(group: ValidatingGroup); visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; validateForShorthand(values: Css.Val[], index: number): Css.Val[]; } class FuncValidator extends ListValidator { readonly name: string; constructor(name: string, group: ValidatingGroup); validateSingle(inval: Css.Val): Css.Val; visitFunc(func: Css.Func): Css.Val; } class ShorthandSyntaxNode { tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxProperty extends ShorthandSyntaxNode { readonly name: string; validator: PropertyValidator; constructor(validatorSet: ValidatorSet, name: string); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxPropertyN extends ShorthandSyntaxProperty { readonly names: string[]; constructor(validatorSet: ValidatorSet, names: string[]); success(rval: Css.Val, shorthandValidator: ShorthandValidator): void; } class ShorthandSyntaxCompound extends ShorthandSyntaxNode { readonly nodes: ShorthandSyntaxNode[]; readonly slash: boolean; constructor(nodes: ShorthandSyntaxNode[], slash: boolean); tryParse(values: Css.Val[], index: number, shorthandValidator: ShorthandValidator): number; } class ShorthandValidator extends Css.Visitor { syntax: ShorthandSyntaxNode[]; propList: string[]; error: boolean; values: ValueMap; validatorSet: ValidatorSet; setOwner(validatorSet: ValidatorSet): void; syntaxNodeForProperty(name: string): ShorthandSyntaxNode; clone(): this; init(syntax: ShorthandSyntaxNode[], propList: string[]): void; finish(important: boolean, receiver: PropertyReceiver): boolean; propagateInherit(important: boolean, receiver: PropertyReceiver): void; validateList(list: Css.Val[]): number; validateSingle(val: Css.Val): Css.Val; visitEmpty(empty: Css.Val): Css.Val; visitStr(str: Css.Str): Css.Val; visitIdent(ident: Css.Ident): Css.Val; visitNumeric(numeric: Css.Numeric): Css.Val; visitNum(num: Css.Num): Css.Val; visitInt(num: Css.Int): Css.Val; visitColor(color: Css.Color): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitCommaList(list: Css.CommaList): Css.Val; visitFunc(func: Css.Func): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } class SimpleShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class InsetsShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; createSyntaxNode(): ShorthandSyntaxPropertyN; } class InsetsSlashShorthandValidator extends ShorthandValidator { constructor(); validateList(list: Css.Val[]): number; } class CommaShorthandValidator extends SimpleShorthandValidator { constructor(); mergeIn(acc: { [key: string]: Css.Val[]; }, values: ValueMap): void; visitCommaList(list: Css.CommaList): Css.Val; } class FontShorthandValidator extends SimpleShorthandValidator { constructor(); init(syntax: ShorthandSyntaxNode[], propList: string[]): void; validateList(list: Css.Val[]): number; visitCommaList(list: Css.CommaList): Css.Val; visitIdent(ident: Css.Ident): Css.Val; } const shorthandValidators: { [key: string]: typeof ShorthandValidator; }; class ValidatorSet { validators: { [key: string]: PropertyValidator; }; prefixes: { [key: string]: { [key: string]: boolean; }; }; defaultValues: ValueMap; namedValidators: { [key: string]: ValidatingGroup; }; systemFonts: { [key: string]: ValueMap; }; shorthands: { [key: string]: ShorthandValidator; }; layoutProps: ValueMap; backgroundProps: ValueMap; private addReplacement; private newGroup; private addCounts; private primitive; private newFunc; initBuiltInValidators(): void; private isBuiltIn; private readNameAndPrefixes; private parseValidators; private parseDefaults; private parseShorthands; parse(text: string): void; makePropSet(propList: string[]): ValueMap; validatePropertyAndHandleShorthand(name: string, value: Css.Val, important: boolean, receiver: PropertyReceiver): void; } function baseValidatorSet(): ValidatorSet; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Font { const traitProps: { [key: string]: Css.Val; }; const bogusFontData: string; let bogusFontCounter: number; function makeFontTraitKey(properties: { [key: string]: Css.Val; }): string; function fillDefaults(properties: { [key: string]: Css.Val; }): void; function prepareProperties(properties: CssCascade_$0.ElementStyle, context: Exprs.Context): { [key: string]: Css.Val; }; class Face { readonly properties: { [key: string]: Css.Val; }; fontTraitKey: string; src: string | null; blobURLs: string[]; blobs: Blob[]; family: string | null; constructor(properties: { [key: string]: Css.Val; }); traitsEqual(other: Face): boolean; makeAtRule(src: string, fontBytes: Blob): string; } class DocumentFaces { readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; familyMap: { [key: string]: string; }; constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null); registerFamily(srcFace: Face, viewFace: Face): void; filterFontFamily(val: Css.Val): Css.Val; } class Mapper { readonly head: Element; readonly body: Element; srcURLMap: { [key: string]: TaskUtil.Fetcher; }; familyPrefix: string; familyCounter: number; constructor(head: Element, body: Element, opt_familyPrefix?: string); getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string; private initFont; loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher; findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result; } } declare namespace GeometryUtil { class Rect { x1: number; y1: number; x2: number; y2: number; constructor(x1: number, y1: number, x2: number, y2: number); } class Point { x: number; y: number; constructor(x: number, y: number); } class Insets { left: number; top: number; right: number; bottom: number; constructor(left: number, top: number, right: number, bottom: number); } class Segment { low: Point; high: Point; winding: number; shapeId: number; constructor(low: Point, high: Point, winding: number, shapeId: number); } class Band { y1: number; y2: number; x1: number; x2: number; left: Element | null; right: Element | null; constructor(y1: number, y2: number, x1: number, x2: number); } function segmentCompare(s1: Segment, s2: Segment): number; class Shape { points: Point[]; constructor(points: Point[]); addSegments(arr: Segment[], id: number): void; withOffset(offsetX: number, offsetY: number): Shape; } function shapeForEllipse(cx: number, cy: number, rx: number, ry: number): Shape; function shapeForRect(x1: number, y1: number, x2: number, y2: number): Shape; function shapeForRectObj(r: Rect): Shape; class BandIntersection { x: number; winding: number; shapeId: number; lowOrHigh: number; constructor(x: number, winding: number, shapeId: number, lowOrHigh: number); } function intersectY(s: Segment, y: number): number; function addBandIntersections(intersections: BandIntersection[], s: Segment, y1: number, y2: number): void; function mergeIntersections(intersections: BandIntersection[], includeCount: number, excludeCount: number): number[]; function ceil(v: number, unit: number): number; function floor(v: number, unit: number): number; function rotatePoint(point: Point): Point; function rotateBox(box: Rect): Rect; function unrotateBox(box: Rect): Rect; function rotateShape(shape: Shape): Shape; function shapesToBands(box: Rect, include: Shape[], exclude: Shape[], granularity: number, snapHeight: number, vertical: boolean): Band[]; function normalize(box: Rect, bands: Band[]): void; function findBand(bands: Band[], y: number): number; function findUppermostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function findBottommostFullyOpenRect(bands: Band[], rect: Rect): Rect | null; function positionFloat(box: Rect, bands: Band[], floatBox: Rect, side: string): boolean; function addFloatToBands(box: Rect, bands: Band[], floatBox: Rect, floatBands: Band[], side: string): void; } declare namespace Net_$0 { enum XMLHttpRequestResponseType { DEFAULT = "", ARRAYBUFFER = "arraybuffer", BLOB = "blob", DOCUMENT = "document", JSON = "json", TEXT = "text" } type Response_$0 = Net.Response_$0; function ajax(url: string, opt_type?: XMLHttpRequestResponseType, opt_method?: string, opt_data?: string, opt_contentType?: string): Task.Result; function makeBlob(parts: (string | Blob | ArrayBuffer | ArrayBufferView)[], opt_type?: string): any; function readBlob(blob: Blob): any; function revokeObjectURL(url: string): void; function createObjectURL(blob: Blob): string; class ResourceStore_$0 implements Net.ResourceStore_$0 { readonly parser: (p1: Response_$0, p2: ResourceStore_$0) => Task.Result; readonly type: XMLHttpRequestResponseType; resources: { [key: string]: Resource; }; fetchers: { [key: string]: TaskUtil.Fetcher; }; constructor(parser: (p1: Response_$0, p2: ResourceStore_$0) => Task.Result, type: XMLHttpRequestResponseType); load(url: string, opt_required?: boolean, opt_message?: string): Task.Result; private fetchInner; fetch(url: string, opt_required?: boolean, opt_message?: string): TaskUtil.Fetcher; get(url: string): XmlDoc.XMLDocHolder; delete(url: string): void; } type JSONStore = ResourceStore_$0; function parseJSONResource(response: Response_$0, store: JSONStore): Task.Result; function newJSONStore(): JSONStore; } declare namespace PageFloats_$0 { const FloatReference_$0: typeof PageFloats.FloatReference_$0; type FloatReference_$0 = PageFloats.FloatReference_$0; function floatReferenceOf(str: string): FloatReference_$0; function isPageFloat(floatReference: FloatReference_$0): boolean; function resolveInlineFloatDirection(floatSide: string, vertical: boolean, direction: string): string; class PageFloat_$0 implements PageFloats.PageFloat_$0 { readonly nodePosition: Vtree.NodePosition; readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly clearSide: string | null; readonly flowName: string; readonly floatMinWrapBlock: Css.Numeric | null; order: number | null; id: PageFloatID_$0 | null; constructor(nodePosition: Vtree.NodePosition, floatReference: FloatReference_$0, floatSide: string, clearSide: string | null, flowName: string, floatMinWrapBlock: Css.Numeric | null); getOrder(): number; getId(): PageFloatID_$0; isAllowedOnContext(pageFloatLayoutContext: PageFloatLayoutContext_$0): boolean; isAllowedToPrecede(other: PageFloat_$0): boolean; } class PageFloatStore { private floats; private nextPageFloatIndex; private nextOrder; private createPageFloatId; addPageFloat(float: PageFloat_$0): void; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; findPageFloatById(id: PageFloatID_$0): PageFloat_$0; } class PageFloatFragment_$0 implements PageFloats.PageFloatFragment_$0 { readonly floatReference: FloatReference_$0; readonly floatSide: string; readonly continuations: PageFloatContinuation_$0[]; readonly area: Vtree.Container; readonly continues: boolean; constructor(floatReference: FloatReference_$0, floatSide: string, continuations: PageFloatContinuation_$0[], area: Vtree.Container, continues: boolean); hasFloat(float: PageFloat_$0): boolean; findNotAllowedFloat(context: PageFloatLayoutContext_$0): PageFloat_$0 | null; getOuterShape(): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; getOrder(): number; shouldBeStashedBefore(float: PageFloat_$0): boolean; addContinuations(continuations: PageFloatContinuation_$0[]): void; getFlowName(): string; } class PageFloatContinuation_$0 implements PageFloats.PageFloatContinuation_$0 { readonly float: PageFloat_$0; readonly nodePosition: Vtree.NodePosition; constructor(float: PageFloat_$0, nodePosition: Vtree.NodePosition); equals(other: PageFloatContinuation_$0 | null): boolean; } type PageFloatPlacementCondition_$0 = PageFloats.PageFloatPlacementCondition_$0; class PageFloatLayoutContext_$0 implements PageFloats.PageFloatLayoutContext_$0 { readonly parent: PageFloatLayoutContext_$0; private readonly floatReference; private container; readonly flowName: string | null; readonly generatingNodePosition: Vtree.NodePosition | null; private children; writingMode: Css.Val; direction: Css.Val; private invalidated; private floatStore; private forbiddenFloats; floatFragments: PageFloatFragment_$0[]; private stashedFloatFragments; private floatAnchors; private floatsDeferredToNext; private floatsDeferredFromPrevious; private layoutConstraints; private locked; constructor(parent: PageFloatLayoutContext_$0, floatReference: FloatReference_$0 | null, container: Vtree.Container, flowName: string | null, generatingNodePosition: Vtree.NodePosition | null, writingMode: Css.Val | null, direction: Css.Val | null); private getParent; private getPreviousSiblingOf; private getPreviousSibling; getContainer(floatReference?: FloatReference_$0): Vtree.Container; setContainer(container: Vtree.Container): void; addPageFloat(float: PageFloat_$0): void; getPageFloatLayoutContext(floatReference: FloatReference_$0): PageFloatLayoutContext_$0; findPageFloatByNodePosition(nodePosition: Vtree.NodePosition): PageFloat_$0 | null; private forbid; isForbidden(float: PageFloat_$0): boolean; addPageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; removePageFloatFragment(floatFragment: PageFloatFragment_$0, dontInvalidate?: boolean): void; findPageFloatFragment(float: PageFloat_$0): PageFloatFragment_$0 | null; hasFloatFragments(condition?: (p1: PageFloatFragment_$0) => boolean): boolean; hasContinuingFloatFragmentsInFlow(flowName: string): boolean; registerPageFloatAnchor(float: PageFloat_$0, anchorViewNode: Node): void; collectPageFloatAnchors(): any; isAnchorAlreadyAppeared(floatId: PageFloatID_$0): boolean; deferPageFloat(continuation: PageFloatContinuation_$0): void; hasPrecedingFloatsDeferredToNext(float: PageFloat_$0, ignoreReference?: boolean): boolean; getLastFollowingFloatInFragments(float: PageFloat_$0): PageFloat_$0 | null; getDeferredPageFloatContinuations(flowName?: string | null): PageFloatContinuation_$0[]; getPageFloatContinuationsDeferredToNext(flowName?: string | null): PageFloatContinuation_$0[]; getFloatsDeferredToNextInChildContexts(): PageFloat_$0[]; checkAndForbidNotAllowedFloat(): boolean; checkAndForbidFloatFollowingDeferredFloat(): boolean; finish(): void; hasSameContainerAs(other: PageFloatLayoutContext_$0): boolean; invalidate(): void; detachChildren(): PageFloatLayoutContext_$0[]; attachChildren(children: PageFloatLayoutContext_$0[]): void; isInvalidated(): any; validate(): void; private toLogical; private toPhysical; removeEndFloatFragments(floatSide: string): void; stashEndFloatFragments(float: PageFloat_$0): void; restoreStashedFragments(floatReference: FloatReference_$0): void; discardStashedFragments(floatReference: FloatReference_$0): void; getStashedFloatFragments(floatReference: FloatReference_$0): PageFloatFragment_$0[]; private getLimitValue; private getLimitValueInner; private getLimitValuesInner; setFloatAreaDimensions(area: LayoutType.PageFloatArea, floatReference: FloatReference_$0, floatSide: string, anchorEdge: number | null, init: boolean, force: boolean, condition: PageFloatPlacementCondition_$0): string | null; getFloatFragmentExclusions(): GeometryUtil.Shape[]; private reattachFloatFragments; getMaxReachedAfterEdge(): number; getBlockStartEdgeOfBlockEndFloats(): number; getPageFloatClearEdge(clear: string, column: LayoutType.Column): number; getPageFloatPlacementCondition(float: PageFloat_$0, floatSide: string, clearSide: string | null): PageFloatPlacementCondition_$0; getLayoutConstraints(): LayoutType.LayoutConstraint[]; addLayoutConstraint(layoutConstraint: LayoutType.LayoutConstraint, floatReference: FloatReference_$0): void; isColumnFullWithPageFloats(column: LayoutType.Column): boolean; getMaxBlockSizeOfPageFloats(): number; lock(): void; unlock(): void; isLocked(): boolean; } interface PageFloatLayoutStrategy_$0 extends PageFloats.PageFloatLayoutStrategy_$0 { } class PageFloatLayoutStrategyResolver { register(strategy: PageFloatLayoutStrategy_$0): void; findByNodeContext(nodeContext: Vtree.NodeContext): PageFloatLayoutStrategy_$0; findByFloat(float: PageFloat_$0): PageFloatLayoutStrategy_$0; } class NormalPageFloatLayoutStrategy implements PageFloatLayoutStrategy_$0 { appliesToNodeContext(nodeContext: Vtree.NodeContext): boolean; appliesToFloat(float: PageFloat_$0): boolean; createPageFloat(nodeContext: Vtree.NodeContext, pageFloatLayoutContext: PageFloatLayoutContext_$0, column: LayoutType.Column): Task.Result; createPageFloatFragment(continuations: PageFloatContinuation_$0[], floatSide: string, floatArea: LayoutType.PageFloatArea, continues: boolean): PageFloatFragment_$0; findPageFloatFragment(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): PageFloatFragment_$0 | null; adjustPageFloatArea(floatArea: LayoutType.PageFloatArea, floatContainer: Vtree.Container, column: LayoutType.Column): void; forbid(float: PageFloat_$0, pageFloatLayoutContext: PageFloatLayoutContext_$0): void; } } declare namespace CssPage { function resolvePageProgression(style: CssCascade.ElementStyle): Constants.PageProgression; type PageSize = { width: Css.Numeric; height: Css.Numeric; }; const pageSizes: { [key: string]: PageSize; }; const defaultPrinterMarkLineWidth: Css.Numeric; const defaultPrinterMarkOffset: Css.Numeric; const defaultPrinterMarkLineLength: Css.Numeric; const defaultBleedOffset: Css.Numeric; type PageSizeAndBleed = { width: Css.Numeric; height: Css.Numeric; bleed: Css.Numeric; bleedOffset: Css.Numeric; }; function resolvePageSizeAndBleed(style: { [key: string]: CssCascade.CascadeValue; }): PageSizeAndBleed; type EvaluatedPageSizeAndBleed = { pageWidth: number; pageHeight: number; bleed: number; bleedOffset: number; cropOffset: number; }; function evaluatePageSizeAndBleed(pageSizeAndBleed: PageSizeAndBleed, context: Exprs.Context): EvaluatedPageSizeAndBleed; function createPrinterMarkSvg(doc: Document, width: number, height: number): Element; function createPrinterMarkElement(doc: Document, lineWidth: number, elementType?: string): Element; enum CornerMarkPosition { TOP_LEFT = "top left", TOP_RIGHT = "top right", BOTTOM_LEFT = "bottom left", BOTTOM_RIGHT = "bottom right" } function createCornerMark(doc: Document, position: CornerMarkPosition, lineWidth: number, cropMarkLineLength: number, bleed: number, offset: number): Element; enum CrossMarkPosition { TOP = "top", BOTTOM = "bottom", LEFT = "left", RIGHT = "right" } function createCrossMark(doc: Document, position: CrossMarkPosition, lineWidth: number, lineLength: number, offset: number): Element; function addPrinterMarks(cascadedPageStyle: CssCascade.ElementStyle, evaluatedPageSizeAndBleed: EvaluatedPageSizeAndBleed, page: Vtree_$0.Page, context: Exprs.Context): void; const propertiesAppliedToPartition: { width: boolean; height: boolean; "block-size": boolean; "inline-size": boolean; margin: boolean; padding: boolean; border: boolean; outline: boolean; "outline-width": boolean; "outline-style": boolean; "outline-color": boolean; }; enum MarginBoxPositionAlongVariableDimension { START = "start", CENTER = "center", END = "end" } type PageMarginBoxInformation = { order: number; isInTopRow: boolean; isInBottomRow: boolean; isInLeftColumn: boolean; isInRightColumn: boolean; positionAlongVariableDimension: MarginBoxPositionAlongVariableDimension; }; const pageMarginBoxes: { [key: string]: PageMarginBoxInformation; }; const pageMarginBoxNames: string[]; const pageRuleMasterPseudoName = "vivliostyle-page-rule-master"; const marginBoxesKey: string; class PageRuleMaster extends PageMaster.PageMaster { private bodyPartitionKey; private pageMarginBoxes; constructor(scope: Exprs.LexicalScope, parent: PageMaster.RootPageBox, style: CssCascade.ElementStyle); createPageMarginBoxes(style: CssCascade.ElementStyle): void; private applySpecified; createInstance(parentInstance: any): PageRuleMasterInstance; } class PageRulePartition extends PageMaster.Partition { readonly pageSize: PageSize; constructor(scope: Exprs.LexicalScope, parent: PageRuleMaster, style: CssCascade.ElementStyle, pageSize: PageSize); private applySpecified; createInstance(parentInstance: any): PageMaster.PageBoxInstance; } class PageMarginBoxPartition extends PageMaster.Partition { readonly marginBoxName: string; constructor(scope: Exprs.LexicalScope, parent: PageRuleMaster, marginBoxName: string, style: CssCascade.ElementStyle); applySpecified(style: CssCascade.ElementStyle): void; createInstance(parentInstance: any): PageMaster.PageBoxInstance; } type PageAreaDimension = { borderBoxWidth: Exprs.Val; borderBoxHeight: Exprs.Val; marginTop: Exprs.Val; marginBottom: Exprs.Val; marginLeft: Exprs.Val; marginRight: Exprs.Val; }; class PageRuleMasterInstance extends PageMaster.PageMasterInstance { pageAreaDimension: PageAreaDimension | null; pageMarginBoxInstances: { [key: string]: PageMarginBoxPartitionInstance; }; constructor(parentInstance: PageMaster.PageBoxInstance, pageRuleMaster: PageRuleMaster); applyCascadeAndInit(cascade: CssCascade.CascadeInstance, docElementStyle: CssCascade.ElementStyle): void; initHorizontal(): void; initVertical(): void; setPageAreaDimension(dim: PageAreaDimension): void; adjustPageLayout(context: Exprs.Context, page: Vtree_$0.Page, clientLayout: Vtree_$0.ClientLayout): void; private sizeMarginBoxesAlongVariableDimension; private getSizesOfMarginBoxesAlongVariableDimension; private distributeAutoMarginBoxSizes; prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; } class PageRulePartitionInstance extends PageMaster.PartitionInstance { borderBoxWidth: Exprs.Val; borderBoxHeight: Exprs.Val; marginTop: Exprs.Val; marginRight: Exprs.Val; marginBottom: Exprs.Val; marginLeft: Exprs.Val; constructor(parentInstance: PageMaster.PageBoxInstance, pageRulePartition: PageRulePartition); applyCascadeAndInit(cascade: CssCascade.CascadeInstance, docElementStyle: CssCascade.ElementStyle): void; initHorizontal(): void; initVertical(): void; private resolvePageBoxDimensions; prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; } class PageMarginBoxPartitionInstance extends PageMaster.PartitionInstance { boxInfo: PageMarginBoxInformation; suppressEmptyBoxGeneration: boolean; constructor(parentInstance: PageMaster.PageBoxInstance, pageMarginBoxPartition: PageMarginBoxPartition); prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; private applyVerticalAlign; private positionAlongVariableDimension; private positionAndSizeAlongFixedDimension; initHorizontal(): void; initVertical(): void; finishContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, column: Vtree_$0.Container, columnCount: number, clientLayout: Vtree_$0.ClientLayout, docFaces: Font.DocumentFaces): void; } class PageManager { private readonly cascadeInstance; private readonly pageScope; private readonly rootPageBoxInstance; private readonly context; private readonly docElementStyle; private pageMasterCache; constructor(cascadeInstance: CssCascade.CascadeInstance, pageScope: Exprs.LexicalScope, rootPageBoxInstance: PageMaster.RootPageBoxInstance, context: Exprs.Context, docElementStyle: CssCascade.ElementStyle); private definePageProgression; getCascadedPageStyle(): CssCascade.ElementStyle; getPageRulePageMaster(pageMasterInstance: PageMaster.PageMasterInstance, cascadedPageStyle: CssCascade.ElementStyle): PageMaster.PageMasterInstance; private makeCacheKey; private makeCascadeValueObjectKey; private generatePageRuleMaster; private generateCascadedPageMaster; } class CheckPageTypeAction extends CssCascade.ChainedAction { readonly pageType: string; constructor(pageType: string); apply(cascadeInstance: CssCascade.CascadeInstance): void; getPriority(): number; makePrimary(cascade: CssCascade.Cascade): boolean; } class IsFirstPageAction extends CssCascade.ChainedAction { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); apply(cascadeInstance: CssCascade.CascadeInstance): void; getPriority(): number; } class IsLeftPageAction extends CssCascade.ChainedAction { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); apply(cascadeInstance: CssCascade.CascadeInstance): void; getPriority(): number; } class IsRightPageAction extends CssCascade.ChainedAction { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); apply(cascadeInstance: CssCascade.CascadeInstance): void; getPriority(): number; } class IsRectoPageAction extends CssCascade.ChainedAction { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); apply(cascadeInstance: CssCascade.CascadeInstance): void; getPriority(): number; } class IsVersoPageAction extends CssCascade.ChainedAction { readonly scope: Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope); apply(cascadeInstance: CssCascade.CascadeInstance): void; getPriority(): number; } class ApplyPageRuleAction extends CssCascade.ApplyRuleAction { constructor(style: CssCascade.ElementStyle, specificity: number); apply(cascadeInstance: CssCascade.CascadeInstance): void; } function mergeInPageRule(context: Exprs.Context, target: CssCascade.ElementStyle, style: CssCascade.ElementStyle, specificity: number, cascadeInstance: CssCascade.CascadeInstance): void; class PageParserHandler extends CssCascade.CascadeParserHandler implements CssValidator.PropertyReceiver { private readonly pageProps; private currentPageSelectors; private currentNamedPageSelector; private currentPseudoPageClassSelectors; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, parent: CssCascade.CascadeParserHandler, validatorSet: CssValidator.ValidatorSet, pageProps: { [key: string]: CssCascade.ElementStyle; }); startPageRule(): void; tagSelector(ns: string | null, name: string | null): void; pseudoclassSelector(name: string, params: (number | string)[]): void; private finishSelector; nextSelector(): void; startRuleBody(): void; simpleProperty(name: string, value: Css.Val, important: any): void; insertNonPrimary(action: CssCascade.CascadeAction): void; makeApplyRuleAction(specificity: number): CssCascade.ApplyRuleAction; startPageMarginBoxRule(name: string): void; } class PageMarginBoxParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly validatorSet: CssValidator.ValidatorSet; readonly boxStyle: CssCascade.ElementStyle; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, validatorSet: CssValidator.ValidatorSet, boxStyle: CssCascade.ElementStyle); property(name: string, value: Css.Val, important: boolean): void; invalidPropertyValue(name: string, value: Css.Val): void; unknownProperty(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } } declare namespace PageMaster { let keyCount: number; abstract class PageBox> { readonly name: string | null; readonly pseudoName: string | null; readonly classes: string[]; readonly parent: PageBox; specified: CssCascade.ElementStyle; children: PageBox[]; pageMaster: PageMaster; index: number; key: string; protected _scope: Exprs.LexicalScope; get scope(): Exprs.LexicalScope; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: PageBox); createInstance(parentInstance: PageBoxInstance): PageBoxInstance; clone(param: { parent?: PageBox; pseudoName?: string; }): PageBox; copySpecified(dest: PageBox): void; cloneChildren(parent: PageBox): void; } class RootPageBox extends PageBox { constructor(scope: Exprs.LexicalScope); } class PageMasterScope extends Exprs.LexicalScope { pageMaster: PageMaster; constructor(scope: Exprs.LexicalScope, pageMaster: PageMaster); } class PageMaster> extends PageBox { readonly condition: Exprs.Val; readonly specificity: number; pageMaster: PageMaster; keyMap: { [key: string]: string; }; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: RootPageBox, condition: Exprs.Val, specificity: number); createInstance(parentInstance: any): PageBoxInstance; clone(param: any): PageMaster; resetScope(): void; } class PartitionGroup extends PageBox { pageMaster: PageMaster; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: PageBox); createInstance(parentInstance: PageBoxInstance): PageBoxInstance; clone(param: any): PartitionGroup; } class Partition extends PageBox { pageMaster: PageMaster; constructor(scope: Exprs.LexicalScope, name: string | null, pseudoName: string | null, classes: string[], parent: PageBox); createInstance(parentInstance: any): PageBoxInstance; clone(param: any): Partition; } function toExprIdent(scope: Exprs.LexicalScope, val: Css.Val, def: string): Exprs.Val; function toExprAuto(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprNormal(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprZero(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprZeroAuto(scope: Exprs.LexicalScope, val: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprZeroBorder(scope: Exprs.LexicalScope, val: Css.Val, styleVal: Css.Val, ref: Exprs.Val): Exprs.Val; function toExprBool(scope: Exprs.LexicalScope, val: Css.Val, def: Exprs.Val): Exprs.Val; interface InstanceHolder extends Exprs.Context { registerInstance(key: string, instance: PageBoxInstance): void; lookupInstance(key: string): PageBoxInstance; } class PageBoxInstance

> { readonly parentInstance: PageBoxInstance; readonly pageBox: P; protected cascaded: CssCascade.ElementStyle; style: { [key: string]: Css.Val; }; private autoWidth; private autoHeight; children: PageBoxInstance[]; isAutoWidth: boolean; isAutoHeight: boolean; isTopDependentOnAutoHeight: boolean; isRightDependentOnAutoWidth: boolean; private calculatedWidth; private calculatedHeight; pageMasterInstance: PageMasterInstance; namedValues: { [key: string]: Exprs.Val; }; namedFuncs: { [key: string]: Exprs.Val; }; vertical: boolean; rtl: boolean; suppressEmptyBoxGeneration: boolean; constructor(parentInstance: PageBoxInstance, pageBox: P); reset(): void; private addNamedValues; resolveName(name: string): Exprs.Val; resolveFunc(name: any): Exprs.Val; private initEnabled; boxSpecificEnabled(enabled: Exprs.Val): Exprs.Val; initHorizontal(): void; initVertical(): void; private initColumns; private depends; private init; getProp(context: Exprs.Context, name: string): Css.Val; getPropAsNumber(context: Exprs.Context, name: string): number; getSpecial(context: Exprs.Context, name: string): Css.Val[]; getActiveRegions(context: Exprs.Context): string[]; propagateProperty(context: Exprs.Context, container: Vtree_$0.Container, name: string, docFaces: Font.DocumentFaces): void; propagatePropertyToElement(context: Exprs.Context, element: Element, name: string, docFaces: Font.DocumentFaces): void; propagateDelayedProperty(context: Exprs.Context, container: Vtree_$0.Container, name: string, delayedItems: Vtree_$0.DelayedItem[]): void; assignLeftPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignRightPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignTopPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignBottomPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignBeforePosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignAfterPosition(context: Exprs.Context, container: Vtree_$0.Container): void; assignStartEndPosition(context: Exprs.Context, container: Vtree_$0.Container): void; sizeWithMaxHeight(context: Exprs.Context, container: Vtree_$0.Container): void; sizeWithMaxWidth(context: Exprs.Context, container: Vtree_$0.Container): void; prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; transferContentProps(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces): void; transferSinglUriContentProps(context: Exprs.Context, element: Element, docFaces: Font.DocumentFaces): void; finishContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, column: Vtree_$0.Container, columnCount: number, clientLayout: Vtree_$0.ClientLayout, docFaces: Font.DocumentFaces): void; applyCascadeAndInit(cascade: CssCascade.CascadeInstance, docElementStyle: CssCascade.ElementStyle): void; resolveAutoSizing(context: Exprs.Context): void; } const passPreProperties: string[]; const passPostProperties: string[]; const passContentProperties: string[]; const passSingleUriContentProperties: string[]; const delayedProperties: string[]; const userAgentPageMasterPseudo = "background-host"; class RootPageBoxInstance extends PageBoxInstance { constructor(pageBox: RootPageBox); applyCascadeAndInit(cascade: CssCascade.CascadeInstance, docElementStyle: CssCascade.ElementStyle): void; } class PageMasterInstance

>> extends PageBoxInstance

{ pageMasterInstance: PageMasterInstance; constructor(parentInstance: PageBoxInstance, pageBox: P); boxSpecificEnabled(enabled: Exprs.Val): Exprs.Val; adjustPageLayout(context: Exprs.Context, page: Vtree_$0.Page, clientLayout: Vtree_$0.ClientLayout): void; } class PartitionGroupInstance extends PageBoxInstance { pageMasterInstance: PageMasterInstance; constructor(parentInstance: PageBoxInstance, pageBox: PageBox); } class PartitionInstance

>> extends PageBoxInstance

{ pageMasterInstance: PageMasterInstance; constructor(parentInstance: PageBoxInstance, pageBox: P); processPartitionList(enabled: Exprs.Val, listVal: Css.Val, conflicting: boolean): Exprs.Val; boxSpecificEnabled(enabled: Exprs.Val): Exprs.Val; prepareContainer(context: Exprs.Context, container: Vtree_$0.Container, page: Vtree_$0.Page, docFaces: Font.DocumentFaces, clientLayout: Vtree_$0.ClientLayout): void; } class PageBoxParserHandler extends CssParser.SlaveParserHandler implements CssValidator.PropertyReceiver { readonly target: PageBox; readonly validatorSet: CssValidator.ValidatorSet; constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: PageBox, validatorSet: CssValidator.ValidatorSet); property(name: string, value: Css.Val, important: boolean): void; unknownProperty(name: string, value: Css.Val): void; invalidPropertyValue(name: string, value: Css.Val): void; simpleProperty(name: string, value: Css.Val, important: any): void; } class PartitionParserHandler extends PageBoxParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: Partition, validatorSet: CssValidator.ValidatorSet); } class PartitionGroupParserHandler extends PageBoxParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: PartitionGroup, validatorSet: CssValidator.ValidatorSet); startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; } class PageMasterParserHandler extends PageBoxParserHandler { constructor(scope: Exprs.LexicalScope, owner: CssParser.DispatchParserHandler, target: PageMaster, validatorSet: CssValidator.ValidatorSet); startPartitionRule(name: string | null, pseudoName: string | null, classes: string[]): void; startPartitionGroupRule(name: string | null, pseudoName: string | null, classes: string[]): void; } } declare namespace Task { interface Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } interface Result_$0 { then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } let privateCurrentTask: Task | null; let primaryScheduler: Scheduler | null; function currentTask(): Task | null; function newFrame(name: string): Frame; function newEventSource(): EventSource; function newScheduler(opt_timer?: Timer): Scheduler; function newResult(opt_value: T): Result_$0; function handle(name: any, code: (p1: Frame) => void, onErr: (p1: Frame, p2: Error) => void): Result_$0; function start(func: () => Result_$0, opt_name?: string): Task; enum FrameState { INIT = 0, ACTIVE = 1, FINISHED = 2, DEAD = 3 } class TimerImpl implements Timer { currentTime(): number; setTimeout(fn: () => void, delay: number): number; clearTimeout(token: number): void; } class Scheduler { timer: Timer; timeout: number; slice: number; sliceOverTime: number; queue: Base.PriorityQueue; wakeupTime: number | null; timeoutToken: number | null; inTimeSlice: boolean; order: number; constructor(timer: Timer); setSlice(slice: number): void; setTimeout(timeout: number): void; isTimeSliceOver(): boolean; private arm; schedule(continuation: Continuation, opt_delay?: number): void; private doTimeSlice; run(func: () => Result_$0, opt_name?: string): Task; } class Continuation implements Base.Comparable { task: Task; scheduledTime: number; order: number; result: T; canceled: boolean; constructor(task: Task); compare(otherComp: Base.Comparable): number; getTask(): Task; schedule(result: T, opt_delay?: number): void; resumeInternal(): boolean; cancel(): void; } class Task { scheduler: Scheduler; name: string; callbacks: (() => void)[]; exception: Error | null; running: boolean; result: any; waitTarget: string | null; top: Frame | null; continuation: Continuation | null; constructor(scheduler: Scheduler, name: string); getName(): string; interrupt(err: Error): void; getScheduler(): Scheduler; isRunning(): boolean; whenDone(callback: () => void): void; join(): Result_$0; unwind(): void; raise(err: Error, opt_frame?: Frame): void; fillStack(err: Error): void; } class SyncResultImpl implements Result_$0 { value: T; constructor(value: T); then(callback: (T: any) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class ResultImpl implements Result_$0 { readonly frame: Frame; constructor(frame: Frame); then(callback: (p1: T) => void): void; thenAsync(callback: (p1: T) => Result_$0): Result_$0; thenReturn(result: T1): Result_$0 | SyncResultImpl; thenFinish(frame: Frame): void; isPending(): boolean; get(): T | null; } class Frame { task: Task; parent: Frame; name: string; res: T; state: FrameState; callback: ((p1: any) => void) | null; handler: ((p1: Frame, p2: Error) => void) | null; constructor(task: Task, parent: Frame, name: string); private checkEnvironment; result(): Result_$0; finish(res: T): void; getTask(): Task; getName(): string; getScheduler(): Scheduler; then(callback: (p1: T) => void): void; timeSlice(): Result_$0; sleep(delay: number): Result_$0; loop(func: () => Result_$0): Result_$0; loopWithFrame(func: (p1: LoopBodyFrame) => void): Result_$0; suspend(opt_waitTarget?: any): Continuation; } class LoopBodyFrame extends Frame { constructor(task: Task, parent: Frame); continueLoop(): void; breakLoop(): void; } class EventItem { event: Base.Event; next: EventItem; constructor(event: Base.Event); } class EventSource { continuation: Continuation; listeners: { target: Base.EventTarget; type: string; listener: Base.EventListener; }[]; head: EventItem; tail: EventItem; constructor(); attach(target: Base.EventTarget, type: string, opt_preventDefault?: boolean): void; detach(target: Base.EventTarget, type: string): void; nextEvent(): Result_$0; } } declare namespace TaskUtil { class Fetcher { readonly fetch: () => Task.Result; name: string; arrived: boolean; resource: T; task: Task.Task; piggybacks: ((p1: any) => void)[] | null; constructor(fetch: () => Task.Result, opt_name?: string); start(): void; piggyback(fn: (p1: T) => void): void; get(): Task.Result; hasArrived(): boolean; } const waitForFetchers: (fetchers: Fetcher[]) => Task.Result; function loadElement(elem: Element, src: string): Fetcher; } declare namespace Vgen { const frontEdgeBlackListHor: { [key: string]: string; }; const frontEdgeBlackListVert: { [key: string]: string; }; const frontEdgeUnforcedBreakBlackListHor: { [key: string]: string; }; const frontEdgeUnforcedBreakBlackListVert: { [key: string]: string; }; type CustomRenderer = (p1: Element, p2: Element, p3: { [key: string]: Css.Val; }) => Task.Result; interface CustomRendererFactory { makeCustomRenderer(xmldoc: XmlDoc.XMLDocHolder): CustomRenderer; } function initIFrame(iframe: HTMLIFrameElement): void; interface StylerProducer { getStylerForDoc(xmldoc: XmlDoc.XMLDocHolder): CssStyler_$0.AbstractStyler; } class ViewFactory extends Base.SimpleEventTarget implements Vtree_$0.LayoutContext { readonly flowName: string; readonly context: Exprs.Context; readonly viewport: Viewport; readonly styler: CssStyler_$0.Styler; readonly regionIds: string[]; readonly xmldoc: XmlDoc.XMLDocHolder; readonly docFaces: Font.DocumentFaces; readonly footnoteStyle: CssCascade_$0.ElementStyle; readonly stylerProducer: StylerProducer; readonly page: Vtree_$0.Page; readonly customRenderer: CustomRenderer; readonly fallbackMap: { [key: string]: string; }; readonly documentURLTransformer: Base.DocumentURLTransformer; private static SVG_URL_ATTRIBUTES; document: Document; exprContentListener: Vtree_$0.ExprContentListener; nodeContext: Vtree_$0.NodeContext | null; viewRoot: Element | null; isFootnote: boolean; sourceNode: Node | null; offsetInNode: number; viewNode: Node | null; constructor(flowName: string, context: Exprs.Context, viewport: Viewport, styler: CssStyler_$0.Styler, regionIds: string[], xmldoc: XmlDoc.XMLDocHolder, docFaces: Font.DocumentFaces, footnoteStyle: CssCascade_$0.ElementStyle, stylerProducer: StylerProducer, page: Vtree_$0.Page, customRenderer: CustomRenderer, fallbackMap: { [key: string]: string; }, documentURLTransformer: Base.DocumentURLTransformer); clone(): Vtree_$0.LayoutContext; createPseudoelementShadow(element: Element, isRoot: boolean, cascStyle: CssCascade_$0.ElementStyle, computedStyle: { [key: string]: Css.Val; }, styler: CssStyler_$0.AbstractStyler, context: Exprs.Context, parentShadow: Vtree_$0.ShadowContext, subShadow: Vtree_$0.ShadowContext): Vtree_$0.ShadowContext; getPseudoMap(cascStyle: CssCascade_$0.ElementStyle, regionIds: string[], isFootnote: boolean, nodeContext: Vtree_$0.NodeContext, context: Exprs.Context): {}; createRefShadow(href: string, type: Vtree_$0.ShadowType, element: Element, parentShadow: Vtree_$0.ShadowContext, subShadow: Vtree_$0.ShadowContext): Task.Result; createShadows(element: Element, isRoot: any, cascStyle: CssCascade_$0.ElementStyle, computedStyle: { [key: string]: Css.Val; }, styler: CssStyler_$0.AbstractStyler, context: Exprs.Context, shadowContext: Vtree_$0.ShadowContext): Task.Result; setViewRoot(viewRoot: Element, isFootnote: boolean): void; computeStyle(vertical: boolean, rtl: boolean, style: CssCascade_$0.ElementStyle, computedStyle: { [key: string]: Css.Val; }): boolean; private inheritFromSourceParent; resolveURL(url: string): string; inheritLangAttribute(): void; transferPolyfilledInheritedProps(computedStyle: { [key: string]: Css.Val; }): void; resolveFormattingContext(nodeContext: Vtree_$0.NodeContext, firstTime: boolean, display: Css.Ident, position: Css.Ident, float: Css.Ident, isRoot: boolean): void; private createElementView; private processAfterIfcontinues; isSVGUrlAttribute(attributeName: string): boolean; modifyElemDimensionWithImageResolution(images: { image: HTMLElement; element: HTMLElement; fetcher: TaskUtil.Fetcher; }[], imageResolution: number, computedStyle: { [key: string]: Css.Val; }, isVertical: boolean): void; private preprocessElementStyle; private findAndProcessRepeatingElements; private processRepeatOnBreak; private createTextNodeView; private preprocessTextContent; createNodeView(firstTime: boolean, atUnforcedBreak: boolean): Task.Result; setCurrent(nodeContext: Vtree_$0.NodeContext, firstTime: boolean, atUnforcedBreak?: boolean): Task.Result; processShadowContent(pos: Vtree_$0.NodeContext): Vtree_$0.NodeContext; private nextPositionInTree; isTransclusion(element: Element, elementStyle: CssCascade_$0.ElementStyle, transclusionType: string | null): boolean; nextInTree(position: Vtree_$0.NodeContext, atUnforcedBreak?: boolean): Task.Result; addImageFetchers(bg: Css.Val): void; applyComputedStyles(target: Element, computedStyle: { [key: string]: Css.Val; }): void; applyPseudoelementStyle(nodeContext: Vtree_$0.NodeContext, pseudoName: string, target: Element): void; peelOff(nodeContext: Vtree_$0.NodeContext, nodeOffset: number): Task.Result; createElement(ns: string, tag: string): Element; applyFootnoteStyle(vertical: boolean, rtl: boolean, target: Element): boolean; processFragmentedBlockEdge(nodeContext: Vtree_$0.NodeContext): void; convertLengthToPx(numeric: Css.Numeric, viewNode: Node, clientLayout: Vtree_$0.ClientLayout): number | Css.Numeric; isSameNodePositionStep(step1: Vtree_$0.NodePositionStep, step2: Vtree_$0.NodePositionStep): boolean; isSameNodePosition(nodePosition1: Vtree_$0.NodePosition, nodePosition2: Vtree_$0.NodePosition): boolean; isPseudoelement(elem: any): boolean; } const fb2Remap: { a: string; sub: string; sup: string; table: string; tr: string; td: string; th: string; code: string; body: string; p: string; v: string; date: string; emphasis: string; strong: string; style: string; strikethrough: string; }; const propertiesNotPassedToDOM: { "box-decoration-break": boolean; "float-min-wrap-block": boolean; "float-reference": boolean; "flow-into": boolean; "flow-linger": boolean; "flow-options": boolean; "flow-priority": boolean; "footnote-policy": boolean; page: boolean; }; class DefaultClientLayout implements Vtree_$0.ClientLayout { layoutBox: Element; window: Window; constructor(viewport: Viewport); private subtractOffsets; getRangeClientRects(range: Range): ClientRect[]; getElementClientRect(element: Element): ClientRect; getElementComputedStyle(element: Element): CSSStyleDeclaration; } class Viewport { readonly window: Window; readonly fontSize: number; document: Document; root: HTMLElement; private outerZoomBox; contentContainer: HTMLElement; layoutBox: Element; width: number; height: number; constructor(window: Window, fontSize: number, opt_root?: HTMLElement, opt_width?: number, opt_height?: number); resetZoom(): void; zoom(width: number, height: number, scale: number): void; clear(): void; } } declare namespace Vtree_$0 { const delayedProps: { transform: boolean; "transform-origin": boolean; }; const delayedPropsIfRelativePositioned: { top: boolean; bottom: boolean; left: boolean; right: boolean; }; class DelayedItem { target: Element; name: string; value: Css.Val; constructor(target: Element, name: string, value: Css.Val); } type PageHyperlinkEvent = { type: string; target: any; currentTarget: any; anchorElement: Element; href: string; }; type Trigger = { observer: string; event: string; action: string; ref: string; }; const actions: { show: (obj: any) => void; hide: (obj: any) => void; play: (obj: any) => void; pause: (obj: any) => void; resume: (obj: any) => void; mute: (obj: any) => void; unmute: (obj: any) => void; }; function makeListener(refs: Element[], action: string): EventListener | null; class Page extends Base.SimpleEventTarget { readonly container: HTMLElement; readonly bleedBox: HTMLElement; private static AUTO_PAGE_WIDTH_ATTRIBUTE; private static AUTO_PAGE_HEIGHT_ATTRIBUTE; pageAreaElement: HTMLElement | null; delayedItems: DelayedItem[]; hrefHandler: (e: Event) => void; elementsById: { [key: string]: Element[]; }; dimensions: { width: number; height: number; }; isFirstPage: boolean; isLastPage: boolean; isAutoPageWidth: boolean; isAutoPageHeight: boolean; spineIndex: number; position: LayoutPosition; offset: number; side: Constants.PageSide | null; fetchers: TaskUtil.Fetcher<{}>[]; marginBoxes: { top: { [key: string]: Container_$0; }; bottom: { [key: string]: Container_$0; }; left: { [key: string]: Container_$0; }; right: { [key: string]: Container_$0; }; }; constructor(container: HTMLElement, bleedBox: HTMLElement); setAutoPageWidth(isAuto: boolean): void; setAutoPageHeight(isAuto: boolean): void; registerElementWithId(element: Element, id: string): void; finish(triggers: Trigger[], clientLayout: ClientLayout_$0): void; zoom(scale: number): void; getPageAreaElement(): HTMLElement; } type Spread = { left: Page; right: Page; }; const SPECIAL_ATTR = "data-adapt-spec"; const Whitespace_$0: typeof Vtree.Whitespace_$0; type Whitespace_$0 = Vtree.Whitespace_$0; function whitespaceFromPropertyValue(whitespace: string): Whitespace_$0 | null; function canIgnore(node: Node, whitespace: Whitespace_$0): boolean; class Flow { readonly flowName: string; readonly parentFlowName: string | null; forcedBreakOffsets: number[]; formattingContext: FormattingContext_$0 | null; constructor(flowName: string, parentFlowName: string | null); } class FlowChunk { flowName: string; element: Element; startOffset: number; priority: number; linger: number; exclusive: boolean; repeated: boolean; last: boolean; breakBefore: string | null; startPage: number; constructor(flowName: string, element: Element, startOffset: number, priority: number, linger: number, exclusive: boolean, repeated: boolean, last: boolean, breakBefore: string | null); isBetter(other: FlowChunk): boolean; } type ClientRect_$0 = Vtree.ClientRect_$0; function clientrectIncreasingTop(r1: ClientRect_$0, r2: ClientRect_$0): number; function clientrectDecreasingRight(r1: ClientRect_$0, r2: ClientRect_$0): number; type ClientLayout_$0 = Vtree.ClientLayout_$0; type LayoutContext_$0 = Vtree.LayoutContext_$0; type FormattingContext_$0 = Vtree.FormattingContext_$0; function eachAncestorFormattingContext(nodeContext: NodeContext_$0, callback: (p1: FormattingContext_$0) => any): void; type NodePositionStep_$0 = Vtree.NodePositionStep_$0; function isSameNodePositionStep(nps1: NodePositionStep_$0, nps2: NodePositionStep_$0): boolean; type NodePosition_$0 = Vtree.NodePosition_$0; function isSameNodePosition(np1: NodePosition_$0 | null, np2: NodePosition_$0 | null): boolean; function newNodePositionFromNode(node: Node): NodePosition_$0; function newNodePositionFromNodeContext(nodeContext: Vtree.NodeContext_$0, initialFragmentIndex: number | null): NodePosition_$0; function makeNodeContextFromNodePositionStep(step: NodePositionStep_$0, parent: Vtree.NodeContext_$0): NodeContext_$0; const ShadowType_$0: typeof Vtree.ShadowType_$0; type ShadowType_$0 = Vtree.ShadowType_$0; class ShadowContext_$0 implements Vtree.ShadowContext_$0 { readonly owner: Element; readonly root: Element; readonly xmldoc: XmlDoc.XMLDocHolder; readonly parentShadow: ShadowContext_$0; readonly type: ShadowType_$0; readonly styler: object; subShadow: ShadowContext_$0; constructor(owner: Element, root: Element, xmldoc: XmlDoc.XMLDocHolder, parentShadow: ShadowContext_$0, superShadow: ShadowContext_$0, type: ShadowType_$0, styler: object); equals(other: ShadowContext_$0): boolean; } function isSameShadowContext(sc1: ShadowContext_$0, sc2: ShadowContext_$0): boolean; class FirstPseudo_$0 implements Vtree.FirstPseudo_$0 { readonly outer: FirstPseudo_$0; readonly count: number; constructor(outer: FirstPseudo_$0, count: number); } class NodeContext_$0 implements Vtree.NodeContext_$0 { sourceNode: Node; parent: NodeContext_$0; boxOffset: number; offsetInNode: number; after: boolean; shadowType: ShadowType_$0; shadowContext: ShadowContext_$0; nodeShadow: ShadowContext_$0; shadowSibling: NodeContext_$0; shared: boolean; inline: boolean; overflow: boolean; breakPenalty: number; display: string | null; floatReference: PageFloats.FloatReference; floatSide: string | null; clearSide: string | null; floatMinWrapBlock: Css.Numeric | null; columnSpan: Css.Val | null; verticalAlign: string; captionSide: string; inlineBorderSpacing: number; blockBorderSpacing: number; flexContainer: boolean; whitespace: Whitespace_$0; hyphenateCharacter: string | null; breakWord: boolean; establishesBFC: boolean; containingBlockForAbsolute: boolean; breakBefore: string | null; breakAfter: string | null; viewNode: Node; clearSpacer: Node; inheritedProps: { [key: string]: number | string | Css.Val; }; vertical: boolean; direction: string; firstPseudo: FirstPseudo_$0; lang: string | null; preprocessedTextContent: Diff.Change[] | null; formattingContext: FormattingContext_$0; repeatOnBreak: string | null; pluginProps: { [key: string]: string | number | undefined | null | (number | null)[]; }; fragmentIndex: number; afterIfContinues: Selectors.AfterIfContinues; footnotePolicy: Css.Ident | null; constructor(sourceNode: Node, parent: NodeContext_$0, boxOffset: number); resetView(): void; private cloneItem; modify(): NodeContext_$0; copy(): NodeContext_$0; clone(): NodeContext_$0; toNodePositionStep(): NodePositionStep_$0; toNodePosition(): NodePosition_$0; isInsideBFC(): boolean; getContainingBlockForAbsolute(): NodeContext_$0; walkUpBlocks(callback: (p1: NodeContext_$0) => any): void; belongsTo(formattingContext: FormattingContext_$0): boolean; } class ChunkPosition_$0 implements Vtree.ChunkPosition_$0 { primary: NodePosition_$0; floats: NodePosition_$0[]; constructor(primary: NodePosition_$0); clone(): ChunkPosition_$0; isSamePosition(other: ChunkPosition_$0): boolean; } class FlowChunkPosition { chunkPosition: ChunkPosition_$0; readonly flowChunk: FlowChunk; constructor(chunkPosition: ChunkPosition_$0, flowChunk: FlowChunk); clone(): FlowChunkPosition; isSamePosition(other: FlowChunkPosition): boolean; } class FlowPosition { positions: FlowChunkPosition[]; startSide: string; breakAfter: string | null; clone(): FlowPosition; isSamePosition(other: FlowPosition): boolean; hasContent(offset: number): boolean; } class LayoutPosition { page: number; flows: { [key: string]: Flow; }; flowPositions: { [key: string]: FlowPosition; }; highestSeenOffset: number; highestSeenNode: Node; lookupPositionOffset: number; clone(): LayoutPosition; isSamePosition(other: LayoutPosition): boolean; hasContent(name: string, offset: number): boolean; startSideOfFlow(name: string): string; firstFlowChunkOfFlow(name: string): FlowChunk | null; } class Container_$0 implements Vtree.Container_$0 { element: Element; left: number; top: number; marginLeft: number; marginRight: number; marginTop: number; marginBottom: number; borderLeft: number; borderRight: number; borderTop: number; borderBottom: number; paddingLeft: number; paddingRight: number; paddingTop: number; paddingBottom: number; width: number; height: number; originX: number; originY: number; exclusions: GeometryUtil.Shape[]; innerShape: GeometryUtil.Shape; computedBlockSize: number; snapWidth: number; snapHeight: number; snapOffsetX: number; snapOffsetY: number; vertical: boolean; constructor(element: Element); getInsetTop(): number; getInsetBottom(): number; getInsetLeft(): number; getInsetRight(): number; getInsetBefore(): number; getInsetAfter(): number; getInsetStart(): number; getInsetEnd(): number; getBeforeEdge(box: ClientRect_$0): number; getAfterEdge(box: ClientRect_$0): number; getStartEdge(box: ClientRect_$0): number; getEndEdge(box: ClientRect_$0): number; getInlineSize(box: ClientRect_$0): number; getBoxSize(box: ClientRect_$0): number; getBoxDir(): number; getInlineDir(): number; copyFrom(other: Container_$0): void; setVerticalPosition(top: number, height: number): void; setHorizontalPosition(left: number, width: number): void; setBlockPosition(start: number, extent: number): void; setInlinePosition(start: number, extent: number): void; clear(): void; getInnerShape(): GeometryUtil.Shape; getInnerRect(): GeometryUtil.Rect; getPaddingRect(): GeometryUtil.Rect; getOuterShape(outerShapeProp: Css.Val, context: Exprs.Context): GeometryUtil.Shape; getOuterRect(): GeometryUtil.Rect; } type ExprContentListener_$0 = Vtree.ExprContentListener_$0; class ContentPropertyHandler extends Css.Visitor { readonly elem: Element; readonly context: Exprs.Context; readonly rootContentValue: Css.Val; readonly exprContentListener: ExprContentListener_$0; constructor(elem: Element, context: Exprs.Context, rootContentValue: Css.Val, exprContentListener: ExprContentListener_$0); private visitStrInner; visitStr(str: Css.Str): Css.Val; visitURL(url: Css.URL): Css.Val; visitSpaceList(list: Css.SpaceList): Css.Val; visitExpr(expr: Css.Expr): Css.Val; } function nonTrivialContent(val: Css.Val): boolean; } declare namespace XmlDoc_$0 { type XMLDocStore_$0 = XmlDoc.XMLDocStore_$0; const ELEMENT_OFFSET_ATTR = "data-adapt-eloff"; class XMLDocHolder_$0 implements XmlDoc.XMLDocHolder_$0 { readonly store: XMLDocStore_$0; readonly url: string; readonly document: Document; lang: string | null; totalOffset: number; root: Element; body: Element; head: Element; last: Element; lastOffset: number; idMap: { [key: string]: Element; }; constructor(store: XMLDocStore_$0, url: string, document: Document); doc(): XmlDoc.NodeList_$0; getElementOffset(element: Element): number; getNodeOffset(srcNode: Node, offsetInNode: number, after: boolean): number; getTotalOffset(): number; getNodeByOffset(offset: number): Node; private buildIdMap; getElement(url: string): Element | null; } enum DOMParserSupportedType { TEXT_HTML = "text/html", TEXT_XML = "text/xml", APPLICATION_XML = "application/xml", APPLICATION_XHTML_XML = "application/xhtml_xml", IMAGE_SVG_XML = "image/svg+xml" } function parseAndReturnNullIfError(str: string, type: string, opt_parser?: DOMParser): Document | null; function resolveContentType(response: Net_$0.Response): string | null; function parseXMLResource(response: Net_$0.Response, store: XMLDocStore_$0): Task.Result; function newXMLDocStore(): XMLDocStore_$0; class Predicate_$0 implements XmlDoc.Predicate_$0 { readonly fn: (p1: Node) => boolean; constructor(fn: (p1: Node) => boolean); check(node: Node): boolean; withAttribute(name: string, value: string): Predicate_$0; withChild(name: string, opt_childPredicate?: Predicate_$0): Predicate_$0; } const predicate: Predicate_$0; class NodeList_$0 implements XmlDoc.NodeList_$0 { readonly nodes: Node[]; constructor(nodes: Node[]); asArray(): Node[]; size(): number; predicate(pr: Predicate_$0): NodeList_$0; forEachNode(fn: (p1: Node, p2: (p1: Node) => void) => void): NodeList_$0; forEach(fn: (p1: Node) => T): T[]; forEachNonNull(fn: (p1: Node) => T): T[]; child(tag: string): NodeList_$0; childElements(): NodeList_$0; attribute(name: string): (string | null)[]; textContent(): (string | null)[]; } } type LayoutType = Layout; declare namespace Base { let emptyObj: {}; type JSON = any; function jsonToString(json: JSON): string; function stringToJSON(str: string): JSON; function stripFragment(url: string): string; function stripFragmentAndQuery(url: string): string; let baseURL: string; function setBaseURL(value: string): void; let resourceBaseURL: string; function setResourceBaseURL(value: string): void; function resolveURL(relURL: string, baseURL: string): string; function convertSpecialURL(url: string): string; interface DocumentURLTransformer { transformFragment(fragment: string, baseURL: string): string; transformURL(url: string, baseURL: string): string; restoreURL(encoded: string): string[]; } enum NS { FB2 = "http://www.gribuser.ru/xml/fictionbook/2.0", epub = "http://www.idpf.org/2007/ops", EV = "http://www.w3.org/2001/xml-events", MATHML = "http://www.w3.org/1998/Math/MathML", XML = "http://www.w3.org/XML/1998/namespace", XHTML = "http://www.w3.org/1999/xhtml", XLINK = "http://www.w3.org/1999/xlink", SHADOW = "http://www.pyroxy.com/ns/shadow", SVG = "http://www.w3.org/2000/svg", DC = "http://purl.org/dc/elements/1.1/", NCX = "http://www.daisy.org/z3986/2005/ncx/", SSE = "http://example.com/sse" } function getURLParam(name: string, opt_url?: string): string | null; function setURLParam(url: string, name: string, value: string): string; function asString(v: any): any; interface Comparable { compare(other: Comparable): number; } class PriorityQueue { queue: Comparable[]; length(): number; add(item: Comparable): void; peek(): Comparable; remove(): Comparable; } function cssToJSProp(prefix: string, cssPropName: string): string; const knownPrefixes: string[]; const propNameMap: {}; function checkIfPropertySupported(prefix: string, prop: string): boolean; function getPrefixedPropertyNames(prop: string): string[] | null; function setCSSProperty(elem: Element, prop: string, value: string): void; function getCSSProperty(elem: Element, prop: string, opt_value?: string): string; function getLangAttribute(element: Element): string; class StringBuffer { list: string[]; append(str: string): StringBuffer; clear(): void; toString(): string; } function escapeChar(str: string): string; function escapeCSSIdent(name: string): string; function escapeCSSStr(str: string): string; function lightURLEncode(str: string): string; function isLetter(ch: string): boolean; function escapeCharToHex(str: string, prefix?: string): string; function escapeNameStrToHex(str: string, prefix?: string): string; function escapeRegExp(str: string): string; function unescapeCharFromHex(str: string, prefix?: string): string; function unescapeStrFromHex(str: string, prefix?: string): string; function binarySearch(high: number, good: (p1: number) => boolean): number; function numberCompare(a: number, b: number): number; const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function appendBase64(sb: StringBuffer, data: string): void; function indexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T; }; function arrayToSet(arr: string[]): { [key: string]: boolean; }; function multiIndexArray(arr: T[], key: (p1: T) => string | null): { [key: string]: T[]; }; function mapObj(obj: { [key: string]: P; }, fn: (p1: P, p2: string) => R): { [key: string]: R; }; function mapSize(obj: object): number; type Event = { type: string; target?: any; currentTarget?: any; preventDefault?: any; newPage?: any; anchorElement?: any; href?: any; content?: any; }; type EventListener = (p1: Event) => void; class SimpleEventTarget { listeners: { [key: string]: EventListener[]; }; dispatchEvent(evt: Event): void; addEventListener(type: string, listener: EventListener, capture?: boolean): void; removeEventListener(type: string, listener: EventListener, capture?: boolean): void; } type EventTarget = SimpleEventTarget; let hasLShapeFloatBug: boolean | null; function checkLShapeFloatBug(body: HTMLElement): boolean; let hasVerticalBBoxBug: boolean | null; function checkVerticalBBoxBug(body: HTMLElement): boolean; let hasInlineBlockJustificationBug: boolean | null; function checkInlineBlockJustificationBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityAfterHyphenBug: boolean | null; function checkSoftWrapOpportunityAfterHyphenBug(body: HTMLElement): boolean; let hasSoftWrapOpportunityByWbrBug: boolean | null; function checkSoftWrapOpportunityByWbrBug(body: HTMLElement): boolean; } declare namespace Counters { class TargetCounterReference { readonly targetId: string; resolved: boolean; pageCounters: CssCascade_$0.CounterValues; spineIndex: number; pageIndex: number; constructor(targetId: string, resolved: boolean); equals(other: TargetCounterReference): boolean; isResolved(): boolean; resolve(): void; unresolve(): void; } class CounterStore { readonly documentURLTransformer: Base.DocumentURLTransformer; countersById: { [key: string]: CssCascade_$0.CounterValues; }; pageCountersById: { [key: string]: CssCascade_$0.CounterValues; }; currentPageCounters: CssCascade_$0.CounterValues; previousPageCounters: CssCascade_$0.CounterValues; currentPageCountersStack: CssCascade_$0.CounterValues[]; pageIndicesById: { [key: string]: { spineIndex: number; pageIndex: number; }; }; currentPage: Vtree_$0.Page; newReferencesOfCurrentPage: TargetCounterReference[]; referencesToSolve: TargetCounterReference[]; referencesToSolveStack: TargetCounterReference[][]; unresolvedReferences: { [key: string]: TargetCounterReference[]; }; resolvedReferences: { [key: string]: TargetCounterReference[]; }; private pagesCounterExprs; constructor(documentURLTransformer: Base.DocumentURLTransformer); createCounterListener(baseURL: string): CssCascade_$0.CounterListener; createCounterResolver(baseURL: string, rootScope: Exprs.LexicalScope, pageScope: Exprs.LexicalScope): CssCascade_$0.CounterResolver; setCurrentPage(page: Vtree_$0.Page): void; private definePageCounter; forceSetPageCounter(pageNumber: number): void; updatePageCounters(cascadedPageStyle: CssCascade_$0.ElementStyle, context: Exprs.Context): void; pushPageCounters(counters: CssCascade_$0.CounterValues): void; popPageCounters(): void; resolveReference(id: string): void; saveReferenceOfCurrentPage(id: string, resolved: boolean): void; finishPage(spineIndex: number, pageIndex: number): void; getUnresolvedRefsToPage(page: Vtree_$0.Page): { spineIndex: number; pageIndex: number; pageCounters: CssCascade_$0.CounterValues; refs: TargetCounterReference[]; }[]; pushReferencesToSolve(refs: TargetCounterReference[]): void; popReferencesToSolve(): void; registerPageCounterExpr(name: string, format: (p1: number[]) => string, expr: Exprs.Val): void; getExprContentListener(): Vtree_$0.ExprContentListener; private exprContentListener; finishLastPage(viewport: Vgen.Viewport): void; createLayoutConstraint(pageIndex: number): Layout.LayoutConstraint; } const PAGES_COUNTER_ATTR = "data-vivliostyle-pages-counter"; } declare namespace Exprs { type Preferences = { fontFamily: string; lineHeight: number; margin: number; hyphenate: boolean; columnWidth: number; horizontal: boolean; nightMode: boolean; spreadView: boolean; pageBorder: number; enabledMediaTypes: { [key: string]: boolean; }; defaultPaperSize?: { [key: string]: number; }; }; function defaultPreferences(): Preferences; function clonePreferences(pref: Preferences): Preferences; const defaultPreferencesInstance: Preferences; const Special: { PENDING: Pending; }; type Result = string | number | boolean | undefined; type PendingResult = Special | Result; function letterbox(viewW: number, viewH: number, objW: number, objH: number): string; function cssString(str: string): string; function cssIdent(name: string): string; function makeQualifiedName(objName: string | null, memberName: string): string; let nextKeyIndex: number; class LexicalScope { parent: LexicalScope; resolver?: (p1: string, p2: boolean) => Val; scopeKey: string; children: LexicalScope[]; zero: Const; one: Const; _true: Const; _false: Const; values: { [key: string]: Val; }; funcs: { [key: string]: Val; }; builtIns: { [key: string]: (...p1: Result[]) => Result; }; constructor(parent: LexicalScope, resolver?: (p1: string, p2: boolean) => Val); defineBuiltInName(name: string, fn: () => Result): void; defineName(qualifiedName: string, val: Val): void; defineFunc(qualifiedName: string, val: Val): void; defineBuiltIn(qualifiedName: string, fn: (...p1: Result[]) => Result): void; } function isAbsoluteLengthUnit(unit: string): boolean; function isViewportRelativeLengthUnit(unit: string): boolean; function isFontRelativeLengthUnit(unit: string): boolean; const defaultUnitSizes: { [key: string]: number; }; function needUnitConversion(unit: string): boolean; type ScopeContext = { [key: string]: Result; }; class Context { readonly rootScope: LexicalScope; readonly viewportWidth: number; readonly viewportHeight: number; protected actualPageWidth: number | null; pageWidth: () => number; protected actualPageHeight: number | null; pageHeight: () => number; initialFontSize: number; rootFontSize: number | null; fontSize: () => number; pref: Preferences; scopes: { [key: string]: ScopeContext; }; pageAreaWidth: number | null; pageAreaHeight: number | null; pageVertical: boolean | null; pubTitle: string | null; docTitle: string | null; constructor(rootScope: LexicalScope, viewportWidth: number, viewportHeight: number, fontSize: number); private getScopeContext; clearScope(scope: LexicalScope): void; queryUnitSize(unit: string, isRoot: boolean): number; evalName(scope: LexicalScope, qualifiedName: string): Val; evalCall(scope: LexicalScope, qualifiedName: string, params: Val[], noBuiltInEval: boolean): Val; evalMediaName(name: string, not: boolean): boolean; evalMediaTest(feature: string, value: Val): boolean; queryVal(scope: LexicalScope, key: string): Result | undefined; storeVal(scope: LexicalScope, key: string, val: Result): void; } type DependencyCache = { [key: string]: boolean | Special; }; class Val { scope: LexicalScope; key: string; constructor(scope: LexicalScope); toString(): string; appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; expand(context: Context, params: Val[]): Val; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; dependOuter(other: Val, context: Context, dependencyCache: DependencyCache): boolean; depend(other: Val, context: Context): boolean; evaluate(context: Context): Result; isMediaName(): boolean; } class Prefix extends Val { val: Val; constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Infix extends Val { lhs: Val; rhs: Val; constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } class Logical extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Comparison extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Additive extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Multiplicative extends Infix { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getPriority(): number; } class Not extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class Negate extends Prefix { constructor(scope: LexicalScope, val: Val); getOp(): string; evalPrefix(val: Result): Result; } class And extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class AndMedia extends And { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Or extends Logical { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evaluateCore(context: Context): Result; } class OrMedia extends Or { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; } class Lt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Le extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Gt extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ge extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Eq extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Ne extends Comparison { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Add extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Subtract extends Additive { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Multiply extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Divide extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Modulo extends Multiplicative { constructor(scope: LexicalScope, lhs: Val, rhs: Val); getOp(): string; evalInfix(lhs: Result, rhs: Result): Result; } class Numeric extends Val { num: number; unit: string; constructor(scope: LexicalScope, num: number, unit: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class Named extends Val { qualifiedName: string; constructor(scope: LexicalScope, qualifiedName: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; } class MediaName extends Val { not: boolean; name: string; value: Val; constructor(scope: LexicalScope, not: boolean, name: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; isMediaName(): boolean; } class Native extends Val { fn: () => Result; str: string; constructor(scope: LexicalScope, fn: () => Result, str: string); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } function appendValArray(buf: Base.StringBuffer, arr: Val[]): void; function expandValArray(context: Context, arr: Val[], params: Val[]): Val[]; function evalValArray(context: Context, arr: Val[]): Result[]; class Call extends Val { qualifiedName: string; params: Val[]; constructor(scope: LexicalScope, qualifiedName: string, params: Val[]); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Cond extends Val { cond: Val; ifTrue: Val; ifFalse: Val; constructor(scope: LexicalScope, cond: Val, ifTrue: Val, ifFalse: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Const extends Val { val: Result; constructor(scope: LexicalScope, val: Result); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; } class MediaTest extends Val { name: MediaName; value: Val; constructor(scope: LexicalScope, name: MediaName, value: Val); appendTo(buf: Base.StringBuffer, priority: number): void; evaluateCore(context: Context): Result; dependCore(other: Val, context: Context, dependencyCache: DependencyCache): boolean; expand(context: Context, params: Val[]): Val; } class Param extends Val { index: number; constructor(scope: LexicalScope, index: number); appendTo(buf: Base.StringBuffer, priority: number): void; expand(context: Context, params: Val[]): Val; } function and(scope: LexicalScope, v1: Val, v2: Val): Val; function add(scope: LexicalScope, v1: Val, v2: Val): Val; function sub(scope: LexicalScope, v1: Val, v2: Val): Val; function mul(scope: LexicalScope, v1: Val, v2: Val): Val; function div(scope: LexicalScope, v1: Val, v2: Val): Val; } declare namespace Font { const traitProps: { [key: string]: Css.Val; }; const bogusFontData: string; let bogusFontCounter: number; function makeFontTraitKey(properties: { [key: string]: Css.Val; }): string; function fillDefaults(properties: { [key: string]: Css.Val; }): void; function prepareProperties(properties: CssCascade_$0.ElementStyle, context: Exprs.Context): { [key: string]: Css.Val; }; class Face { readonly properties: { [key: string]: Css.Val; }; fontTraitKey: string; src: string | null; blobURLs: string[]; blobs: Blob[]; family: string | null; constructor(properties: { [key: string]: Css.Val; }); traitsEqual(other: Face): boolean; makeAtRule(src: string, fontBytes: Blob): string; } class DocumentFaces { readonly deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; familyMap: { [key: string]: string; }; constructor(deobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null); registerFamily(srcFace: Face, viewFace: Face): void; filterFontFamily(val: Css.Val): Css.Val; } class Mapper { readonly head: Element; readonly body: Element; srcURLMap: { [key: string]: TaskUtil.Fetcher; }; familyPrefix: string; familyCounter: number; constructor(head: Element, body: Element, opt_familyPrefix?: string); getViewFontFamily(srcFace: Face, documentFaces: DocumentFaces): string; private initFont; loadFont(srcFace: Face, documentFaces: DocumentFaces): TaskUtil.Fetcher; findOrLoadFonts(srcFaces: Face[], documentFaces: DocumentFaces): Task.Result; } } declare namespace OPS { const uaStylesheetBaseFetcher: TaskUtil.Fetcher; function loadUABase(): Task.Result; type FontFace = { properties: CssCascade.ElementStyle; condition: Exprs.Val; }; class Style { readonly store: OPSDocStore; readonly rootScope: Exprs.LexicalScope; readonly pageScope: Exprs.LexicalScope; readonly cascade: CssCascade.Cascade; readonly rootBox: PageMaster.RootPageBox; readonly fontFaces: FontFace[]; readonly footnoteProps: CssCascade.ElementStyle; readonly flowProps: { [key: string]: CssCascade.ElementStyle; }; readonly viewportProps: CssCascade.ElementStyle[]; readonly pageProps: { [key: string]: CssCascade.ElementStyle; }; fontDeobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; validatorSet: CssValidator.ValidatorSet; constructor(store: OPSDocStore, rootScope: Exprs.LexicalScope, pageScope: Exprs.LexicalScope, cascade: CssCascade.Cascade, rootBox: PageMaster.RootPageBox, fontFaces: FontFace[], footnoteProps: CssCascade.ElementStyle, flowProps: { [key: string]: CssCascade.ElementStyle; }, viewportProps: CssCascade.ElementStyle[], pageProps: { [key: string]: CssCascade.ElementStyle; }); sizeViewport(viewportWidth: number, viewportHeight: number, fontSize: number, pref?: Exprs.Preferences): { width: number; height: number; fontSize: number; }; } class StyleInstance extends Exprs.Context implements CssStyler_$0.FlowListener, PageMaster.InstanceHolder, Vgen.StylerProducer { readonly style: Style; readonly xmldoc: XmlDoc_$0.XMLDocHolder; readonly viewport: Vgen.Viewport; readonly clientLayout: Vtree_$0.ClientLayout; readonly fontMapper: Font.Mapper; readonly customRenderer: Vgen.CustomRenderer; readonly fallbackMap: { [key: string]: string; }; readonly pageNumberOffset: number; readonly documentURLTransformer: Base.DocumentURLTransformer; readonly counterStore: Counters.CounterStore; lang: string | null; primaryFlows: { [key: string]: boolean; }; rootPageBoxInstance: PageMaster.RootPageBoxInstance; styler: CssStyler_$0.Styler; stylerMap: { [key: string]: CssStyler_$0.Styler; }; currentLayoutPosition: Vtree_$0.LayoutPosition; layoutPositionAtPageStart: Vtree_$0.LayoutPosition; lookupOffset: number; faces: Font.DocumentFaces; pageBoxInstances: { [key: string]: PageMaster.PageBoxInstance; }; pageManager: CssPage.PageManager; private rootPageFloatLayoutContext; pageBreaks: { [key: string]: boolean; }; pageProgression: Constants.PageProgression | null; pageSheetSize: { [key: string]: { width: number; height: number; }; }; pageSheetHeight: number; pageSheetWidth: number; actualPageWidth: number; actualPageHeight: number; constructor(style: Style, xmldoc: XmlDoc_$0.XMLDocHolder, defaultLang: string | null, viewport: Vgen.Viewport, clientLayout: Vtree_$0.ClientLayout, fontMapper: Font.Mapper, customRenderer: Vgen.CustomRenderer, fallbackMap: { [key: string]: string; }, pageNumberOffset: number, documentURLTransformer: Base.DocumentURLTransformer, counterStore: Counters.CounterStore, pageProgression?: Constants.PageProgression); init(): Task.Result; getStylerForDoc(xmldoc: XmlDoc_$0.XMLDocHolder): CssStyler_$0.AbstractStyler; registerInstance(key: string, instance: PageMaster.PageBoxInstance): void; lookupInstance(key: string): PageMaster.PageBoxInstance; encounteredFlowChunk(flowChunk: Vtree_$0.FlowChunk, flow: Vtree_$0.Flow): any; getConsumedOffset(flowPosition: Vtree_$0.FlowPosition): number; getPosition(layoutPosition?: Vtree_$0.LayoutPosition, noLookAhead?: boolean): number; dumpLocation(position: any): void; matchPageSide(side: string): boolean; updateStartSide(layoutPosition: Vtree_$0.LayoutPosition): void; selectPageMaster(cascadedPageStyle: CssCascade.ElementStyle): PageMaster.PageMasterInstance; flowChunkIsAfterParentFlowForcedBreak(flowChunk: Vtree_$0.FlowChunk): boolean; setFormattingContextToColumn(column: LayoutType.Column, flowName: string): void; layoutDeferredPageFloats(column: LayoutType.Column): Task.Result; getLastAfterPositionIfDeferredFloatsExists(column: LayoutType.Column, newPosition: Vtree_$0.ChunkPosition | null): Vtree_$0.ChunkPosition | null; layoutColumn(column: LayoutType.Column, flowName: string): Task.Result; createLayoutConstraint(pageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext): LayoutType.LayoutConstraint; private createAndLayoutColumn; setPagePageFloatLayoutContextContainer(pagePageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext, boxInstance: PageMaster.PageBoxInstance, layoutContainer: Vtree_$0.Container): void; getRegionPageFloatLayoutContext(pagePageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext, boxInstance: PageMaster.PageBoxInstance, layoutContainer: Vtree_$0.Container, flowName: string): PageFloats_$0.PageFloatLayoutContext; layoutFlowColumnsWithBalancing(page: Vtree_$0.Page, boxInstance: PageMaster.PageBoxInstance, offsetX: number, offsetY: number, exclusions: GeometryUtil.Shape[], pagePageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext, layoutContainer: Vtree_$0.Container, flowNameStr: string, columnCount: number): Task.Result; layoutFlowColumns(page: Vtree_$0.Page, boxInstance: PageMaster.PageBoxInstance, offsetX: number, offsetY: number, exclusions: GeometryUtil.Shape[], pagePageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext, regionPageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext, layoutContainer: Vtree_$0.Container, flowNameStr: string, columnCount: number, forceNonFitting: boolean): Task.Result; layoutContainer(page: Vtree_$0.Page, boxInstance: PageMaster.PageBoxInstance, parentContainer: HTMLElement, offsetX: number, offsetY: number, exclusions: GeometryUtil.Shape[], pagePageFloatLayoutContext: PageFloats_$0.PageFloatLayoutContext): Task.Result; processLinger(): void; initLingering(): void; noMorePrimaryFlows(cp: Vtree_$0.LayoutPosition): boolean; layoutNextPage(page: Vtree_$0.Page, cp?: Vtree_$0.LayoutPosition): Task.Result; private setPageSizeAndBleed; } class BaseParserHandler extends CssCascade.CascadeParserHandler { masterHandler: StyleParserHandler; insideRegion: boolean; constructor(masterHandler: StyleParserHandler, condition: Exprs.Val, parent: BaseParserHandler, regionId: string | null); startPageTemplateRule(): void; startPageMasterRule(name: string | null, pseudoName: string | null, classes: string[]): void; startWhenRule(expr: Css.Expr): void; startDefineRule(): void; startFontFaceRule(): void; startFlowRule(flowName: string): void; startViewportRule(): void; startFootnoteRule(pseudoelem: string | null): void; startRegionRule(): void; startPageRule(): void; startRuleBody(): void; } function processViewportMeta(meta: Element): string; class StyleParserHandler extends CssParser.DispatchParserHandler { readonly validatorSet: CssValidator.ValidatorSet; rootScope: Exprs.LexicalScope; pageScope: Exprs.LexicalScope; rootBox: PageMaster.RootPageBox; cascadeParserHandler: BaseParserHandler; regionCount: number; fontFaces: FontFace[]; footnoteProps: CssCascade.ElementStyle; flowProps: { [key: string]: CssCascade.ElementStyle; }; viewportProps: CssCascade.ElementStyle[]; pageProps: { [key: string]: CssCascade.ElementStyle; }; slave: BaseParserHandler; constructor(validatorSet: CssValidator.ValidatorSet); error(mnemonics: string, token: CssTokenizer.Token): void; } type StyleSource = { url: string; text: string | null; flavor: CssParser.StylesheetFlavor; classes: string | null; media: string | null; }; function parseOPSResource(response: Net_$0.Response, store: XmlDoc_$0.XMLDocStore): Task.Result; class OPSDocStore extends Net_$0.ResourceStore { fontDeobfuscator: ((p1: string) => ((p1: Blob) => Task.Result) | null) | null; styleByKey: { [key: string]: Style; }; styleFetcherByKey: { [key: string]: TaskUtil.Fetcher