Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular/platform-browser

Package Overview
Dependencies
Maintainers
1
Versions
849
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/platform-browser - npm Package Compare versions

Comparing version 2.0.0-rc.5 to 2.0.0-rc.6

bundles/platform-browser-testing.umd.js

25

index.d.ts

@@ -8,20 +8,7 @@ /**

*/
export { BROWSER_APP_PROVIDERS, BROWSER_PLATFORM_PROVIDERS, BROWSER_SANITIZATION_PROVIDERS, BrowserModule, browserPlatform, platformBrowser } from './src/browser';
export { BrowserPlatformLocation } from './src/browser/location/browser_platform_location';
export { Title } from './src/browser/title';
export { disableDebugTools, enableDebugTools } from './src/browser/tools/tools';
export { AnimationDriver } from './src/dom/animation_driver';
export { By } from './src/dom/debug/by';
export { DOCUMENT } from './src/dom/dom_tokens';
export { EVENT_MANAGER_PLUGINS, EventManager } from './src/dom/events/event_manager';
export { HAMMER_GESTURE_CONFIG, HammerGestureConfig } from './src/dom/events/hammer_gestures';
export { DomSanitizationService, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from './src/security/dom_sanitization_service';
export { ClientMessageBroker, ClientMessageBrokerFactory, FnArg, UiArguments } from './src/web_workers/shared/client_message_broker';
export { PRIMITIVE } from './src/web_workers/shared/serializer';
export { ReceivedMessage, ServiceMessageBroker, ServiceMessageBrokerFactory } from './src/web_workers/shared/service_message_broker';
export * from './src/web_workers/shared/message_bus';
export { WORKER_APP_LOCATION_PROVIDERS } from './src/web_workers/worker/location_providers';
export { WORKER_UI_LOCATION_PROVIDERS } from './src/web_workers/ui/location_providers';
export * from './src/worker_render';
export * from './src/worker_app';
export * from './private_export';
/**
* @module
* @description
* Entry point for all public APIs of the platform-browser package.
*/
export * from './src/platform-browser';

@@ -8,54 +8,8 @@ /**

*/
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var browser_1 = require('./src/browser');
exports.BROWSER_APP_PROVIDERS = browser_1.BROWSER_APP_PROVIDERS;
exports.BROWSER_PLATFORM_PROVIDERS = browser_1.BROWSER_PLATFORM_PROVIDERS;
exports.BROWSER_SANITIZATION_PROVIDERS = browser_1.BROWSER_SANITIZATION_PROVIDERS;
exports.BrowserModule = browser_1.BrowserModule;
exports.browserPlatform = browser_1.browserPlatform;
exports.platformBrowser = browser_1.platformBrowser;
var browser_platform_location_1 = require('./src/browser/location/browser_platform_location');
exports.BrowserPlatformLocation = browser_platform_location_1.BrowserPlatformLocation;
var title_1 = require('./src/browser/title');
exports.Title = title_1.Title;
var tools_1 = require('./src/browser/tools/tools');
exports.disableDebugTools = tools_1.disableDebugTools;
exports.enableDebugTools = tools_1.enableDebugTools;
var animation_driver_1 = require('./src/dom/animation_driver');
exports.AnimationDriver = animation_driver_1.AnimationDriver;
var by_1 = require('./src/dom/debug/by');
exports.By = by_1.By;
var dom_tokens_1 = require('./src/dom/dom_tokens');
exports.DOCUMENT = dom_tokens_1.DOCUMENT;
var event_manager_1 = require('./src/dom/events/event_manager');
exports.EVENT_MANAGER_PLUGINS = event_manager_1.EVENT_MANAGER_PLUGINS;
exports.EventManager = event_manager_1.EventManager;
var hammer_gestures_1 = require('./src/dom/events/hammer_gestures');
exports.HAMMER_GESTURE_CONFIG = hammer_gestures_1.HAMMER_GESTURE_CONFIG;
exports.HammerGestureConfig = hammer_gestures_1.HammerGestureConfig;
var dom_sanitization_service_1 = require('./src/security/dom_sanitization_service');
exports.DomSanitizationService = dom_sanitization_service_1.DomSanitizationService;
// Web Workers
var client_message_broker_1 = require('./src/web_workers/shared/client_message_broker');
exports.ClientMessageBroker = client_message_broker_1.ClientMessageBroker;
exports.ClientMessageBrokerFactory = client_message_broker_1.ClientMessageBrokerFactory;
exports.FnArg = client_message_broker_1.FnArg;
exports.UiArguments = client_message_broker_1.UiArguments;
var serializer_1 = require('./src/web_workers/shared/serializer');
exports.PRIMITIVE = serializer_1.PRIMITIVE;
var service_message_broker_1 = require('./src/web_workers/shared/service_message_broker');
exports.ReceivedMessage = service_message_broker_1.ReceivedMessage;
exports.ServiceMessageBroker = service_message_broker_1.ServiceMessageBroker;
exports.ServiceMessageBrokerFactory = service_message_broker_1.ServiceMessageBrokerFactory;
__export(require('./src/web_workers/shared/message_bus'));
var location_providers_1 = require('./src/web_workers/worker/location_providers');
exports.WORKER_APP_LOCATION_PROVIDERS = location_providers_1.WORKER_APP_LOCATION_PROVIDERS;
var location_providers_2 = require('./src/web_workers/ui/location_providers');
exports.WORKER_UI_LOCATION_PROVIDERS = location_providers_2.WORKER_UI_LOCATION_PROVIDERS;
__export(require('./src/worker_render'));
__export(require('./src/worker_app'));
__export(require('./private_export'));
/**
* @module
* @description
* Entry point for all public APIs of the platform-browser package.
*/
export * from './src/platform-browser';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/browser","export":["BROWSER_APP_PROVIDERS","BROWSER_PLATFORM_PROVIDERS","BROWSER_SANITIZATION_PROVIDERS","BrowserModule","browserPlatform","platformBrowser"]},{"from":"./src/browser/location/browser_platform_location","export":["BrowserPlatformLocation"]},{"from":"./src/browser/title","export":["Title"]},{"from":"./src/browser/tools/tools","export":["disableDebugTools","enableDebugTools"]},{"from":"./src/dom/animation_driver","export":["AnimationDriver"]},{"from":"./src/dom/debug/by","export":["By"]},{"from":"./src/dom/dom_tokens","export":["DOCUMENT"]},{"from":"./src/dom/events/event_manager","export":["EVENT_MANAGER_PLUGINS","EventManager"]},{"from":"./src/dom/events/hammer_gestures","export":["HAMMER_GESTURE_CONFIG","HammerGestureConfig"]},{"from":"./src/security/dom_sanitization_service","export":["DomSanitizationService","SafeHtml","SafeResourceUrl","SafeScript","SafeStyle","SafeUrl"]},{"from":"./src/web_workers/shared/client_message_broker","export":["ClientMessageBroker","ClientMessageBrokerFactory","FnArg","UiArguments"]},{"from":"./src/web_workers/shared/serializer","export":["PRIMITIVE"]},{"from":"./src/web_workers/shared/service_message_broker","export":["ReceivedMessage","ServiceMessageBroker","ServiceMessageBrokerFactory"]},{"from":"./src/web_workers/shared/message_bus"},{"from":"./src/web_workers/worker/location_providers","export":["WORKER_APP_LOCATION_PROVIDERS"]},{"from":"./src/web_workers/ui/location_providers","export":["WORKER_UI_LOCATION_PROVIDERS"]},{"from":"./src/worker_render"},{"from":"./src/worker_app"},{"from":"./private_export"}]}
{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/platform-browser"}]}
{
"name": "@angular/platform-browser",
"version": "2.0.0-rc.5",
"description": "",
"main": "index.js",
"jsnext:main": "esm/index.js",
"version": "2.0.0-rc.6",
"description": "Angular 2 platform-browser",
"main": "bundles/platform-browser.umd.js",
"module": "index.js",
"typings": "index.d.ts",

@@ -11,5 +11,4 @@ "author": "angular",

"peerDependencies": {
"@angular/core": "^2.0.0-rc.5",
"@angular/common": "^2.0.0-rc.5",
"@angular/compiler": "^2.0.0-rc.5"
"@angular/core": "^2.0.0-rc.6",
"@angular/common": "^2.0.0-rc.6"
},

@@ -16,0 +15,0 @@ "repository": {

@@ -1,14 +0,5 @@

import { ExceptionHandler, PlatformRef } from '@angular/core';
import { ErrorHandler, PlatformRef, Provider } from '@angular/core';
import { AnimationDriver } from '../src/dom/animation_driver';
export declare const INTERNAL_BROWSER_PLATFORM_PROVIDERS: Array<any>;
export declare const INTERNAL_BROWSER_PLATFORM_PROVIDERS: Provider[];
/**
* A set of providers to initialize the Angular platform in a web browser.
*
* Used automatically by `bootstrap`, or can be passed to `platform`.
*
* @deprecated Use `platformBrowser()` or create a custom platform factory via
* `createPlatformFactory(platformBrowser, ...)`
*/
export declare const BROWSER_PLATFORM_PROVIDERS: Array<any>;
/**
* @security Replacing built-in sanitization providers exposes the application to XSS risks.

@@ -21,23 +12,7 @@ * Attacker-controlled data introduced by an unsanitized provider could expose your

/**
* A set of providers to initialize an Angular application in a web browser.
*
* Used automatically by `bootstrap`, or can be passed to {@link PlatformRef
* PlatformRef.application}.
*
* @deprecated Create a module that includes `BrowserModule` instead. This is empty for backwards
* compatibility,
* as all of our bootstrap methods add a module implicitly, i.e. keeping this filled would add the
* providers 2x.
* @stable
*/
export declare const BROWSER_APP_PROVIDERS: Array<any>;
/**
* @experimental API related to bootstrapping are still under review.
*/
export declare const platformBrowser: (extraProviders?: any[]) => PlatformRef;
/**
* @deprecated Use {@link platformBrowser} instead
*/
export declare const browserPlatform: (extraProviders?: any[]) => PlatformRef;
export declare const platformBrowser: (extraProviders?: Provider[]) => PlatformRef;
export declare function initDomAdapter(): void;
export declare function _exceptionHandler(): ExceptionHandler;
export declare function errorHandler(): ErrorHandler;
export declare function _document(): any;

@@ -48,5 +23,6 @@ export declare function _resolveDefaultAnimationDriver(): AnimationDriver;

*
* @experimental
* @stable
*/
export declare class BrowserModule {
constructor(parentModule: BrowserModule);
}

@@ -8,35 +8,24 @@ /**

*/
"use strict";
var common_1 = require('@angular/common');
var core_1 = require('@angular/core');
var core_private_1 = require('../core_private');
var animation_driver_1 = require('../src/dom/animation_driver');
var web_animations_driver_1 = require('../src/dom/web_animations_driver');
var browser_adapter_1 = require('./browser/browser_adapter');
var browser_platform_location_1 = require('./browser/location/browser_platform_location');
var testability_1 = require('./browser/testability');
var ng_probe_1 = require('./dom/debug/ng_probe');
var dom_adapter_1 = require('./dom/dom_adapter');
var dom_renderer_1 = require('./dom/dom_renderer');
var dom_tokens_1 = require('./dom/dom_tokens');
var dom_events_1 = require('./dom/events/dom_events');
var event_manager_1 = require('./dom/events/event_manager');
var hammer_gestures_1 = require('./dom/events/hammer_gestures');
var key_events_1 = require('./dom/events/key_events');
var shared_styles_host_1 = require('./dom/shared_styles_host');
var dom_sanitization_service_1 = require('./security/dom_sanitization_service');
exports.INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
{ provide: core_1.PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },
{ provide: common_1.PlatformLocation, useClass: browser_platform_location_1.BrowserPlatformLocation }
import { CommonModule, PlatformLocation } from '@angular/common';
import { ApplicationModule, ErrorHandler, NgModule, Optional, PLATFORM_INITIALIZER, RootRenderer, Sanitizer, SkipSelf, Testability, createPlatformFactory, platformCore } from '@angular/core';
import { AnimationDriver } from '../src/dom/animation_driver';
import { WebAnimationsDriver } from '../src/dom/web_animations_driver';
import { BrowserDomAdapter } from './browser/browser_adapter';
import { BrowserPlatformLocation } from './browser/location/browser_platform_location';
import { BrowserGetTestability } from './browser/testability';
import { ELEMENT_PROBE_PROVIDERS } from './dom/debug/ng_probe';
import { getDOM } from './dom/dom_adapter';
import { DomRootRenderer, DomRootRenderer_ } from './dom/dom_renderer';
import { DOCUMENT } from './dom/dom_tokens';
import { DomEventsPlugin } from './dom/events/dom_events';
import { EVENT_MANAGER_PLUGINS, EventManager } from './dom/events/event_manager';
import { HAMMER_GESTURE_CONFIG, HammerGestureConfig, HammerGesturesPlugin } from './dom/events/hammer_gestures';
import { KeyEventsPlugin } from './dom/events/key_events';
import { DomSharedStylesHost, SharedStylesHost } from './dom/shared_styles_host';
import { DomSanitizer, DomSanitizerImpl } from './security/dom_sanitization_service';
export var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
{ provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },
{ provide: PlatformLocation, useClass: BrowserPlatformLocation }
];
/**
* A set of providers to initialize the Angular platform in a web browser.
*
* Used automatically by `bootstrap`, or can be passed to `platform`.
*
* @deprecated Use `platformBrowser()` or create a custom platform factory via
* `createPlatformFactory(platformBrowser, ...)`
*/
exports.BROWSER_PLATFORM_PROVIDERS = [core_1.PLATFORM_COMMON_PROVIDERS, exports.INTERNAL_BROWSER_PLATFORM_PROVIDERS];
/**
* @security Replacing built-in sanitization providers exposes the application to XSS risks.

@@ -47,73 +36,61 @@ * Attacker-controlled data introduced by an unsanitized provider could expose your

*/
exports.BROWSER_SANITIZATION_PROVIDERS = [
{ provide: core_1.SanitizationService, useExisting: dom_sanitization_service_1.DomSanitizationService },
{ provide: dom_sanitization_service_1.DomSanitizationService, useClass: dom_sanitization_service_1.DomSanitizationServiceImpl },
export var BROWSER_SANITIZATION_PROVIDERS = [
{ provide: Sanitizer, useExisting: DomSanitizer },
{ provide: DomSanitizer, useClass: DomSanitizerImpl },
];
/**
* A set of providers to initialize an Angular application in a web browser.
*
* Used automatically by `bootstrap`, or can be passed to {@link PlatformRef
* PlatformRef.application}.
*
* @deprecated Create a module that includes `BrowserModule` instead. This is empty for backwards
* compatibility,
* as all of our bootstrap methods add a module implicitly, i.e. keeping this filled would add the
* providers 2x.
* @stable
*/
exports.BROWSER_APP_PROVIDERS = [];
/**
* @experimental API related to bootstrapping are still under review.
*/
exports.platformBrowser = core_1.createPlatformFactory(core_1.platformCore, 'browser', exports.INTERNAL_BROWSER_PLATFORM_PROVIDERS);
/**
* @deprecated Use {@link platformBrowser} instead
*/
exports.browserPlatform = exports.platformBrowser;
function initDomAdapter() {
browser_adapter_1.BrowserDomAdapter.makeCurrent();
core_private_1.wtfInit();
testability_1.BrowserGetTestability.init();
export var platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
export function initDomAdapter() {
BrowserDomAdapter.makeCurrent();
BrowserGetTestability.init();
}
exports.initDomAdapter = initDomAdapter;
function _exceptionHandler() {
return new core_1.ExceptionHandler(dom_adapter_1.getDOM());
export function errorHandler() {
return new ErrorHandler();
}
exports._exceptionHandler = _exceptionHandler;
function _document() {
return dom_adapter_1.getDOM().defaultDoc();
export function _document() {
return getDOM().defaultDoc();
}
exports._document = _document;
function _resolveDefaultAnimationDriver() {
if (dom_adapter_1.getDOM().supportsWebAnimation()) {
return new web_animations_driver_1.WebAnimationsDriver();
export function _resolveDefaultAnimationDriver() {
if (getDOM().supportsWebAnimation()) {
return new WebAnimationsDriver();
}
return animation_driver_1.AnimationDriver.NOOP;
return AnimationDriver.NOOP;
}
exports._resolveDefaultAnimationDriver = _resolveDefaultAnimationDriver;
var BrowserModule = (function () {
function BrowserModule() {
/**
* The ng module for the browser.
*
* @stable
*/
export var BrowserModule = (function () {
function BrowserModule(parentModule) {
if (parentModule) {
throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.");
}
}
/** @nocollapse */
BrowserModule.decorators = [
{ type: core_1.NgModule, args: [{
{ type: NgModule, args: [{
providers: [
exports.BROWSER_SANITIZATION_PROVIDERS,
{ provide: core_1.ExceptionHandler, useFactory: _exceptionHandler, deps: [] },
{ provide: dom_tokens_1.DOCUMENT, useFactory: _document, deps: [] },
{ provide: event_manager_1.EVENT_MANAGER_PLUGINS, useClass: dom_events_1.DomEventsPlugin, multi: true },
{ provide: event_manager_1.EVENT_MANAGER_PLUGINS, useClass: key_events_1.KeyEventsPlugin, multi: true },
{ provide: event_manager_1.EVENT_MANAGER_PLUGINS, useClass: hammer_gestures_1.HammerGesturesPlugin, multi: true },
{ provide: hammer_gestures_1.HAMMER_GESTURE_CONFIG, useClass: hammer_gestures_1.HammerGestureConfig },
{ provide: dom_renderer_1.DomRootRenderer, useClass: dom_renderer_1.DomRootRenderer_ },
{ provide: core_1.RootRenderer, useExisting: dom_renderer_1.DomRootRenderer },
{ provide: shared_styles_host_1.SharedStylesHost, useExisting: shared_styles_host_1.DomSharedStylesHost },
{ provide: animation_driver_1.AnimationDriver, useFactory: _resolveDefaultAnimationDriver }, shared_styles_host_1.DomSharedStylesHost,
core_1.Testability, event_manager_1.EventManager, ng_probe_1.ELEMENT_PROBE_PROVIDERS
BROWSER_SANITIZATION_PROVIDERS, { provide: ErrorHandler, useFactory: errorHandler, deps: [] },
{ provide: DOCUMENT, useFactory: _document, deps: [] },
{ provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true },
{ provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true },
{ provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true },
{ provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig },
{ provide: DomRootRenderer, useClass: DomRootRenderer_ },
{ provide: RootRenderer, useExisting: DomRootRenderer },
{ provide: SharedStylesHost, useExisting: DomSharedStylesHost },
{ provide: AnimationDriver, useFactory: _resolveDefaultAnimationDriver }, DomSharedStylesHost,
Testability, EventManager, ELEMENT_PROBE_PROVIDERS
],
exports: [common_1.CommonModule, core_1.ApplicationModule]
exports: [CommonModule, ApplicationModule]
},] },
];
/** @nocollapse */
BrowserModule.ctorParameters = [
{ type: BrowserModule, decorators: [{ type: Optional }, { type: SkipSelf },] },
];
return BrowserModule;
}());
exports.BrowserModule = BrowserModule;
//# sourceMappingURL=browser.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"INTERNAL_BROWSER_PLATFORM_PROVIDERS":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_INITIALIZER"},"useValue":{"__symbolic":"reference","name":"initDomAdapter"},"multi":true},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},"useClass":{"__symbolic":"reference","module":"./browser/location/browser_platform_location","name":"BrowserPlatformLocation"}}],"BROWSER_PLATFORM_PROVIDERS":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_COMMON_PROVIDERS"},{"__symbolic":"reference","name":"INTERNAL_BROWSER_PLATFORM_PROVIDERS"}],"BROWSER_SANITIZATION_PROVIDERS":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"SanitizationService"},"useExisting":{"__symbolic":"reference","module":"./security/dom_sanitization_service","name":"DomSanitizationService"}},{"provide":{"__symbolic":"reference","module":"./security/dom_sanitization_service","name":"DomSanitizationService"},"useClass":{"__symbolic":"reference","module":"./security/dom_sanitization_service","name":"DomSanitizationServiceImpl"}}],"BROWSER_APP_PROVIDERS":[],"platformBrowser":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"platformCore"},"browser",{"__symbolic":"reference","name":"INTERNAL_BROWSER_PLATFORM_PROVIDERS"}]},"browserPlatform":{"__symbolic":"reference","name":"platformBrowser"},"_exceptionHandler":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"ExceptionHandler"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./dom/dom_adapter","name":"getDOM"}}]}},"_document":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./dom/dom_adapter","name":"getDOM"}},"member":"defaultDoc"}}},"BrowserModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"providers":[{"__symbolic":"reference","name":"BROWSER_SANITIZATION_PROVIDERS"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ExceptionHandler"},"useFactory":{"__symbolic":"reference","name":"_exceptionHandler"},"deps":[]},{"provide":{"__symbolic":"reference","module":"./dom/dom_tokens","name":"DOCUMENT"},"useFactory":{"__symbolic":"reference","name":"_document"},"deps":[]},{"provide":{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EVENT_MANAGER_PLUGINS"},"useClass":{"__symbolic":"reference","module":"./dom/events/dom_events","name":"DomEventsPlugin"},"multi":true},{"provide":{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EVENT_MANAGER_PLUGINS"},"useClass":{"__symbolic":"reference","module":"./dom/events/key_events","name":"KeyEventsPlugin"},"multi":true},{"provide":{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EVENT_MANAGER_PLUGINS"},"useClass":{"__symbolic":"reference","module":"./dom/events/hammer_gestures","name":"HammerGesturesPlugin"},"multi":true},{"provide":{"__symbolic":"reference","module":"./dom/events/hammer_gestures","name":"HAMMER_GESTURE_CONFIG"},"useClass":{"__symbolic":"reference","module":"./dom/events/hammer_gestures","name":"HammerGestureConfig"}},{"provide":{"__symbolic":"reference","module":"./dom/dom_renderer","name":"DomRootRenderer"},"useClass":{"__symbolic":"reference","module":"./dom/dom_renderer","name":"DomRootRenderer_"}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"RootRenderer"},"useExisting":{"__symbolic":"reference","module":"./dom/dom_renderer","name":"DomRootRenderer"}},{"provide":{"__symbolic":"reference","module":"./dom/shared_styles_host","name":"SharedStylesHost"},"useExisting":{"__symbolic":"reference","module":"./dom/shared_styles_host","name":"DomSharedStylesHost"}},{"provide":{"__symbolic":"reference","module":"../src/dom/animation_driver","name":"AnimationDriver"},"useFactory":{"__symbolic":"reference","name":"_resolveDefaultAnimationDriver"}},{"__symbolic":"reference","module":"./dom/shared_styles_host","name":"DomSharedStylesHost"},{"__symbolic":"reference","module":"@angular/core","name":"Testability"},{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EventManager"},{"__symbolic":"reference","module":"./dom/debug/ng_probe","name":"ELEMENT_PROBE_PROVIDERS"}],"exports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationModule"}]}]}]}}}
{"__symbolic":"module","version":1,"metadata":{"INTERNAL_BROWSER_PLATFORM_PROVIDERS":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_INITIALIZER"},"useValue":{"__symbolic":"reference","name":"initDomAdapter"},"multi":true},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},"useClass":{"__symbolic":"reference","module":"./browser/location/browser_platform_location","name":"BrowserPlatformLocation"}}],"BROWSER_SANITIZATION_PROVIDERS":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"Sanitizer"},"useExisting":{"__symbolic":"reference","module":"./security/dom_sanitization_service","name":"DomSanitizer"}},{"provide":{"__symbolic":"reference","module":"./security/dom_sanitization_service","name":"DomSanitizer"},"useClass":{"__symbolic":"reference","module":"./security/dom_sanitization_service","name":"DomSanitizerImpl"}}],"platformBrowser":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"createPlatformFactory"},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"platformCore"},"browser",{"__symbolic":"reference","name":"INTERNAL_BROWSER_PLATFORM_PROVIDERS"}]},"errorHandler":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"ErrorHandler"}}},"_document":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./dom/dom_adapter","name":"getDOM"}},"member":"defaultDoc"}}},"BrowserModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"providers":[{"__symbolic":"reference","name":"BROWSER_SANITIZATION_PROVIDERS"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ErrorHandler"},"useFactory":{"__symbolic":"reference","name":"errorHandler"},"deps":[]},{"provide":{"__symbolic":"reference","module":"./dom/dom_tokens","name":"DOCUMENT"},"useFactory":{"__symbolic":"reference","name":"_document"},"deps":[]},{"provide":{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EVENT_MANAGER_PLUGINS"},"useClass":{"__symbolic":"reference","module":"./dom/events/dom_events","name":"DomEventsPlugin"},"multi":true},{"provide":{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EVENT_MANAGER_PLUGINS"},"useClass":{"__symbolic":"reference","module":"./dom/events/key_events","name":"KeyEventsPlugin"},"multi":true},{"provide":{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EVENT_MANAGER_PLUGINS"},"useClass":{"__symbolic":"reference","module":"./dom/events/hammer_gestures","name":"HammerGesturesPlugin"},"multi":true},{"provide":{"__symbolic":"reference","module":"./dom/events/hammer_gestures","name":"HAMMER_GESTURE_CONFIG"},"useClass":{"__symbolic":"reference","module":"./dom/events/hammer_gestures","name":"HammerGestureConfig"}},{"provide":{"__symbolic":"reference","module":"./dom/dom_renderer","name":"DomRootRenderer"},"useClass":{"__symbolic":"reference","module":"./dom/dom_renderer","name":"DomRootRenderer_"}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"RootRenderer"},"useExisting":{"__symbolic":"reference","module":"./dom/dom_renderer","name":"DomRootRenderer"}},{"provide":{"__symbolic":"reference","module":"./dom/shared_styles_host","name":"SharedStylesHost"},"useExisting":{"__symbolic":"reference","module":"./dom/shared_styles_host","name":"DomSharedStylesHost"}},{"provide":{"__symbolic":"reference","module":"../src/dom/animation_driver","name":"AnimationDriver"},"useFactory":{"__symbolic":"reference","name":"_resolveDefaultAnimationDriver"}},{"__symbolic":"reference","module":"./dom/shared_styles_host","name":"DomSharedStylesHost"},{"__symbolic":"reference","module":"@angular/core","name":"Testability"},{"__symbolic":"reference","module":"./dom/events/event_manager","name":"EventManager"},{"__symbolic":"reference","module":"./dom/debug/ng_probe","name":"ELEMENT_PROBE_PROVIDERS"}],"exports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@angular/core","name":"ApplicationModule"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}]],"parameters":[{"__symbolic":"reference","name":"BrowserModule"}]}]}}}}
import { GenericBrowserDomAdapter } from './generic_browser_adapter';
/**
* A `DomAdapter` powered by full browser DOM APIs.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/

@@ -112,4 +115,2 @@ export declare class BrowserDomAdapter extends GenericBrowserDomAdapter {

setGlobalVar(path: string, value: any): void;
requestAnimationFrame(callback: any): number;
cancelAnimationFrame(id: number): void;
supportsWebAnimation(): boolean;

@@ -116,0 +117,0 @@ performanceNow(): number;

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,6 +14,6 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var dom_adapter_1 = require('../dom/dom_adapter');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var generic_browser_adapter_1 = require('./generic_browser_adapter');
import { setRootDomAdapter } from '../dom/dom_adapter';
import { ListWrapper } from '../facade/collection';
import { DateWrapper, global, isBlank, isFunction, isPresent, setValueOnPath } from '../facade/lang';
import { GenericBrowserDomAdapter } from './generic_browser_adapter';
var _attrToPropMap = {

@@ -68,5 +67,8 @@ 'class': 'className',

* A `DomAdapter` powered by full browser DOM APIs.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
/* tslint:disable:requireParameterType */
var BrowserDomAdapter = (function (_super) {
export var BrowserDomAdapter = (function (_super) {
__extends(BrowserDomAdapter, _super);

@@ -77,3 +79,3 @@ function BrowserDomAdapter() {

BrowserDomAdapter.prototype.parse = function (templateHtml) { throw new Error('parse not implemented'); };
BrowserDomAdapter.makeCurrent = function () { dom_adapter_1.setRootDomAdapter(new BrowserDomAdapter()); };
BrowserDomAdapter.makeCurrent = function () { setRootDomAdapter(new BrowserDomAdapter()); };
BrowserDomAdapter.prototype.hasProperty = function (element /** TODO #9100 */, name) { return name in element; };

@@ -146,3 +148,3 @@ BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };

BrowserDomAdapter.prototype.isPrevented = function (evt) {
return evt.defaultPrevented || lang_1.isPresent(evt.returnValue) && !evt.returnValue;
return evt.defaultPrevented || isPresent(evt.returnValue) && !evt.returnValue;
};

@@ -171,3 +173,3 @@ BrowserDomAdapter.prototype.getInnerHTML = function (el /** TODO #9100 */) { return el.innerHTML; };

var childNodes = el.childNodes;
var res = collection_1.ListWrapper.createFixedSize(childNodes.length);
var res = ListWrapper.createFixedSize(childNodes.length);
for (var i = 0; i < childNodes.length; i++) {

@@ -348,3 +350,3 @@ res[i] = childNodes[i];

BrowserDomAdapter.prototype.hasShadowRoot = function (node /** TODO #9100 */) {
return node instanceof HTMLElement && lang_1.isPresent(node.shadowRoot);
return isPresent(node.shadowRoot) && node instanceof HTMLElement;
};

@@ -363,3 +365,3 @@ BrowserDomAdapter.prototype.isShadowRoot = function (node /** TODO #9100 */) { return node instanceof DocumentFragment; };

var key = event.key;
if (lang_1.isBlank(key)) {
if (isBlank(key)) {
key = event.keyIdentifier;

@@ -370,3 +372,3 @@ // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and

// http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
if (lang_1.isBlank(key)) {
if (isBlank(key)) {
return 'Unidentified';

@@ -404,3 +406,3 @@ }

var href = getBaseElementHref();
if (lang_1.isBlank(href)) {
if (isBlank(href)) {
return null;

@@ -420,16 +422,12 @@ }

// TODO(tbosch): move this into a separate environment class once we have it
BrowserDomAdapter.prototype.setGlobalVar = function (path, value) { lang_1.setValueOnPath(lang_1.global, path, value); };
BrowserDomAdapter.prototype.requestAnimationFrame = function (callback /** TODO #9100 */) {
return window.requestAnimationFrame(callback);
};
BrowserDomAdapter.prototype.cancelAnimationFrame = function (id) { window.cancelAnimationFrame(id); };
BrowserDomAdapter.prototype.supportsWebAnimation = function () { return lang_1.isFunction(Element.prototype['animate']); };
BrowserDomAdapter.prototype.setGlobalVar = function (path, value) { setValueOnPath(global, path, value); };
BrowserDomAdapter.prototype.supportsWebAnimation = function () { return isFunction(Element.prototype['animate']); };
BrowserDomAdapter.prototype.performanceNow = function () {
// performance.now() is not available in all browsers, see
// http://caniuse.com/#search=performance.now
if (lang_1.isPresent(window.performance) && lang_1.isPresent(window.performance.now)) {
if (isPresent(window.performance) && isPresent(window.performance.now)) {
return window.performance.now();
}
else {
return lang_1.DateWrapper.toMillis(lang_1.DateWrapper.now());
return DateWrapper.toMillis(DateWrapper.now());
}

@@ -445,9 +443,8 @@ };

return BrowserDomAdapter;
}(generic_browser_adapter_1.GenericBrowserDomAdapter));
exports.BrowserDomAdapter = BrowserDomAdapter;
}(GenericBrowserDomAdapter));
var baseElement = null;
function getBaseElementHref() {
if (lang_1.isBlank(baseElement)) {
if (isBlank(baseElement)) {
baseElement = document.querySelector('base');
if (lang_1.isBlank(baseElement)) {
if (isBlank(baseElement)) {
return null;

@@ -461,3 +458,3 @@ }

function relativePath(url /** TODO #9100 */) {
if (lang_1.isBlank(urlParsingNode)) {
if (isBlank(urlParsingNode)) {
urlParsingNode = document.createElement('a');

@@ -469,3 +466,3 @@ }

}
function parseCookieValue(cookieStr, name) {
export function parseCookieValue(cookieStr, name) {
name = encodeURIComponent(name);

@@ -482,3 +479,2 @@ for (var _i = 0, _a = cookieStr.split(';'); _i < _a.length; _i++) {

}
exports.parseCookieValue = parseCookieValue;
//# sourceMappingURL=browser_adapter.js.map

@@ -11,2 +11,5 @@ /**

* Provides DOM operations in any browser environment.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/

@@ -13,0 +16,0 @@ export declare abstract class GenericBrowserDomAdapter extends DomAdapter {

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,9 +14,12 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var dom_adapter_1 = require('../dom/dom_adapter');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
import { DomAdapter } from '../dom/dom_adapter';
import { StringMapWrapper } from '../facade/collection';
import { isFunction, isPresent } from '../facade/lang';
/**
* Provides DOM operations in any browser environment.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
var GenericBrowserDomAdapter = (function (_super) {
export var GenericBrowserDomAdapter = (function (_super) {
__extends(GenericBrowserDomAdapter, _super);

@@ -31,3 +33,3 @@ function GenericBrowserDomAdapter() {

var element = this.createElement('div', this.defaultDoc());
if (lang_1.isPresent(this.getStyle(element, 'animationName'))) {
if (isPresent(this.getStyle(element, 'animationName'))) {
this._animationPrefix = '';

@@ -38,3 +40,3 @@ }

for (var i = 0; i < domPrefixes.length; i++) {
if (lang_1.isPresent(this.getStyle(element, domPrefixes[i] + 'AnimationName'))) {
if (isPresent(this.getStyle(element, domPrefixes[i] + 'AnimationName'))) {
this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';

@@ -51,4 +53,4 @@ break;

};
collection_1.StringMapWrapper.forEach(transEndEventNames, function (value, key) {
if (lang_1.isPresent(_this.getStyle(element, key))) {
StringMapWrapper.forEach(transEndEventNames, function (value, key) {
if (isPresent(_this.getStyle(element, key))) {
_this._transitionEnd = value;

@@ -69,14 +71,13 @@ }

GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM = function () {
return lang_1.isFunction(this.defaultDoc().body.createShadowRoot);
return isFunction(this.defaultDoc().body.createShadowRoot);
};
GenericBrowserDomAdapter.prototype.getAnimationPrefix = function () {
return lang_1.isPresent(this._animationPrefix) ? this._animationPrefix : '';
return isPresent(this._animationPrefix) ? this._animationPrefix : '';
};
GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return lang_1.isPresent(this._transitionEnd) ? this._transitionEnd : ''; };
GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return isPresent(this._transitionEnd) ? this._transitionEnd : ''; };
GenericBrowserDomAdapter.prototype.supportsAnimation = function () {
return lang_1.isPresent(this._animationPrefix) && lang_1.isPresent(this._transitionEnd);
return isPresent(this._animationPrefix) && isPresent(this._transitionEnd);
};
return GenericBrowserDomAdapter;
}(dom_adapter_1.DomAdapter));
exports.GenericBrowserDomAdapter = GenericBrowserDomAdapter;
}(DomAdapter));
//# sourceMappingURL=generic_browser_adapter.js.map

@@ -8,3 +8,3 @@ /**

*/
import { PlatformLocation, UrlChangeListener } from '@angular/common';
import { LocationChangeListener, PlatformLocation } from '@angular/common';
/**

@@ -14,4 +14,2 @@ * `PlatformLocation` encapsulates all of the direct calls to platform APIs.

* {@link Location}.
*
* @stable
*/

@@ -22,5 +20,6 @@ export declare class BrowserPlatformLocation extends PlatformLocation {

constructor();
location: Location;
getBaseHrefFromDOM(): string;
onPopState(fn: UrlChangeListener): void;
onHashChange(fn: UrlChangeListener): void;
onPopState(fn: LocationChangeListener): void;
onHashChange(fn: LocationChangeListener): void;
pathname: string;

@@ -27,0 +26,0 @@ search: string;

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,7 +14,12 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var common_1 = require('@angular/common');
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../../dom/dom_adapter');
var history_1 = require('./history');
var BrowserPlatformLocation = (function (_super) {
import { PlatformLocation } from '@angular/common';
import { Injectable } from '@angular/core';
import { getDOM } from '../../dom/dom_adapter';
import { supportsState } from './history';
/**
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
* This class should not be used directly by an application developer. Instead, use
* {@link Location}.
*/
export var BrowserPlatformLocation = (function (_super) {
__extends(BrowserPlatformLocation, _super);

@@ -29,7 +33,6 @@ function BrowserPlatformLocation() {

BrowserPlatformLocation.prototype._init = function () {
this._location = dom_adapter_1.getDOM().getLocation();
this._history = dom_adapter_1.getDOM().getHistory();
this._location = getDOM().getLocation();
this._history = getDOM().getHistory();
};
Object.defineProperty(BrowserPlatformLocation.prototype, "location", {
/** @internal */
get: function () { return this._location; },

@@ -39,8 +42,8 @@ enumerable: true,

});
BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return dom_adapter_1.getDOM().getBaseHref(); };
BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return getDOM().getBaseHref(); };
BrowserPlatformLocation.prototype.onPopState = function (fn) {
dom_adapter_1.getDOM().getGlobalEventTarget('window').addEventListener('popstate', fn, false);
getDOM().getGlobalEventTarget('window').addEventListener('popstate', fn, false);
};
BrowserPlatformLocation.prototype.onHashChange = function (fn) {
dom_adapter_1.getDOM().getGlobalEventTarget('window').addEventListener('hashchange', fn, false);
getDOM().getGlobalEventTarget('window').addEventListener('hashchange', fn, false);
};

@@ -64,3 +67,3 @@ Object.defineProperty(BrowserPlatformLocation.prototype, "pathname", {

BrowserPlatformLocation.prototype.pushState = function (state, title, url) {
if (history_1.supportsState()) {
if (supportsState()) {
this._history.pushState(state, title, url);

@@ -73,3 +76,3 @@ }

BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {
if (history_1.supportsState()) {
if (supportsState()) {
this._history.replaceState(state, title, url);

@@ -83,5 +86,4 @@ }

BrowserPlatformLocation.prototype.back = function () { this._history.back(); };
/** @nocollapse */
BrowserPlatformLocation.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];

@@ -91,4 +93,3 @@ /** @nocollapse */

return BrowserPlatformLocation;
}(common_1.PlatformLocation));
exports.BrowserPlatformLocation = BrowserPlatformLocation;
}(PlatformLocation));
//# sourceMappingURL=browser_platform_location.js.map

@@ -8,7 +8,5 @@ /**

*/
"use strict";
function supportsState() {
export function supportsState() {
return !!window.history.pushState;
}
exports.supportsState = supportsState;
//# sourceMappingURL=history.js.map

@@ -8,27 +8,12 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../dom/dom_adapter');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var PublicTestability = (function () {
function PublicTestability(testability) {
this._testability = testability;
}
PublicTestability.prototype.isStable = function () { return this._testability.isStable(); };
PublicTestability.prototype.whenStable = function (callback) { this._testability.whenStable(callback); };
PublicTestability.prototype.findBindings = function (using, provider, exactMatch) {
return this.findProviders(using, provider, exactMatch);
};
PublicTestability.prototype.findProviders = function (using, provider, exactMatch) {
return this._testability.findBindings(using, provider, exactMatch);
};
return PublicTestability;
}());
var BrowserGetTestability = (function () {
import { setTestabilityGetter } from '@angular/core';
import { getDOM } from '../dom/dom_adapter';
import { ListWrapper } from '../facade/collection';
import { global, isPresent } from '../facade/lang';
export var BrowserGetTestability = (function () {
function BrowserGetTestability() {
}
BrowserGetTestability.init = function () { core_1.setTestabilityGetter(new BrowserGetTestability()); };
BrowserGetTestability.init = function () { setTestabilityGetter(new BrowserGetTestability()); };
BrowserGetTestability.prototype.addToWindow = function (registry) {
lang_1.global.getAngularTestability = function (elem, findInAncestors) {
global.getAngularTestability = function (elem, findInAncestors) {
if (findInAncestors === void 0) { findInAncestors = true; }

@@ -39,11 +24,8 @@ var testability = registry.findTestabilityInTree(elem, findInAncestors);

}
return new PublicTestability(testability);
return testability;
};
lang_1.global.getAllAngularTestabilities = function () {
var testabilities = registry.getAllTestabilities();
return testabilities.map(function (testability) { return new PublicTestability(testability); });
};
lang_1.global.getAllAngularRootElements = function () { return registry.getAllRootElements(); };
global.getAllAngularTestabilities = function () { return registry.getAllTestabilities(); };
global.getAllAngularRootElements = function () { return registry.getAllRootElements(); };
var whenAllStable = function (callback /** TODO #9100 */) {
var testabilities = lang_1.global.getAllAngularTestabilities();
var testabilities = global.getAllAngularTestabilities();
var count = testabilities.length;

@@ -62,6 +44,6 @@ var didWork = false;

};
if (!lang_1.global.frameworkStabilizers) {
lang_1.global.frameworkStabilizers = collection_1.ListWrapper.createGrowableSize(0);
if (!global['frameworkStabilizers']) {
global['frameworkStabilizers'] = ListWrapper.createGrowableSize(0);
}
lang_1.global.frameworkStabilizers.push(whenAllStable);
global['frameworkStabilizers'].push(whenAllStable);
};

@@ -73,3 +55,3 @@ BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {

var t = registry.getTestability(elem);
if (lang_1.isPresent(t)) {
if (isPresent(t)) {
return t;

@@ -80,10 +62,9 @@ }

}
if (dom_adapter_1.getDOM().isShadowRoot(elem)) {
return this.findTestabilityInTree(registry, dom_adapter_1.getDOM().getHost(elem), true);
if (getDOM().isShadowRoot(elem)) {
return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);
}
return this.findTestabilityInTree(registry, dom_adapter_1.getDOM().parentElement(elem), true);
return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);
};
return BrowserGetTestability;
}());
exports.BrowserGetTestability = BrowserGetTestability;
//# sourceMappingURL=testability.js.map

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var dom_adapter_1 = require('../dom/dom_adapter');
import { getDOM } from '../dom/dom_adapter';
/**

@@ -21,3 +20,3 @@ * A service that can be used to get and set the title of a current HTML document.

*/
var Title = (function () {
export var Title = (function () {
function Title() {

@@ -29,3 +28,3 @@ }

*/
Title.prototype.getTitle = function () { return dom_adapter_1.getDOM().getTitle(); };
Title.prototype.getTitle = function () { return getDOM().getTitle(); };
/**

@@ -35,6 +34,5 @@ * Set the title of the current HTML document.

*/
Title.prototype.setTitle = function (newTitle) { dom_adapter_1.getDOM().setTitle(newTitle); };
Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(newTitle); };
return Title;
}());
exports.Title = Title;
//# sourceMappingURL=title.js.map

@@ -8,8 +8,7 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../../dom/dom_adapter');
var browser_1 = require('../../facade/browser');
var lang_1 = require('../../facade/lang');
var ChangeDetectionPerfRecord = (function () {
import { ApplicationRef } from '@angular/core';
import { getDOM } from '../../dom/dom_adapter';
import { window } from '../../facade/browser';
import { NumberWrapper, isPresent } from '../../facade/lang';
export var ChangeDetectionPerfRecord = (function () {
function ChangeDetectionPerfRecord(msPerTick, numTicks) {

@@ -21,3 +20,2 @@ this.msPerTick = msPerTick;

}());
exports.ChangeDetectionPerfRecord = ChangeDetectionPerfRecord;
/**

@@ -27,3 +25,3 @@ * Entry point for all Angular debug tools. This object corresponds to the `ng`

*/
var AngularTools = (function () {
export var AngularTools = (function () {
function AngularTools(ref) {

@@ -34,3 +32,2 @@ this.profiler = new AngularProfiler(ref);

}());
exports.AngularTools = AngularTools;
/**

@@ -40,5 +37,5 @@ * Entry point for all Angular profiling-related debug tools. This object

*/
var AngularProfiler = (function () {
export var AngularProfiler = (function () {
function AngularProfiler(ref) {
this.appRef = ref.injector.get(core_1.ApplicationRef);
this.appRef = ref.injector.get(ApplicationRef);
}

@@ -62,16 +59,16 @@ /**

AngularProfiler.prototype.timeChangeDetection = function (config) {
var record = lang_1.isPresent(config) && config['record'];
var record = isPresent(config) && config['record'];
var profileName = 'Change Detection';
// Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
var isProfilerAvailable = lang_1.isPresent(browser_1.window.console.profile);
var isProfilerAvailable = isPresent(window.console.profile);
if (record && isProfilerAvailable) {
browser_1.window.console.profile(profileName);
window.console.profile(profileName);
}
var start = dom_adapter_1.getDOM().performanceNow();
var start = getDOM().performanceNow();
var numTicks = 0;
while (numTicks < 5 || (dom_adapter_1.getDOM().performanceNow() - start) < 500) {
while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {
this.appRef.tick();
numTicks++;
}
var end = dom_adapter_1.getDOM().performanceNow();
var end = getDOM().performanceNow();
if (record && isProfilerAvailable) {

@@ -82,7 +79,7 @@ // need to cast to <any> because type checker thinks there's no argument

// https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd
browser_1.window.console.profileEnd(profileName);
window.console.profileEnd(profileName);
}
var msPerTick = (end - start) / numTicks;
browser_1.window.console.log("ran " + numTicks + " change detection cycles");
browser_1.window.console.log(lang_1.NumberWrapper.toFixed(msPerTick, 2) + " ms per check");
window.console.log("ran " + numTicks + " change detection cycles");
window.console.log(NumberWrapper.toFixed(msPerTick, 2) + " ms per check");
return new ChangeDetectionPerfRecord(msPerTick, numTicks);

@@ -92,3 +89,2 @@ };

}());
exports.AngularProfiler = AngularProfiler;
//# sourceMappingURL=common_tools.js.map

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var lang_1 = require('../../facade/lang');
var common_tools_1 = require('./common_tools');
var context = lang_1.global;
import { global } from '../../facade/lang';
import { AngularTools } from './common_tools';
var context = global;
/**

@@ -26,7 +25,6 @@ * Enabled Angular 2 debug tools that are accessible via your browser's

*/
function enableDebugTools(ref) {
context.ng = new common_tools_1.AngularTools(ref);
export function enableDebugTools(ref) {
context.ng = new AngularTools(ref);
return ref;
}
exports.enableDebugTools = enableDebugTools;
/**

@@ -37,6 +35,5 @@ * Disables Angular 2 tools.

*/
function disableDebugTools() {
export function disableDebugTools() {
delete context.ng;
}
exports.disableDebugTools = disableDebugTools;
//# sourceMappingURL=tools.js.map

@@ -9,3 +9,3 @@ /**

import { AnimationPlayer } from '@angular/core';
import { AnimationKeyframe, AnimationStyles } from '../../core_private';
import { AnimationKeyframe, AnimationStyles } from '../private_import_core';
/**

@@ -12,0 +12,0 @@ * @experimental

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var core_private_1 = require('../../core_private');
import { NoOpAnimationPlayer } from '../private_import_core';
var _NoOpAnimationDriver = (function () {

@@ -15,3 +14,3 @@ function _NoOpAnimationDriver() {

_NoOpAnimationDriver.prototype.animate = function (element, startingStyles, keyframes, duration, delay, easing) {
return new core_private_1.NoOpAnimationPlayer();
return new NoOpAnimationPlayer();
};

@@ -23,3 +22,3 @@ return _NoOpAnimationDriver;

*/
var AnimationDriver = (function () {
export var AnimationDriver = (function () {
function AnimationDriver() {

@@ -30,3 +29,2 @@ }

}());
exports.AnimationDriver = AnimationDriver;
//# sourceMappingURL=animation_driver.js.map

@@ -8,5 +8,4 @@ /**

*/
import { DebugElement } from '@angular/core';
import { DebugElement, Type } from '@angular/core';
import { Predicate } from '../../facade/collection';
import { Type } from '../../facade/lang';
/**

@@ -41,3 +40,3 @@ * Predicates for use with {@link DebugElement}'s query functions.

*/
static directive(type: Type): Predicate<DebugElement>;
static directive(type: Type<any>): Predicate<DebugElement>;
}

@@ -8,5 +8,4 @@ /**

*/
"use strict";
var dom_adapter_1 = require('../../dom/dom_adapter');
var lang_1 = require('../../facade/lang');
import { getDOM } from '../../dom/dom_adapter';
import { isPresent } from '../../facade/lang';
/**

@@ -17,3 +16,3 @@ * Predicates for use with {@link DebugElement}'s query functions.

*/
var By = (function () {
export var By = (function () {
function By() {

@@ -38,4 +37,4 @@ }

return function (debugElement) {
return lang_1.isPresent(debugElement.nativeElement) ?
dom_adapter_1.getDOM().elementMatches(debugElement.nativeElement, selector) :
return isPresent(debugElement.nativeElement) ?
getDOM().elementMatches(debugElement.nativeElement, selector) :
false;

@@ -56,3 +55,2 @@ };

}());
exports.By = By;
//# sourceMappingURL=by.js.map

@@ -8,3 +8,3 @@ /**

*/
import { DebugNode } from '@angular/core';
import { DebugNode, Provider } from '@angular/core';
/**

@@ -16,7 +16,15 @@ * Returns a {@link DebugElement} for the given native DOM element, or

export declare function inspectNativeElement(element: any): DebugNode;
export declare function _createConditionalRootRenderer(rootRenderer: any): any;
/**
* @experimental
*/
export declare class NgProbeToken {
private name;
private token;
constructor(name: string, token: any);
}
export declare function _createConditionalRootRenderer(rootRenderer: any, extraTokens: NgProbeToken[]): any;
/**
* Providers which support debugging Angular applications (e.g. via `ng.probe`).
*/
export declare const ELEMENT_PROBE_PROVIDERS: any[];
export declare const ELEMENT_PROBE_PROVIDERS: Provider[];
export declare const ELEMENT_PROBE_PROVIDERS_PROD_MODE: any[];

@@ -8,10 +8,10 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var core_private_1 = require('../../../core_private');
var dom_adapter_1 = require('../dom_adapter');
var dom_renderer_1 = require('../dom_renderer');
import { ApplicationRef, NgZone, Optional, RootRenderer, getDebugNode, isDevMode } from '@angular/core';
import { StringMapWrapper } from '../../facade/collection';
import { DebugDomRootRenderer } from '../../private_import_core';
import { getDOM } from '../dom_adapter';
import { DomRootRenderer } from '../dom_renderer';
var CORE_TOKENS = {
'ApplicationRef': core_1.ApplicationRef,
'NgZone': core_1.NgZone
'ApplicationRef': ApplicationRef,
'NgZone': NgZone
};

@@ -25,23 +25,42 @@ var INSPECT_GLOBAL_NAME = 'ng.probe';

*/
function inspectNativeElement(element /** TODO #9100 */) {
return core_1.getDebugNode(element);
export function inspectNativeElement(element /** TODO #9100 */) {
return getDebugNode(element);
}
exports.inspectNativeElement = inspectNativeElement;
function _createConditionalRootRenderer(rootRenderer /** TODO #9100 */) {
if (core_1.isDevMode()) {
return _createRootRenderer(rootRenderer);
/**
* @experimental
*/
export var NgProbeToken = (function () {
function NgProbeToken(name, token) {
this.name = name;
this.token = token;
}
return NgProbeToken;
}());
export function _createConditionalRootRenderer(rootRenderer /** TODO #9100 */, extraTokens) {
if (isDevMode()) {
return _createRootRenderer(rootRenderer, extraTokens);
}
return rootRenderer;
}
exports._createConditionalRootRenderer = _createConditionalRootRenderer;
function _createRootRenderer(rootRenderer /** TODO #9100 */) {
dom_adapter_1.getDOM().setGlobalVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
dom_adapter_1.getDOM().setGlobalVar(CORE_TOKENS_GLOBAL_NAME, CORE_TOKENS);
return new core_private_1.DebugDomRootRenderer(rootRenderer);
function _createRootRenderer(rootRenderer /** TODO #9100 */, extraTokens) {
getDOM().setGlobalVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
getDOM().setGlobalVar(CORE_TOKENS_GLOBAL_NAME, StringMapWrapper.merge(CORE_TOKENS, _ngProbeTokensToMap(extraTokens || [])));
return new DebugDomRootRenderer(rootRenderer);
}
function _ngProbeTokensToMap(tokens) {
return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});
}
/**
* Providers which support debugging Angular applications (e.g. via `ng.probe`).
*/
exports.ELEMENT_PROBE_PROVIDERS = [{ provide: core_1.RootRenderer, useFactory: _createConditionalRootRenderer, deps: [dom_renderer_1.DomRootRenderer] }];
exports.ELEMENT_PROBE_PROVIDERS_PROD_MODE = [{ provide: core_1.RootRenderer, useFactory: _createRootRenderer, deps: [dom_renderer_1.DomRootRenderer] }];
export var ELEMENT_PROBE_PROVIDERS = [{
provide: RootRenderer,
useFactory: _createConditionalRootRenderer,
deps: [DomRootRenderer, [NgProbeToken, new Optional()]]
}];
export var ELEMENT_PROBE_PROVIDERS_PROD_MODE = [{
provide: RootRenderer,
useFactory: _createRootRenderer,
deps: [DomRootRenderer, [NgProbeToken, new Optional()]]
}];
//# sourceMappingURL=ng_probe.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"inspectNativeElement":{"__symbolic":"function","parameters":["element"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"getDebugNode"},"arguments":[{"__symbolic":"reference","name":"element"}]}},"ELEMENT_PROBE_PROVIDERS":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"RootRenderer"},"useFactory":{"__symbolic":"reference","name":"_createConditionalRootRenderer"},"deps":[{"__symbolic":"reference","module":"../dom_renderer","name":"DomRootRenderer"}]}],"ELEMENT_PROBE_PROVIDERS_PROD_MODE":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"RootRenderer"},"useFactory":{"__symbolic":"reference","name":"_createRootRenderer"},"deps":[{"__symbolic":"reference","module":"../dom_renderer","name":"DomRootRenderer"}]}]}}
{"__symbolic":"module","version":1,"metadata":{"inspectNativeElement":{"__symbolic":"function","parameters":["element"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"getDebugNode"},"arguments":[{"__symbolic":"reference","name":"element"}]}},"ELEMENT_PROBE_PROVIDERS":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"RootRenderer"},"useFactory":{"__symbolic":"reference","name":"_createConditionalRootRenderer"},"deps":[{"__symbolic":"reference","module":"../dom_renderer","name":"DomRootRenderer"},[{"__symbolic":"reference","name":"NgProbeToken"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]]}],"ELEMENT_PROBE_PROVIDERS_PROD_MODE":{"__symbolic":"error","message":"Reference to a non-exported function","line":48,"character":9,"context":{"name":"_createRootRenderer"}}}}

@@ -8,3 +8,3 @@ /**

*/
import { Type } from '../facade/lang';
import { Type } from '@angular/core';
export declare function getDOM(): DomAdapter;

@@ -15,5 +15,8 @@ export declare function setDOM(adapter: DomAdapter): void;

* Provides DOM operations in an environment-agnostic way.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
export declare abstract class DomAdapter {
xhrType: Type;
resourceLoaderType: Type<any>;
abstract hasProperty(element: any, name: string): boolean;

@@ -27,4 +30,2 @@ abstract setProperty(el: Element, name: string, value: any): any;

abstract logGroupEnd(): any;
/** @deprecated */
getXHR(): Type;
/**

@@ -138,4 +139,2 @@ * Maps attribute names to their corresponding property names for cases

abstract setGlobalVar(name: string, value: any): any;
abstract requestAnimationFrame(callback: any): number;
abstract cancelAnimationFrame(id: any): any;
abstract supportsWebAnimation(): boolean;

@@ -142,0 +141,0 @@ abstract performanceNow(): number;

@@ -8,29 +8,26 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { isBlank } from '../facade/lang';
var _DOM = null;
function getDOM() {
export function getDOM() {
return _DOM;
}
exports.getDOM = getDOM;
function setDOM(adapter) {
export function setDOM(adapter) {
_DOM = adapter;
}
exports.setDOM = setDOM;
function setRootDomAdapter(adapter) {
if (lang_1.isBlank(_DOM)) {
export function setRootDomAdapter(adapter) {
if (isBlank(_DOM)) {
_DOM = adapter;
}
}
exports.setRootDomAdapter = setRootDomAdapter;
/* tslint:disable:requireParameterType */
/**
* Provides DOM operations in an environment-agnostic way.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
var DomAdapter = (function () {
export var DomAdapter = (function () {
function DomAdapter() {
this.xhrType = null;
this.resourceLoaderType = null;
}
/** @deprecated */
DomAdapter.prototype.getXHR = function () { return this.xhrType; };
Object.defineProperty(DomAdapter.prototype, "attrToPropMap", {

@@ -50,3 +47,2 @@ /**

}());
exports.DomAdapter = DomAdapter;
//# sourceMappingURL=dom_adapter.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
//# sourceMappingURL=dom_animate_player.js.map

@@ -9,3 +9,3 @@ /**

import { RenderComponentType, Renderer, RootRenderer } from '@angular/core';
import { AnimationKeyframe, AnimationPlayer, AnimationStyles, RenderDebugInfo } from '../../core_private';
import { AnimationKeyframe, AnimationPlayer, AnimationStyles, RenderDebugInfo } from '../private_import_core';
import { AnimationDriver } from './animation_driver';

@@ -12,0 +12,0 @@ import { EventManager } from './events/event_manager';

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,11 +14,10 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var core_1 = require('@angular/core');
var exceptions_1 = require('../facade/exceptions');
var lang_1 = require('../facade/lang');
var animation_driver_1 = require('./animation_driver');
var dom_adapter_1 = require('./dom_adapter');
var dom_tokens_1 = require('./dom_tokens');
var event_manager_1 = require('./events/event_manager');
var shared_styles_host_1 = require('./shared_styles_host');
var util_1 = require('./util');
import { Inject, Injectable, ViewEncapsulation } from '@angular/core';
import { Json, StringWrapper, isArray, isBlank, isPresent, isString, stringify } from '../facade/lang';
import { AnimationDriver } from './animation_driver';
import { getDOM } from './dom_adapter';
import { DOCUMENT } from './dom_tokens';
import { EventManager } from './events/event_manager';
import { DomSharedStylesHost } from './shared_styles_host';
import { camelCaseToDashCase } from './util';
var NAMESPACE_URIS = {

@@ -32,3 +30,3 @@ 'xlink': 'http://www.w3.org/1999/xlink',

var TEMPLATE_BINDINGS_EXP = /^template bindings=(.*)$/;
var DomRootRenderer = (function () {
export var DomRootRenderer = (function () {
function DomRootRenderer(document, eventManager, sharedStylesHost, animationDriver) {

@@ -43,3 +41,3 @@ this.document = document;

var renderer = this.registeredComponents.get(componentProto.id);
if (lang_1.isBlank(renderer)) {
if (isBlank(renderer)) {
renderer = new DomRenderer(this, componentProto, this.animationDriver);

@@ -52,4 +50,3 @@ this.registeredComponents.set(componentProto.id, renderer);

}());
exports.DomRootRenderer = DomRootRenderer;
var DomRootRenderer_ = (function (_super) {
export var DomRootRenderer_ = (function (_super) {
__extends(DomRootRenderer_, _super);

@@ -59,17 +56,15 @@ function DomRootRenderer_(_document, _eventManager, sharedStylesHost, animationDriver) {

}
/** @nocollapse */
DomRootRenderer_.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
DomRootRenderer_.ctorParameters = [
{ type: undefined, decorators: [{ type: core_1.Inject, args: [dom_tokens_1.DOCUMENT,] },] },
{ type: event_manager_1.EventManager, },
{ type: shared_styles_host_1.DomSharedStylesHost, },
{ type: animation_driver_1.AnimationDriver, },
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },
{ type: EventManager, },
{ type: DomSharedStylesHost, },
{ type: AnimationDriver, },
];
return DomRootRenderer_;
}(DomRootRenderer));
exports.DomRootRenderer_ = DomRootRenderer_;
var DomRenderer = (function () {
export var DomRenderer = (function () {
function DomRenderer(_rootRenderer, componentProto, _animationDriver) {

@@ -80,6 +75,6 @@ this._rootRenderer = _rootRenderer;

this._styles = _flattenStyles(componentProto.id, componentProto.styles, []);
if (componentProto.encapsulation !== core_1.ViewEncapsulation.Native) {
if (componentProto.encapsulation !== ViewEncapsulation.Native) {
this._rootRenderer.sharedStylesHost.addStyles(this._styles);
}
if (this.componentProto.encapsulation === core_1.ViewEncapsulation.Emulated) {
if (this.componentProto.encapsulation === ViewEncapsulation.Emulated) {
this._contentAttr = _shimContentAttribute(componentProto.id);

@@ -95,6 +90,6 @@ this._hostAttr = _shimHostAttribute(componentProto.id);

var el;
if (lang_1.isString(selectorOrNode)) {
el = dom_adapter_1.getDOM().querySelector(this._rootRenderer.document, selectorOrNode);
if (lang_1.isBlank(el)) {
throw new exceptions_1.BaseException("The selector \"" + selectorOrNode + "\" did not match any elements");
if (isString(selectorOrNode)) {
el = getDOM().querySelector(this._rootRenderer.document, selectorOrNode);
if (isBlank(el)) {
throw new Error("The selector \"" + selectorOrNode + "\" did not match any elements");
}

@@ -105,3 +100,3 @@ }

}
dom_adapter_1.getDOM().clearNodes(el);
getDOM().clearNodes(el);
return el;

@@ -111,10 +106,10 @@ };

var nsAndName = splitNamespace(name);
var el = lang_1.isPresent(nsAndName[0]) ?
dom_adapter_1.getDOM().createElementNS(NAMESPACE_URIS[nsAndName[0]], nsAndName[1]) :
dom_adapter_1.getDOM().createElement(nsAndName[1]);
if (lang_1.isPresent(this._contentAttr)) {
dom_adapter_1.getDOM().setAttribute(el, this._contentAttr, '');
var el = isPresent(nsAndName[0]) ?
getDOM().createElementNS(NAMESPACE_URIS[nsAndName[0]], nsAndName[1]) :
getDOM().createElement(nsAndName[1]);
if (isPresent(this._contentAttr)) {
getDOM().setAttribute(el, this._contentAttr, '');
}
if (lang_1.isPresent(parent)) {
dom_adapter_1.getDOM().appendChild(parent, el);
if (isPresent(parent)) {
getDOM().appendChild(parent, el);
}

@@ -125,12 +120,12 @@ return el;

var nodesParent;
if (this.componentProto.encapsulation === core_1.ViewEncapsulation.Native) {
nodesParent = dom_adapter_1.getDOM().createShadowRoot(hostElement);
if (this.componentProto.encapsulation === ViewEncapsulation.Native) {
nodesParent = getDOM().createShadowRoot(hostElement);
this._rootRenderer.sharedStylesHost.addHost(nodesParent);
for (var i = 0; i < this._styles.length; i++) {
dom_adapter_1.getDOM().appendChild(nodesParent, dom_adapter_1.getDOM().createStyleElement(this._styles[i]));
getDOM().appendChild(nodesParent, getDOM().createStyleElement(this._styles[i]));
}
}
else {
if (lang_1.isPresent(this._hostAttr)) {
dom_adapter_1.getDOM().setAttribute(hostElement, this._hostAttr, '');
if (isPresent(this._hostAttr)) {
getDOM().setAttribute(hostElement, this._hostAttr, '');
}

@@ -142,5 +137,5 @@ nodesParent = hostElement;

DomRenderer.prototype.createTemplateAnchor = function (parentElement, debugInfo) {
var comment = dom_adapter_1.getDOM().createComment(TEMPLATE_COMMENT_TEXT);
if (lang_1.isPresent(parentElement)) {
dom_adapter_1.getDOM().appendChild(parentElement, comment);
var comment = getDOM().createComment(TEMPLATE_COMMENT_TEXT);
if (isPresent(parentElement)) {
getDOM().appendChild(parentElement, comment);
}

@@ -150,5 +145,5 @@ return comment;

DomRenderer.prototype.createText = function (parentElement, value, debugInfo) {
var node = dom_adapter_1.getDOM().createTextNode(value);
if (lang_1.isPresent(parentElement)) {
dom_adapter_1.getDOM().appendChild(parentElement, node);
var node = getDOM().createTextNode(value);
if (isPresent(parentElement)) {
getDOM().appendChild(parentElement, node);
}

@@ -158,3 +153,3 @@ return node;

DomRenderer.prototype.projectNodes = function (parentElement, nodes) {
if (lang_1.isBlank(parentElement))
if (isBlank(parentElement))
return;

@@ -166,8 +161,8 @@ appendNodes(parentElement, nodes);

for (var i = 0; i < viewRootNodes.length; i++) {
dom_adapter_1.getDOM().remove(viewRootNodes[i]);
getDOM().remove(viewRootNodes[i]);
}
};
DomRenderer.prototype.destroyView = function (hostElement, viewAllNodes) {
if (this.componentProto.encapsulation === core_1.ViewEncapsulation.Native && lang_1.isPresent(hostElement)) {
this._rootRenderer.sharedStylesHost.removeHost(dom_adapter_1.getDOM().getShadowRoot(hostElement));
if (this.componentProto.encapsulation === ViewEncapsulation.Native && isPresent(hostElement)) {
this._rootRenderer.sharedStylesHost.removeHost(getDOM().getShadowRoot(hostElement));
}

@@ -182,3 +177,3 @@ };

DomRenderer.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {
dom_adapter_1.getDOM().setProperty(renderElement, propertyName, propertyValue);
getDOM().setProperty(renderElement, propertyName, propertyValue);
};

@@ -188,20 +183,20 @@ DomRenderer.prototype.setElementAttribute = function (renderElement, attributeName, attributeValue) {

var nsAndName = splitNamespace(attributeName);
if (lang_1.isPresent(nsAndName[0])) {
if (isPresent(nsAndName[0])) {
attributeName = nsAndName[0] + ':' + nsAndName[1];
attrNs = NAMESPACE_URIS[nsAndName[0]];
}
if (lang_1.isPresent(attributeValue)) {
if (lang_1.isPresent(attrNs)) {
dom_adapter_1.getDOM().setAttributeNS(renderElement, attrNs, attributeName, attributeValue);
if (isPresent(attributeValue)) {
if (isPresent(attrNs)) {
getDOM().setAttributeNS(renderElement, attrNs, attributeName, attributeValue);
}
else {
dom_adapter_1.getDOM().setAttribute(renderElement, attributeName, attributeValue);
getDOM().setAttribute(renderElement, attributeName, attributeValue);
}
}
else {
if (lang_1.isPresent(attrNs)) {
dom_adapter_1.getDOM().removeAttributeNS(renderElement, attrNs, nsAndName[1]);
if (isPresent(attrNs)) {
getDOM().removeAttributeNS(renderElement, attrNs, nsAndName[1]);
}
else {
dom_adapter_1.getDOM().removeAttribute(renderElement, attributeName);
getDOM().removeAttribute(renderElement, attributeName);
}

@@ -211,9 +206,9 @@ }

DomRenderer.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) {
var dashCasedPropertyName = util_1.camelCaseToDashCase(propertyName);
if (dom_adapter_1.getDOM().isCommentNode(renderElement)) {
var existingBindings = lang_1.StringWrapper.replaceAll(dom_adapter_1.getDOM().getText(renderElement), /\n/g, '')
var dashCasedPropertyName = camelCaseToDashCase(propertyName);
if (getDOM().isCommentNode(renderElement)) {
var existingBindings = StringWrapper.replaceAll(getDOM().getText(renderElement), /\n/g, '')
.match(TEMPLATE_BINDINGS_EXP);
var parsedBindings = lang_1.Json.parse(existingBindings[1]);
var parsedBindings = Json.parse(existingBindings[1]);
parsedBindings[dashCasedPropertyName] = propertyValue;
dom_adapter_1.getDOM().setText(renderElement, lang_1.StringWrapper.replace(TEMPLATE_COMMENT_TEXT, '{}', lang_1.Json.stringify(parsedBindings)));
getDOM().setText(renderElement, StringWrapper.replace(TEMPLATE_COMMENT_TEXT, '{}', Json.stringify(parsedBindings)));
}

@@ -226,20 +221,20 @@ else {

if (isAdd) {
dom_adapter_1.getDOM().addClass(renderElement, className);
getDOM().addClass(renderElement, className);
}
else {
dom_adapter_1.getDOM().removeClass(renderElement, className);
getDOM().removeClass(renderElement, className);
}
};
DomRenderer.prototype.setElementStyle = function (renderElement, styleName, styleValue) {
if (lang_1.isPresent(styleValue)) {
dom_adapter_1.getDOM().setStyle(renderElement, styleName, lang_1.stringify(styleValue));
if (isPresent(styleValue)) {
getDOM().setStyle(renderElement, styleName, stringify(styleValue));
}
else {
dom_adapter_1.getDOM().removeStyle(renderElement, styleName);
getDOM().removeStyle(renderElement, styleName);
}
};
DomRenderer.prototype.invokeElementMethod = function (renderElement, methodName, args) {
dom_adapter_1.getDOM().invoke(renderElement, methodName, args);
getDOM().invoke(renderElement, methodName, args);
};
DomRenderer.prototype.setText = function (renderNode, text) { dom_adapter_1.getDOM().setText(renderNode, text); };
DomRenderer.prototype.setText = function (renderNode, text) { getDOM().setText(renderNode, text); };
DomRenderer.prototype.animate = function (element, startingStyles, keyframes, duration, delay, easing) {

@@ -250,10 +245,9 @@ return this._animationDriver.animate(element, startingStyles, keyframes, duration, delay, easing);

}());
exports.DomRenderer = DomRenderer;
function moveNodesAfterSibling(sibling /** TODO #9100 */, nodes /** TODO #9100 */) {
var parent = dom_adapter_1.getDOM().parentElement(sibling);
if (nodes.length > 0 && lang_1.isPresent(parent)) {
var nextSibling = dom_adapter_1.getDOM().nextSibling(sibling);
if (lang_1.isPresent(nextSibling)) {
var parent = getDOM().parentElement(sibling);
if (nodes.length > 0 && isPresent(parent)) {
var nextSibling = getDOM().nextSibling(sibling);
if (isPresent(nextSibling)) {
for (var i = 0; i < nodes.length; i++) {
dom_adapter_1.getDOM().insertBefore(nextSibling, nodes[i]);
getDOM().insertBefore(nextSibling, nodes[i]);
}

@@ -263,3 +257,3 @@ }

for (var i = 0; i < nodes.length; i++) {
dom_adapter_1.getDOM().appendChild(parent, nodes[i]);
getDOM().appendChild(parent, nodes[i]);
}

@@ -271,3 +265,3 @@ }

for (var i = 0; i < nodes.length; i++) {
dom_adapter_1.getDOM().appendChild(parent, nodes[i]);
getDOM().appendChild(parent, nodes[i]);
}

@@ -280,3 +274,3 @@ }

// TODO(tbosch): move preventDefault into event plugins...
dom_adapter_1.getDOM().preventDefault(event);
getDOM().preventDefault(event);
}

@@ -286,10 +280,10 @@ };

var COMPONENT_REGEX = /%COMP%/g;
exports.COMPONENT_VARIABLE = '%COMP%';
exports.HOST_ATTR = "_nghost-" + exports.COMPONENT_VARIABLE;
exports.CONTENT_ATTR = "_ngcontent-" + exports.COMPONENT_VARIABLE;
export var COMPONENT_VARIABLE = '%COMP%';
export var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
export var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
function _shimContentAttribute(componentShortId) {
return lang_1.StringWrapper.replaceAll(exports.CONTENT_ATTR, COMPONENT_REGEX, componentShortId);
return StringWrapper.replaceAll(CONTENT_ATTR, COMPONENT_REGEX, componentShortId);
}
function _shimHostAttribute(componentShortId) {
return lang_1.StringWrapper.replaceAll(exports.HOST_ATTR, COMPONENT_REGEX, componentShortId);
return StringWrapper.replaceAll(HOST_ATTR, COMPONENT_REGEX, componentShortId);
}

@@ -299,7 +293,7 @@ function _flattenStyles(compId, styles, target) {

var style = styles[i];
if (lang_1.isArray(style)) {
if (isArray(style)) {
_flattenStyles(compId, style, target);
}
else {
style = lang_1.StringWrapper.replaceAll(style, COMPONENT_REGEX, compId);
style = StringWrapper.replaceAll(style, COMPONENT_REGEX, compId);
target.push(style);

@@ -306,0 +300,0 @@ }

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"DomRootRenderer_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./dom_tokens","name":"DOCUMENT"}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"./events/event_manager","name":"EventManager"},{"__symbolic":"reference","module":"./shared_styles_host","name":"DomSharedStylesHost"},{"__symbolic":"reference","module":"./animation_driver","name":"AnimationDriver"}]}]}},"COMPONENT_VARIABLE":"%COMP%","HOST_ATTR":{"__symbolic":"error","message":"Expression form not supported","line":273,"character":24},"CONTENT_ATTR":{"__symbolic":"error","message":"Expression form not supported","line":274,"character":27}}}
{"__symbolic":"module","version":1,"metadata":{"DomRootRenderer_":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./dom_tokens","name":"DOCUMENT"}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"./events/event_manager","name":"EventManager"},{"__symbolic":"reference","module":"./shared_styles_host","name":"DomSharedStylesHost"},{"__symbolic":"reference","module":"./animation_driver","name":"AnimationDriver"}]}]}},"COMPONENT_VARIABLE":"%COMP%","HOST_ATTR":{"__symbolic":"error","message":"Expression form not supported","line":272,"character":25},"CONTENT_ATTR":{"__symbolic":"error","message":"Expression form not supported","line":273,"character":28}}}

@@ -8,4 +8,3 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
import { OpaqueToken } from '@angular/core';
/**

@@ -19,3 +18,3 @@ * A DI Token representing the main rendering context. In a browser this is the DOM Document.

*/
exports.DOCUMENT = new core_1.OpaqueToken('DocumentToken');
export var DOCUMENT = new OpaqueToken('DocumentToken');
//# sourceMappingURL=dom_tokens.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,6 +14,6 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../dom_adapter');
var event_manager_1 = require('./event_manager');
var DomEventsPlugin = (function (_super) {
import { Injectable } from '@angular/core';
import { getDOM } from '../dom_adapter';
import { EventManagerPlugin } from './event_manager';
export var DomEventsPlugin = (function (_super) {
__extends(DomEventsPlugin, _super);

@@ -30,17 +29,17 @@ function DomEventsPlugin() {

var outsideHandler = function (event /** TODO #9100 */) { return zone.runGuarded(function () { return handler(event); }); };
return this.manager.getZone().runOutsideAngular(function () { return dom_adapter_1.getDOM().onAndCancel(element, eventName, outsideHandler); });
return this.manager.getZone().runOutsideAngular(function () { return getDOM().onAndCancel(element, eventName, outsideHandler); });
};
DomEventsPlugin.prototype.addGlobalEventListener = function (target, eventName, handler) {
var element = dom_adapter_1.getDOM().getGlobalEventTarget(target);
var element = getDOM().getGlobalEventTarget(target);
var zone = this.manager.getZone();
var outsideHandler = function (event /** TODO #9100 */) { return zone.runGuarded(function () { return handler(event); }); };
return this.manager.getZone().runOutsideAngular(function () { return dom_adapter_1.getDOM().onAndCancel(element, eventName, outsideHandler); });
return this.manager.getZone().runOutsideAngular(function () { return getDOM().onAndCancel(element, eventName, outsideHandler); });
};
/** @nocollapse */
DomEventsPlugin.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
DomEventsPlugin.ctorParameters = [];
return DomEventsPlugin;
}(event_manager_1.EventManagerPlugin));
exports.DomEventsPlugin = DomEventsPlugin;
}(EventManagerPlugin));
//# sourceMappingURL=dom_events.js.map

@@ -8,11 +8,12 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var collection_1 = require('../../facade/collection');
var exceptions_1 = require('../../facade/exceptions');
import { Inject, Injectable, NgZone, OpaqueToken } from '@angular/core';
import { ListWrapper } from '../../facade/collection';
/**
* @stable
*/
exports.EVENT_MANAGER_PLUGINS = new core_1.OpaqueToken('EventManagerPlugins');
var EventManager = (function () {
export var EVENT_MANAGER_PLUGINS = new OpaqueToken('EventManagerPlugins');
/**
* @stable
*/
export var EventManager = (function () {
function EventManager(plugins, _zone) {

@@ -22,3 +23,3 @@ var _this = this;

plugins.forEach(function (p) { return p.manager = _this; });
this._plugins = collection_1.ListWrapper.reversed(plugins);
this._plugins = ListWrapper.reversed(plugins);
}

@@ -43,17 +44,15 @@ EventManager.prototype.addEventListener = function (element, eventName, handler) {

}
throw new exceptions_1.BaseException("No event manager plugin found for event " + eventName);
throw new Error("No event manager plugin found for event " + eventName);
};
/** @nocollapse */
EventManager.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
EventManager.ctorParameters = [
{ type: Array, decorators: [{ type: core_1.Inject, args: [exports.EVENT_MANAGER_PLUGINS,] },] },
{ type: core_1.NgZone, },
{ type: Array, decorators: [{ type: Inject, args: [EVENT_MANAGER_PLUGINS,] },] },
{ type: NgZone, },
];
return EventManager;
}());
exports.EventManager = EventManager;
var EventManagerPlugin = (function () {
export var EventManagerPlugin = (function () {
function EventManagerPlugin() {

@@ -71,3 +70,2 @@ }

}());
exports.EventManagerPlugin = EventManagerPlugin;
//# sourceMappingURL=event_manager.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,4 +14,4 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var collection_1 = require('../../facade/collection');
var event_manager_1 = require('./event_manager');
import { StringMapWrapper } from '../../facade/collection';
import { EventManagerPlugin } from './event_manager';
var _eventNames = {

@@ -55,3 +54,3 @@ // pan

};
var HammerGesturesPluginCommon = (function (_super) {
export var HammerGesturesPluginCommon = (function (_super) {
__extends(HammerGesturesPluginCommon, _super);

@@ -63,7 +62,6 @@ function HammerGesturesPluginCommon() {

eventName = eventName.toLowerCase();
return collection_1.StringMapWrapper.contains(_eventNames, eventName);
return StringMapWrapper.contains(_eventNames, eventName);
};
return HammerGesturesPluginCommon;
}(event_manager_1.EventManagerPlugin));
exports.HammerGesturesPluginCommon = HammerGesturesPluginCommon;
}(EventManagerPlugin));
//# sourceMappingURL=hammer_common.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,6 +14,5 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var core_1 = require('@angular/core');
var exceptions_1 = require('../../facade/exceptions');
var lang_1 = require('../../facade/lang');
var hammer_common_1 = require('./hammer_common');
import { Inject, Injectable, OpaqueToken } from '@angular/core';
import { isPresent } from '../../facade/lang';
import { HammerGesturesPluginCommon } from './hammer_common';
/**

@@ -26,4 +24,7 @@ * A DI token that you can use to provide{@link HammerGestureConfig} to Angular. Use it to configure

*/
exports.HAMMER_GESTURE_CONFIG = new core_1.OpaqueToken('HammerGestureConfig');
var HammerGestureConfig = (function () {
export var HAMMER_GESTURE_CONFIG = new OpaqueToken('HammerGestureConfig');
/**
* @experimental
*/
export var HammerGestureConfig = (function () {
function HammerGestureConfig() {

@@ -42,10 +43,10 @@ this.events = [];

};
/** @nocollapse */
HammerGestureConfig.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
HammerGestureConfig.ctorParameters = [];
return HammerGestureConfig;
}());
exports.HammerGestureConfig = HammerGestureConfig;
var HammerGesturesPlugin = (function (_super) {
export var HammerGesturesPlugin = (function (_super) {
__extends(HammerGesturesPlugin, _super);

@@ -59,4 +60,4 @@ function HammerGesturesPlugin(_config) {

return false;
if (!lang_1.isPresent(window['Hammer'])) {
throw new exceptions_1.BaseException("Hammer.js is not loaded, can not bind " + eventName + " event");
if (!isPresent(window['Hammer'])) {
throw new Error("Hammer.js is not loaded, can not bind " + eventName + " event");
}

@@ -80,13 +81,11 @@ return true;

HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };
/** @nocollapse */
HammerGesturesPlugin.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
HammerGesturesPlugin.ctorParameters = [
{ type: HammerGestureConfig, decorators: [{ type: core_1.Inject, args: [exports.HAMMER_GESTURE_CONFIG,] },] },
{ type: HammerGestureConfig, decorators: [{ type: Inject, args: [HAMMER_GESTURE_CONFIG,] },] },
];
return HammerGesturesPlugin;
}(hammer_common_1.HammerGesturesPluginCommon));
exports.HammerGesturesPlugin = HammerGesturesPlugin;
}(HammerGesturesPluginCommon));
//# sourceMappingURL=hammer_gestures.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,7 +14,7 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var core_1 = require('@angular/core');
var collection_1 = require('../../facade/collection');
var lang_1 = require('../../facade/lang');
var dom_adapter_1 = require('../dom_adapter');
var event_manager_1 = require('./event_manager');
import { Injectable } from '@angular/core';
import { ListWrapper, StringMapWrapper } from '../../facade/collection';
import { StringWrapper, isPresent } from '../../facade/lang';
import { getDOM } from '../dom_adapter';
import { EventManagerPlugin } from './event_manager';
var modifierKeys = ['alt', 'control', 'meta', 'shift'];

@@ -28,3 +27,6 @@ var modifierKeyGetters = {

};
var KeyEventsPlugin = (function (_super) {
/**
* @experimental
*/
export var KeyEventsPlugin = (function (_super) {
__extends(KeyEventsPlugin, _super);

@@ -35,9 +37,9 @@ function KeyEventsPlugin() {

KeyEventsPlugin.prototype.supports = function (eventName) {
return lang_1.isPresent(KeyEventsPlugin.parseEventName(eventName));
return isPresent(KeyEventsPlugin.parseEventName(eventName));
};
KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
var outsideHandler = KeyEventsPlugin.eventCallback(element, collection_1.StringMapWrapper.get(parsedEvent, 'fullKey'), handler, this.manager.getZone());
var outsideHandler = KeyEventsPlugin.eventCallback(element, StringMapWrapper.get(parsedEvent, 'fullKey'), handler, this.manager.getZone());
return this.manager.getZone().runOutsideAngular(function () {
return dom_adapter_1.getDOM().onAndCancel(element, collection_1.StringMapWrapper.get(parsedEvent, 'domEventName'), outsideHandler);
return getDOM().onAndCancel(element, StringMapWrapper.get(parsedEvent, 'domEventName'), outsideHandler);
});

@@ -49,4 +51,4 @@ };

if ((parts.length === 0) ||
!(lang_1.StringWrapper.equals(domEventName, 'keydown') ||
lang_1.StringWrapper.equals(domEventName, 'keyup'))) {
!(StringWrapper.equals(domEventName, 'keydown') ||
StringWrapper.equals(domEventName, 'keyup'))) {
return null;

@@ -57,4 +59,4 @@ }

modifierKeys.forEach(function (modifierName) {
if (collection_1.ListWrapper.contains(parts, modifierName)) {
collection_1.ListWrapper.remove(parts, modifierName);
if (ListWrapper.contains(parts, modifierName)) {
ListWrapper.remove(parts, modifierName);
fullKey += modifierName + '.';

@@ -68,5 +70,5 @@ }

}
var result = collection_1.StringMapWrapper.create();
collection_1.StringMapWrapper.set(result, 'domEventName', domEventName);
collection_1.StringMapWrapper.set(result, 'fullKey', fullKey);
var result = StringMapWrapper.create();
StringMapWrapper.set(result, 'domEventName', domEventName);
StringMapWrapper.set(result, 'fullKey', fullKey);
return result;

@@ -76,8 +78,8 @@ };

var fullKey = '';
var key = dom_adapter_1.getDOM().getEventKey(event);
var key = getDOM().getEventKey(event);
key = key.toLowerCase();
if (lang_1.StringWrapper.equals(key, ' ')) {
if (StringWrapper.equals(key, ' ')) {
key = 'space'; // for readability
}
else if (lang_1.StringWrapper.equals(key, '.')) {
else if (StringWrapper.equals(key, '.')) {
key = 'dot'; // because '.' is used as a separator in event names

@@ -87,3 +89,3 @@ }

if (modifierName != key) {
var modifierGetter = collection_1.StringMapWrapper.get(modifierKeyGetters, modifierName);
var modifierGetter = StringMapWrapper.get(modifierKeyGetters, modifierName);
if (modifierGetter(event)) {

@@ -99,3 +101,3 @@ fullKey += modifierName + '.';

return function (event /** TODO #9100 */) {
if (lang_1.StringWrapper.equals(KeyEventsPlugin.getEventFullKey(event), fullKey)) {
if (StringWrapper.equals(KeyEventsPlugin.getEventFullKey(event), fullKey)) {
zone.runGuarded(function () { return handler(event); });

@@ -115,5 +117,4 @@ }

};
/** @nocollapse */
KeyEventsPlugin.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];

@@ -123,4 +124,3 @@ /** @nocollapse */

return KeyEventsPlugin;
}(event_manager_1.EventManagerPlugin));
exports.KeyEventsPlugin = KeyEventsPlugin;
}(EventManagerPlugin));
//# sourceMappingURL=key_events.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"KeyEventsPlugin":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"supports":[{"__symbolic":"method"}],"addEventListener":[{"__symbolic":"method"}]},"statics":{"eventCallback":{"__symbolic":"function","parameters":["element","fullKey","handler","zone"],"value":{"__symbolic":"error","message":"Function call not supported","line":103,"character":10}}}}}}
{"__symbolic":"module","version":1,"metadata":{"KeyEventsPlugin":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"supports":[{"__symbolic":"method"}],"addEventListener":[{"__symbolic":"method"}]},"statics":{"eventCallback":{"__symbolic":"function","parameters":["element","fullKey","handler","zone"],"value":{"__symbolic":"error","message":"Function call not supported","line":103,"character":11}}}}}}

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,7 +14,6 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var core_1 = require('@angular/core');
var collection_1 = require('../facade/collection');
var dom_adapter_1 = require('./dom_adapter');
var dom_tokens_1 = require('./dom_tokens');
var SharedStylesHost = (function () {
import { Inject, Injectable } from '@angular/core';
import { getDOM } from './dom_adapter';
import { DOCUMENT } from './dom_tokens';
export var SharedStylesHost = (function () {
function SharedStylesHost() {

@@ -31,3 +29,3 @@ /** @internal */

styles.forEach(function (style) {
if (!collection_1.SetWrapper.has(_this._stylesSet, style)) {
if (!_this._stylesSet.has(style)) {
_this._stylesSet.add(style);

@@ -42,5 +40,4 @@ _this._styles.push(style);

SharedStylesHost.prototype.getAllStyles = function () { return this._styles; };
/** @nocollapse */
SharedStylesHost.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];

@@ -51,4 +48,3 @@ /** @nocollapse */

}());
exports.SharedStylesHost = SharedStylesHost;
var DomSharedStylesHost = (function (_super) {
export var DomSharedStylesHost = (function (_super) {
__extends(DomSharedStylesHost, _super);

@@ -64,3 +60,3 @@ function DomSharedStylesHost(doc) {

var style = styles[i];
dom_adapter_1.getDOM().appendChild(host, dom_adapter_1.getDOM().createStyleElement(style));
getDOM().appendChild(host, getDOM().createStyleElement(style));
}

@@ -72,3 +68,3 @@ };

};
DomSharedStylesHost.prototype.removeHost = function (hostNode) { collection_1.SetWrapper.delete(this._hostNodes, hostNode); };
DomSharedStylesHost.prototype.removeHost = function (hostNode) { this._hostNodes.delete(hostNode); };
DomSharedStylesHost.prototype.onStylesAdded = function (additions) {

@@ -78,13 +74,11 @@ var _this = this;

};
/** @nocollapse */
DomSharedStylesHost.decorators = [
{ type: core_1.Injectable },
{ type: Injectable },
];
/** @nocollapse */
DomSharedStylesHost.ctorParameters = [
{ type: undefined, decorators: [{ type: core_1.Inject, args: [dom_tokens_1.DOCUMENT,] },] },
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },
];
return DomSharedStylesHost;
}(SharedStylesHost));
exports.DomSharedStylesHost = DomSharedStylesHost;
//# sourceMappingURL=shared_styles_host.js.map

@@ -8,14 +8,11 @@ /**

*/
"use strict";
var lang_1 = require('../facade/lang');
import { StringWrapper } from '../facade/lang';
var CAMEL_CASE_REGEXP = /([A-Z])/g;
var DASH_CASE_REGEXP = /-([a-z])/g;
function camelCaseToDashCase(input) {
return lang_1.StringWrapper.replaceAllMapped(input, CAMEL_CASE_REGEXP, function (m /** TODO #9100 */) { return '-' + m[1].toLowerCase(); });
export function camelCaseToDashCase(input) {
return StringWrapper.replaceAllMapped(input, CAMEL_CASE_REGEXP, function (m /** TODO #9100 */) { return '-' + m[1].toLowerCase(); });
}
exports.camelCaseToDashCase = camelCaseToDashCase;
function dashCaseToCamelCase(input) {
return lang_1.StringWrapper.replaceAllMapped(input, DASH_CASE_REGEXP, function (m /** TODO #9100 */) { return m[1].toUpperCase(); });
export function dashCaseToCamelCase(input) {
return StringWrapper.replaceAllMapped(input, DASH_CASE_REGEXP, function (m /** TODO #9100 */) { return m[1].toUpperCase(); });
}
exports.dashCaseToCamelCase = dashCaseToCamelCase;
//# sourceMappingURL=util.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"camelCaseToDashCase":{"__symbolic":"function","parameters":["input"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":10,"character":3,"context":{"name":"CAMEL_CASE_REGEXP"}}},"dashCaseToCamelCase":{"__symbolic":"function","parameters":["input"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"DASH_CASE_REGEXP"}}}}}
{"__symbolic":"module","version":1,"metadata":{"camelCaseToDashCase":{"__symbolic":"function","parameters":["input"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":10,"character":4,"context":{"name":"CAMEL_CASE_REGEXP"}}},"dashCaseToCamelCase":{"__symbolic":"function","parameters":["input"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":4,"context":{"name":"DASH_CASE_REGEXP"}}}}}

@@ -1,2 +0,2 @@

import { AnimationKeyframe, AnimationStyles } from '../../core_private';
import { AnimationKeyframe, AnimationStyles } from '../private_import_core';
import { AnimationDriver } from './animation_driver';

@@ -3,0 +3,0 @@ import { WebAnimationsPlayer } from './web_animations_player';

@@ -8,9 +8,8 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var util_1 = require('./util');
var web_animations_player_1 = require('./web_animations_player');
var WebAnimationsDriver = (function () {
import { AUTO_STYLE } from '@angular/core';
import { StringMapWrapper } from '../facade/collection';
import { StringWrapper, isNumber, isPresent } from '../facade/lang';
import { dashCaseToCamelCase } from './util';
import { WebAnimationsPlayer } from './web_animations_player';
export var WebAnimationsDriver = (function () {
function WebAnimationsDriver() {

@@ -21,3 +20,3 @@ }

var startingStyleLookup = {};
if (lang_1.isPresent(startingStyles) && startingStyles.styles.length > 0) {
if (isPresent(startingStyles) && startingStyles.styles.length > 0) {
startingStyleLookup = _populateStyles(element, startingStyles, {});

@@ -51,18 +50,17 @@ startingStyleLookup['offset'] = 0;

}
return new web_animations_player_1.WebAnimationsPlayer(element, formattedSteps, playerOptions);
return new WebAnimationsPlayer(element, formattedSteps, playerOptions);
};
return WebAnimationsDriver;
}());
exports.WebAnimationsDriver = WebAnimationsDriver;
function _populateStyles(element, styles, defaultStyles) {
var data = {};
styles.styles.forEach(function (entry) {
collection_1.StringMapWrapper.forEach(entry, function (val, prop) {
var formattedProp = util_1.dashCaseToCamelCase(prop);
StringMapWrapper.forEach(entry, function (val, prop) {
var formattedProp = dashCaseToCamelCase(prop);
data[formattedProp] =
val == core_1.AUTO_STYLE ? val : val.toString() + _resolveStyleUnit(val, prop, formattedProp);
val == AUTO_STYLE ? val : val.toString() + _resolveStyleUnit(val, prop, formattedProp);
});
});
collection_1.StringMapWrapper.forEach(defaultStyles, function (value, prop) {
if (!lang_1.isPresent(data[prop])) {
StringMapWrapper.forEach(defaultStyles, function (value, prop) {
if (!isPresent(data[prop])) {
data[prop] = value;

@@ -76,7 +74,7 @@ }

if (_isPixelDimensionStyle(formattedProp) && val != 0 && val != '0') {
if (lang_1.isNumber(val)) {
if (isNumber(val)) {
unit = 'px';
}
else if (_findDimensionalSuffix(val.toString()).length == 0) {
throw new core_1.BaseException('Please provide a CSS unit value for ' + userProvidedProp + ':' + val);
throw new Error('Please provide a CSS unit value for ' + userProvidedProp + ':' + val);
}

@@ -91,3 +89,3 @@ }

for (var i = 0; i < value.length; i++) {
var c = lang_1.StringWrapper.charCodeAt(value, i);
var c = StringWrapper.charCodeAt(value, i);
if ((c >= _$0 && c <= _$9) || c == _$PERIOD)

@@ -94,0 +92,0 @@ continue;

@@ -1,2 +0,2 @@

import { AnimationPlayer } from '../../core_private';
import { AnimationPlayer } from '../private_import_core';
export declare class WebAnimationsPlayer implements AnimationPlayer {

@@ -10,3 +10,4 @@ element: any;

};
private _subscriptions;
private _onDoneFns;
private _onStartFns;
private _finished;

@@ -25,3 +26,4 @@ private _initialized;

init(): void;
onDone(fn: Function): void;
onStart(fn: () => void): void;
onDone(fn: () => void): void;
play(): void;

@@ -28,0 +30,0 @@ pause(): void;

@@ -8,8 +8,7 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var collection_1 = require('../facade/collection');
var lang_1 = require('../facade/lang');
var dom_adapter_1 = require('./dom_adapter');
var WebAnimationsPlayer = (function () {
import { AUTO_STYLE } from '@angular/core';
import { StringMapWrapper } from '../facade/collection';
import { isPresent } from '../facade/lang';
import { getDOM } from './dom_adapter';
export var WebAnimationsPlayer = (function () {
function WebAnimationsPlayer(element, keyframes, options) {

@@ -19,3 +18,4 @@ this.element = element;

this.options = options;
this._subscriptions = [];
this._onDoneFns = [];
this._onStartFns = [];
this._finished = false;

@@ -30,7 +30,7 @@ this._initialized = false;

this._finished = true;
if (!lang_1.isPresent(this.parentPlayer)) {
if (!isPresent(this.parentPlayer)) {
this.destroy();
}
this._subscriptions.forEach(function (fn) { return fn(); });
this._subscriptions = [];
this._onDoneFns.forEach(function (fn) { return fn(); });
this._onDoneFns = [];
}

@@ -45,4 +45,4 @@ };

var formattedKeyframe = {};
collection_1.StringMapWrapper.forEach(styles, function (value, prop) {
formattedKeyframe[prop] = value == core_1.AUTO_STYLE ? _computeStyle(_this.element, prop) : value;
StringMapWrapper.forEach(styles, function (value, prop) {
formattedKeyframe[prop] = value == AUTO_STYLE ? _computeStyle(_this.element, prop) : value;
});

@@ -60,5 +60,11 @@ return formattedKeyframe;

};
WebAnimationsPlayer.prototype.onDone = function (fn) { this._subscriptions.push(fn); };
WebAnimationsPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };
WebAnimationsPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };
WebAnimationsPlayer.prototype.play = function () {
this.init();
if (!this.hasStarted()) {
this._onStartFns.forEach(function (fn) { return fn(); });
this._onStartFns = [];
this._started = true;
}
this._player.play();

@@ -94,6 +100,5 @@ };

}());
exports.WebAnimationsPlayer = WebAnimationsPlayer;
function _computeStyle(element, prop) {
return dom_adapter_1.getDOM().getComputedStyle(element)[prop];
return getDOM().getComputedStyle(element)[prop];
}
//# sourceMappingURL=web_animations_player.js.map

@@ -8,3 +8,2 @@ /**

*/
"use strict";
/**

@@ -14,14 +13,14 @@ * JS version of browser APIs. This library can only run in the browser.

var win = typeof window !== 'undefined' && window || {};
exports.window = win;
exports.document = win.document;
exports.location = win.location;
exports.gc = win['gc'] ? function () { return win['gc'](); } : function () { return null; };
exports.performance = win['performance'] ? win['performance'] : null;
exports.Event = win['Event'];
exports.MouseEvent = win['MouseEvent'];
exports.KeyboardEvent = win['KeyboardEvent'];
exports.EventTarget = win['EventTarget'];
exports.History = win['History'];
exports.Location = win['Location'];
exports.EventListener = win['EventListener'];
export { win as window };
export var document = win.document;
export var location = win.location;
export var gc = win['gc'] ? function () { return win['gc'](); } : function () { return null; };
export var performance = win['performance'] ? win['performance'] : null;
export var Event = win['Event'];
export var MouseEvent = win['MouseEvent'];
export var KeyboardEvent = win['KeyboardEvent'];
export var EventTarget = win['EventTarget'];
export var History = win['History'];
export var Location = win['Location'];
export var EventListener = win['EventListener'];
//# sourceMappingURL=browser.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"document":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"location":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"gc":{"__symbolic":"if","condition":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"thenExpression":{"__symbolic":"error","message":"Function call not supported","line":16,"character":27},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":16,"character":47}},"performance":{"__symbolic":"if","condition":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"thenExpression":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"elseExpression":null},"Event":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"MouseEvent":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"KeyboardEvent":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"EventTarget":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"History":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"Location":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}},"EventListener":{"__symbolic":"error","message":"Reference to a local symbol","line":11,"character":3,"context":{"name":"win"}}}}
{"__symbolic":"module","version":1,"metadata":{"document":{"__symbolic":"select","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"member":"document"},"location":{"__symbolic":"select","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"member":"location"},"gc":{"__symbolic":"if","condition":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"gc"},"thenExpression":{"__symbolic":"error","message":"Function call not supported","line":16,"character":28},"elseExpression":{"__symbolic":"error","message":"Function call not supported","line":16,"character":48}},"performance":{"__symbolic":"if","condition":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"performance"},"thenExpression":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"performance"},"elseExpression":null},"Event":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"Event"},"MouseEvent":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"MouseEvent"},"KeyboardEvent":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"KeyboardEvent"},"EventTarget":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"EventTarget"},"History":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"History"},"Location":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"Location"},"EventListener":{"__symbolic":"index","expression":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":11,"character":10},"right":"undefined"},"right":{"__symbolic":"reference","name":"window"}},"right":{}},"index":"EventListener"}}}

@@ -0,1 +1,2 @@

export declare var Map: MapConstructor;

@@ -2,0 +3,0 @@ export declare var Set: SetConstructor;

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var lang_1 = require('./lang');
exports.Map = lang_1.global.Map;
exports.Set = lang_1.global.Set;
import { getSymbolIterator, global, isArray, isBlank, isJsObject, isPresent } from './lang';
export var Map = global.Map;
export var Set = global.Set;
// Safari and Internet Explorer do not support the iterable parameter to the

@@ -17,4 +16,4 @@ // Map constructor. We work around that by manually adding the items.

try {
if (new exports.Map([[1, 2]]).size === 1) {
return function createMapFromPairs(pairs) { return new exports.Map(pairs); };
if (new Map([[1, 2]]).size === 1) {
return function createMapFromPairs(pairs) { return new Map(pairs); };
}

@@ -25,3 +24,3 @@ }

return function createMapAndPopulateFromPairs(pairs) {
var map = new exports.Map();
var map = new Map();
for (var i = 0; i < pairs.length; i++) {

@@ -36,4 +35,4 @@ var pair = pairs[i];

try {
if (new exports.Map(new exports.Map())) {
return function createMapFromMap(m) { return new exports.Map(m); };
if (new Map(new Map())) {
return function createMapFromMap(m) { return new Map(m); };
}

@@ -44,3 +43,3 @@ }

return function createMapAndPopulateFromMap(m) {
var map = new exports.Map();
var map = new Map();
m.forEach(function (v, k) { map.set(k, v); });

@@ -51,3 +50,3 @@ return map;

var _clearValues = (function () {
if ((new exports.Map()).keys().next) {
if ((new Map()).keys().next) {
return function _clearValues(m) {

@@ -71,3 +70,3 @@ var keyIterator = m.keys();

try {
if ((new exports.Map()).values().next) {
if ((new Map()).values().next) {
return function createArrayFromMap(m, getValues) {

@@ -89,3 +88,3 @@ return getValues ? Array.from(m.values()) : Array.from(m.keys());

})();
var MapWrapper = (function () {
export var MapWrapper = (function () {
function MapWrapper() {

@@ -95,3 +94,3 @@ }

MapWrapper.createFromStringMap = function (stringMap) {
var result = new exports.Map();
var result = new Map();
for (var prop in stringMap) {

@@ -114,7 +113,6 @@ result.set(prop, stringMap[prop]);

}());
exports.MapWrapper = MapWrapper;
/**
* Wraps Javascript Objects
*/
var StringMapWrapper = (function () {
export var StringMapWrapper = (function () {
function StringMapWrapper() {

@@ -181,4 +179,3 @@ }

}());
exports.StringMapWrapper = StringMapWrapper;
var ListWrapper = (function () {
export var ListWrapper = (function () {
function ListWrapper() {

@@ -259,3 +256,3 @@ }

ListWrapper.sort = function (l, compareFn) {
if (lang_1.isPresent(compareFn)) {
if (isPresent(compareFn)) {
l.sort(compareFn);

@@ -277,3 +274,3 @@ }

var candidate = list[index];
if (lang_1.isBlank(candidate)) {
if (isBlank(candidate)) {
continue;

@@ -301,8 +298,7 @@ }

}());
exports.ListWrapper = ListWrapper;
function _flattenArray(source, target) {
if (lang_1.isPresent(source)) {
if (isPresent(source)) {
for (var i = 0; i < source.length; i++) {
var item = source[i];
if (lang_1.isArray(item)) {
if (isArray(item)) {
_flattenArray(item, target);

@@ -317,13 +313,12 @@ }

}
function isListLikeIterable(obj) {
if (!lang_1.isJsObject(obj))
export function isListLikeIterable(obj) {
if (!isJsObject(obj))
return false;
return lang_1.isArray(obj) ||
(!(obj instanceof exports.Map) &&
lang_1.getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
return isArray(obj) ||
(!(obj instanceof Map) &&
getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
}
exports.isListLikeIterable = isListLikeIterable;
function areIterablesEqual(a, b, comparator) {
var iterator1 = a[lang_1.getSymbolIterator()]();
var iterator2 = b[lang_1.getSymbolIterator()]();
export function areIterablesEqual(a, b, comparator) {
var iterator1 = a[getSymbolIterator()]();
var iterator2 = b[getSymbolIterator()]();
while (true) {

@@ -340,5 +335,4 @@ var item1 = iterator1.next();

}
exports.areIterablesEqual = areIterablesEqual;
function iterateListLike(obj, fn) {
if (lang_1.isArray(obj)) {
export function iterateListLike(obj, fn) {
if (isArray(obj)) {
for (var i = 0; i < obj.length; i++) {

@@ -349,3 +343,3 @@ fn(obj[i]);

else {
var iterator = obj[lang_1.getSymbolIterator()]();
var iterator = obj[getSymbolIterator()]();
var item;

@@ -357,13 +351,12 @@ while (!((item = iterator.next()).done)) {

}
exports.iterateListLike = iterateListLike;
// Safari and Internet Explorer do not support the iterable parameter to the
// Set constructor. We work around that by manually adding the items.
var createSetFromList = (function () {
var test = new exports.Set([1, 2, 3]);
var test = new Set([1, 2, 3]);
if (test.size === 3) {
return function createSetFromList(lst) { return new exports.Set(lst); };
return function createSetFromList(lst) { return new Set(lst); };
}
else {
return function createSetAndPopulateFromList(lst) {
var res = new exports.Set(lst);
var res = new Set(lst);
if (res.size !== lst.length) {

@@ -378,3 +371,3 @@ for (var i = 0; i < lst.length; i++) {

})();
var SetWrapper = (function () {
export var SetWrapper = (function () {
function SetWrapper() {

@@ -387,3 +380,2 @@ }

}());
exports.SetWrapper = SetWrapper;
//# sourceMappingURL=collection.js.map

@@ -0,1 +1,2 @@

/**

@@ -32,20 +33,3 @@ * @license

export { _global as global };
/**
* Runtime representation a type that a Component or other object is instances of.
*
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
* the `MyCustomComponent` constructor function.
*
* @stable
*/
export declare var Type: FunctionConstructor;
export interface Type extends Function {
}
/**
* Runtime representation of a type that is constructable (non-abstract).
*/
export interface ConcreteType<T> extends Type {
new (...args: any[]): T;
}
export declare function getTypeNameForDebugging(type: Type): string;
export declare function getTypeNameForDebugging(type: any): string;
export declare var Math: any;

@@ -57,3 +41,3 @@ export declare var Date: DateConstructor;

export declare function isNumber(obj: any): boolean;
export declare function isString(obj: any): obj is String;
export declare function isString(obj: any): obj is string;
export declare function isFunction(obj: any): boolean;

@@ -91,8 +75,2 @@ export declare function isType(obj: any): boolean;

}
export declare class NumberParseError extends Error {
message: string;
name: string;
constructor(message: string);
toString(): string;
}
export declare class NumberWrapper {

@@ -139,4 +117,4 @@ static toFixed(n: number, fractionDigits: number): string;

export declare function isPrimitive(obj: any): boolean;
export declare function hasConstructor(value: Object, type: Type): boolean;
export declare function hasConstructor(value: Object, type: any): boolean;
export declare function escape(s: string): string;
export declare function escapeRegExp(s: string): string;

@@ -8,8 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var globalScope;

@@ -28,20 +22,10 @@ if (typeof window === 'undefined') {

}
function scheduleMicroTask(fn) {
export function scheduleMicroTask(fn) {
Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
}
exports.scheduleMicroTask = scheduleMicroTask;
// Need to declare a new variable for global here since TypeScript
// exports the original value of the symbol.
var _global = globalScope;
exports.global = _global;
/**
* Runtime representation a type that a Component or other object is instances of.
*
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
* the `MyCustomComponent` constructor function.
*
* @stable
*/
exports.Type = Function;
function getTypeNameForDebugging(type) {
export { _global as global };
export function getTypeNameForDebugging(type) {
if (type['name']) {

@@ -52,5 +36,4 @@ return type['name'];

}
exports.getTypeNameForDebugging = getTypeNameForDebugging;
exports.Math = _global.Math;
exports.Date = _global.Date;
export var Math = _global.Math;
export var Date = _global.Date;
// TODO: remove calls to assert in production environment

@@ -62,40 +45,31 @@ // Note: Can't just export this and import in in other files

};
function isPresent(obj) {
export function isPresent(obj) {
return obj !== undefined && obj !== null;
}
exports.isPresent = isPresent;
function isBlank(obj) {
export function isBlank(obj) {
return obj === undefined || obj === null;
}
exports.isBlank = isBlank;
function isBoolean(obj) {
export function isBoolean(obj) {
return typeof obj === 'boolean';
}
exports.isBoolean = isBoolean;
function isNumber(obj) {
export function isNumber(obj) {
return typeof obj === 'number';
}
exports.isNumber = isNumber;
function isString(obj) {
export function isString(obj) {
return typeof obj === 'string';
}
exports.isString = isString;
function isFunction(obj) {
export function isFunction(obj) {
return typeof obj === 'function';
}
exports.isFunction = isFunction;
function isType(obj) {
export function isType(obj) {
return isFunction(obj);
}
exports.isType = isType;
function isStringMap(obj) {
export function isStringMap(obj) {
return typeof obj === 'object' && obj !== null;
}
exports.isStringMap = isStringMap;
var STRING_MAP_PROTO = Object.getPrototypeOf({});
function isStrictStringMap(obj) {
export function isStrictStringMap(obj) {
return isStringMap(obj) && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
}
exports.isStrictStringMap = isStrictStringMap;
function isPromise(obj) {
export function isPromise(obj) {
// allow any Promise/A+ compliant thenable.

@@ -105,14 +79,10 @@ // It's up to the caller to ensure that obj.then conforms to the spec

}
exports.isPromise = isPromise;
function isArray(obj) {
export function isArray(obj) {
return Array.isArray(obj);
}
exports.isArray = isArray;
function isDate(obj) {
return obj instanceof exports.Date && !isNaN(obj.valueOf());
export function isDate(obj) {
return obj instanceof Date && !isNaN(obj.valueOf());
}
exports.isDate = isDate;
function noop() { }
exports.noop = noop;
function stringify(token) {
export function noop() { }
export function stringify(token) {
if (typeof token === 'string') {

@@ -134,18 +104,14 @@ return token;

}
exports.stringify = stringify;
// serialize / deserialize enum exist only for consistency with dart API
// enums in typescript don't need to be serialized
function serializeEnum(val) {
export function serializeEnum(val) {
return val;
}
exports.serializeEnum = serializeEnum;
function deserializeEnum(val, values) {
export function deserializeEnum(val, values) {
return val;
}
exports.deserializeEnum = deserializeEnum;
function resolveEnumToken(enumValue, val) {
export function resolveEnumToken(enumValue, val) {
return enumValue[val];
}
exports.resolveEnumToken = resolveEnumToken;
var StringWrapper = (function () {
export var StringWrapper = (function () {
function StringWrapper() {

@@ -218,4 +184,3 @@ }

}());
exports.StringWrapper = StringWrapper;
var StringJoiner = (function () {
export var StringJoiner = (function () {
function StringJoiner(parts) {

@@ -229,14 +194,3 @@ if (parts === void 0) { parts = []; }

}());
exports.StringJoiner = StringJoiner;
var NumberParseError = (function (_super) {
__extends(NumberParseError, _super);
function NumberParseError(message) {
_super.call(this);
this.message = message;
}
NumberParseError.prototype.toString = function () { return this.message; };
return NumberParseError;
}(Error));
exports.NumberParseError = NumberParseError;
var NumberWrapper = (function () {
export var NumberWrapper = (function () {
function NumberWrapper() {

@@ -249,3 +203,3 @@ }

if (isNaN(result)) {
throw new NumberParseError('Invalid integer literal when parsing ' + text);
throw new Error('Invalid integer literal when parsing ' + text);
}

@@ -271,3 +225,3 @@ return result;

}
throw new NumberParseError('Invalid integer literal when parsing ' + text + ' in base ' + radix);
throw new Error('Invalid integer literal when parsing ' + text + ' in base ' + radix);
};

@@ -286,5 +240,4 @@ // TODO: NaN is a valid literal but is returned by parseFloat to indicate an error.

}());
exports.NumberWrapper = NumberWrapper;
exports.RegExp = _global.RegExp;
var FunctionWrapper = (function () {
export var RegExp = _global.RegExp;
export var FunctionWrapper = (function () {
function FunctionWrapper() {

@@ -296,36 +249,28 @@ }

}());
exports.FunctionWrapper = FunctionWrapper;
// JS has NaN !== NaN
function looseIdentical(a, b) {
export function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
exports.looseIdentical = looseIdentical;
// JS considers NaN is the same as NaN for map Key (while NaN !== NaN otherwise)
// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
function getMapKey(value) {
export function getMapKey(value) {
return value;
}
exports.getMapKey = getMapKey;
function normalizeBlank(obj) {
export function normalizeBlank(obj) {
return isBlank(obj) ? null : obj;
}
exports.normalizeBlank = normalizeBlank;
function normalizeBool(obj) {
export function normalizeBool(obj) {
return isBlank(obj) ? false : obj;
}
exports.normalizeBool = normalizeBool;
function isJsObject(o) {
export function isJsObject(o) {
return o !== null && (typeof o === 'function' || typeof o === 'object');
}
exports.isJsObject = isJsObject;
function print(obj) {
export function print(obj) {
console.log(obj);
}
exports.print = print;
function warn(obj) {
export function warn(obj) {
console.warn(obj);
}
exports.warn = warn;
// Can't be all uppercase as our transpiler would think it is a special directive...
var Json = (function () {
export var Json = (function () {
function Json() {

@@ -340,4 +285,3 @@ }

}());
exports.Json = Json;
var DateWrapper = (function () {
export var DateWrapper = (function () {
function DateWrapper() {

@@ -352,13 +296,12 @@ }

if (milliseconds === void 0) { milliseconds = 0; }
return new exports.Date(year, month - 1, day, hour, minutes, seconds, milliseconds);
return new Date(year, month - 1, day, hour, minutes, seconds, milliseconds);
};
DateWrapper.fromISOString = function (str) { return new exports.Date(str); };
DateWrapper.fromMillis = function (ms) { return new exports.Date(ms); };
DateWrapper.fromISOString = function (str) { return new Date(str); };
DateWrapper.fromMillis = function (ms) { return new Date(ms); };
DateWrapper.toMillis = function (date) { return date.getTime(); };
DateWrapper.now = function () { return new exports.Date(); };
DateWrapper.now = function () { return new Date(); };
DateWrapper.toJson = function (date) { return date.toJSON(); };
return DateWrapper;
}());
exports.DateWrapper = DateWrapper;
function setValueOnPath(global, path, value) {
export function setValueOnPath(global, path, value) {
var parts = path.split('.');

@@ -380,5 +323,4 @@ var obj = global;

}
exports.setValueOnPath = setValueOnPath;
var _symbolIterator = null;
function getSymbolIterator() {
export function getSymbolIterator() {
if (isBlank(_symbolIterator)) {

@@ -402,4 +344,3 @@ if (isPresent(globalScope.Symbol) && isPresent(Symbol.iterator)) {

}
exports.getSymbolIterator = getSymbolIterator;
function evalExpression(sourceUrl, expr, declarations, vars) {
export function evalExpression(sourceUrl, expr, declarations, vars) {
var fnBody = declarations + "\nreturn " + expr + "\n//# sourceURL=" + sourceUrl;

@@ -414,19 +355,14 @@ var fnArgNames = [];

}
exports.evalExpression = evalExpression;
function isPrimitive(obj) {
export function isPrimitive(obj) {
return !isJsObject(obj);
}
exports.isPrimitive = isPrimitive;
function hasConstructor(value, type) {
export function hasConstructor(value, type) {
return value.constructor === type;
}
exports.hasConstructor = hasConstructor;
function escape(s) {
export function escape(s) {
return _global.encodeURI(s);
}
exports.escape = escape;
function escapeRegExp(s) {
export function escapeRegExp(s) {
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
}
exports.escapeRegExp = escapeRegExp;
//# sourceMappingURL=lang.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":104,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":108,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":112,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":116,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":124,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"error","message":"Reference to a local symbol","line":127,"character":5,"context":{"name":"STRING_MAP_PROTO"}}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"then"}]}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":322,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":340,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":3,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":437,"character":19}}}}
{"__symbolic":"module","version":1,"metadata":{"Math":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"Date":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":87,"character":9},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":91,"character":9},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":95,"character":9},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":99,"character":9},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":107,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"then"}]}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":296,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":296,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":null,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isBlank"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"thenExpression":false,"elseExpression":{"__symbolic":"reference","name":"obj"}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":314,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":314,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Reference to a local symbol","line":55,"character":4,"context":{"name":"_global"}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":411,"character":19}}}}

@@ -8,3 +8,3 @@ /**

*/
import { SanitizationService, SecurityContext } from '@angular/core';
import { Sanitizer, SecurityContext } from '@angular/core';
export { SecurityContext };

@@ -54,3 +54,3 @@ /**

/**
* DomSanitizationService helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
* DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
* values to be safe to use in the different DOM contexts.

@@ -85,3 +85,3 @@ *

*/
export declare abstract class DomSanitizationService implements SanitizationService {
export declare abstract class DomSanitizer implements Sanitizer {
/**

@@ -136,3 +136,3 @@ * Sanitizes a value for use in the given SecurityContext.

}
export declare class DomSanitizationServiceImpl extends DomSanitizationService {
export declare class DomSanitizerImpl extends DomSanitizer {
sanitize(ctx: SecurityContext, value: any): string;

@@ -139,0 +139,0 @@ private checkNotSafeValue(value, expectedType);

@@ -8,3 +8,2 @@ /**

*/
"use strict";
var __extends = (this && this.__extends) || function (d, b) {

@@ -15,9 +14,9 @@ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];

};
var core_1 = require('@angular/core');
exports.SecurityContext = core_1.SecurityContext;
var html_sanitizer_1 = require('./html_sanitizer');
var style_sanitizer_1 = require('./style_sanitizer');
var url_sanitizer_1 = require('./url_sanitizer');
import { Injectable, SecurityContext } from '@angular/core';
import { sanitizeHtml } from './html_sanitizer';
import { sanitizeStyle } from './style_sanitizer';
import { sanitizeUrl } from './url_sanitizer';
export { SecurityContext };
/**
* DomSanitizationService helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
* DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
* values to be safe to use in the different DOM contexts.

@@ -52,30 +51,29 @@ *

*/
var DomSanitizationService = (function () {
function DomSanitizationService() {
export var DomSanitizer = (function () {
function DomSanitizer() {
}
return DomSanitizationService;
return DomSanitizer;
}());
exports.DomSanitizationService = DomSanitizationService;
var DomSanitizationServiceImpl = (function (_super) {
__extends(DomSanitizationServiceImpl, _super);
function DomSanitizationServiceImpl() {
export var DomSanitizerImpl = (function (_super) {
__extends(DomSanitizerImpl, _super);
function DomSanitizerImpl() {
_super.apply(this, arguments);
}
DomSanitizationServiceImpl.prototype.sanitize = function (ctx, value) {
DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
if (value == null)
return null;
switch (ctx) {
case core_1.SecurityContext.NONE:
case SecurityContext.NONE:
return value;
case core_1.SecurityContext.HTML:
case SecurityContext.HTML:
if (value instanceof SafeHtmlImpl)
return value.changingThisBreaksApplicationSecurity;
this.checkNotSafeValue(value, 'HTML');
return html_sanitizer_1.sanitizeHtml(String(value));
case core_1.SecurityContext.STYLE:
return sanitizeHtml(String(value));
case SecurityContext.STYLE:
if (value instanceof SafeStyleImpl)
return value.changingThisBreaksApplicationSecurity;
this.checkNotSafeValue(value, 'Style');
return style_sanitizer_1.sanitizeStyle(value);
case core_1.SecurityContext.SCRIPT:
return sanitizeStyle(value);
case SecurityContext.SCRIPT:
if (value instanceof SafeScriptImpl)

@@ -85,3 +83,3 @@ return value.changingThisBreaksApplicationSecurity;

throw new Error('unsafe value used in a script context');
case core_1.SecurityContext.URL:
case SecurityContext.URL:
if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {

@@ -92,4 +90,4 @@ // Allow resource URLs in URL contexts, they are strictly more trusted.

this.checkNotSafeValue(value, 'URL');
return url_sanitizer_1.sanitizeUrl(String(value));
case core_1.SecurityContext.RESOURCE_URL:
return sanitizeUrl(String(value));
case SecurityContext.RESOURCE_URL:
if (value instanceof SafeResourceUrlImpl) {

@@ -104,3 +102,3 @@ return value.changingThisBreaksApplicationSecurity;

};
DomSanitizationServiceImpl.prototype.checkNotSafeValue = function (value, expectedType) {
DomSanitizerImpl.prototype.checkNotSafeValue = function (value, expectedType) {
if (value instanceof SafeValueImpl) {

@@ -111,16 +109,16 @@ throw new Error(("Required a safe " + expectedType + ", got a " + value.getTypeName() + " ") +

};
DomSanitizationServiceImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };
DomSanitizationServiceImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };
DomSanitizationServiceImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };
DomSanitizationServiceImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };
DomSanitizationServiceImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };
DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
return new SafeResourceUrlImpl(value);
};
DomSanitizerImpl.decorators = [
{ type: Injectable },
];
/** @nocollapse */
DomSanitizationServiceImpl.decorators = [
{ type: core_1.Injectable },
];
return DomSanitizationServiceImpl;
}(DomSanitizationService));
exports.DomSanitizationServiceImpl = DomSanitizationServiceImpl;
DomSanitizerImpl.ctorParameters = [];
return DomSanitizerImpl;
}(DomSanitizer));
var SafeValueImpl = (function () {

@@ -127,0 +125,0 @@ function SafeValueImpl(changingThisBreaksApplicationSecurity) {

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"DomSanitizationServiceImpl":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"sanitize":[{"__symbolic":"method"}],"checkNotSafeValue":[{"__symbolic":"method"}],"bypassSecurityTrustHtml":[{"__symbolic":"method"}],"bypassSecurityTrustStyle":[{"__symbolic":"method"}],"bypassSecurityTrustScript":[{"__symbolic":"method"}],"bypassSecurityTrustUrl":[{"__symbolic":"method"}],"bypassSecurityTrustResourceUrl":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":1,"metadata":{"DomSanitizerImpl":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"sanitize":[{"__symbolic":"method"}],"checkNotSafeValue":[{"__symbolic":"method"}],"bypassSecurityTrustHtml":[{"__symbolic":"method"}],"bypassSecurityTrustStyle":[{"__symbolic":"method"}],"bypassSecurityTrustScript":[{"__symbolic":"method"}],"bypassSecurityTrustUrl":[{"__symbolic":"method"}],"bypassSecurityTrustResourceUrl":[{"__symbolic":"method"}]}}}}

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../dom/dom_adapter');
var url_sanitizer_1 = require('./url_sanitizer');
import { isDevMode } from '@angular/core';
import { getDOM } from '../dom/dom_adapter';
import { sanitizeSrcset, sanitizeUrl } from './url_sanitizer';
/** A <body> element that can be safely used to parse untrusted HTML. Lazily initialized below. */

@@ -21,3 +20,3 @@ var inertElement = null;

return inertElement;
DOM = dom_adapter_1.getDOM();
DOM = getDOM();
// Prefer using <template> element if supported.

@@ -160,5 +159,5 @@ var templateEl = DOM.createElement('template');

if (URI_ATTRS[lower])
value = url_sanitizer_1.sanitizeUrl(value);
value = sanitizeUrl(value);
if (SRCSET_ATTRS[lower])
value = url_sanitizer_1.sanitizeSrcset(value);
value = sanitizeSrcset(value);
_this.buf.push(' ');

@@ -228,3 +227,3 @@ _this.buf.push(attrName);

*/
function sanitizeHtml(unsafeHtmlInput) {
export function sanitizeHtml(unsafeHtmlInput) {
try {

@@ -259,3 +258,3 @@ var containerEl = getInertElement();

}
if (core_1.isDevMode() && sanitizer.sanitizedSomething) {
if (isDevMode() && sanitizer.sanitizedSomething) {
DOM.log('WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).');

@@ -271,3 +270,2 @@ }

}
exports.sanitizeHtml = sanitizeHtml;
//# sourceMappingURL=html_sanitizer.js.map

@@ -8,6 +8,5 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../dom/dom_adapter');
var url_sanitizer_1 = require('./url_sanitizer');
import { isDevMode } from '@angular/core';
import { getDOM } from '../dom/dom_adapter';
import { sanitizeUrl } from './url_sanitizer';
/**

@@ -77,3 +76,3 @@ * Regular expression for safe style values.

*/
function sanitizeStyle(value) {
export function sanitizeStyle(value) {
value = String(value).trim(); // Make sure it's actually a string.

@@ -85,12 +84,11 @@ if (!value)

var urlMatch = value.match(URL_RE);
if ((urlMatch && url_sanitizer_1.sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||
if ((urlMatch && sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||
value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {
return value; // Safe style values.
}
if (core_1.isDevMode()) {
dom_adapter_1.getDOM().log("WARNING: sanitizing unsafe style value " + value + " (see http://g.co/ng/security#xss).");
if (isDevMode()) {
getDOM().log("WARNING: sanitizing unsafe style value " + value + " (see http://g.co/ng/security#xss).");
}
return 'unsafe';
}
exports.sanitizeStyle = sanitizeStyle;
//# sourceMappingURL=style_sanitizer.js.map

@@ -8,5 +8,4 @@ /**

*/
"use strict";
var core_1 = require('@angular/core');
var dom_adapter_1 = require('../dom/dom_adapter');
import { isDevMode } from '@angular/core';
import { getDOM } from '../dom/dom_adapter';
/**

@@ -43,17 +42,15 @@ * A pattern that recognizes a commonly useful subset of URLs that are safe.

var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;
function sanitizeUrl(url) {
export function sanitizeUrl(url) {
url = String(url);
if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))
return url;
if (core_1.isDevMode()) {
dom_adapter_1.getDOM().log("WARNING: sanitizing unsafe URL value " + url + " (see http://g.co/ng/security#xss)");
if (isDevMode()) {
getDOM().log("WARNING: sanitizing unsafe URL value " + url + " (see http://g.co/ng/security#xss)");
}
return 'unsafe:' + url;
}
exports.sanitizeUrl = sanitizeUrl;
function sanitizeSrcset(srcset) {
export function sanitizeSrcset(srcset) {
srcset = String(srcset);
return srcset.split(',').map(function (srcset) { return sanitizeUrl(srcset.trim()); }).join(', ');
}
exports.sanitizeSrcset = sanitizeSrcset;
//# sourceMappingURL=url_sanitizer.js.map

@@ -0,1 +1,9 @@

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { NgZone } from '@angular/core';
export declare class BrowserDetection {

@@ -21,1 +29,2 @@ private _overrideUa;

export declare var browserDetection: BrowserDetection;
export declare function createNgZone(): NgZone;

@@ -8,7 +8,7 @@ /**

*/
"use strict";
var dom_adapter_1 = require('../src/dom/dom_adapter');
var collection_1 = require('../src/facade/collection');
var lang_1 = require('../src/facade/lang');
var BrowserDetection = (function () {
import { NgZone } from '@angular/core';
import { ListWrapper } from './facade/collection';
import { StringWrapper, global, isPresent, isString } from './facade/lang';
import { getDOM } from './private_import_platform-browser';
export var BrowserDetection = (function () {
function BrowserDetection(ua) {

@@ -19,7 +19,7 @@ this._overrideUa = ua;

get: function () {
if (lang_1.isPresent(this._overrideUa)) {
if (isPresent(this._overrideUa)) {
return this._overrideUa;
}
else {
return lang_1.isPresent(dom_adapter_1.getDOM()) ? dom_adapter_1.getDOM().getUserAgent() : '';
return isPresent(getDOM()) ? getDOM().getUserAgent() : '';
}

@@ -30,3 +30,3 @@ },

});
BrowserDetection.setup = function () { exports.browserDetection = new BrowserDetection(null); };
BrowserDetection.setup = function () { browserDetection = new BrowserDetection(null); };
Object.defineProperty(BrowserDetection.prototype, "isFirefox", {

@@ -81,3 +81,3 @@ get: function () { return this._ua.indexOf('Firefox') > -1; },

// see https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
get: function () { return !!lang_1.global.Intl; },
get: function () { return !!global.Intl; },
enumerable: true,

@@ -96,38 +96,34 @@ configurable: true

}());
exports.BrowserDetection = BrowserDetection;
BrowserDetection.setup();
function dispatchEvent(element /** TODO #9100 */, eventType /** TODO #9100 */) {
dom_adapter_1.getDOM().dispatchEvent(element, dom_adapter_1.getDOM().createEvent(eventType));
export function dispatchEvent(element /** TODO #9100 */, eventType /** TODO #9100 */) {
getDOM().dispatchEvent(element, getDOM().createEvent(eventType));
}
exports.dispatchEvent = dispatchEvent;
function el(html) {
return dom_adapter_1.getDOM().firstChild(dom_adapter_1.getDOM().content(dom_adapter_1.getDOM().createTemplate(html)));
export function el(html) {
return getDOM().firstChild(getDOM().content(getDOM().createTemplate(html)));
}
exports.el = el;
function normalizeCSS(css) {
css = lang_1.StringWrapper.replaceAll(css, /\s+/g, ' ');
css = lang_1.StringWrapper.replaceAll(css, /:\s/g, ':');
css = lang_1.StringWrapper.replaceAll(css, /'/g, '"');
css = lang_1.StringWrapper.replaceAll(css, / }/g, '}');
css = lang_1.StringWrapper.replaceAllMapped(css, /url\((\"|\s)(.+)(\"|\s)\)(\s*)/g, function (match /** TODO #9100 */) { return ("url(\"" + match[2] + "\")"); });
css = lang_1.StringWrapper.replaceAllMapped(css, /\[(.+)=([^"\]]+)\]/g, function (match /** TODO #9100 */) { return ("[" + match[1] + "=\"" + match[2] + "\"]"); });
export function normalizeCSS(css) {
css = StringWrapper.replaceAll(css, /\s+/g, ' ');
css = StringWrapper.replaceAll(css, /:\s/g, ':');
css = StringWrapper.replaceAll(css, /'/g, '"');
css = StringWrapper.replaceAll(css, / }/g, '}');
css = StringWrapper.replaceAllMapped(css, /url\((\"|\s)(.+)(\"|\s)\)(\s*)/g, function (match /** TODO #9100 */) { return ("url(\"" + match[2] + "\")"); });
css = StringWrapper.replaceAllMapped(css, /\[(.+)=([^"\]]+)\]/g, function (match /** TODO #9100 */) { return ("[" + match[1] + "=\"" + match[2] + "\"]"); });
return css;
}
exports.normalizeCSS = normalizeCSS;
var _singleTagWhitelist = ['br', 'hr', 'input'];
function stringifyElement(el /** TODO #9100 */) {
export function stringifyElement(el /** TODO #9100 */) {
var result = '';
if (dom_adapter_1.getDOM().isElementNode(el)) {
var tagName = dom_adapter_1.getDOM().tagName(el).toLowerCase();
if (getDOM().isElementNode(el)) {
var tagName = getDOM().tagName(el).toLowerCase();
// Opening tag
result += "<" + tagName;
// Attributes in an ordered way
var attributeMap = dom_adapter_1.getDOM().attributeMap(el);
var attributeMap = getDOM().attributeMap(el);
var keys = [];
attributeMap.forEach(function (v, k) { return keys.push(k); });
collection_1.ListWrapper.sort(keys);
ListWrapper.sort(keys);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var attValue = attributeMap.get(key);
if (!lang_1.isString(attValue)) {
if (!isString(attValue)) {
result += " " + key;

@@ -141,4 +137,4 @@ }

// Children
var childrenRoot = dom_adapter_1.getDOM().templateAwareRoot(el);
var children = lang_1.isPresent(childrenRoot) ? dom_adapter_1.getDOM().childNodes(childrenRoot) : [];
var childrenRoot = getDOM().templateAwareRoot(el);
var children = isPresent(childrenRoot) ? getDOM().childNodes(childrenRoot) : [];
for (var j = 0; j < children.length; j++) {

@@ -148,16 +144,18 @@ result += stringifyElement(children[j]);

// Closing tag
if (!collection_1.ListWrapper.contains(_singleTagWhitelist, tagName)) {
if (!ListWrapper.contains(_singleTagWhitelist, tagName)) {
result += "</" + tagName + ">";
}
}
else if (dom_adapter_1.getDOM().isCommentNode(el)) {
result += "<!--" + dom_adapter_1.getDOM().nodeValue(el) + "-->";
else if (getDOM().isCommentNode(el)) {
result += "<!--" + getDOM().nodeValue(el) + "-->";
}
else {
result += dom_adapter_1.getDOM().getText(el);
result += getDOM().getText(el);
}
return result;
}
exports.stringifyElement = stringifyElement;
exports.browserDetection = new BrowserDetection(null);
export var browserDetection = new BrowserDetection(null);
export function createNgZone() {
return new NgZone({ enableLongStackTrace: true });
}
//# sourceMappingURL=browser_util.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"el":{"__symbolic":"function","parameters":["html"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../src/dom/dom_adapter","name":"getDOM"}},"member":"firstChild"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../src/dom/dom_adapter","name":"getDOM"}},"member":"content"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../src/dom/dom_adapter","name":"getDOM"}},"member":"createTemplate"},"arguments":[{"__symbolic":"reference","name":"html"}]}]}]}},"browserDetection":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"BrowserDetection"},"arguments":[null]}}}
{"__symbolic":"module","version":1,"metadata":{"el":{"__symbolic":"function","parameters":["html"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./private_import_platform-browser","name":"getDOM"}},"member":"firstChild"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./private_import_platform-browser","name":"getDOM"}},"member":"content"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./private_import_platform-browser","name":"getDOM"}},"member":"createTemplate"},"arguments":[{"__symbolic":"reference","name":"html"}]}]}]}},"browserDetection":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"BrowserDetection"},"arguments":[null]},"createNgZone":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},"arguments":[{"enableLongStackTrace":true}]}}}}

@@ -1,32 +0,21 @@

import { PlatformRef } from '@angular/core';
/**
* Providers for the browser test platform
* @license
* Copyright Google Inc. All Rights Reserved.
*
* @deprecated Use `platformBrowserTesting()` or create a custom platform factory via
* `createPlatformFactory(platformBrowserTesting, ...)`
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export declare const TEST_BROWSER_PLATFORM_PROVIDERS: Array<any>;
import { PlatformRef, Provider } from '@angular/core';
/**
* @deprecated Use initTestEnvironment with BrowserTestModule instead. This is empty for backwards
* compatibility,
* as all of our bootstrap methods add a module implicitly, i.e. keeping this filled would add the
* providers 2x.
*/
export declare const TEST_BROWSER_APPLICATION_PROVIDERS: Array<any>;
/**
* Platform for testing
*
* @experimental API related to bootstrapping are still under review.
* @stable
*/
export declare const platformBrowserTesting: (extraProviders?: any[]) => PlatformRef;
export declare const platformBrowserTesting: (extraProviders?: Provider[]) => PlatformRef;
/**
* @deprecated Use {@link platformBrowserTesting} instead
*/
export declare const browserTestingPlatform: (extraProviders?: any[]) => PlatformRef;
/**
* NgModule for testing.
*
* @experimental
* @stable
*/
export declare class BrowserTestingModule {
}

@@ -1,64 +0,38 @@

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
"use strict";
var core_1 = require('@angular/core');
var browser_1 = require('../src/browser');
var browser_adapter_1 = require('../src/browser/browser_adapter');
var animation_driver_1 = require('../src/dom/animation_driver');
var ng_probe_1 = require('../src/dom/debug/ng_probe');
var browser_util_1 = require('./browser_util');
import { APP_ID, NgModule, NgZone, PLATFORM_INITIALIZER, createPlatformFactory, platformCore } from '@angular/core';
import { AnimationDriver, BrowserModule } from '@angular/platform-browser';
import { BrowserDetection, createNgZone } from './browser_util';
import { BrowserDomAdapter, ELEMENT_PROBE_PROVIDERS } from './private_import_platform-browser';
function initBrowserTests() {
browser_adapter_1.BrowserDomAdapter.makeCurrent();
browser_util_1.BrowserDetection.setup();
BrowserDomAdapter.makeCurrent();
BrowserDetection.setup();
}
function createNgZone() {
return new core_1.NgZone({ enableLongStackTrace: true });
}
var _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: core_1.PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
var _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
/**
* Providers for the browser test platform
* Platform for testing
*
* @deprecated Use `platformBrowserTesting()` or create a custom platform factory via
* `createPlatformFactory(platformBrowserTesting, ...)`
* @stable
*/
exports.TEST_BROWSER_PLATFORM_PROVIDERS = [core_1.PLATFORM_COMMON_PROVIDERS, _TEST_BROWSER_PLATFORM_PROVIDERS];
export var platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
/**
* @deprecated Use initTestEnvironment with BrowserTestModule instead. This is empty for backwards
* compatibility,
* as all of our bootstrap methods add a module implicitly, i.e. keeping this filled would add the
* providers 2x.
*/
exports.TEST_BROWSER_APPLICATION_PROVIDERS = [];
/**
* Platform for testing
* NgModule for testing.
*
* @experimental API related to bootstrapping are still under review.
* @stable
*/
exports.platformBrowserTesting = core_1.createPlatformFactory(core_1.platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
/**
* @deprecated Use {@link platformBrowserTesting} instead
*/
exports.browserTestingPlatform = exports.platformBrowserTesting;
var BrowserTestingModule = (function () {
export var BrowserTestingModule = (function () {
function BrowserTestingModule() {
}
/** @nocollapse */
BrowserTestingModule.decorators = [
{ type: core_1.NgModule, args: [{
exports: [browser_1.BrowserModule],
{ type: NgModule, args: [{
exports: [BrowserModule],
providers: [
{ provide: core_1.APP_ID, useValue: 'a' }, ng_probe_1.ELEMENT_PROBE_PROVIDERS,
{ provide: core_1.NgZone, useFactory: createNgZone },
{ provide: animation_driver_1.AnimationDriver, useValue: animation_driver_1.AnimationDriver.NOOP }
{ provide: APP_ID, useValue: 'a' }, ELEMENT_PROBE_PROVIDERS,
{ provide: NgZone, useFactory: createNgZone },
{ provide: AnimationDriver, useValue: AnimationDriver.NOOP }
]
},] },
];
/** @nocollapse */
BrowserTestingModule.ctorParameters = [];
return BrowserTestingModule;
}());
exports.BrowserTestingModule = BrowserTestingModule;
//# sourceMappingURL=browser.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"TEST_BROWSER_PLATFORM_PROVIDERS":{"__symbolic":"error","message":"Reference to a local symbol","line":27,"character":5,"context":{"name":"_TEST_BROWSER_PLATFORM_PROVIDERS"}},"TEST_BROWSER_APPLICATION_PROVIDERS":[],"platformBrowserTesting":{"__symbolic":"error","message":"Reference to a local symbol","line":27,"character":5,"context":{"name":"_TEST_BROWSER_PLATFORM_PROVIDERS"}},"browserTestingPlatform":{"__symbolic":"reference","name":"platformBrowserTesting"},"BrowserTestingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[{"__symbolic":"reference","module":"../src/browser","name":"BrowserModule"}],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_ID"},"useValue":"a"},{"__symbolic":"reference","module":"../src/dom/debug/ng_probe","name":"ELEMENT_PROBE_PROVIDERS"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},"useFactory":{"__symbolic":"reference","name":"createNgZone"}},{"provide":{"__symbolic":"reference","module":"../src/dom/animation_driver","name":"AnimationDriver"},"useValue":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../src/dom/animation_driver","name":"AnimationDriver"},"member":"NOOP"}}]}]}]}}}
{"__symbolic":"module","version":1,"metadata":{"platformBrowserTesting":{"__symbolic":"error","message":"Reference to a local symbol","line":18,"character":6,"context":{"name":"_TEST_BROWSER_PLATFORM_PROVIDERS"}},"BrowserTestingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"exports":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"BrowserModule"}],"providers":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_ID"},"useValue":"a"},{"__symbolic":"reference","module":"./private_import_platform-browser","name":"ELEMENT_PROBE_PROVIDERS"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgZone"},"useFactory":{"__symbolic":"reference","module":"./browser_util","name":"createNgZone"}},{"provide":{"__symbolic":"reference","module":"@angular/platform-browser","name":"AnimationDriver"},"useValue":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/platform-browser","name":"AnimationDriver"},"member":"NOOP"}}]}]}]}}}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc