Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: pkg/web_components/lib/platform.concat.js.map

Issue 516043002: fix for getDefaultComputedStyles (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update pubspec and changelog Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/web_components/lib/platform.concat.js ('k') | pkg/web_components/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 { 1 {
2 "version": 3, 2 "version": 3,
3 "file": "platform.concat.js", 3 "file": "platform.concat.js",
4 "sources": [ 4 "sources": [
5 "build/boot.js", 5 "build/boot.js",
6 "../WeakMap/weakmap.js", 6 "../WeakMap/weakmap.js",
7 "../observe-js/src/observe.js", 7 "../observe-js/src/observe.js",
8 "build/if-poly.js", 8 "build/if-poly.js",
9 "../ShadowDOM/src/wrappers.js", 9 "../ShadowDOM/src/wrappers.js",
10 "../ShadowDOM/src/microtask.js", 10 "../ShadowDOM/src/microtask.js",
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 "../CustomElements/src/Parser.js", 80 "../CustomElements/src/Parser.js",
81 "../CustomElements/src/boot.js", 81 "../CustomElements/src/boot.js",
82 "src/patches-custom-elements.js", 82 "src/patches-custom-elements.js",
83 "src/loader.js", 83 "src/loader.js",
84 "src/styleloader.js", 84 "src/styleloader.js",
85 "../NodeBind/src/NodeBind.js", 85 "../NodeBind/src/NodeBind.js",
86 "../TemplateBinding/src/TemplateBinding.js", 86 "../TemplateBinding/src/TemplateBinding.js",
87 "src/patches-mdv.js" 87 "src/patches-mdv.js"
88 ], 88 ],
89 "names": [], 89 "names": [],
90 "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;A;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;A;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;A;AC9rDA;AACA;A;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrXA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;A;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACv4BA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjDA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/tBA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7QA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;A;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;A;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzCA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;A;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtUA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC /BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxCA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AClCA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;A;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxEA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;A;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;A;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;A;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;A;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;A;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpCA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;A;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; A;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3BA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7CA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzCA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACn DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;A;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACvBA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnpBA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;A;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;A;AC5UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtFA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;A;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;A;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtwBA,Q;ACAA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5CA,C;ACAA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;A;ACjkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7 DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5IA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;A;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;A;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1DA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;A;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;A;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;A;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sD; ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3KA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/KA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;A;ACrUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjCA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA,4D;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC 1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5dA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A,0B;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChCA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjHA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;A;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtVA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;A;ACrwCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A", 90 "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;A;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;A;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;A;AC9rDA;AACA;A;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrXA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;A;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACv4BA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjDA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/tBA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7QA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;A;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;A;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzCA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;A;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtUA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC /BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxCA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AClCA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;A;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxEA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;A;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;A;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;A;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;A;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;A;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpCA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;A;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; A;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3BA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7CA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzCA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACn DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;A;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACvBA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnpBA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;A;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;A;AC5UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACvFA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;A;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtwBA,Q ;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5CA,C;ACAA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;A;ACjkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; A;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5IA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;A;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;A;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1DA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;A;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;A;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A,sD;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3KA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/KA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;A;ACrUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;A;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjCA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA,4D;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;A;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5dA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA,0B;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtEA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChCA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjHA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;A;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtVA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA ;AACA;AACA;AACA;A;ACrwCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA; AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A",
91 "sourcesContent": [ 91 "sourcesContent": [
92 "/**\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved .\n * This code may only be used under the BSD style license found at http://pol ymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http: //polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be foun d at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights gran t found at http://polymer.github.io/PATENTS.txt\n */\n\nwindow.Platform = window .Platform || {};\n// prepopulate window.logFlags if necessary\nwindow.logFlags = window.logFlags || {};\n// process flags\n(function(scope){\n // import\n var flags = scope.flags || {};\n // populate flags from location\n location.searc h.slice(1).split('&').forEach(function(o) {\n o = o.split('=');\n o[0] && (flags[o[0]] = o[1] || true);\n });\n var entryPoint = document.currentScript ||\n document.querySelector('script[src*=\"platform.js\"]');\n if (entryPo int) {\n var a = entryPoint.attributes;\n for (var i = 0, n; i < a.length; i++) {\n n = a[i];\n if (n.name !== 'src') {\n flags[n.name] = n.value || true;\n }\n }\n }\n if (flags.log) {\n flags.log.split( ',').forEach(function(f) {\n window.logFlags[f] = true;\n });\n }\n // If any of these flags match 'native', then force native ShadowDOM; any\n // ot her truthy value, or failure to detect native\n // ShadowDOM, results in polyfi ll\n flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;\n if (f lags.shadow === 'native') {\n flags.shadow = false;\n } else {\n flags.sh adow = flags.shadow || !HTMLElement.prototype.createShadowRoot;\n }\n\n if (fl ags.shadow && document.querySelectorAll('script').length > 1) {\n console.war n('platform.js is not the first script on the page. ' +\n 'See http://www .polymer-project.org/docs/start/platform.html#setup ' +\n 'for details.') ;\n }\n\n // CustomElements polyfill flag\n if (flags.register) {\n window .CustomElements = window.CustomElements || {flags: {}};\n window.CustomElemen ts.flags.register = flags.register;\n }\n\n if (flags.imports) {\n window.H TMLImports = window.HTMLImports || {flags: {}};\n window.HTMLImports.flags.im ports = flags.imports;\n }\n\n // export\n scope.flags = flags;\n})(Platform) ;\n", 92 "/**\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved .\n * This code may only be used under the BSD style license found at http://pol ymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http: //polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be foun d at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights gran t found at http://polymer.github.io/PATENTS.txt\n */\n\nwindow.Platform = window .Platform || {};\n// prepopulate window.logFlags if necessary\nwindow.logFlags = window.logFlags || {};\n// process flags\n(function(scope){\n // import\n var flags = scope.flags || {};\n // populate flags from location\n location.searc h.slice(1).split('&').forEach(function(o) {\n o = o.split('=');\n o[0] && (flags[o[0]] = o[1] || true);\n });\n var entryPoint = document.currentScript ||\n document.querySelector('script[src*=\"platform.js\"]');\n if (entryPo int) {\n var a = entryPoint.attributes;\n for (var i = 0, n; i < a.length; i++) {\n n = a[i];\n if (n.name !== 'src') {\n flags[n.name] = n.value || true;\n }\n }\n }\n if (flags.log) {\n flags.log.split( ',').forEach(function(f) {\n window.logFlags[f] = true;\n });\n }\n // If any of these flags match 'native', then force native ShadowDOM; any\n // ot her truthy value, or failure to detect native\n // ShadowDOM, results in polyfi ll\n flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;\n if (f lags.shadow === 'native') {\n flags.shadow = false;\n } else {\n flags.sh adow = flags.shadow || !HTMLElement.prototype.createShadowRoot;\n }\n\n if (fl ags.shadow && document.querySelectorAll('script').length > 1) {\n console.war n('platform.js is not the first script on the page. ' +\n 'See http://www .polymer-project.org/docs/start/platform.html#setup ' +\n 'for details.') ;\n }\n\n // CustomElements polyfill flag\n if (flags.register) {\n window .CustomElements = window.CustomElements || {flags: {}};\n window.CustomElemen ts.flags.register = flags.register;\n }\n\n if (flags.imports) {\n window.H TMLImports = window.HTMLImports || {flags: {}};\n window.HTMLImports.flags.im ports = flags.imports;\n }\n\n // export\n scope.flags = flags;\n})(Platform) ;\n",
93 "/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1 e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (en try && entry[0] === key)\n entry[1] = value;\n else\n d efineProperty(key, this.name, {value: [key, value], writable: true});\n },\ n get: function(key) {\n var entry;\n return (entry = key[thi s.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n var entry = key[this.name];\n if (!en try) return false;\n var hasValue = entry[0] === key;\n entry[0] = entry[1] = undefined;\n return hasValue;\n },\n has: function( key) {\n var entry = key[this.name];\n if (!entry) return false;\n return entry[0] === key;\n }\n };\n\n window.WeakMap = WeakMa p;\n })();\n}\n", 93 "/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1 e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (en try && entry[0] === key)\n entry[1] = value;\n else\n d efineProperty(key, this.name, {value: [key, value], writable: true});\n },\ n get: function(key) {\n var entry;\n return (entry = key[thi s.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n var entry = key[this.name];\n if (!en try) return false;\n var hasValue = entry[0] === key;\n entry[0] = entry[1] = undefined;\n return hasValue;\n },\n has: function( key) {\n var entry = key[this.name];\n if (!entry) return false;\n return entry[0] === key;\n }\n };\n\n window.WeakMap = WeakMa p;\n })();\n}\n",
94 "// Copyright 2012 Google Inc.\n//\n// Licensed under the Apache License, Ve rsion 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http:/ /www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law o r agreed to in writing, software\n// distributed under the License is distribute d on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe r express or implied.\n// See the License for the specific language governing pe rmissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n var testingExposeCycleCount = global.testingExposeCycleCount;\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function det ectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n t ypeof Array.observe !== 'function') {\n return false;\n }\n\n var rec ords = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n var arr = [];\n Object.observe(test, callback);\n Arr ay.observe(arr, callback);\n test.id = 1;\n test.id = 2;\n delete test. id;\n arr.push(1, 2);\n arr.length = 0;\n\n Object.deliverChangeRecords (callback);\n if (records.length !== 5)\n return false;\n\n if (recor ds[0].type != 'add' ||\n records[1].type != 'update' ||\n records[ 2].type != 'delete' ||\n records[3].type != 'splice' ||\n records[ 4].type != 'splice') {\n return false;\n }\n\n Object.unobserve(test, callback);\n Array.unobserve(arr, callback);\n\n return true;\n }\n\n v ar hasObserve = detectObjectObserve();\n\n function detectEval() {\n // Don' t test for eval if we're running in a Chrome App environment.\n // We check f or APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n \n // Firefox OS Apps do not allow eval. This feature detection is very hacky \n // but even if some other platform adds support for this function this cod e\n // will continue to work.\n if (navigator.getDeviceStorage) {\n r eturn false;\n }\n\n try {\n var f = new Function('', 'return true;') ;\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n v ar hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0 ;\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(o bj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number .isNaN || function(value) {\n return typeof value === 'number' && global.isNa N(value);\n }\n\n function areSameValue(left, right) {\n if (left === right )\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj ) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\ n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object. defineProperty(newObject, name,\n Object.getOwnPrope rtyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var identR egExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');\n\n functio n getPathCharType(char) {\n if (char === undefined)\n return 'eof';\n\n var code = char.charCodeAt(0);\n\n switch(code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return char;\n\n case 0x5F: // _\n case 0x24: // $\n return 'ident';\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return \n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator \n return 'ws';\n }\n\n // a-z, A-Z\n if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))\n return 'ident';\n\n // 1-9 \n if (0x31 <= code && code <= 0x39)\n return 'number';\n\n return 'e lse';\n }\n\n var pathStateMachine = {\n 'beforePath': {\n 'ws': ['bef orePath'],\n 'ident': ['inIdent', 'append'],\n '[': ['beforeElement'], \n 'eof': ['afterPath']\n },\n\n 'inPath': {\n 'ws': ['inPath'], \n '.': ['beforeIdent'],\n '[': ['beforeElement'],\n 'eof': ['aft erPath']\n },\n\n 'beforeIdent': {\n 'ws': ['beforeIdent'],\n 'i dent': ['inIdent', 'append']\n },\n\n 'inIdent': {\n 'ident': ['inIde nt', 'append'],\n '0': ['inIdent', 'append'],\n 'number': ['inIdent', 'append'],\n 'ws': ['inPath', 'push'],\n '.': ['beforeIdent', 'push'], \n '[': ['beforeElement', 'push'],\n 'eof': ['afterPath', 'push']\n },\n\n 'beforeElement': {\n 'ws': ['beforeElement'],\n '0': ['afte rZero', 'append'],\n 'number': ['inIndex', 'append'],\n \"'\": ['inSin gleQuote', 'append', ''],\n '\"': ['inDoubleQuote', 'append', '']\n },\n \n 'afterZero': {\n 'ws': ['afterElement', 'push'],\n ']': ['inPath ', 'push']\n },\n\n 'inIndex': {\n '0': ['inIndex', 'append'],\n 'number': ['inIndex', 'append'],\n 'ws': ['afterElement'],\n ']': ['i nPath', 'push']\n },\n\n 'inSingleQuote': {\n \"'\": ['afterElement'] ,\n 'eof': ['error'],\n 'else': ['inSingleQuote', 'append']\n },\n\ n 'inDoubleQuote': {\n '\"': ['afterElement'],\n 'eof': ['error'],\ n 'else': ['inDoubleQuote', 'append']\n },\n\n 'afterElement': {\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n }\n }\n\n funct ion noop() {}\n\n function parsePath(path) {\n var keys = [];\n var index = -1;\n var c, newChar, key, type, transition, action, typeMap, mode = 'befo rePath';\n\n var actions = {\n push: function() {\n if (key === u ndefined)\n return;\n\n keys.push(key);\n key = undefined ;\n },\n\n append: function() {\n if (key === undefined)\n key = newChar\n else\n key += newChar;\n }\n };\n\n function maybeUnescapeQuote() {\n if (index >= path.length)\n re turn;\n\n var nextChar = path[index + 1];\n if ((mode == 'inSingleQuot e' && nextChar == \"'\") ||\n (mode == 'inDoubleQuote' && nextChar == ' \"')) {\n index++;\n newChar = nextChar;\n actions.append() ;\n return true;\n }\n }\n\n while (mode) {\n index++;\n c = path[index];\n\n if (c == '\\\\' && maybeUnescapeQuote(mode))\n continue;\n\n type = getPathCharType(c);\n typeMap = pathStateMac hine[mode];\n transition = typeMap[type] || typeMap['else'] || 'error';\n\n if (transition == 'error')\n return; // parse error;\n\n mode = transition[0];\n action = actions[transition[1]] || noop;\n newChar = transition[2] === undefined ? c : transition[2];\n action();\n\n if (mode === 'afterPath') {\n return keys;\n }\n }\n\n return; // parse error\n }\n\n function isIdent(s) {\n return identRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(parts, privateToken) { \n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.ge t to retrieve path objects');\n\n for (var i = 0; i < parts.length; i++) {\n this.push(String(parts[i]));\n }\n\n if (hasEval && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO (rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pa thString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null || pathString.length == 0)\n pathString = '';\n\n if (typeof pathString != 'string') {\n if (isIndex(pathString.length)) { \n // Constructed with array-like (pre-parsed) keys\n return new P ath(pathString, constructorIsPrivate);\n }\n\n pathString = String(pat hString);\n }\n\n var path = pathCache[pathString];\n if (path)\n return path;\n\n var parts = parsePath(pathString);\n if (!parts)\n r eturn invalidPath;\n\n var path = new Path(parts, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n \n function formatAccessor(key) {\n if (isIndex(key)) {\n return '[' + key + ']';\n } else {\n return '[\"' + key.replace(/\"/g, '\\\\\"') + '\ "]';\n }\n }\n\n Path.prototype = createObject({\n __proto__: [],\n v alid: true,\n\n toString: function() {\n var pathString = '';\n for (var i = 0; i < this.length; i++) {\n var key = this[i];\n if (is Ident(key)) {\n pathString += i ? '.' + key : key;\n } else {\n pathString += formatAccessor(key);\n }\n }\n\n return pathString;\n },\n\n getValueFrom: function(obj, directObserver) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n ret urn;\n obj = obj[this[i]];\n }\n return obj;\n },\n\n ite rateObjects: function(obj, observe) {\n for (var i = 0; i < this.length; i+ +) {\n if (i)\n obj = obj[this[i - 1]];\n if (!isObject(o bj))\n return;\n observe(obj, this[0]);\n }\n },\n\n compiledGetValueFromFn: function() {\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n var key;\n for (; i < (this.length - 1); i++) {\n key = this[i];\n pathStr ing += isIdent(key) ? '.' + key : formatAccessor(key);\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n var key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\ n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0 ; i < this.length - 1; i++) {\n if (!isObject(obj))\n return fal se;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n \n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\ n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_ ()) {\n cycles++;\n }\n if (testingExposeCycleCount)\n global.di rtyCheckCycleCount = cycles;\n\n return cycles > 0;\n }\n\n function object IsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.add ed) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff .changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n\n for (var pr op in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(pr op in object)) {\n removed[prop] = undefined;\n continue;\n } \n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n c ontinue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(ob ject) && object.length !== oldObject.length)\n changed.length = object.leng th;\n\n return {\n added: added,\n removed: removed,\n changed : changed\n };\n }\n\n var eomTasks = [];\n function runEOMTasks() {\n if (!eomTasks.length)\n return false;\n\n for (var i = 0; i < eomTasks.l ength; i++) {\n eomTasks[i]();\n }\n eomTasks.length = 0;\n return true;\n }\n\n var runEOM = hasObserve ? (function(){\n var eomObj = { ping Pong: true };\n var eomRunScheduled = false;\n\n Object.observe(eomObj, fu nction() {\n runEOMTasks();\n eomRunScheduled = false;\n });\n\n return function(fn) {\n eomTasks.push(fn);\n if (!eomRunScheduled) {\ n eomRunScheduled = true;\n eomObj.pingPong = !eomObj.pingPong;\n }\n };\n })() :\n (function() {\n return function(fn) {\n eomT asks.push(fn);\n };\n })();\n\n var observedObjectCache = [];\n\n function newObservedObject() {\n var observer;\n var object;\n var discardRecor ds = false;\n var first = true;\n\n function callback(records) {\n if (observer && observer.state_ === OPENED && !discardRecords)\n observer.c heck_(records);\n }\n\n return {\n open: function(obs) {\n if (observer)\n throw Error('ObservedObject in use');\n\n if (!firs t)\n Object.deliverChangeRecords(callback);\n\n observer = obs;\ n first = false;\n },\n observe: function(obj, arrayObserve) {\ n object = obj;\n if (arrayObserve)\n Array.observe(objec t, callback);\n else\n Object.observe(object, callback);\n },\n deliver: function(discard) {\n discardRecords = discard;\n Object.deliverChangeRecords(callback);\n discardRecords = false;\n },\n close: function() {\n observer = undefined;\n Object.u nobserve(object, callback);\n observedObjectCache.push(this);\n }\n };\n }\n\n /*\n * The observedSet abstraction is a perf optimization whic h reduces the total\n * number of Object.observe observations of a set of obje cts. The idea is that\n * groups of Observers will have some object dependenci es in common and this\n * observed set ensures that each object in the transit ive closure of\n * dependencies is only observed once. The observedSet acts as a write barrier\n * such that whenever any change comes through, all Observer s are checked for\n * changed values.\n *\n * Note that this optimization is explicitly moving work from setup-time to\n * change-time.\n *\n * TODO (rafaelw): Implement \"garbage collection\". In order to move work off\n * the critical path, when Observers are closed, their observed objects are\n * not Object.unobserve(d). As a result, it's possible that if the observedSet\n * is kept open, but some Observers have been closed, it could cause \"leaks\"\n * (prevent otherwise collectable objects from being collected). At some\n * poin t, we should implement incremental \"gc\" which keeps a list of\n * observedSe ts which may need clean-up and does small amounts of cleanup on a\n * timeout until all is clean.\n */\n\n function getObservedObject(observer, object, arr ayObserve) {\n var dir = observedObjectCache.pop() || newObservedObject();\n dir.open(observer);\n dir.observe(object, arrayObserve);\n return dir;\ n }\n\n var observedSetCache = [];\n\n function newObservedSet() {\n var o bserverCount = 0;\n var observers = [];\n var objects = [];\n var rootO bj;\n var rootObjProps;\n\n function observe(obj, prop) {\n if (!obj) \n return;\n\n if (obj === rootObj)\n rootObjProps[prop] = tr ue;\n\n if (objects.indexOf(obj) < 0) {\n objects.push(obj);\n Object.observe(obj, callback);\n }\n\n observe(Object.getPrototypeOf (obj), prop);\n }\n\n function allRootObjNonObservedProps(recs) {\n f or (var i = 0; i < recs.length; i++) {\n var rec = recs[i];\n if ( rec.object !== rootObj ||\n rootObjProps[rec.name] ||\n re c.type === 'setPrototype') {\n return false;\n }\n }\n return true;\n }\n\n function callback(recs) {\n if (allRootObjNonOb servedProps(recs))\n return;\n\n var observer;\n for (var i = 0 ; i < observers.length; i++) {\n observer = observers[i];\n if (ob server.state_ == OPENED) {\n observer.iterateObjects_(observe);\n }\n }\n\n for (var i = 0; i < observers.length; i++) {\n obse rver = observers[i];\n if (observer.state_ == OPENED) {\n observ er.check_();\n }\n }\n }\n\n var record = {\n object: und efined,\n objects: objects,\n open: function(obs, object) {\n i f (!rootObj) {\n rootObj = object;\n rootObjProps = {};\n }\n\n observers.push(obs);\n observerCount++;\n obs.iter ateObjects_(observe);\n },\n close: function(obs) {\n observerC ount--;\n if (observerCount > 0) {\n return;\n }\n\n for (var i = 0; i < objects.length; i++) {\n Object.unobserve(object s[i], callback);\n Observer.unobservedCount++;\n }\n\n ob servers.length = 0;\n objects.length = 0;\n rootObj = undefined;\n rootObjProps = undefined;\n observedSetCache.push(this);\n } \n };\n\n return record;\n }\n\n var lastObservedSet;\n\n function getO bservedSet(observer, obj) {\n if (!lastObservedSet || lastObservedSet.object !== obj) {\n lastObservedSet = observedSetCache.pop() || newObservedSet();\ n lastObservedSet.object = obj;\n }\n lastObservedSet.open(observer, obj);\n return lastObservedSet;\n }\n\n var UNOPENED = 0;\n var OPENED = 1 ;\n var CLOSED = 2;\n var RESETTING = 3;\n\n var nextObserverId = 1;\n\n fun ction Observer() {\n this.state_ = UNOPENED;\n this.callback_ = undefined; \n this.target_ = undefined; // TODO(rafaelw): Should be WeakRef\n this.di rectObserver_ = undefined;\n this.value_ = undefined;\n this.id_ = nextObs erverId++;\n }\n\n Observer.prototype = {\n open: function(callback, target ) {\n if (this.state_ != UNOPENED)\n throw Error('Observer has alrea dy been opened.');\n\n addToAll(this);\n this.callback_ = callback;\n this.target_ = target;\n this.connect_();\n this.state_ = OPENED; \n return this.value_;\n },\n\n close: function() {\n if (this.s tate_ != OPENED)\n return;\n\n removeFromAll(this);\n this.disc onnect_();\n this.value_ = undefined;\n this.callback_ = undefined;\n this.target_ = undefined;\n this.state_ = CLOSED;\n },\n\n deliv er: function() {\n if (this.state_ != OPENED)\n return;\n\n dir tyCheck(this);\n },\n\n report_: function(changes) {\n try {\n this.callback_.apply(this.target_, changes);\n } catch (ex) {\n Obs erver._errorThrownDuringCallback = true;\n console.error('Exception caugh t during observer callback: ' +\n (ex.stack || ex));\n }\n },\n\n discardChanges: function() {\n this.check_(undefined, tr ue);\n return this.value_;\n }\n }\n\n var collectObservers = !hasObse rve;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectOb servers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n Observer._allObserversCount++;\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n }\n\n function removeFromAll(observer) {\n Observer._allObserversCount--;\n }\n\n var runningMicrotaskCheckpoint = false; \n\n var hasDebugForceFullDelivery = hasObserve && hasEval && (function() {\n try {\n eval('%RunMicrotasks()');\n return true;\n } catch (ex) { \n return false;\n }\n })();\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runn ingMicrotaskCheckpoint)\n return;\n\n if (hasDebugForceFullDelivery) {\n eval('%RunMicrotasks()');\n return;\n }\n\n if (!collectObserve rs)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var anyChanged, toCheck;\n\n do {\n cycles++;\n toCheck = allObservers;\n allObservers = [];\n anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.state_ != OPENED)\n continue;\n\n if (observer. check_())\n anyChanged = true;\n\n allObservers.push(observer);\ n }\n if (runEOMTasks())\n anyChanged = true;\n } while (cyc les < MAX_DIRTY_CHECK_CYCLES && anyChanged);\n\n if (testingExposeCycleCount) \n global.dirtyCheckCycleCount = cycles;\n\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserv er(object) {\n Observer.call(this);\n this.value_ = object;\n this.oldO bject_ = undefined;\n }\n\n ObjectObserver.prototype = createObject({\n __p roto__: Observer.prototype,\n\n arrayObserve: false,\n\n connect_: functio n(callback, target) {\n if (hasObserve) {\n this.directObserver_ = g etObservedObject(this, this.value_,\n this.arrayObserve);\n } else {\n this.oldObject_ = this.copyOb ject(this.value_);\n }\n\n },\n\n copyObject: function(object) {\n var copy = Array.isArray(object) ? [] : {};\n for (var prop in object) { \n copy[prop] = object[prop];\n };\n if (Array.isArray(object)) \n copy.length = object.length;\n return copy;\n },\n\n check_ : function(changeRecords, skipChanges) {\n var diff;\n var oldValues;\ n if (hasObserve) {\n if (!changeRecords)\n return false;\n \n oldValues = {};\n diff = diffObjectFromChangeRecords(this.value _, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject_;\n diff = diffObjectFromOl dObject(this.value_, this.oldObject_);\n }\n\n if (diffIsEmpty(diff))\ n return false;\n\n if (!hasObserve)\n this.oldObject_ = this .copyObject(this.value_);\n\n this.report_([\n diff.added || {},\n diff.removed || {},\n diff.changed || {},\n function(propert y) {\n return oldValues[property];\n }\n ]);\n\n retur n true;\n },\n\n disconnect_: function() {\n if (hasObserve) {\n this.directObserver_.close();\n this.directObserver_ = undefined;\n } else {\n this.oldObject_ = undefined;\n }\n },\n\n delive r: function() {\n if (this.state_ != OPENED)\n return;\n\n if ( hasObserve)\n this.directObserver_.deliver(false);\n else\n d irtyCheck(this);\n },\n\n discardChanges: function() {\n if (this.dir ectObserver_)\n this.directObserver_.deliver(true);\n else\n this.oldObject_ = this.copyObject(this.value_);\n\n return this.value_;\n }\n });\n\n function ArrayObserver(array) {\n if (!Array.isArray(array))\ n throw Error('Provided object is not an Array');\n ObjectObserver.call( this, array);\n }\n\n ArrayObserver.prototype = createObject({\n\n __proto_ _: ObjectObserver.prototype,\n\n arrayObserve: true,\n\n copyObject: funct ion(arr) {\n return arr.slice();\n },\n\n check_: function(changeReco rds) {\n var splices;\n if (hasObserve) {\n if (!changeRecords) \n return false;\n splices = projectArraySplices(this.value_, ch angeRecords);\n } else {\n splices = calcSplices(this.value_, 0, thi s.value_.length,\n this.oldObject_, 0, this.oldObje ct_.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this .value_);\n\n this.report_([splices]);\n return true;\n }\n });\n\ n ArrayObserver.applySplices = function(previous, current, splices) {\n spli ces.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.rem oved.length];\n var addIndex = splice.index;\n while (addIndex < splic e.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, splice Args);\n });\n };\n\n function PathObserver(object, path) {\n Observer.c all(this);\n\n this.object_ = object;\n this.path_ = getPath(path);\n t his.directObserver_ = undefined;\n }\n\n PathObserver.prototype = createObject ({\n __proto__: Observer.prototype,\n\n get path() {\n return this.pa th_;\n },\n\n connect_: function() {\n if (hasObserve)\n this. directObserver_ = getObservedSet(this, this.object_);\n\n this.check_(undef ined, true);\n },\n\n disconnect_: function() {\n this.value_ = undef ined;\n\n if (this.directObserver_) {\n this.directObserver_.close(t his);\n this.directObserver_ = undefined;\n }\n },\n\n iterate Objects_: function(observe) {\n this.path_.iterateObjects(this.object_, obs erve);\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValue = this.value_;\n this.value_ = this.path_.getValueFrom(this.object _);\n if (skipChanges || areSameValue(this.value_, oldValue))\n retu rn false;\n\n this.report_([this.value_, oldValue, this]);\n return tr ue;\n },\n\n setValue: function(newValue) {\n if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function C ompoundObserver(reportChangesOnOpen) {\n Observer.call(this);\n\n this.rep ortChangesOnOpen_ = reportChangesOnOpen;\n this.value_ = [];\n this.direct Observer_ = undefined;\n this.observed_ = [];\n }\n\n var observerSentinel = {};\n\n CompoundObserver.prototype = createObject({\n __proto__: Observer. prototype,\n\n connect_: function() {\n if (hasObserve) {\n var o bject;\n var needsDirectObserver = false;\n for (var i = 0; i < th is.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel) {\n needsDirectObserver = true;\n break;\n }\n }\n\n if (needsDirectObserver)\n this.directObserver_ = getObservedSet(this, object);\n }\n\n th is.check_(undefined, !this.reportChangesOnOpen_);\n },\n\n disconnect_: fu nction() {\n for (var i = 0; i < this.observed_.length; i += 2) {\n if (this.observed_[i] === observerSentinel)\n this.observed_[i + 1].clo se();\n }\n this.observed_.length = 0;\n this.value_.length = 0;\ n\n if (this.directObserver_) {\n this.directObserver_.close(this);\ n this.directObserver_ = undefined;\n }\n },\n\n addPath: func tion(object, path) {\n if (this.state_ != UNOPENED && this.state_ != RESETT ING)\n throw Error('Cannot add paths once started.');\n\n var path = getPath(path);\n this.observed_.push(object, path);\n if (!this.repor tChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = path.getValueFrom(object);\n },\n\n addObs erver: function(observer) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add observers once started.');\n\n this.observed_.push(observerSentinel, observer);\n if (!this.reportChanges OnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = observer.open(this.deliver, this);\n },\n\n startR eset: function() {\n if (this.state_ != OPENED)\n throw Error('Can o nly reset while open');\n\n this.state_ = RESETTING;\n this.disconnect _();\n },\n\n finishReset: function() {\n if (this.state_ != RESETTIN G)\n throw Error('Can only finishReset after startReset');\n this.st ate_ = OPENED;\n this.connect_();\n\n return this.value_;\n },\n\n iterateObjects_: function(observe) {\n var object;\n for (var i = 0 ; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel)\n this.observed_[i + 1].iterateObj ects(object, observe)\n }\n },\n\n check_: function(changeRecords, sk ipChanges) {\n var oldValues;\n for (var i = 0; i < this.observed_.len gth; i += 2) {\n var object = this.observed_[i];\n var path = this .observed_[i+1];\n var value;\n if (object === observerSentinel) { \n var observable = path;\n value = this.state_ === UNOPENED ? \n observable.open(this.deliver, this) :\n observable. discardChanges();\n } else {\n value = path.getValueFrom(object) ;\n }\n\n if (skipChanges) {\n this.value_[i / 2] = value ;\n continue;\n }\n\n if (areSameValue(value, this.value_ [i / 2]))\n continue;\n\n oldValues = oldValues || [];\n oldValues[i / 2] = this.value_[i / 2];\n this.value_[i / 2] = value;\n }\n\n if (!oldValues)\n return false;\n\n // TODO(rafaelw): Having observed_ as the third callback arg here is\n // pretty lame API. Fi x.\n this.report_([this.value_, oldValues, this.observed_]);\n return true;\n }\n });\n\n function identFn(value) { return value; }\n\n function ObserverTransform(observable, getValueFn, setValueFn,\n dontPassThroughSet) {\n this.callback_ = undefined;\n this.target_ = undefined;\n this.value_ = undefined;\n this.observable_ = observable;\n this.getValueFn_ = getValueFn || identFn;\n this.setValueFn_ = setValueFn | | identFn;\n // TODO(rafaelw): This is a temporary hack. PolymerExpressions n eeds this\n // at the moment because of a bug in it's dependency tracking.\n this.dontPassThroughSet_ = dontPassThroughSet;\n }\n\n ObserverTransform.pr ototype = {\n open: function(callback, target) {\n this.callback_ = call back;\n this.target_ = target;\n this.value_ =\n this.getValu eFn_(this.observable_.open(this.observedCallback_, this));\n return this.va lue_;\n },\n\n observedCallback_: function(value) {\n value = this.ge tValueFn_(value);\n if (areSameValue(value, this.value_))\n return;\ n var oldValue = this.value_;\n this.value_ = value;\n this.callb ack_.call(this.target_, this.value_, oldValue);\n },\n\n discardChanges: f unction() {\n this.value_ = this.getValueFn_(this.observable_.discardChange s());\n return this.value_;\n },\n\n deliver: function() {\n ret urn this.observable_.deliver();\n },\n\n setValue: function(value) {\n value = this.setValueFn_(value);\n if (!this.dontPassThroughSet_ && this. observable_.setValue)\n return this.observable_.setValue(value);\n },\ n\n close: function() {\n if (this.observable_)\n this.observable _.close();\n this.callback_ = undefined;\n this.target_ = undefined;\n this.observable_ = undefined;\n this.value_ = undefined;\n this. getValueFn_ = undefined;\n this.setValueFn_ = undefined;\n }\n }\n\n v ar expectedRecordTypes = {\n add: true,\n update: true,\n delete: true\ n };\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues ) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < chang eRecords.length; i++) {\n var record = changeRecords[i];\n if (!expect edRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n \n if (!(record.name in oldValues))\n oldValues[record.name] = recor d.oldValue;\n\n if (record.type == 'update')\n continue;\n\n if (record.type == 'add') {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in a dded) {\n delete added[record.name];\n delete oldValues[record.nam e];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added : added,\n removed: removed,\n changed: changed\n };\n }\n\n func tion newSplice(index, removed, addedCount) {\n return {\n index: index,\ n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDI T_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3 ;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array i tems in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy '\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and ad d 4. This\n // leaves the substring '123' intact.\n calcEditDistances: fun ction(current, currentStart, currentEnd,\n old, o ldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n va r distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize nul l column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = ne w Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initial ize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][ j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1]; \n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < wes t ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by findi ng\n // the minimum previous weight recursively until the origin of the weigh t\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\ n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j-- ;\n continue;\n }\n if (j == 0) {\n edits.push(E DIT_DELETE);\n i--;\n continue;\n }\n var northW est = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north) \n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\ n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = nor thWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n retur n edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was t ransformed into a new array of items. Conceptually it is a list of\n * tuple s of\n *\n * <index, removed, addedCount>\n *\n * which are ke pt in ascending index order of. The tuple represents that at\n * the |index| , |removed| sequence of items were removed, and counting forward\n * from |i ndex|, |addedCount| items were added.\n */\n\n /**\n * Lacking indivi dual splice mutation information, the minimal set of\n * splices can be synt hesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortes t path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calc Splices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0; \n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart) ;\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sha redPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, mi nLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\ n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n re turn [];\n\n if (currentStart == currentEnd) {\n var splice = newSpl ice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.r emoved.push(old[oldStart++]);\n\n return [ splice ];\n } else if (ol dStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - cur rentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldSta rt;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(s plice);\n splice = undefined;\n }\n\n index++ ;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.p ush(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [] , 0);\n\n splice.addedCount++;\n index++;\n bre ak;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (spl ice) {\n splices.push(splice);\n }\n return splices;\n },\n\ n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(cu rrent, old, searchLength) {\n var index1 = current.length;\n var index 2 = old.length;\n var count = 0;\n while (count < searchLength && this .equals(current[--index1], old[--index2]))\n count++;\n\n return cou nt;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previo usValue) {\n return currentValue === previousValue;\n }\n };\n\n var a rraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arrayS plice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, star t2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n ret urn -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n ret urn 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersec t, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap \n else\n return end1 - start1; // Contained\n }\n }\n\n functi on mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSpl ice(index, removed, addedCount);\n\n var inserted = false;\n var insertion Offset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n c urrent.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n s plice.addedCount += current.addedCount - intersectCount;\n var deleteCoun t = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < cur rent.index) {\n // some prefix of splice.removed is prepended to curr ent.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.re moved.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = spl ice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice .removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.i ndex < current.index) {\n // Insert splice here.\n\n inserted = tr ue;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecor ds) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i+ +) {\n var record = changeRecords[i];\n switch(record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.sli ce(), record.addedCount);\n break;\n case 'add':\n case ' update':\n case 'delete':\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldV alue], 1);\n break;\n default:\n console.error('Unexpec ted record type: ' + JSON.stringify(record));\n break;\n }\n }\ n\n return splices;\n }\n\n function projectArraySplices(array, changeRecor ds) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).f orEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.le ngth == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.con cat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.O bserver.runEOM_ = runEOM;\n global.Observer.observerSentinel_ = observerSentine l; // for testing.\n global.Observer.hasObjectObserve = hasObserve;\n global.A rrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = functio n(current, previous) {\n return arraySplice.calculateSplices(current, previou s);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = Obje ctObserver;\n global.PathObserver = PathObserver;\n global.CompoundObserver = CompoundObserver;\n global.Path = Path;\n global.ObserverTransform = ObserverT ransform;\n})(typeof global !== 'undefined' && global && typeof module !== 'unde fined' && module ? global : this || window);\n", 94 "// Copyright 2012 Google Inc.\n//\n// Licensed under the Apache License, Ve rsion 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http:/ /www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law o r agreed to in writing, software\n// distributed under the License is distribute d on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe r express or implied.\n// See the License for the specific language governing pe rmissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n var testingExposeCycleCount = global.testingExposeCycleCount;\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function det ectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n t ypeof Array.observe !== 'function') {\n return false;\n }\n\n var rec ords = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n var arr = [];\n Object.observe(test, callback);\n Arr ay.observe(arr, callback);\n test.id = 1;\n test.id = 2;\n delete test. id;\n arr.push(1, 2);\n arr.length = 0;\n\n Object.deliverChangeRecords (callback);\n if (records.length !== 5)\n return false;\n\n if (recor ds[0].type != 'add' ||\n records[1].type != 'update' ||\n records[ 2].type != 'delete' ||\n records[3].type != 'splice' ||\n records[ 4].type != 'splice') {\n return false;\n }\n\n Object.unobserve(test, callback);\n Array.unobserve(arr, callback);\n\n return true;\n }\n\n v ar hasObserve = detectObjectObserve();\n\n function detectEval() {\n // Don' t test for eval if we're running in a Chrome App environment.\n // We check f or APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n \n // Firefox OS Apps do not allow eval. This feature detection is very hacky \n // but even if some other platform adds support for this function this cod e\n // will continue to work.\n if (navigator.getDeviceStorage) {\n r eturn false;\n }\n\n try {\n var f = new Function('', 'return true;') ;\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n v ar hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0 ;\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(o bj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number .isNaN || function(value) {\n return typeof value === 'number' && global.isNa N(value);\n }\n\n function areSameValue(left, right) {\n if (left === right )\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj ) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\ n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object. defineProperty(newObject, name,\n Object.getOwnPrope rtyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var identR egExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');\n\n functio n getPathCharType(char) {\n if (char === undefined)\n return 'eof';\n\n var code = char.charCodeAt(0);\n\n switch(code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return char;\n\n case 0x5F: // _\n case 0x24: // $\n return 'ident';\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return \n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator \n return 'ws';\n }\n\n // a-z, A-Z\n if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))\n return 'ident';\n\n // 1-9 \n if (0x31 <= code && code <= 0x39)\n return 'number';\n\n return 'e lse';\n }\n\n var pathStateMachine = {\n 'beforePath': {\n 'ws': ['bef orePath'],\n 'ident': ['inIdent', 'append'],\n '[': ['beforeElement'], \n 'eof': ['afterPath']\n },\n\n 'inPath': {\n 'ws': ['inPath'], \n '.': ['beforeIdent'],\n '[': ['beforeElement'],\n 'eof': ['aft erPath']\n },\n\n 'beforeIdent': {\n 'ws': ['beforeIdent'],\n 'i dent': ['inIdent', 'append']\n },\n\n 'inIdent': {\n 'ident': ['inIde nt', 'append'],\n '0': ['inIdent', 'append'],\n 'number': ['inIdent', 'append'],\n 'ws': ['inPath', 'push'],\n '.': ['beforeIdent', 'push'], \n '[': ['beforeElement', 'push'],\n 'eof': ['afterPath', 'push']\n },\n\n 'beforeElement': {\n 'ws': ['beforeElement'],\n '0': ['afte rZero', 'append'],\n 'number': ['inIndex', 'append'],\n \"'\": ['inSin gleQuote', 'append', ''],\n '\"': ['inDoubleQuote', 'append', '']\n },\n \n 'afterZero': {\n 'ws': ['afterElement', 'push'],\n ']': ['inPath ', 'push']\n },\n\n 'inIndex': {\n '0': ['inIndex', 'append'],\n 'number': ['inIndex', 'append'],\n 'ws': ['afterElement'],\n ']': ['i nPath', 'push']\n },\n\n 'inSingleQuote': {\n \"'\": ['afterElement'] ,\n 'eof': ['error'],\n 'else': ['inSingleQuote', 'append']\n },\n\ n 'inDoubleQuote': {\n '\"': ['afterElement'],\n 'eof': ['error'],\ n 'else': ['inDoubleQuote', 'append']\n },\n\n 'afterElement': {\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n }\n }\n\n funct ion noop() {}\n\n function parsePath(path) {\n var keys = [];\n var index = -1;\n var c, newChar, key, type, transition, action, typeMap, mode = 'befo rePath';\n\n var actions = {\n push: function() {\n if (key === u ndefined)\n return;\n\n keys.push(key);\n key = undefined ;\n },\n\n append: function() {\n if (key === undefined)\n key = newChar\n else\n key += newChar;\n }\n };\n\n function maybeUnescapeQuote() {\n if (index >= path.length)\n re turn;\n\n var nextChar = path[index + 1];\n if ((mode == 'inSingleQuot e' && nextChar == \"'\") ||\n (mode == 'inDoubleQuote' && nextChar == ' \"')) {\n index++;\n newChar = nextChar;\n actions.append() ;\n return true;\n }\n }\n\n while (mode) {\n index++;\n c = path[index];\n\n if (c == '\\\\' && maybeUnescapeQuote(mode))\n continue;\n\n type = getPathCharType(c);\n typeMap = pathStateMac hine[mode];\n transition = typeMap[type] || typeMap['else'] || 'error';\n\n if (transition == 'error')\n return; // parse error;\n\n mode = transition[0];\n action = actions[transition[1]] || noop;\n newChar = transition[2] === undefined ? c : transition[2];\n action();\n\n if (mode === 'afterPath') {\n return keys;\n }\n }\n\n return; // parse error\n }\n\n function isIdent(s) {\n return identRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(parts, privateToken) { \n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.ge t to retrieve path objects');\n\n for (var i = 0; i < parts.length; i++) {\n this.push(String(parts[i]));\n }\n\n if (hasEval && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO (rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pa thString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null || pathString.length == 0)\n pathString = '';\n\n if (typeof pathString != 'string') {\n if (isIndex(pathString.length)) { \n // Constructed with array-like (pre-parsed) keys\n return new P ath(pathString, constructorIsPrivate);\n }\n\n pathString = String(pat hString);\n }\n\n var path = pathCache[pathString];\n if (path)\n return path;\n\n var parts = parsePath(pathString);\n if (!parts)\n r eturn invalidPath;\n\n var path = new Path(parts, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n \n function formatAccessor(key) {\n if (isIndex(key)) {\n return '[' + key + ']';\n } else {\n return '[\"' + key.replace(/\"/g, '\\\\\"') + '\ "]';\n }\n }\n\n Path.prototype = createObject({\n __proto__: [],\n v alid: true,\n\n toString: function() {\n var pathString = '';\n for (var i = 0; i < this.length; i++) {\n var key = this[i];\n if (is Ident(key)) {\n pathString += i ? '.' + key : key;\n } else {\n pathString += formatAccessor(key);\n }\n }\n\n return pathString;\n },\n\n getValueFrom: function(obj, directObserver) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n ret urn;\n obj = obj[this[i]];\n }\n return obj;\n },\n\n ite rateObjects: function(obj, observe) {\n for (var i = 0; i < this.length; i+ +) {\n if (i)\n obj = obj[this[i - 1]];\n if (!isObject(o bj))\n return;\n observe(obj, this[0]);\n }\n },\n\n compiledGetValueFromFn: function() {\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n var key;\n for (; i < (this.length - 1); i++) {\n key = this[i];\n pathStr ing += isIdent(key) ? '.' + key : formatAccessor(key);\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n var key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\ n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0 ; i < this.length - 1; i++) {\n if (!isObject(obj))\n return fal se;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n \n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\ n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_ ()) {\n cycles++;\n }\n if (testingExposeCycleCount)\n global.di rtyCheckCycleCount = cycles;\n\n return cycles > 0;\n }\n\n function object IsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.add ed) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff .changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n\n for (var pr op in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(pr op in object)) {\n removed[prop] = undefined;\n continue;\n } \n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n c ontinue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(ob ject) && object.length !== oldObject.length)\n changed.length = object.leng th;\n\n return {\n added: added,\n removed: removed,\n changed : changed\n };\n }\n\n var eomTasks = [];\n function runEOMTasks() {\n if (!eomTasks.length)\n return false;\n\n for (var i = 0; i < eomTasks.l ength; i++) {\n eomTasks[i]();\n }\n eomTasks.length = 0;\n return true;\n }\n\n var runEOM = hasObserve ? (function(){\n var eomObj = { ping Pong: true };\n var eomRunScheduled = false;\n\n Object.observe(eomObj, fu nction() {\n runEOMTasks();\n eomRunScheduled = false;\n });\n\n return function(fn) {\n eomTasks.push(fn);\n if (!eomRunScheduled) {\ n eomRunScheduled = true;\n eomObj.pingPong = !eomObj.pingPong;\n }\n };\n })() :\n (function() {\n return function(fn) {\n eomT asks.push(fn);\n };\n })();\n\n var observedObjectCache = [];\n\n function newObservedObject() {\n var observer;\n var object;\n var discardRecor ds = false;\n var first = true;\n\n function callback(records) {\n if (observer && observer.state_ === OPENED && !discardRecords)\n observer.c heck_(records);\n }\n\n return {\n open: function(obs) {\n if (observer)\n throw Error('ObservedObject in use');\n\n if (!firs t)\n Object.deliverChangeRecords(callback);\n\n observer = obs;\ n first = false;\n },\n observe: function(obj, arrayObserve) {\ n object = obj;\n if (arrayObserve)\n Array.observe(objec t, callback);\n else\n Object.observe(object, callback);\n },\n deliver: function(discard) {\n discardRecords = discard;\n Object.deliverChangeRecords(callback);\n discardRecords = false;\n },\n close: function() {\n observer = undefined;\n Object.u nobserve(object, callback);\n observedObjectCache.push(this);\n }\n };\n }\n\n /*\n * The observedSet abstraction is a perf optimization whic h reduces the total\n * number of Object.observe observations of a set of obje cts. The idea is that\n * groups of Observers will have some object dependenci es in common and this\n * observed set ensures that each object in the transit ive closure of\n * dependencies is only observed once. The observedSet acts as a write barrier\n * such that whenever any change comes through, all Observer s are checked for\n * changed values.\n *\n * Note that this optimization is explicitly moving work from setup-time to\n * change-time.\n *\n * TODO (rafaelw): Implement \"garbage collection\". In order to move work off\n * the critical path, when Observers are closed, their observed objects are\n * not Object.unobserve(d). As a result, it's possible that if the observedSet\n * is kept open, but some Observers have been closed, it could cause \"leaks\"\n * (prevent otherwise collectable objects from being collected). At some\n * poin t, we should implement incremental \"gc\" which keeps a list of\n * observedSe ts which may need clean-up and does small amounts of cleanup on a\n * timeout until all is clean.\n */\n\n function getObservedObject(observer, object, arr ayObserve) {\n var dir = observedObjectCache.pop() || newObservedObject();\n dir.open(observer);\n dir.observe(object, arrayObserve);\n return dir;\ n }\n\n var observedSetCache = [];\n\n function newObservedSet() {\n var o bserverCount = 0;\n var observers = [];\n var objects = [];\n var rootO bj;\n var rootObjProps;\n\n function observe(obj, prop) {\n if (!obj) \n return;\n\n if (obj === rootObj)\n rootObjProps[prop] = tr ue;\n\n if (objects.indexOf(obj) < 0) {\n objects.push(obj);\n Object.observe(obj, callback);\n }\n\n observe(Object.getPrototypeOf (obj), prop);\n }\n\n function allRootObjNonObservedProps(recs) {\n f or (var i = 0; i < recs.length; i++) {\n var rec = recs[i];\n if ( rec.object !== rootObj ||\n rootObjProps[rec.name] ||\n re c.type === 'setPrototype') {\n return false;\n }\n }\n return true;\n }\n\n function callback(recs) {\n if (allRootObjNonOb servedProps(recs))\n return;\n\n var observer;\n for (var i = 0 ; i < observers.length; i++) {\n observer = observers[i];\n if (ob server.state_ == OPENED) {\n observer.iterateObjects_(observe);\n }\n }\n\n for (var i = 0; i < observers.length; i++) {\n obse rver = observers[i];\n if (observer.state_ == OPENED) {\n observ er.check_();\n }\n }\n }\n\n var record = {\n object: und efined,\n objects: objects,\n open: function(obs, object) {\n i f (!rootObj) {\n rootObj = object;\n rootObjProps = {};\n }\n\n observers.push(obs);\n observerCount++;\n obs.iter ateObjects_(observe);\n },\n close: function(obs) {\n observerC ount--;\n if (observerCount > 0) {\n return;\n }\n\n for (var i = 0; i < objects.length; i++) {\n Object.unobserve(object s[i], callback);\n Observer.unobservedCount++;\n }\n\n ob servers.length = 0;\n objects.length = 0;\n rootObj = undefined;\n rootObjProps = undefined;\n observedSetCache.push(this);\n } \n };\n\n return record;\n }\n\n var lastObservedSet;\n\n function getO bservedSet(observer, obj) {\n if (!lastObservedSet || lastObservedSet.object !== obj) {\n lastObservedSet = observedSetCache.pop() || newObservedSet();\ n lastObservedSet.object = obj;\n }\n lastObservedSet.open(observer, obj);\n return lastObservedSet;\n }\n\n var UNOPENED = 0;\n var OPENED = 1 ;\n var CLOSED = 2;\n var RESETTING = 3;\n\n var nextObserverId = 1;\n\n fun ction Observer() {\n this.state_ = UNOPENED;\n this.callback_ = undefined; \n this.target_ = undefined; // TODO(rafaelw): Should be WeakRef\n this.di rectObserver_ = undefined;\n this.value_ = undefined;\n this.id_ = nextObs erverId++;\n }\n\n Observer.prototype = {\n open: function(callback, target ) {\n if (this.state_ != UNOPENED)\n throw Error('Observer has alrea dy been opened.');\n\n addToAll(this);\n this.callback_ = callback;\n this.target_ = target;\n this.connect_();\n this.state_ = OPENED; \n return this.value_;\n },\n\n close: function() {\n if (this.s tate_ != OPENED)\n return;\n\n removeFromAll(this);\n this.disc onnect_();\n this.value_ = undefined;\n this.callback_ = undefined;\n this.target_ = undefined;\n this.state_ = CLOSED;\n },\n\n deliv er: function() {\n if (this.state_ != OPENED)\n return;\n\n dir tyCheck(this);\n },\n\n report_: function(changes) {\n try {\n this.callback_.apply(this.target_, changes);\n } catch (ex) {\n Obs erver._errorThrownDuringCallback = true;\n console.error('Exception caugh t during observer callback: ' +\n (ex.stack || ex));\n }\n },\n\n discardChanges: function() {\n this.check_(undefined, tr ue);\n return this.value_;\n }\n }\n\n var collectObservers = !hasObse rve;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectOb servers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n Observer._allObserversCount++;\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n }\n\n function removeFromAll(observer) {\n Observer._allObserversCount--;\n }\n\n var runningMicrotaskCheckpoint = false; \n\n var hasDebugForceFullDelivery = hasObserve && hasEval && (function() {\n try {\n eval('%RunMicrotasks()');\n return true;\n } catch (ex) { \n return false;\n }\n })();\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runn ingMicrotaskCheckpoint)\n return;\n\n if (hasDebugForceFullDelivery) {\n eval('%RunMicrotasks()');\n return;\n }\n\n if (!collectObserve rs)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var anyChanged, toCheck;\n\n do {\n cycles++;\n toCheck = allObservers;\n allObservers = [];\n anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.state_ != OPENED)\n continue;\n\n if (observer. check_())\n anyChanged = true;\n\n allObservers.push(observer);\ n }\n if (runEOMTasks())\n anyChanged = true;\n } while (cyc les < MAX_DIRTY_CHECK_CYCLES && anyChanged);\n\n if (testingExposeCycleCount) \n global.dirtyCheckCycleCount = cycles;\n\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserv er(object) {\n Observer.call(this);\n this.value_ = object;\n this.oldO bject_ = undefined;\n }\n\n ObjectObserver.prototype = createObject({\n __p roto__: Observer.prototype,\n\n arrayObserve: false,\n\n connect_: functio n(callback, target) {\n if (hasObserve) {\n this.directObserver_ = g etObservedObject(this, this.value_,\n this.arrayObserve);\n } else {\n this.oldObject_ = this.copyOb ject(this.value_);\n }\n\n },\n\n copyObject: function(object) {\n var copy = Array.isArray(object) ? [] : {};\n for (var prop in object) { \n copy[prop] = object[prop];\n };\n if (Array.isArray(object)) \n copy.length = object.length;\n return copy;\n },\n\n check_ : function(changeRecords, skipChanges) {\n var diff;\n var oldValues;\ n if (hasObserve) {\n if (!changeRecords)\n return false;\n \n oldValues = {};\n diff = diffObjectFromChangeRecords(this.value _, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject_;\n diff = diffObjectFromOl dObject(this.value_, this.oldObject_);\n }\n\n if (diffIsEmpty(diff))\ n return false;\n\n if (!hasObserve)\n this.oldObject_ = this .copyObject(this.value_);\n\n this.report_([\n diff.added || {},\n diff.removed || {},\n diff.changed || {},\n function(propert y) {\n return oldValues[property];\n }\n ]);\n\n retur n true;\n },\n\n disconnect_: function() {\n if (hasObserve) {\n this.directObserver_.close();\n this.directObserver_ = undefined;\n } else {\n this.oldObject_ = undefined;\n }\n },\n\n delive r: function() {\n if (this.state_ != OPENED)\n return;\n\n if ( hasObserve)\n this.directObserver_.deliver(false);\n else\n d irtyCheck(this);\n },\n\n discardChanges: function() {\n if (this.dir ectObserver_)\n this.directObserver_.deliver(true);\n else\n this.oldObject_ = this.copyObject(this.value_);\n\n return this.value_;\n }\n });\n\n function ArrayObserver(array) {\n if (!Array.isArray(array))\ n throw Error('Provided object is not an Array');\n ObjectObserver.call( this, array);\n }\n\n ArrayObserver.prototype = createObject({\n\n __proto_ _: ObjectObserver.prototype,\n\n arrayObserve: true,\n\n copyObject: funct ion(arr) {\n return arr.slice();\n },\n\n check_: function(changeReco rds) {\n var splices;\n if (hasObserve) {\n if (!changeRecords) \n return false;\n splices = projectArraySplices(this.value_, ch angeRecords);\n } else {\n splices = calcSplices(this.value_, 0, thi s.value_.length,\n this.oldObject_, 0, this.oldObje ct_.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this .value_);\n\n this.report_([splices]);\n return true;\n }\n });\n\ n ArrayObserver.applySplices = function(previous, current, splices) {\n spli ces.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.rem oved.length];\n var addIndex = splice.index;\n while (addIndex < splic e.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, splice Args);\n });\n };\n\n function PathObserver(object, path) {\n Observer.c all(this);\n\n this.object_ = object;\n this.path_ = getPath(path);\n t his.directObserver_ = undefined;\n }\n\n PathObserver.prototype = createObject ({\n __proto__: Observer.prototype,\n\n get path() {\n return this.pa th_;\n },\n\n connect_: function() {\n if (hasObserve)\n this. directObserver_ = getObservedSet(this, this.object_);\n\n this.check_(undef ined, true);\n },\n\n disconnect_: function() {\n this.value_ = undef ined;\n\n if (this.directObserver_) {\n this.directObserver_.close(t his);\n this.directObserver_ = undefined;\n }\n },\n\n iterate Objects_: function(observe) {\n this.path_.iterateObjects(this.object_, obs erve);\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValue = this.value_;\n this.value_ = this.path_.getValueFrom(this.object _);\n if (skipChanges || areSameValue(this.value_, oldValue))\n retu rn false;\n\n this.report_([this.value_, oldValue, this]);\n return tr ue;\n },\n\n setValue: function(newValue) {\n if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function C ompoundObserver(reportChangesOnOpen) {\n Observer.call(this);\n\n this.rep ortChangesOnOpen_ = reportChangesOnOpen;\n this.value_ = [];\n this.direct Observer_ = undefined;\n this.observed_ = [];\n }\n\n var observerSentinel = {};\n\n CompoundObserver.prototype = createObject({\n __proto__: Observer. prototype,\n\n connect_: function() {\n if (hasObserve) {\n var o bject;\n var needsDirectObserver = false;\n for (var i = 0; i < th is.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel) {\n needsDirectObserver = true;\n break;\n }\n }\n\n if (needsDirectObserver)\n this.directObserver_ = getObservedSet(this, object);\n }\n\n th is.check_(undefined, !this.reportChangesOnOpen_);\n },\n\n disconnect_: fu nction() {\n for (var i = 0; i < this.observed_.length; i += 2) {\n if (this.observed_[i] === observerSentinel)\n this.observed_[i + 1].clo se();\n }\n this.observed_.length = 0;\n this.value_.length = 0;\ n\n if (this.directObserver_) {\n this.directObserver_.close(this);\ n this.directObserver_ = undefined;\n }\n },\n\n addPath: func tion(object, path) {\n if (this.state_ != UNOPENED && this.state_ != RESETT ING)\n throw Error('Cannot add paths once started.');\n\n var path = getPath(path);\n this.observed_.push(object, path);\n if (!this.repor tChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = path.getValueFrom(object);\n },\n\n addObs erver: function(observer) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add observers once started.');\n\n this.observed_.push(observerSentinel, observer);\n if (!this.reportChanges OnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = observer.open(this.deliver, this);\n },\n\n startR eset: function() {\n if (this.state_ != OPENED)\n throw Error('Can o nly reset while open');\n\n this.state_ = RESETTING;\n this.disconnect _();\n },\n\n finishReset: function() {\n if (this.state_ != RESETTIN G)\n throw Error('Can only finishReset after startReset');\n this.st ate_ = OPENED;\n this.connect_();\n\n return this.value_;\n },\n\n iterateObjects_: function(observe) {\n var object;\n for (var i = 0 ; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel)\n this.observed_[i + 1].iterateObj ects(object, observe)\n }\n },\n\n check_: function(changeRecords, sk ipChanges) {\n var oldValues;\n for (var i = 0; i < this.observed_.len gth; i += 2) {\n var object = this.observed_[i];\n var path = this .observed_[i+1];\n var value;\n if (object === observerSentinel) { \n var observable = path;\n value = this.state_ === UNOPENED ? \n observable.open(this.deliver, this) :\n observable. discardChanges();\n } else {\n value = path.getValueFrom(object) ;\n }\n\n if (skipChanges) {\n this.value_[i / 2] = value ;\n continue;\n }\n\n if (areSameValue(value, this.value_ [i / 2]))\n continue;\n\n oldValues = oldValues || [];\n oldValues[i / 2] = this.value_[i / 2];\n this.value_[i / 2] = value;\n }\n\n if (!oldValues)\n return false;\n\n // TODO(rafaelw): Having observed_ as the third callback arg here is\n // pretty lame API. Fi x.\n this.report_([this.value_, oldValues, this.observed_]);\n return true;\n }\n });\n\n function identFn(value) { return value; }\n\n function ObserverTransform(observable, getValueFn, setValueFn,\n dontPassThroughSet) {\n this.callback_ = undefined;\n this.target_ = undefined;\n this.value_ = undefined;\n this.observable_ = observable;\n this.getValueFn_ = getValueFn || identFn;\n this.setValueFn_ = setValueFn | | identFn;\n // TODO(rafaelw): This is a temporary hack. PolymerExpressions n eeds this\n // at the moment because of a bug in it's dependency tracking.\n this.dontPassThroughSet_ = dontPassThroughSet;\n }\n\n ObserverTransform.pr ototype = {\n open: function(callback, target) {\n this.callback_ = call back;\n this.target_ = target;\n this.value_ =\n this.getValu eFn_(this.observable_.open(this.observedCallback_, this));\n return this.va lue_;\n },\n\n observedCallback_: function(value) {\n value = this.ge tValueFn_(value);\n if (areSameValue(value, this.value_))\n return;\ n var oldValue = this.value_;\n this.value_ = value;\n this.callb ack_.call(this.target_, this.value_, oldValue);\n },\n\n discardChanges: f unction() {\n this.value_ = this.getValueFn_(this.observable_.discardChange s());\n return this.value_;\n },\n\n deliver: function() {\n ret urn this.observable_.deliver();\n },\n\n setValue: function(value) {\n value = this.setValueFn_(value);\n if (!this.dontPassThroughSet_ && this. observable_.setValue)\n return this.observable_.setValue(value);\n },\ n\n close: function() {\n if (this.observable_)\n this.observable _.close();\n this.callback_ = undefined;\n this.target_ = undefined;\n this.observable_ = undefined;\n this.value_ = undefined;\n this. getValueFn_ = undefined;\n this.setValueFn_ = undefined;\n }\n }\n\n v ar expectedRecordTypes = {\n add: true,\n update: true,\n delete: true\ n };\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues ) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < chang eRecords.length; i++) {\n var record = changeRecords[i];\n if (!expect edRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n \n if (!(record.name in oldValues))\n oldValues[record.name] = recor d.oldValue;\n\n if (record.type == 'update')\n continue;\n\n if (record.type == 'add') {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in a dded) {\n delete added[record.name];\n delete oldValues[record.nam e];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added : added,\n removed: removed,\n changed: changed\n };\n }\n\n func tion newSplice(index, removed, addedCount) {\n return {\n index: index,\ n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDI T_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3 ;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array i tems in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy '\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and ad d 4. This\n // leaves the substring '123' intact.\n calcEditDistances: fun ction(current, currentStart, currentEnd,\n old, o ldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n va r distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize nul l column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = ne w Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initial ize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][ j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1]; \n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < wes t ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by findi ng\n // the minimum previous weight recursively until the origin of the weigh t\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\ n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j-- ;\n continue;\n }\n if (j == 0) {\n edits.push(E DIT_DELETE);\n i--;\n continue;\n }\n var northW est = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north) \n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\ n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = nor thWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n retur n edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was t ransformed into a new array of items. Conceptually it is a list of\n * tuple s of\n *\n * <index, removed, addedCount>\n *\n * which are ke pt in ascending index order of. The tuple represents that at\n * the |index| , |removed| sequence of items were removed, and counting forward\n * from |i ndex|, |addedCount| items were added.\n */\n\n /**\n * Lacking indivi dual splice mutation information, the minimal set of\n * splices can be synt hesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortes t path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calc Splices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0; \n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart) ;\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sha redPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, mi nLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\ n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n re turn [];\n\n if (currentStart == currentEnd) {\n var splice = newSpl ice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.r emoved.push(old[oldStart++]);\n\n return [ splice ];\n } else if (ol dStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - cur rentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldSta rt;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(s plice);\n splice = undefined;\n }\n\n index++ ;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.p ush(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [] , 0);\n\n splice.addedCount++;\n index++;\n bre ak;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (spl ice) {\n splices.push(splice);\n }\n return splices;\n },\n\ n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(cu rrent, old, searchLength) {\n var index1 = current.length;\n var index 2 = old.length;\n var count = 0;\n while (count < searchLength && this .equals(current[--index1], old[--index2]))\n count++;\n\n return cou nt;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previo usValue) {\n return currentValue === previousValue;\n }\n };\n\n var a rraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arrayS plice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, star t2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n ret urn -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n ret urn 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersec t, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap \n else\n return end1 - start1; // Contained\n }\n }\n\n functi on mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSpl ice(index, removed, addedCount);\n\n var inserted = false;\n var insertion Offset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n c urrent.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n s plice.addedCount += current.addedCount - intersectCount;\n var deleteCoun t = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < cur rent.index) {\n // some prefix of splice.removed is prepended to curr ent.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.re moved.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = spl ice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice .removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.i ndex < current.index) {\n // Insert splice here.\n\n inserted = tr ue;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecor ds) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i+ +) {\n var record = changeRecords[i];\n switch(record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.sli ce(), record.addedCount);\n break;\n case 'add':\n case ' update':\n case 'delete':\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldV alue], 1);\n break;\n default:\n console.error('Unexpec ted record type: ' + JSON.stringify(record));\n break;\n }\n }\ n\n return splices;\n }\n\n function projectArraySplices(array, changeRecor ds) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).f orEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.le ngth == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.con cat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.O bserver.runEOM_ = runEOM;\n global.Observer.observerSentinel_ = observerSentine l; // for testing.\n global.Observer.hasObjectObserve = hasObserve;\n global.A rrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = functio n(current, previous) {\n return arraySplice.calculateSplices(current, previou s);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = Obje ctObserver;\n global.PathObserver = PathObserver;\n global.CompoundObserver = CompoundObserver;\n global.Path = Path;\n global.ObserverTransform = ObserverT ransform;\n})(typeof global !== 'undefined' && global && typeof module !== 'unde fined' && module ? global : this || window);\n",
95 "// select ShadowDOM impl\r\nif (Platform.flags.shadow) {\r\n", 95 "// select ShadowDOM impl\r\nif (Platform.flags.shadow) {\r\n",
96 "// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use stri ct';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = ne w WeakMap();\n var wrappers = Object.create(null);\n\n function detectEval() { \n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeo f chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return fa lse;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this func tion this code\n // will continue to work.\n if (navigator.getDeviceStorag e) {\n return false;\n }\n\n try {\n var f = new Function('retur n true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.de fineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var ge tOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to , from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < n ames.length; i++) {\n var name = names[i];\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n functio n mixinStatics(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n switch ( name) {\n case 'arguments':\n case 'caller':\n case 'length ':\n case 'name':\n case 'prototype':\n case 'toString':\n continue;\n }\n defineProperty(to, name, getOwnPropertyDescri ptor(from, name));\n }\n return to;\n };\n\n function oneOf(object, prop ertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (pr opertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n var nonEnumerableDataDescriptor = {\n value: undefined,\n configurable: true, \n enumerable: false,\n writable: true\n };\n\n function defineNonEnumer ableDataProperty(object, name, value) {\n nonEnumerableDataDescriptor.value = value;\n defineProperty(object, name, nonEnumerableDataDescriptor);\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozill a.org/show_bug.cgi?id=855844\n // Make sure they are create before we start mod ifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstruct or(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(no de);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n i f (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrappe rConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapp er = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(n ativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\ n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n in stallProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function regis terInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(i nstanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.tes t(navigator.userAgent);\n\n // This is used as a fallback when getting the desc riptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: func tion() {},\n set: function(v) {},\n configurable: true,\n enumerable: t rue\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test (name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9 ]*$/.test(name);\n }\n\n // The name of the implementation property is intenti onally hard to\n // remember. Unfortunately, browsers are slower doing obj[expr ] than\n // obj.foo so we resort to repeat this ugly name. This ugly name is ne ver\n // used outside of this file though.\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this._ _impl4cf1e782hg__.' + name) :\n function() { return this.__impl4cf1e782hg __[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdent ifierName(name) ?\n new Function('v', 'this.__impl4cf1e782hg__.' + name + ' = v') :\n function(v) { this.__impl4cf1e782hg__[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.__impl4cf1e782hg__.' + name +\n '.apply(this.__impl4cf1e782hg__, arguments)') :\n function() {\n return this.__impl4cf1e782hg__[name].apply(\n this.__impl4cf1e 782hg__, arguments);\n };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception. \n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDesc riptor;\n }\n }\n\n function installProperty(source, target, allowMethod, o pt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'pol ymerBlackList_')\n continue;\n\n if (name in target)\n contin ue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindi ngs.\n source.__lookupGetter__(name);\n }\n var descriptor = ge tDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name );\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\ n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || desc riptor.set) {\n if (isEvent)\n setter = scope.getEventHandlerSet ter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enume rable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\ n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance I f present, this is used to extract\n * properties from an instance object. \n */\n function register(nativeConstructor, wrapperConstructor, opt_instance ) {\n var nativePrototype = nativeConstructor.prototype;\n registerInterna l(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperC onstructor, nativeConstructor);\n }\n\n function registerInternal(nativeProtot ype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperCons tructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefin ed);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nati vePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingPro perties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n regist erInstanceProperties(wrapperPrototype, opt_instance);\n\n defineNonEnumerable DataProperty(\n wrapperPrototype, 'constructor', wrapperConstructor);\n // Set it again. Some VMs optimizes objects that are used as prototypes.\n wrapperConstructor.prototype = wrapperPrototype;\n }\n\n function isWrapperFor (wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativ eConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Cre ates a generic wrapper constructor based on |object| and its\n * constructor.\ n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.get PrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor( nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrap perConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object );\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(s uperWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWra pperConstructor.call(this, node);\n }\n var p = Object.create(superWrapper Constructor.prototype);\n p.constructor = GeneratedWrapper;\n GeneratedWra pper.prototype = p;\n\n return GeneratedWrapper;\n }\n\n function isWrapper (object) {\n return object && object.__impl4cf1e782hg__;\n }\n\n function i sNative(object) {\n return !isWrapper(object);\n }\n\n /**\n * Wraps a no de in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNod e}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n \n assert(isNative(impl));\n return impl.__wrapper8e3dd93a60__ ||\n (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));\n }\n\ n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) { \n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper)); \n return wrapper.__impl4cf1e782hg__;\n }\n\n function unsafeUnwrap(wrapper ) {\n return wrapper.__impl4cf1e782hg__;\n }\n\n function setWrapper(impl, wrapper) {\n wrapper.__impl4cf1e782hg__ = impl;\n impl.__wrapper8e3dd93a60 __ = wrapper;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @para m {Object} object\n * @return {Object} The native implementation object.\n * /\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrappe r.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object ) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null) \n return;\n assert(isNative(node));\n assert(wrapper === undefined | | isWrapper(wrapper));\n node.__wrapper8e3dd93a60__ = wrapper;\n }\n\n var getterDescriptor = {\n get: undefined,\n configurable: true,\n enumerab le: true\n };\n\n function defineGetter(constructor, name, getter) {\n gett erDescriptor.get = getter;\n defineProperty(constructor.prototype, name, gett erDescriptor);\n }\n\n function defineWrapGetter(constructor, name) {\n def ineGetter(constructor, name, function() {\n return wrap(this.__impl4cf1e782 hg__[name]);\n });\n }\n\n /**\n * Forwards existing methods on the nativ e object to the wrapper methods.\n * This does not wrap any of the arguments o r the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n co nstructors.forEach(function(constructor) {\n names.forEach(function(name) { \n constructor.prototype[name] = function() {\n var w = wrapIfNe eded(this);\n return w[name].apply(w, arguments);\n };\n }) ;\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = construc torTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defi neWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n sco pe.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = o neOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = regis ter;\n scope.rewrap = rewrap;\n scope.setWrapper = setWrapper;\n scope.unsafe Unwrap = unsafeUnwrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwra pIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope. wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n", 96 "// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use stri ct';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = ne w WeakMap();\n var wrappers = Object.create(null);\n\n function detectEval() { \n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeo f chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return fa lse;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this func tion this code\n // will continue to work.\n if (navigator.getDeviceStorag e) {\n return false;\n }\n\n try {\n var f = new Function('retur n true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.de fineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var ge tOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to , from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < n ames.length; i++) {\n var name = names[i];\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n functio n mixinStatics(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n switch ( name) {\n case 'arguments':\n case 'caller':\n case 'length ':\n case 'name':\n case 'prototype':\n case 'toString':\n continue;\n }\n defineProperty(to, name, getOwnPropertyDescri ptor(from, name));\n }\n return to;\n };\n\n function oneOf(object, prop ertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (pr opertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n var nonEnumerableDataDescriptor = {\n value: undefined,\n configurable: true, \n enumerable: false,\n writable: true\n };\n\n function defineNonEnumer ableDataProperty(object, name, value) {\n nonEnumerableDataDescriptor.value = value;\n defineProperty(object, name, nonEnumerableDataDescriptor);\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozill a.org/show_bug.cgi?id=855844\n // Make sure they are create before we start mod ifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstruct or(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(no de);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n i f (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrappe rConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapp er = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(n ativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\ n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n in stallProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function regis terInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(i nstanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.tes t(navigator.userAgent);\n\n // This is used as a fallback when getting the desc riptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: func tion() {},\n set: function(v) {},\n configurable: true,\n enumerable: t rue\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test (name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9 ]*$/.test(name);\n }\n\n // The name of the implementation property is intenti onally hard to\n // remember. Unfortunately, browsers are slower doing obj[expr ] than\n // obj.foo so we resort to repeat this ugly name. This ugly name is ne ver\n // used outside of this file though.\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this._ _impl4cf1e782hg__.' + name) :\n function() { return this.__impl4cf1e782hg __[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdent ifierName(name) ?\n new Function('v', 'this.__impl4cf1e782hg__.' + name + ' = v') :\n function(v) { this.__impl4cf1e782hg__[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.__impl4cf1e782hg__.' + name +\n '.apply(this.__impl4cf1e782hg__, arguments)') :\n function() {\n return this.__impl4cf1e782hg__[name].apply(\n this.__impl4cf1e 782hg__, arguments);\n };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception. \n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDesc riptor;\n }\n }\n\n function installProperty(source, target, allowMethod, o pt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'pol ymerBlackList_')\n continue;\n\n if (name in target)\n contin ue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindi ngs.\n source.__lookupGetter__(name);\n }\n var descriptor = ge tDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name );\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\ n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || desc riptor.set) {\n if (isEvent)\n setter = scope.getEventHandlerSet ter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enume rable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\ n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance I f present, this is used to extract\n * properties from an instance object. \n */\n function register(nativeConstructor, wrapperConstructor, opt_instance ) {\n var nativePrototype = nativeConstructor.prototype;\n registerInterna l(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperC onstructor, nativeConstructor);\n }\n\n function registerInternal(nativeProtot ype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperCons tructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefin ed);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nati vePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingPro perties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n regist erInstanceProperties(wrapperPrototype, opt_instance);\n\n defineNonEnumerable DataProperty(\n wrapperPrototype, 'constructor', wrapperConstructor);\n // Set it again. Some VMs optimizes objects that are used as prototypes.\n wrapperConstructor.prototype = wrapperPrototype;\n }\n\n function isWrapperFor (wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativ eConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Cre ates a generic wrapper constructor based on |object| and its\n * constructor.\ n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.get PrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor( nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrap perConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object );\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(s uperWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWra pperConstructor.call(this, node);\n }\n var p = Object.create(superWrapper Constructor.prototype);\n p.constructor = GeneratedWrapper;\n GeneratedWra pper.prototype = p;\n\n return GeneratedWrapper;\n }\n\n function isWrapper (object) {\n return object && object.__impl4cf1e782hg__;\n }\n\n function i sNative(object) {\n return !isWrapper(object);\n }\n\n /**\n * Wraps a no de in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNod e}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n \n assert(isNative(impl));\n return impl.__wrapper8e3dd93a60__ ||\n (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));\n }\n\ n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) { \n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper)); \n return wrapper.__impl4cf1e782hg__;\n }\n\n function unsafeUnwrap(wrapper ) {\n return wrapper.__impl4cf1e782hg__;\n }\n\n function setWrapper(impl, wrapper) {\n wrapper.__impl4cf1e782hg__ = impl;\n impl.__wrapper8e3dd93a60 __ = wrapper;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @para m {Object} object\n * @return {Object} The native implementation object.\n * /\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrappe r.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object ) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null) \n return;\n assert(isNative(node));\n assert(wrapper === undefined | | isWrapper(wrapper));\n node.__wrapper8e3dd93a60__ = wrapper;\n }\n\n var getterDescriptor = {\n get: undefined,\n configurable: true,\n enumerab le: true\n };\n\n function defineGetter(constructor, name, getter) {\n gett erDescriptor.get = getter;\n defineProperty(constructor.prototype, name, gett erDescriptor);\n }\n\n function defineWrapGetter(constructor, name) {\n def ineGetter(constructor, name, function() {\n return wrap(this.__impl4cf1e782 hg__[name]);\n });\n }\n\n /**\n * Forwards existing methods on the nativ e object to the wrapper methods.\n * This does not wrap any of the arguments o r the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n co nstructors.forEach(function(constructor) {\n names.forEach(function(name) { \n constructor.prototype[name] = function() {\n var w = wrapIfNe eded(this);\n return w[name].apply(w, arguments);\n };\n }) ;\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = construc torTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defi neWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n sco pe.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = o neOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = regis ter;\n scope.rewrap = rewrap;\n scope.setWrapper = setWrapper;\n scope.unsafe Unwrap = unsafeUnwrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwra pIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope. wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n",
97 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in th e LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalM utationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < c opies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutat ionObserver) {\n var counter = 1;\n var observer = new OriginalMutationObs erver(handle);\n var textNode = document.createTextNode(counter);\n observ er.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n func tion setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.set EndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n", 97 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in th e LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalM utationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < c opies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutat ionObserver) {\n var counter = 1;\n var observer = new OriginalMutationObs erver(handle);\n var textNode = document.createTextNode(counter);\n observ er.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n func tion setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.set EndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n",
98 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in th e LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMic rotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function schedule Callback(observer) {\n if (isScheduled)\n return;\n setEndOfMicrotask (notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg. org/#mutation-observers\n function notifyObservers() {\n isScheduled = false ;\n\n do {\n var notifyList = globalMutationObservers.slice();\n va r anyNonEmpty = false;\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n var queue = mo.takeRecords();\n rem oveTransientObserversFor(mo);\n if (queue.length) {\n mo.callbac k_(queue, mo);\n anyNonEmpty = true;\n }\n }\n } while ( anyNonEmpty);\n }\n\n /**\n * @param {string} type\n * @param {Node} targe t\n * @constructor\n */\n function MutationRecord(type, target) {\n this .type = type;\n this.target = target;\n this.addedNodes = new wrappers.Nod eList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSib ling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * R egisters transient observers to ancestor and its ancesors for the node\n * whi ch was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; an cestor = ancestor.parentNode) {\n var registrations = registrationsTable.ge t(ancestor);\n if (!registrations)\n continue;\n for (var i = 0 ; i < registrations.length; i++) {\n var registration = registrations[i]; \n if (registration.options.subtree)\n registration.addTransient Observer(node);\n }\n }\n }\n\n function removeTransientObserversFor(o bserver) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var no de = observer.nodes_[i];\n var registrations = registrationsTable.get(node) ;\n if (!registrations)\n return;\n for (var j = 0; j < registr ations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObse rvers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutati on-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.c reate(null);\n\n // 2.\n for (var node = target; node; node = node.parentN ode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrati ons.length; j++) {\n var registration = registrations[j];\n var op tions = registration.options;\n // 1.\n if (node !== target && !op tions.subtree)\n continue;\n\n // 2.\n if (type === 'attr ibutes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either op tions's attributeFilter does not contain name or namespace\n // is non-nu ll, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.in dexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continu e;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer ;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If ei ther type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // in terested observers to oldValue.\n if (type === 'attributes' && options.at tributeOldValue ||\n type === 'characterData' && options.characterDat aOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n var anyRecordsEnqueued = false;\n\n // 4.\n fo r (var uid in interestedObservers) {\n var observer = interestedObservers[u id];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = da ta.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\ n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data .removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.p reviousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSiblin g)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (ass ociatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[ uid];\n\n // 8.\n observer.records_.push(record);\n\n anyRecordsE nqueued = true;\n }\n\n if (anyRecordsEnqueued)\n scheduleCallback(); \n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} op tions\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree; \n\n // 1. If either options' attributeOldValue or attributeFilter is present \n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' ch aracterDataOldValue is present and options'\n // characterData is omitted, se t options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!thi s.attributes &&\n (options.attributeOldValue || 'attributeFilter' in opti ons) ||\n // 5.\n !this.characterData && options.characterDataOldV alue) {\n throw new TypeError();\n }\n\n this.characterData = !!optio ns.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attrib uteFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError(); \n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationOb server(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n t his.records_ = [];\n this.uid_ = ++uidCounter;\n\n // This will leak. Ther e is no way to implement this without WeakRefs :'(\n globalMutationObservers. push(this);\n }\n\n MutationObserver.prototype = {\n constructor: MutationO bserver,\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (re gistrations[i].observer === this) {\n registration = registrations[i];\ n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration( this, target, newOptions);\n registrations.push(registration);\n t his.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/# dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_ .forEach(function(node) {\n var registrations = registrationsTable.get(no de);\n for (var i = 0; i < registrations.length; i++) {\n var re gistration = registrations[i];\n if (registration.observer === this) {\ n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\ n },\n\n takeRecords: function() {\n var copyOfRecords = this.records _;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /** \n * Class used to represent a registered observer.\n * @param {MutationObse rver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, op tions) {\n this.observer = observer;\n this.target = target;\n this.opt ions = options;\n this.transientObservedNodes = [];\n }\n\n Registration.pr ototype = {\n /**\n * Adds a transient observer on node. The transient ob server gets removed\n * next time we deliver the change records.\n * @pa ram {Node} node\n */\n addTransientObserver: function(node) {\n // D on't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.transientObservedNodes.push(node);\n var regi strations = registrationsTable.get(node);\n if (!registrations)\n re gistrationsTable.set(node, registrations = []);\n\n // We know that registr ations does not contain this because we already\n // checked if node === th is.target.\n registrations.push(this);\n },\n\n removeTransientObserv ers: function() {\n var transientObservedNodes = this.transientObservedNode s;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transie ntObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0 ; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutat ion = enqueueMutation;\n scope.registerTransientObservers = registerTransientOb servers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrapper s.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n", 98 "/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in th e LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMic rotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function schedule Callback(observer) {\n if (isScheduled)\n return;\n setEndOfMicrotask (notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg. org/#mutation-observers\n function notifyObservers() {\n isScheduled = false ;\n\n do {\n var notifyList = globalMutationObservers.slice();\n va r anyNonEmpty = false;\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n var queue = mo.takeRecords();\n rem oveTransientObserversFor(mo);\n if (queue.length) {\n mo.callbac k_(queue, mo);\n anyNonEmpty = true;\n }\n }\n } while ( anyNonEmpty);\n }\n\n /**\n * @param {string} type\n * @param {Node} targe t\n * @constructor\n */\n function MutationRecord(type, target) {\n this .type = type;\n this.target = target;\n this.addedNodes = new wrappers.Nod eList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSib ling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * R egisters transient observers to ancestor and its ancesors for the node\n * whi ch was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; an cestor = ancestor.parentNode) {\n var registrations = registrationsTable.ge t(ancestor);\n if (!registrations)\n continue;\n for (var i = 0 ; i < registrations.length; i++) {\n var registration = registrations[i]; \n if (registration.options.subtree)\n registration.addTransient Observer(node);\n }\n }\n }\n\n function removeTransientObserversFor(o bserver) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var no de = observer.nodes_[i];\n var registrations = registrationsTable.get(node) ;\n if (!registrations)\n return;\n for (var j = 0; j < registr ations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObse rvers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutati on-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.c reate(null);\n\n // 2.\n for (var node = target; node; node = node.parentN ode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrati ons.length; j++) {\n var registration = registrations[j];\n var op tions = registration.options;\n // 1.\n if (node !== target && !op tions.subtree)\n continue;\n\n // 2.\n if (type === 'attr ibutes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either op tions's attributeFilter does not contain name or namespace\n // is non-nu ll, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.in dexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continu e;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer ;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If ei ther type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // in terested observers to oldValue.\n if (type === 'attributes' && options.at tributeOldValue ||\n type === 'characterData' && options.characterDat aOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n var anyRecordsEnqueued = false;\n\n // 4.\n fo r (var uid in interestedObservers) {\n var observer = interestedObservers[u id];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = da ta.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\ n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data .removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.p reviousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSiblin g)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (ass ociatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[ uid];\n\n // 8.\n observer.records_.push(record);\n\n anyRecordsE nqueued = true;\n }\n\n if (anyRecordsEnqueued)\n scheduleCallback(); \n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} op tions\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree; \n\n // 1. If either options' attributeOldValue or attributeFilter is present \n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' ch aracterDataOldValue is present and options'\n // characterData is omitted, se t options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!thi s.attributes &&\n (options.attributeOldValue || 'attributeFilter' in opti ons) ||\n // 5.\n !this.characterData && options.characterDataOldV alue) {\n throw new TypeError();\n }\n\n this.characterData = !!optio ns.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attrib uteFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError(); \n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationOb server(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n t his.records_ = [];\n this.uid_ = ++uidCounter;\n\n // This will leak. Ther e is no way to implement this without WeakRefs :'(\n globalMutationObservers. push(this);\n }\n\n MutationObserver.prototype = {\n constructor: MutationO bserver,\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (re gistrations[i].observer === this) {\n registration = registrations[i];\ n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration( this, target, newOptions);\n registrations.push(registration);\n t his.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/# dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_ .forEach(function(node) {\n var registrations = registrationsTable.get(no de);\n for (var i = 0; i < registrations.length; i++) {\n var re gistration = registrations[i];\n if (registration.observer === this) {\ n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\ n },\n\n takeRecords: function() {\n var copyOfRecords = this.records _;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /** \n * Class used to represent a registered observer.\n * @param {MutationObse rver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, op tions) {\n this.observer = observer;\n this.target = target;\n this.opt ions = options;\n this.transientObservedNodes = [];\n }\n\n Registration.pr ototype = {\n /**\n * Adds a transient observer on node. The transient ob server gets removed\n * next time we deliver the change records.\n * @pa ram {Node} node\n */\n addTransientObserver: function(node) {\n // D on't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.transientObservedNodes.push(node);\n var regi strations = registrationsTable.get(node);\n if (!registrations)\n re gistrationsTable.set(node, registrations = []);\n\n // We know that registr ations does not contain this because we already\n // checked if node === th is.target.\n registrations.push(this);\n },\n\n removeTransientObserv ers: function() {\n var transientObservedNodes = this.transientObservedNode s;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transie ntObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0 ; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutat ion = enqueueMutation;\n scope.registerTransientObservers = registerTransientOb servers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrapper s.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n",
99 "/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in t he LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n /**\n * A tr ee scope represents the root of a tree. All nodes in a tree point to\n * the s ame TreeScope object. The tree scope of a node get set the first time\n * it i s accessed or when a node is added or remove to a tree.\n *\n * The root is a Node that has no parent.\n *\n * The parent is another TreeScope. For Shad owRoots, it is the TreeScope of\n * the host of the ShadowRoot.\n *\n * @p aram {!Node} root\n * @param {TreeScope} parent\n * @constructor\n */\n f unction TreeScope(root, parent) {\n /** @type {!Node} */\n this.root = roo t;\n\n /** @type {TreeScope} */\n this.parent = parent;\n }\n\n TreeScop e.prototype = {\n get renderer() {\n if (this.root instanceof scope.wrap pers.ShadowRoot) {\n return scope.getRendererForHost(this.root.host);\n }\n return null;\n },\n\n contains: function(treeScope) {\n for (; treeScope; treeScope = treeScope.parent) {\n if (treeScope === thi s)\n return true;\n }\n return false;\n }\n };\n\n funct ion setTreeScope(node, treeScope) {\n if (node.treeScope_ !== treeScope) {\n node.treeScope_ = treeScope;\n for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {\n sr.treeScope_.parent = treeScope;\n }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n setTreeScope(child, treeScope);\n }\n }\n }\n\n function getTreeScope (node) {\n if (node instanceof scope.wrappers.Window) {\n debugger;\n }\n\n if (node.treeScope_)\n return node.treeScope_;\n var parent = node.parentNode;\n var treeScope;\n if (parent)\n treeScope = getTree Scope(parent);\n else\n treeScope = new TreeScope(node, null);\n retu rn node.treeScope_ = treeScope;\n }\n\n scope.TreeScope = TreeScope;\n scope. getTreeScope = getTreeScope;\n scope.setTreeScope = setTreeScope;\n\n})(window. ShadowDOMPolyfill);\n", 99 "/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in t he LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n /**\n * A tr ee scope represents the root of a tree. All nodes in a tree point to\n * the s ame TreeScope object. The tree scope of a node get set the first time\n * it i s accessed or when a node is added or remove to a tree.\n *\n * The root is a Node that has no parent.\n *\n * The parent is another TreeScope. For Shad owRoots, it is the TreeScope of\n * the host of the ShadowRoot.\n *\n * @p aram {!Node} root\n * @param {TreeScope} parent\n * @constructor\n */\n f unction TreeScope(root, parent) {\n /** @type {!Node} */\n this.root = roo t;\n\n /** @type {TreeScope} */\n this.parent = parent;\n }\n\n TreeScop e.prototype = {\n get renderer() {\n if (this.root instanceof scope.wrap pers.ShadowRoot) {\n return scope.getRendererForHost(this.root.host);\n }\n return null;\n },\n\n contains: function(treeScope) {\n for (; treeScope; treeScope = treeScope.parent) {\n if (treeScope === thi s)\n return true;\n }\n return false;\n }\n };\n\n funct ion setTreeScope(node, treeScope) {\n if (node.treeScope_ !== treeScope) {\n node.treeScope_ = treeScope;\n for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {\n sr.treeScope_.parent = treeScope;\n }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n setTreeScope(child, treeScope);\n }\n }\n }\n\n function getTreeScope (node) {\n if (node instanceof scope.wrappers.Window) {\n debugger;\n }\n\n if (node.treeScope_)\n return node.treeScope_;\n var parent = node.parentNode;\n var treeScope;\n if (parent)\n treeScope = getTree Scope(parent);\n else\n treeScope = new TreeScope(node, null);\n retu rn node.treeScope_ = treeScope;\n }\n\n scope.TreeScope = TreeScope;\n scope. getTreeScope = getTreeScope;\n scope.setTreeScope = setTreeScope;\n\n})(window. ShadowDOMPolyfill);\n",
100 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrap per = scope.forwardMethodsToWrapper;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n va r setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n va r unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrapp ers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap() ;\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmedi atePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\ n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n r eturn node instanceof wrappers.ShadowRoot;\n }\n\n function rootOfNode(node) { \n return getTreeScope(node).root;\n }\n\n // http://w3c.github.io/webcompo nents/spec/shadow/#event-paths\n function getEventPath(node, event) {\n var path = [];\n var current = node;\n path.push(current);\n while (current ) {\n // 4.1.\n var destinationInsertionPoints = getDestinationInserti onPoints(current);\n if (destinationInsertionPoints && destinationInsertion Points.length > 0) {\n // 4.1.1\n for (var i = 0; i < destinationI nsertionPoints.length; i++) {\n var insertionPoint = destinationInserti onPoints[i];\n // 4.1.1.1\n if (isShadowInsertionPoint(inserti onPoint)) {\n var shadowRoot = rootOfNode(insertionPoint);\n // 4.1.1.1.2\n var olderShadowRoot = shadowRoot.olderShadowRoot;\n if (olderShadowRoot)\n path.push(olderShadowRoot);\n }\n\n // 4.1.1.2\n path.push(insertionPoint);\n }\n\n // 4.1.2\n current = destinationInsertionPoints[\n destinationInsertionPoints.length - 1];\n\n // 4.2\n } else {\n if (isShadowRoot(current)) {\n if (inSameTree(node, current) && even tMustBeStopped(event)) {\n // Stop this algorithm\n break; \n }\n current = current.host;\n path.push(current);\ n\n // 4.2.2\n } else {\n current = current.parentNode;\n if (current)\n path.push(current);\n }\n }\n }\n\n return path;\n }\n\n // http://w3c.github.io/webcomponents/spec/shad ow/#dfn-events-always-stopped\n function eventMustBeStopped(event) {\n if (! event)\n return false;\n\n switch (event.type) {\n case 'abort':\n case 'error':\n case 'select':\n case 'change':\n case 'load ':\n case 'reset':\n case 'resize':\n case 'scroll':\n case 'selectstart':\n return true;\n }\n return false;\n }\n\n // http ://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-insertion-point\n functi on isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement; \n // and make sure that there are no shadow precing this?\n // and that t here is no content ancestor?\n }\n\n function getDestinationInsertionPoints(no de) {\n return scope.getDestinationInsertionPoints(node);\n }\n\n // http:/ /w3c.github.io/webcomponents/spec/shadow/#event-retargeting\n function eventRet argetting(path, currentTarget) {\n if (path.length === 0)\n return curre ntTarget;\n\n // The currentTarget might be the window object. Use its docume nt for the\n // purpose of finding the retargetted node.\n if (currentTarg et instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\ n var currentTargetTree = getTreeScope(currentTarget);\n var originalTarge t = path[0];\n var originalTargetTree = getTreeScope(originalTarget);\n va r relativeTargetTree =\n lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);\n\n for (var i = 0; i < path.length; i++) {\n var node = path[i];\n if (getTreeScope(node) === relativeTargetTree)\n r eturn node;\n }\n\n return path[path.length - 1];\n }\n\n function getTr eeScopeAncestors(treeScope) {\n var ancestors = [];\n for (;treeScope; tre eScope = treeScope.parent) {\n ancestors.push(treeScope);\n }\n retur n ancestors;\n }\n\n function lowestCommonInclusiveAncestor(tsA, tsB) {\n v ar ancestorsA = getTreeScopeAncestors(tsA);\n var ancestorsB = getTreeScopeAn cestors(tsB);\n\n var result = null;\n while (ancestorsA.length > 0 && anc estorsB.length > 0) {\n var a = ancestorsA.pop();\n var b = ancestorsB .pop();\n if (a === b)\n result = a;\n else\n break;\n }\n return result;\n }\n\n function getTreeScopeRoot(ts) {\n if (!ts.p arent)\n return ts;\n return getTreeScopeRoot(ts.parent);\n }\n\n func tion relatedTargetResolution(event, currentTarget, relatedTarget) {\n // In c ase the current target is a window use its document for the purpose\n // of r etargetting the related target.\n if (currentTarget instanceof wrappers.Windo w)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var relatedTargetTree = getTreeScope(relatedT arget);\n\n var relatedTargetEventPath = getEventPath(relatedTarget, event);\ n\n var lowestCommonAncestorTree;\n\n // 4\n var lowestCommonAncestorTr ee =\n lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree );\n\n // 5\n if (!lowestCommonAncestorTree)\n lowestCommonAncestorTr ee = relatedTargetTree.root;\n\n // 6\n for (var commonAncestorTree = lowe stCommonAncestorTree;\n commonAncestorTree;\n commonAncestorTree = commonAncestorTree.parent) {\n // 6.1\n var adjustedRelatedTarget;\ n for (var i = 0; i < relatedTargetEventPath.length; i++) {\n var no de = relatedTargetEventPath[i];\n if (getTreeScope(node) === commonAncest orTree)\n return node;\n }\n }\n\n return null;\n }\n\n fu nction inSameTree(a, b) {\n return getTreeScope(a) === getTreeScope(b);\n }\ n\n var NONE = 0;\n var CAPTURING_PHASE = 1;\n var AT_TARGET = 2;\n var BUBB LING_PHASE = 3;\n\n // pendingError is used to rethrow the first error we got d uring an event\n // dispatch. The browser actually reports all errors but to do that we would\n // need to rethrow the error asynchronously.\n var pendingErr or;\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n dispatchEve nt(wrap(originalEvent), wrap(originalEvent.target));\n if (pendingError) {\n var err = pendingError;\n pendingError = null;\n throw err;\n }\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (curr entlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError');\ n\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure t hat the event path is correct.\n scope.renderAllPending();\n var eventPath ;\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappap is.html#events-and-the-window-object\n // All events dispatched on Nodes with a default view, except load events,\n // should propagate to the Window.\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html# the-end\n var overrideTarget;\n var win;\n var type = event.type;\n\n // Should really be not cancelable too but since Firefox has a bug there\n // we skip that check.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=9994 56\n if (type === 'load' && !event.bubbles) {\n var doc = originalWrappe rTarget;\n if (doc instanceof wrappers.Document && (win = doc.defaultView)) {\n overrideTarget = doc;\n eventPath = [];\n }\n }\n\n if (!eventPath) {\n if (originalWrapperTarget instanceof wrappers.Window) {\n win = originalWrapperTarget;\n eventPath = [];\n } else {\n eventPath = getEventPath(originalWrapperTarget, event);\n\n if (event.type !== 'load') {\n var doc = eventPath[eventPath.length - 1]; \n if (doc instanceof wrappers.Document)\n win = doc.default View;\n }\n }\n }\n\n eventPathTable.set(event, eventPath);\n\ n if (dispatchCapturing(event, eventPath, win, overrideTarget)) {\n if ( dispatchAtTarget(event, eventPath, win, overrideTarget)) {\n dispatchBubb ling(event, eventPath, win, overrideTarget);\n }\n }\n\n eventPhaseTa ble.set(event, NONE);\n currentTargetTable.delete(event, null);\n currentl yDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath, win, overrideTarget) {\n var p hase = CAPTURING_PHASE;\n\n if (win) {\n if (!invoke(win, event, phase, eventPath, overrideTarget))\n return false;\n }\n\n for (var i = ev entPath.length - 1; i > 0; i--) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath, win, overrideTarget) {\n var phase = AT_TARGET;\n var currentTarget = eventPath[0] || win;\n retur n invoke(currentTarget, event, phase, eventPath, overrideTarget);\n }\n\n func tion dispatchBubbling(event, eventPath, win, overrideTarget) {\n var phase = BUBBLING_PHASE;\n for (var i = 1; i < eventPath.length; i++) {\n if (!in voke(eventPath[i], event, phase, eventPath, overrideTarget))\n return;\n }\n\n if (win && eventPath.length > 0) {\n invoke(win, event, phase, eventPath, overrideTarget);\n }\n }\n\n function invoke(currentTarget, even t, phase, eventPath, overrideTarget) {\n var listeners = listenersTable.get(c urrentTarget);\n if (!listeners)\n return true;\n\n var target = over rideTarget || eventRetargetting(eventPath, currentTarget);\n\n if (target === currentTarget) {\n if (phase === CAPTURING_PHASE)\n return true;\n\ n if (phase === BUBBLING_PHASE)\n phase = AT_TARGET;\n\n } else if (phase === BUBBLING_PHASE && !event.bubbles) {\n return true;\n }\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n var unwrappedRelatedTarget = originalEvent.relatedTarget;\n\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (unwrappedRelatedTarget) {\n // In IE we ca n get objects that are not EventTargets at this point.\n // Safari does n ot have an EventTarget interface so revert to checking\n // for addEventL istener as an approximation.\n if (unwrappedRelatedTarget instanceof Obje ct &&\n unwrappedRelatedTarget.addEventListener) {\n var rel atedTarget = wrap(unwrappedRelatedTarget);\n\n var adjusted =\n relatedTargetResolution(event, currentTarget, relatedTarget);\n i f (adjusted === target)\n return true;\n } else {\n a djusted = null;\n }\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.typ e;\n\n var anyRemoved = false;\n // targetTable.set(event, target);\n t argetTable.set(event, target);\n currentTargetTable.set(event, currentTarget) ;\n\n // Keep track of the invoke depth so that we only clean up the removed\ n // listeners if we are in the outermost invoke.\n listeners.depth++;\n\n for (var i = 0, len = listeners.length; i < len; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listen er.capture && phase === CAPTURING_PHASE ||\n listener.capture && phase === BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (ty peof listener.handler === 'function')\n listener.handler.call(currentTa rget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\ n } catch (ex) {\n if (!pendingError)\n pendingError = ex;\ n }\n }\n\n listeners.depth--;\n\n if (anyRemoved && listeners.dep th === 0) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTa ble.get(event);\n }\n\n function Listener(type, handler, capture) {\n this. type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\ n }\n Listener.prototype = {\n equals: function(that) {\n return this. handler === that.handler && this.type === that.type &&\n this.capture = == that.capture;\n },\n get removed() {\n return this.handler === nul l;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\ n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList _ = {\n returnValue: true,\n // TODO(arv): keyLocation is part of Keyboard Event but Firefox does not\n // support constructable KeyboardEvent so we kee p it here for now.\n keyLocation: true\n };\n\n /**\n * Creates a new Eve nt wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event( type, options) {\n if (type instanceof OriginalEvent) {\n var impl = typ e;\n if (!OriginalBeforeUnloadEvent && impl.type === 'beforeunload') {\n return new BeforeUnloadEvent(impl);\n }\n setWrapper(impl, this); \n } else {\n return wrap(constructEvent(OriginalEvent, 'Event', type, o ptions));\n }\n }\n Event.prototype = {\n get target() {\n return t argetTable.get(this);\n },\n get currentTarget() {\n return currentTa rgetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTab le.get(this);\n },\n get path() {\n var eventPath = eventPathTable.ge t(this);\n if (!eventPath)\n return [];\n // TODO(arv): Event p ath should contain window.\n return eventPath.slice();\n },\n stopPro pagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, tr ue);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n regis terWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function u nwrapOptions(options) {\n if (!options || !options.relatedTarget)\n retu rn options;\n return Object.create(options, {\n relatedTarget: {value: u nwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(n ame, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var Ge nericEvent = function(type, options) {\n if (type instanceof OriginalEvent) \n setWrapper(type, this);\n else\n return wrap(constructEven t(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Ob ject.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent .prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Sa fari fails on new FocusEvent (and others?).\n // - IE does not support even t constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, n ew OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(Origin alEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEv ent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n var re latedTarget = relatedTargetTable.get(this);\n // relatedTarget can be null. \n if (relatedTarget !== undefined)\n return relatedTarget;\n r eturn wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFuncti on(name, relatedTargetIndex) {\n return function() {\n arguments[related TargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(t his);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEvent Proto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: ge tInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEven t = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEv ent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In c ase the browser does not support event constructors we polyfill that\n // by ca lling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `init FooEvent` are derived from the registered default event init dict.\n var defaul tInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function () {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a ne w native event.\n */\n function constructEvent(OriginalEvent, name, type, opt ions) {\n if (supportsEventConstructors)\n return new OriginalEvent(type , unwrapOptions(options));\n\n // Create the arguments from the default dicti onary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict) .forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].appl y(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInit Dicts[name] = initDict;\n };\n\n // The order of the default event init di ctionary keys is important, the\n // arguments to initFooEvent is derived fro m that.\n configureEventConstructor('Event', {bubbles: false, cancelable: fal se});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\ n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: fals e,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relat edTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n // Safari 7 does not yet have Befor eUnloadEvent.\n // https://bugs.webkit.org/show_bug.cgi?id=120849\n var Origin alBeforeUnloadEvent = window.BeforeUnloadEvent;\n\n function BeforeUnloadEvent( impl) {\n Event.call(this, impl);\n }\n BeforeUnloadEvent.prototype = Objec t.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get retu rnValue() {\n return unsafeUnwrap(this).returnValue;\n },\n set retur nValue(v) {\n unsafeUnwrap(this).returnValue = v;\n }\n });\n\n if (Or iginalBeforeUnloadEvent)\n registerWrapper(OriginalBeforeUnloadEvent, BeforeU nloadEvent);\n\n function isValidListener(fun) {\n if (typeof fun === 'funct ion')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOM NodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRem ovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTa rget} impl The original event target.\n * @constructor\n */\n function Even tTarget(impl) {\n setWrapper(impl, this);\n }\n\n // Node and Window have d ifferent internal type checks in WebKit so we cannot\n // use the same method a s the original function.\n var methodNames = [\n 'addEventListener',\n 'r emoveEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(func tion(constructor) {\n var p = constructor.prototype;\n methodNames.forEach (function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]}); \n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper i nstanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap (wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(t ype, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\ n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n li steners = [];\n listeners.depth = 0;\n listenersTable.set(this, li steners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]) )\n return;\n }\n }\n\n listeners.push(listener);\n\ n var target = getTargetToListenAt(this);\n target.addEventListener_(t ype, dispatchOriginalEvent, true);\n },\n removeEventListener: function(ty pe, fun, capture) {\n capture = Boolean(capture);\n var listeners = li stenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this); \n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n // We want to use the na tive dispatchEvent because it triggers the default\n // actions (like check ing a checkbox). However, if there are no listeners\n // in the composed tr ee then there are no events that will trigger and\n // listeners in the non composed tree that are part of the event path are\n // not notified.\n //\n // If we find out that there are no listeners in the composed tree w e add\n // a temporary listener to the target which makes us get called bac k even\n // in that case.\n\n var nativeEvent = unwrap(event);\n var eventType = nativeEvent.type;\n\n // Allow dispatching the same event a gain. This is safe because if user\n // code calls this during an existing dispatch of the same event the\n // native dispatchEvent throws (that is re quired by the spec).\n handledEventsTable.set(nativeEvent, false);\n\n // Force rendering since we prefer native dispatch and that works on the\n // composed tree.\n scope.renderAllPending();\n\n var tempListener;\n if (!hasListenerInAncestors(this, eventType)) {\n tempListener = fu nction() {};\n this.addEventListener(eventType, tempListener, true);\n }\n\n try {\n return unwrap(this).dispatchEvent_(nativeEvent);\n } finally {\n if (tempListener)\n this.removeEventListener( eventType, tempListener, true);\n }\n }\n };\n\n function hasListener( node, type) {\n var listeners = listenersTable.get(node);\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n if (!listeners[i ].removed && listeners[i].type === type)\n return true;\n }\n } \n return false;\n }\n\n function hasListenerInAncestors(target, type) {\n for (var node = unwrap(target); node; node = node.parentNode) {\n if (ha sListener(wrap(node), type))\n return true;\n }\n return false;\n }\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventT arget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethods ToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = d ocument.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) { \n scope.renderAllPending();\n\n var element =\n wrap(originalEleme ntFromPoint.call(unsafeUnwrap(document), x, y));\n if (!element)\n retur n null;\n var path = getEventPath(element, null);\n\n // scope the path to this TreeScope\n var idx = path.lastIndexOf(self);\n if (idx == -1)\n return null;\n else\n path = path.slice(0, idx);\n\n // TODO(dfreed m): pass idx to eventRetargetting to avoid array copy\n return eventRetargett ing(path, self);\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Functio n}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inline EventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[nam e].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @retur n {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlin eEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inli neEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e .preventDefault();\n else if (name === 'onbeforeunload' && typeof rv == = 'string')\n e.returnValue = rv;\n // mouseover uses true f or preventDefault but preventDefault for\n // mouseover is ignored by b rowsers these day.\n };\n\n this.addEventListener(eventType, wrapp ed, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.elementFrom Point = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter ;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTarg etMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = Before UnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Even t = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusE vent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers. UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n", 100 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrap per = scope.forwardMethodsToWrapper;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n va r setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n va r unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrapp ers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap() ;\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmedi atePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\ n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n r eturn node instanceof wrappers.ShadowRoot;\n }\n\n function rootOfNode(node) { \n return getTreeScope(node).root;\n }\n\n // http://w3c.github.io/webcompo nents/spec/shadow/#event-paths\n function getEventPath(node, event) {\n var path = [];\n var current = node;\n path.push(current);\n while (current ) {\n // 4.1.\n var destinationInsertionPoints = getDestinationInserti onPoints(current);\n if (destinationInsertionPoints && destinationInsertion Points.length > 0) {\n // 4.1.1\n for (var i = 0; i < destinationI nsertionPoints.length; i++) {\n var insertionPoint = destinationInserti onPoints[i];\n // 4.1.1.1\n if (isShadowInsertionPoint(inserti onPoint)) {\n var shadowRoot = rootOfNode(insertionPoint);\n // 4.1.1.1.2\n var olderShadowRoot = shadowRoot.olderShadowRoot;\n if (olderShadowRoot)\n path.push(olderShadowRoot);\n }\n\n // 4.1.1.2\n path.push(insertionPoint);\n }\n\n // 4.1.2\n current = destinationInsertionPoints[\n destinationInsertionPoints.length - 1];\n\n // 4.2\n } else {\n if (isShadowRoot(current)) {\n if (inSameTree(node, current) && even tMustBeStopped(event)) {\n // Stop this algorithm\n break; \n }\n current = current.host;\n path.push(current);\ n\n // 4.2.2\n } else {\n current = current.parentNode;\n if (current)\n path.push(current);\n }\n }\n }\n\n return path;\n }\n\n // http://w3c.github.io/webcomponents/spec/shad ow/#dfn-events-always-stopped\n function eventMustBeStopped(event) {\n if (! event)\n return false;\n\n switch (event.type) {\n case 'abort':\n case 'error':\n case 'select':\n case 'change':\n case 'load ':\n case 'reset':\n case 'resize':\n case 'scroll':\n case 'selectstart':\n return true;\n }\n return false;\n }\n\n // http ://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-insertion-point\n functi on isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement; \n // and make sure that there are no shadow precing this?\n // and that t here is no content ancestor?\n }\n\n function getDestinationInsertionPoints(no de) {\n return scope.getDestinationInsertionPoints(node);\n }\n\n // http:/ /w3c.github.io/webcomponents/spec/shadow/#event-retargeting\n function eventRet argetting(path, currentTarget) {\n if (path.length === 0)\n return curre ntTarget;\n\n // The currentTarget might be the window object. Use its docume nt for the\n // purpose of finding the retargetted node.\n if (currentTarg et instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\ n var currentTargetTree = getTreeScope(currentTarget);\n var originalTarge t = path[0];\n var originalTargetTree = getTreeScope(originalTarget);\n va r relativeTargetTree =\n lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);\n\n for (var i = 0; i < path.length; i++) {\n var node = path[i];\n if (getTreeScope(node) === relativeTargetTree)\n r eturn node;\n }\n\n return path[path.length - 1];\n }\n\n function getTr eeScopeAncestors(treeScope) {\n var ancestors = [];\n for (;treeScope; tre eScope = treeScope.parent) {\n ancestors.push(treeScope);\n }\n retur n ancestors;\n }\n\n function lowestCommonInclusiveAncestor(tsA, tsB) {\n v ar ancestorsA = getTreeScopeAncestors(tsA);\n var ancestorsB = getTreeScopeAn cestors(tsB);\n\n var result = null;\n while (ancestorsA.length > 0 && anc estorsB.length > 0) {\n var a = ancestorsA.pop();\n var b = ancestorsB .pop();\n if (a === b)\n result = a;\n else\n break;\n }\n return result;\n }\n\n function getTreeScopeRoot(ts) {\n if (!ts.p arent)\n return ts;\n return getTreeScopeRoot(ts.parent);\n }\n\n func tion relatedTargetResolution(event, currentTarget, relatedTarget) {\n // In c ase the current target is a window use its document for the purpose\n // of r etargetting the related target.\n if (currentTarget instanceof wrappers.Windo w)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var relatedTargetTree = getTreeScope(relatedT arget);\n\n var relatedTargetEventPath = getEventPath(relatedTarget, event);\ n\n var lowestCommonAncestorTree;\n\n // 4\n var lowestCommonAncestorTr ee =\n lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree );\n\n // 5\n if (!lowestCommonAncestorTree)\n lowestCommonAncestorTr ee = relatedTargetTree.root;\n\n // 6\n for (var commonAncestorTree = lowe stCommonAncestorTree;\n commonAncestorTree;\n commonAncestorTree = commonAncestorTree.parent) {\n // 6.1\n var adjustedRelatedTarget;\ n for (var i = 0; i < relatedTargetEventPath.length; i++) {\n var no de = relatedTargetEventPath[i];\n if (getTreeScope(node) === commonAncest orTree)\n return node;\n }\n }\n\n return null;\n }\n\n fu nction inSameTree(a, b) {\n return getTreeScope(a) === getTreeScope(b);\n }\ n\n var NONE = 0;\n var CAPTURING_PHASE = 1;\n var AT_TARGET = 2;\n var BUBB LING_PHASE = 3;\n\n // pendingError is used to rethrow the first error we got d uring an event\n // dispatch. The browser actually reports all errors but to do that we would\n // need to rethrow the error asynchronously.\n var pendingErr or;\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n dispatchEve nt(wrap(originalEvent), wrap(originalEvent.target));\n if (pendingError) {\n var err = pendingError;\n pendingError = null;\n throw err;\n }\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (curr entlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError');\ n\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure t hat the event path is correct.\n scope.renderAllPending();\n var eventPath ;\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappap is.html#events-and-the-window-object\n // All events dispatched on Nodes with a default view, except load events,\n // should propagate to the Window.\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html# the-end\n var overrideTarget;\n var win;\n var type = event.type;\n\n // Should really be not cancelable too but since Firefox has a bug there\n // we skip that check.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=9994 56\n if (type === 'load' && !event.bubbles) {\n var doc = originalWrappe rTarget;\n if (doc instanceof wrappers.Document && (win = doc.defaultView)) {\n overrideTarget = doc;\n eventPath = [];\n }\n }\n\n if (!eventPath) {\n if (originalWrapperTarget instanceof wrappers.Window) {\n win = originalWrapperTarget;\n eventPath = [];\n } else {\n eventPath = getEventPath(originalWrapperTarget, event);\n\n if (event.type !== 'load') {\n var doc = eventPath[eventPath.length - 1]; \n if (doc instanceof wrappers.Document)\n win = doc.default View;\n }\n }\n }\n\n eventPathTable.set(event, eventPath);\n\ n if (dispatchCapturing(event, eventPath, win, overrideTarget)) {\n if ( dispatchAtTarget(event, eventPath, win, overrideTarget)) {\n dispatchBubb ling(event, eventPath, win, overrideTarget);\n }\n }\n\n eventPhaseTa ble.set(event, NONE);\n currentTargetTable.delete(event, null);\n currentl yDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath, win, overrideTarget) {\n var p hase = CAPTURING_PHASE;\n\n if (win) {\n if (!invoke(win, event, phase, eventPath, overrideTarget))\n return false;\n }\n\n for (var i = ev entPath.length - 1; i > 0; i--) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath, win, overrideTarget) {\n var phase = AT_TARGET;\n var currentTarget = eventPath[0] || win;\n retur n invoke(currentTarget, event, phase, eventPath, overrideTarget);\n }\n\n func tion dispatchBubbling(event, eventPath, win, overrideTarget) {\n var phase = BUBBLING_PHASE;\n for (var i = 1; i < eventPath.length; i++) {\n if (!in voke(eventPath[i], event, phase, eventPath, overrideTarget))\n return;\n }\n\n if (win && eventPath.length > 0) {\n invoke(win, event, phase, eventPath, overrideTarget);\n }\n }\n\n function invoke(currentTarget, even t, phase, eventPath, overrideTarget) {\n var listeners = listenersTable.get(c urrentTarget);\n if (!listeners)\n return true;\n\n var target = over rideTarget || eventRetargetting(eventPath, currentTarget);\n\n if (target === currentTarget) {\n if (phase === CAPTURING_PHASE)\n return true;\n\ n if (phase === BUBBLING_PHASE)\n phase = AT_TARGET;\n\n } else if (phase === BUBBLING_PHASE && !event.bubbles) {\n return true;\n }\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n var unwrappedRelatedTarget = originalEvent.relatedTarget;\n\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (unwrappedRelatedTarget) {\n // In IE we ca n get objects that are not EventTargets at this point.\n // Safari does n ot have an EventTarget interface so revert to checking\n // for addEventL istener as an approximation.\n if (unwrappedRelatedTarget instanceof Obje ct &&\n unwrappedRelatedTarget.addEventListener) {\n var rel atedTarget = wrap(unwrappedRelatedTarget);\n\n var adjusted =\n relatedTargetResolution(event, currentTarget, relatedTarget);\n i f (adjusted === target)\n return true;\n } else {\n a djusted = null;\n }\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.typ e;\n\n var anyRemoved = false;\n // targetTable.set(event, target);\n t argetTable.set(event, target);\n currentTargetTable.set(event, currentTarget) ;\n\n // Keep track of the invoke depth so that we only clean up the removed\ n // listeners if we are in the outermost invoke.\n listeners.depth++;\n\n for (var i = 0, len = listeners.length; i < len; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listen er.capture && phase === CAPTURING_PHASE ||\n listener.capture && phase === BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (ty peof listener.handler === 'function')\n listener.handler.call(currentTa rget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\ n } catch (ex) {\n if (!pendingError)\n pendingError = ex;\ n }\n }\n\n listeners.depth--;\n\n if (anyRemoved && listeners.dep th === 0) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTa ble.get(event);\n }\n\n function Listener(type, handler, capture) {\n this. type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\ n }\n Listener.prototype = {\n equals: function(that) {\n return this. handler === that.handler && this.type === that.type &&\n this.capture = == that.capture;\n },\n get removed() {\n return this.handler === nul l;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\ n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList _ = {\n returnValue: true,\n // TODO(arv): keyLocation is part of Keyboard Event but Firefox does not\n // support constructable KeyboardEvent so we kee p it here for now.\n keyLocation: true\n };\n\n /**\n * Creates a new Eve nt wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event( type, options) {\n if (type instanceof OriginalEvent) {\n var impl = typ e;\n if (!OriginalBeforeUnloadEvent && impl.type === 'beforeunload') {\n return new BeforeUnloadEvent(impl);\n }\n setWrapper(impl, this); \n } else {\n return wrap(constructEvent(OriginalEvent, 'Event', type, o ptions));\n }\n }\n Event.prototype = {\n get target() {\n return t argetTable.get(this);\n },\n get currentTarget() {\n return currentTa rgetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTab le.get(this);\n },\n get path() {\n var eventPath = eventPathTable.ge t(this);\n if (!eventPath)\n return [];\n // TODO(arv): Event p ath should contain window.\n return eventPath.slice();\n },\n stopPro pagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, tr ue);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n regis terWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function u nwrapOptions(options) {\n if (!options || !options.relatedTarget)\n retu rn options;\n return Object.create(options, {\n relatedTarget: {value: u nwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(n ame, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var Ge nericEvent = function(type, options) {\n if (type instanceof OriginalEvent) \n setWrapper(type, this);\n else\n return wrap(constructEven t(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Ob ject.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent .prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Sa fari fails on new FocusEvent (and others?).\n // - IE does not support even t constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, n ew OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(Origin alEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEv ent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n var re latedTarget = relatedTargetTable.get(this);\n // relatedTarget can be null. \n if (relatedTarget !== undefined)\n return relatedTarget;\n r eturn wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFuncti on(name, relatedTargetIndex) {\n return function() {\n arguments[related TargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(t his);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEvent Proto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: ge tInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEven t = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEv ent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In c ase the browser does not support event constructors we polyfill that\n // by ca lling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `init FooEvent` are derived from the registered default event init dict.\n var defaul tInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function () {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a ne w native event.\n */\n function constructEvent(OriginalEvent, name, type, opt ions) {\n if (supportsEventConstructors)\n return new OriginalEvent(type , unwrapOptions(options));\n\n // Create the arguments from the default dicti onary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict) .forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].appl y(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInit Dicts[name] = initDict;\n };\n\n // The order of the default event init di ctionary keys is important, the\n // arguments to initFooEvent is derived fro m that.\n configureEventConstructor('Event', {bubbles: false, cancelable: fal se});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\ n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: fals e,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relat edTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n // Safari 7 does not yet have Befor eUnloadEvent.\n // https://bugs.webkit.org/show_bug.cgi?id=120849\n var Origin alBeforeUnloadEvent = window.BeforeUnloadEvent;\n\n function BeforeUnloadEvent( impl) {\n Event.call(this, impl);\n }\n BeforeUnloadEvent.prototype = Objec t.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get retu rnValue() {\n return unsafeUnwrap(this).returnValue;\n },\n set retur nValue(v) {\n unsafeUnwrap(this).returnValue = v;\n }\n });\n\n if (Or iginalBeforeUnloadEvent)\n registerWrapper(OriginalBeforeUnloadEvent, BeforeU nloadEvent);\n\n function isValidListener(fun) {\n if (typeof fun === 'funct ion')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOM NodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRem ovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTa rget} impl The original event target.\n * @constructor\n */\n function Even tTarget(impl) {\n setWrapper(impl, this);\n }\n\n // Node and Window have d ifferent internal type checks in WebKit so we cannot\n // use the same method a s the original function.\n var methodNames = [\n 'addEventListener',\n 'r emoveEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(func tion(constructor) {\n var p = constructor.prototype;\n methodNames.forEach (function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]}); \n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper i nstanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap (wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(t ype, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\ n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n li steners = [];\n listeners.depth = 0;\n listenersTable.set(this, li steners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]) )\n return;\n }\n }\n\n listeners.push(listener);\n\ n var target = getTargetToListenAt(this);\n target.addEventListener_(t ype, dispatchOriginalEvent, true);\n },\n removeEventListener: function(ty pe, fun, capture) {\n capture = Boolean(capture);\n var listeners = li stenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this); \n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n // We want to use the na tive dispatchEvent because it triggers the default\n // actions (like check ing a checkbox). However, if there are no listeners\n // in the composed tr ee then there are no events that will trigger and\n // listeners in the non composed tree that are part of the event path are\n // not notified.\n //\n // If we find out that there are no listeners in the composed tree w e add\n // a temporary listener to the target which makes us get called bac k even\n // in that case.\n\n var nativeEvent = unwrap(event);\n var eventType = nativeEvent.type;\n\n // Allow dispatching the same event a gain. This is safe because if user\n // code calls this during an existing dispatch of the same event the\n // native dispatchEvent throws (that is re quired by the spec).\n handledEventsTable.set(nativeEvent, false);\n\n // Force rendering since we prefer native dispatch and that works on the\n // composed tree.\n scope.renderAllPending();\n\n var tempListener;\n if (!hasListenerInAncestors(this, eventType)) {\n tempListener = fu nction() {};\n this.addEventListener(eventType, tempListener, true);\n }\n\n try {\n return unwrap(this).dispatchEvent_(nativeEvent);\n } finally {\n if (tempListener)\n this.removeEventListener( eventType, tempListener, true);\n }\n }\n };\n\n function hasListener( node, type) {\n var listeners = listenersTable.get(node);\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n if (!listeners[i ].removed && listeners[i].type === type)\n return true;\n }\n } \n return false;\n }\n\n function hasListenerInAncestors(target, type) {\n for (var node = unwrap(target); node; node = node.parentNode) {\n if (ha sListener(wrap(node), type))\n return true;\n }\n return false;\n }\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventT arget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethods ToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = d ocument.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) { \n scope.renderAllPending();\n\n var element =\n wrap(originalEleme ntFromPoint.call(unsafeUnwrap(document), x, y));\n if (!element)\n retur n null;\n var path = getEventPath(element, null);\n\n // scope the path to this TreeScope\n var idx = path.lastIndexOf(self);\n if (idx == -1)\n return null;\n else\n path = path.slice(0, idx);\n\n // TODO(dfreed m): pass idx to eventRetargetting to avoid array copy\n return eventRetargett ing(path, self);\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Functio n}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inline EventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[nam e].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @retur n {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlin eEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inli neEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e .preventDefault();\n else if (name === 'onbeforeunload' && typeof rv == = 'string')\n e.returnValue = rv;\n // mouseover uses true f or preventDefault but preventDefault for\n // mouseover is ignored by b rowsers these day.\n };\n\n this.addEventListener(eventType, wrapp ed, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.elementFrom Point = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter ;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTarg etMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = Before UnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Even t = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusE vent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers. UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n",
(...skipping 27 matching lines...) Expand all
128 "// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope. wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope .registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope. wrap;\n\n var OriginalSVGElementInstance = window.SVGElementInstance;\n if (!O riginalSVGElementInstance)\n return;\n\n function SVGElementInstance(impl) { \n EventTarget.call(this, impl);\n }\n\n SVGElementInstance.prototype = Obj ect.create(EventTarget.prototype);\n mixin(SVGElementInstance.prototype, {\n /** @type {SVGElement} */\n get correspondingElement() {\n return wrap( unsafeUnwrap(this).correspondingElement);\n },\n\n /** @type {SVGUseElemen t} */\n get correspondingUseElement() {\n return wrap(unsafeUnwrap(this) .correspondingUseElement);\n },\n\n /** @type {SVGElementInstance} */\n get parentNode() {\n return wrap(unsafeUnwrap(this).parentNode);\n },\n \n /** @type {SVGElementInstanceList} */\n get childNodes() {\n throw new Error('Not implemented');\n },\n\n /** @type {SVGElementInstance} */\ n get firstChild() {\n return wrap(unsafeUnwrap(this).firstChild);\n },\n\n /** @type {SVGElementInstance} */\n get lastChild() {\n return wrap(unsafeUnwrap(this).lastChild);\n },\n\n /** @type {SVGElementInstanc e} */\n get previousSibling() {\n return wrap(unsafeUnwrap(this).previou sSibling);\n },\n\n /** @type {SVGElementInstance} */\n get nextSibling () {\n return wrap(unsafeUnwrap(this).nextSibling);\n }\n });\n\n regi sterWrapper(OriginalSVGElementInstance, SVGElementInstance);\n\n scope.wrappers .SVGElementInstance = SVGElementInstance;\n})(window.ShadowDOMPolyfill);\n", 128 "// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope. wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope .registerWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var wrap = scope. wrap;\n\n var OriginalSVGElementInstance = window.SVGElementInstance;\n if (!O riginalSVGElementInstance)\n return;\n\n function SVGElementInstance(impl) { \n EventTarget.call(this, impl);\n }\n\n SVGElementInstance.prototype = Obj ect.create(EventTarget.prototype);\n mixin(SVGElementInstance.prototype, {\n /** @type {SVGElement} */\n get correspondingElement() {\n return wrap( unsafeUnwrap(this).correspondingElement);\n },\n\n /** @type {SVGUseElemen t} */\n get correspondingUseElement() {\n return wrap(unsafeUnwrap(this) .correspondingUseElement);\n },\n\n /** @type {SVGElementInstance} */\n get parentNode() {\n return wrap(unsafeUnwrap(this).parentNode);\n },\n \n /** @type {SVGElementInstanceList} */\n get childNodes() {\n throw new Error('Not implemented');\n },\n\n /** @type {SVGElementInstance} */\ n get firstChild() {\n return wrap(unsafeUnwrap(this).firstChild);\n },\n\n /** @type {SVGElementInstance} */\n get lastChild() {\n return wrap(unsafeUnwrap(this).lastChild);\n },\n\n /** @type {SVGElementInstanc e} */\n get previousSibling() {\n return wrap(unsafeUnwrap(this).previou sSibling);\n },\n\n /** @type {SVGElementInstance} */\n get nextSibling () {\n return wrap(unsafeUnwrap(this).nextSibling);\n }\n });\n\n regi sterWrapper(OriginalSVGElementInstance, SVGElementInstance);\n\n scope.wrappers .SVGElementInstance = SVGElementInstance;\n})(window.ShadowDOMPolyfill);\n",
129 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin; \n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWr apper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n functio n CanvasRenderingContext2D(impl) {\n setWrapper(impl, this);\n }\n\n mixin( CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(uns afeUnwrap(this).canvas);\n },\n\n drawImage: function() {\n arguments [0] = unwrapIfNeeded(arguments[0]);\n unsafeUnwrap(this).drawImage.apply(un safeUnwrap(this), arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return unsafeUnwrap(this).createPatt ern.apply(unsafeUnwrap(this), arguments);\n }\n });\n\n registerWrapper(Ori ginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n docu ment.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRender ingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n", 129 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin; \n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWr apper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n functio n CanvasRenderingContext2D(impl) {\n setWrapper(impl, this);\n }\n\n mixin( CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(uns afeUnwrap(this).canvas);\n },\n\n drawImage: function() {\n arguments [0] = unwrapIfNeeded(arguments[0]);\n unsafeUnwrap(this).drawImage.apply(un safeUnwrap(this), arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return unsafeUnwrap(this).createPatt ern.apply(unsafeUnwrap(this), arguments);\n }\n });\n\n registerWrapper(Ori ginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n docu ment.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRender ingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n",
130 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin; \n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWr apper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrapIfNeeded = scope.u nwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!Origin alWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n setWrapper(impl, this);\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(unsafeUnwrap(this).canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]); \n unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(argu ments[6]);\n unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arg uments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail s o we use a dummy\n // object with dummy instance properties for these broken br owsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper (OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties );\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window .ShadowDOMPolyfill);\n", 130 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin; \n var registerWrapper = scope.registerWrapper;\n var setWrapper = scope.setWr apper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrapIfNeeded = scope.u nwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!Origin alWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n setWrapper(impl, this);\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(unsafeUnwrap(this).canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]); \n unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(argu ments[6]);\n unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arg uments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail s o we use a dummy\n // object with dummy instance properties for these broken br owsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper (OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties );\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window .ShadowDOMPolyfill);\n",
131 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = sc ope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope .unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range ;\n\n function Range(impl) {\n setWrapper(impl, this);\n }\n Range.prototy pe = {\n get startContainer() {\n return wrap(unsafeUnwrap(this).startCo ntainer);\n },\n get endContainer() {\n return wrap(unsafeUnwrap(this ).endContainer);\n },\n get commonAncestorContainer() {\n return wrap (unsafeUnwrap(this).commonAncestorContainer);\n },\n setStart: function(re fNode,offset) {\n unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offs et);\n },\n setEnd: function(refNode,offset) {\n unsafeUnwrap(this).s etEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(re fNode) {\n unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n unsafeUnwrap(this).setStartAf ter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));\n },\n setEn dAfter: function(refNode) {\n unsafeUnwrap(this).setEndAfter(unwrapIfNeeded (refNode));\n },\n selectNode: function(refNode) {\n unsafeUnwrap(thi s).selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: functio n(refNode) {\n unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode ));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n retu rn unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(unsafeUnwrap(this).extractC ontents());\n },\n cloneContents: function() {\n return wrap(unsafeUn wrap(this).cloneContents());\n },\n insertNode: function(node) {\n un safeUnwrap(this).insertNode(unwrapIfNeeded(node));\n },\n surroundContents : function(newParent) {\n unsafeUnwrap(this).surroundContents(unwrapIfNeede d(newParent));\n },\n cloneRange: function() {\n return wrap(unsafeUn wrap(this).cloneRange());\n },\n isPointInRange: function(node, offset) {\ n return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return unsafeUnwrap(th is).comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: fun ction(node) {\n return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(nod e));\n },\n toString: function() {\n return unsafeUnwrap(this).toStri ng();\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (Or iginalRange.prototype.createContextualFragment) {\n Range.prototype.createCon textualFragment = function(html) {\n return wrap(unsafeUnwrap(this).createC ontextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.Shadow DOMPolyfill);\n", 131 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = sc ope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope .unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range ;\n\n function Range(impl) {\n setWrapper(impl, this);\n }\n Range.prototy pe = {\n get startContainer() {\n return wrap(unsafeUnwrap(this).startCo ntainer);\n },\n get endContainer() {\n return wrap(unsafeUnwrap(this ).endContainer);\n },\n get commonAncestorContainer() {\n return wrap (unsafeUnwrap(this).commonAncestorContainer);\n },\n setStart: function(re fNode,offset) {\n unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offs et);\n },\n setEnd: function(refNode,offset) {\n unsafeUnwrap(this).s etEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(re fNode) {\n unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n unsafeUnwrap(this).setStartAf ter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));\n },\n setEn dAfter: function(refNode) {\n unsafeUnwrap(this).setEndAfter(unwrapIfNeeded (refNode));\n },\n selectNode: function(refNode) {\n unsafeUnwrap(thi s).selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: functio n(refNode) {\n unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode ));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n retu rn unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(unsafeUnwrap(this).extractC ontents());\n },\n cloneContents: function() {\n return wrap(unsafeUn wrap(this).cloneContents());\n },\n insertNode: function(node) {\n un safeUnwrap(this).insertNode(unwrapIfNeeded(node));\n },\n surroundContents : function(newParent) {\n unsafeUnwrap(this).surroundContents(unwrapIfNeede d(newParent));\n },\n cloneRange: function() {\n return wrap(unsafeUn wrap(this).cloneRange());\n },\n isPointInRange: function(node, offset) {\ n return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return unsafeUnwrap(th is).comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: fun ction(node) {\n return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(nod e));\n },\n toString: function() {\n return unsafeUnwrap(this).toStri ng();\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (Or iginalRange.prototype.createContextualFragment) {\n Range.prototype.createCon textualFragment = function(html) {\n return wrap(unsafeUnwrap(this).createC ontextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.Shadow DOMPolyfill);\n",
132 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterfa ce = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNode Interface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFrag ment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragm ent.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, Select orsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers. Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n\n})( window.ShadowDOMPolyfill);\n", 132 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterfa ce = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNode Interface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFrag ment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragm ent.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, Select orsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers. Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n\n})( window.ShadowDOMPolyfill);\n",
133 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = s cope.wrappers.DocumentFragment;\n var TreeScope = scope.TreeScope;\n var eleme ntFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\ n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var rew rap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unsafeUnwra p = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n var spaceC harRe = /[ \\t\\n\\r\\f]/;\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n next OlderShadowTreeTable.set(this, oldShadowRoot);\n\n this.treeScope_ =\n new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));\n\n shadowH ostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(Do cumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n constructor: Sh adowRoot,\n\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidat eShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlde rShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return sh adowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: functi on() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this , this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n if (spaceCharRe.test(id))\n return null;\n return this.querySelect or('[id=\"' + id + '\"]');\n }\n });\n\n scope.wrappers.ShadowRoot = Shadow Root;\n\n})(window.ShadowDOMPolyfill);\n", 133 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = s cope.wrappers.DocumentFragment;\n var TreeScope = scope.TreeScope;\n var eleme ntFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\ n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var rew rap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unsafeUnwra p = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n var spaceC harRe = /[ \\t\\n\\r\\f]/;\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n next OlderShadowTreeTable.set(this, oldShadowRoot);\n\n this.treeScope_ =\n new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));\n\n shadowH ostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(Do cumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n constructor: Sh adowRoot,\n\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidat eShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlde rShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return sh adowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: functi on() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this , this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n if (spaceCharRe.test(id))\n return null;\n return this.querySelect or('[id=\"' + id + '\"]');\n }\n });\n\n scope.wrappers.ShadowRoot = Shadow Root;\n\n})(window.ShadowDOMPolyfill);\n",
134 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LIC ENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrapp ers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n v ar HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wra ppers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope .assert;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwr ap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields o f a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNod e\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSib ling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling ;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down mean s first and last child\n * @param {!Node} wrapper\n */\n function updateWra pperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper. lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNod eWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childW rapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWr apper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapp er);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insert Before(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNod e = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove( newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (! refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastC hild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n v ar lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } els e {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parent NodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibl ing_ = refChildWrapper.previousSibling;\n }\n\n parentNode.insertBefore(ne wChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwr ap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperU pAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWr apper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibli ng)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (pa rentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n pare ntNodeWrapper.firstChild_ = nodeWrapper;\n\n parentNode.removeChild(node);\n }\n\n var distributedNodesTable = new WeakMap();\n var destinationInsertionPo intsTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n fun ction resetDistributedNodes(insertionPoint) {\n distributedNodesTable.set(ins ertionPoint, []);\n }\n\n function getDistributedNodes(insertionPoint) {\n var rv = distributedNodesTable.get(insertionPoint);\n if (!rv)\n distrib utedNodesTable.set(insertionPoint, rv = []);\n return rv;\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child ;\n }\n return result;\n }\n\n var request = oneOf(window, [\n 'reque stAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimation Frame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var ren derTimer;\n\n function renderAllPending() {\n // TODO(arv): Order these in d ocument order. That way we do not have to\n // render something twice.\n f or (var i = 0; i < pendingDirtyRenderers.length; i++) {\n var renderer = pe ndingDirtyRenderers[i];\n var parentRenderer = renderer.parentRenderer;\n if (parentRenderer && parentRenderer.dirty)\n continue;\n render er.render();\n }\n\n pendingDirtyRenderers = [];\n }\n\n function handle RequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n } \n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\ n function getRendererForHost(host) {\n var renderer = rendererForHostTable. get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\ n\n function getShadowRootAncestor(node) {\n var root = getTreeScope(node).r oot;\n if (root instanceof ShadowRoot)\n return root;\n return null;\ n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendere rForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spli ceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.no de) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"rende r tree\". When we render the\n * composed tree we create a tree of RenderNodes , then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this. node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.child Nodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unw rap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var s plices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var new Index = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < sp lices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[ne wIndex++].sync(added);\n }\n\n var removedCount = splice.removed.l ength;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = ne wChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node; \n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // ha s been added.\n added.set(newChildWrapper, true);\n\n newChild RenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\ n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChil dren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\ n this.host = host;\n this.dirty = false;\n this.invalidateAttributes() ;\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n / / http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#render ing-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty) \n return;\n\n this.invalidateAttributes();\n\n var host = this .host;\n\n this.distribution(host);\n var renderNode = opt_renderNode || new RenderNode(host);\n this.buildRenderTree(renderNode, host);\n\n var topMostRenderer = !opt_renderNode;\n if (topMostRenderer)\n ren derNode.sync();\n\n this.dirty = false;\n },\n\n get parentRenderer() {\n return getTreeScope(this.host).renderer;\n },\n\n invalidate: fu nction() {\n if (!this.dirty) {\n this.dirty = true;\n var pa rentRenderer = this.parentRenderer;\n if (parentRenderer)\n pare ntRenderer.invalidate();\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRe questAnimationFrame, 0);\n }\n },\n\n // http://w3c.github.io/webcomp onents/spec/shadow/#distribution-algorithms\n distribution: function(root) {\ n this.resetAll(root);\n this.distributionResolution(root);\n },\n\ n resetAll: function(node) {\n if (isInsertionPoint(node))\n rese tDistributedNodes(node);\n else\n resetDestinationInsertionPoints(no de);\n\n for (var child = node.firstChild; child; child = child.nextSibling ) {\n this.resetAll(child);\n }\n\n if (node.shadowRoot)\n this.resetAll(node.shadowRoot);\n\n if (node.olderShadowRoot)\n t his.resetAll(node.olderShadowRoot);\n },\n\n // http://w3c.github.io/webco mponents/spec/shadow/#distribution-results\n distributionResolution: function (node) {\n if (isShadowHost(node)) {\n var shadowHost = node;\n // 1.1\n var pool = poolPopulation(shadowHost);\n\n var shadowT rees = getShadowTrees(shadowHost);\n\n // 1.2\n for (var i = 0; i < shadowTrees.length; i++) {\n // 1.2.1\n this.poolDistributio n(shadowTrees[i], pool);\n }\n\n // 1.3\n for (var i = shad owTrees.length - 1; i >= 0; i--) {\n var shadowTree = shadowTrees[i];\n \n // 1.3.1\n // TODO(arv): We should keep the shadow insertio n points on the\n // shadow root (or renderer) so we don't have to sear ch the tree\n // every time.\n var shadow = getShadowInsertion Point(shadowTree);\n\n // 1.3.2\n if (shadow) {\n\n // 1.3.2.1\n var olderShadowRoot = shadowTree.olderShadowRoot;\n if (olderShadowRoot) {\n // 1.3.2.1.1\n pool = poolPopulation(olderShadowRoot);\n }\n\n // 1.3.2.2\n for (var j = 0; j < pool.length; j++) {\n // 1.3.2.2.1\n destributeNodeInto(pool[j], shadow);\n }\n }\n\n // 1.3.3\n this.distributionResolution(shadowTree);\n } \n }\n\n for (var child = node.firstChild; child; child = child.nextSi bling) {\n this.distributionResolution(child);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-distribution-algorithm \n poolDistribution: function (node, pool) {\n if (node instanceof HTMLS hadowElement)\n return;\n\n if (node instanceof HTMLContentElement) {\n var content = node;\n this.updateDependentAttributes(content.g etAttribute('select'));\n\n var anyDistributed = false;\n\n // 1.1 \n for (var i = 0; i < pool.length; i++) {\n var node = pool[i]; \n if (!node)\n continue;\n if (matches(node, conte nt)) {\n destributeNodeInto(node, content);\n pool[i] = un defined;\n anyDistributed = true;\n }\n }\n\n // 1.2\n // Fallback content\n if (!anyDistributed) {\n f or (var child = content.firstChild;\n child;\n child = child.nextSibling) {\n destributeNodeInto(child, content);\n }\n }\n\n return;\n }\n\n for (var child = node.firs tChild; child; child = child.nextSibling) {\n this.poolDistribution(child , pool);\n }\n },\n\n buildRenderTree: function(renderNode, node) {\n var children = this.compose(node);\n for (var i = 0; i < children.len gth; i++) {\n var child = children[i];\n var childRenderNode = ren derNode.append(child);\n this.buildRenderTree(childRenderNode, child);\n }\n\n if (isShadowHost(node)) {\n var renderer = getRendererFor Host(node);\n renderer.dirty = false;\n }\n\n },\n\n compose: function(node) {\n var children = [];\n var p = node.shadowRoot || nod e;\n for (var child = p.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n this.associateNode(p);\n var distributedNodes = getDistributedNodes(child);\n for (var j = 0; j < distributedNodes.length; j++) {\n var distributedNode = distribut edNodes[j];\n if (isFinalDestination(child, distributedNode))\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttri butes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attrib ute\n * being used in the selector.\n * @param {string} selector\n * /\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n / / #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n a ttributes[name] = true;\n });\n\n // Pseudo selectors have been remove d from the spec.\n },\n\n dependsOnAttribute: function(name) {\n retu rn this.attributes[name];\n },\n\n associateNode: function(node) {\n unsafeUnwrap(node).polymerShadowRenderer_ = this;\n }\n };\n\n // http://w3 c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm\n function poolPopulation(node) {\n var pool = [];\n for (var child = node.firstChil d; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n pool.push.apply(pool, getDistributedNodes(child));\n } else {\n pool.push(child);\n }\n }\n return pool;\n }\n\n function getShad owInsertionPoint(node) {\n if (node instanceof HTMLShadowElement)\n retu rn node;\n if (node instanceof HTMLContentElement)\n return null;\n f or (var child = node.firstChild; child; child = child.nextSibling) {\n var res = getShadowInsertionPoint(child);\n if (res)\n return res;\n }\n return null;\n }\n\n function destributeNodeInto(child, insertionPoint) {\n getDistributedNodes(insertionPoint).push(child);\n var points = desti nationInsertionPointsTable.get(child);\n if (!points)\n destinationInser tionPointsTable.set(child, [insertionPoint]);\n else\n points.push(inser tionPoint);\n }\n\n function getDestinationInsertionPoints(node) {\n return destinationInsertionPointsTable.get(node);\n }\n\n function resetDestinationI nsertionPoints(node) {\n // IE11 crashes when delete is used.\n destinatio nInsertionPointsTable.set(node, undefined);\n }\n\n // AllowedSelectors :\n / / TypeSelector\n // *\n // ClassSelector\n // IDSelector\n // Attr ibuteSelector\n // negation\n var selectorStartCharRe = /^(:not\\()?[*.#[a-z A-Z_|]/;\n\n function matches(node, contentElement) {\n var select = content Element.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.tr im();\n if (!select)\n return true;\n\n if (!(node instanceof Element ))\n return false;\n\n if (!selectorStartCharRe.test(select))\n ret urn false;\n\n try {\n return node.matches(select);\n } catch (ex) {\ n // Invalid selector.\n return false;\n }\n }\n\n function isFin alDestination(insertionPoint, node) {\n var points = getDestinationInsertionP oints(node);\n return points && points[points.length - 1] === insertionPoint; \n }\n\n function isInsertionPoint(node) {\n return node instanceof HTMLCon tentElement ||\n node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n // Retu rns the shadow trees as an array, with the youngest tree at the\n // beginning of the array.\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees. push(tree);\n }\n return trees;\n }\n\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when: \n //\n // - a direct child to the ShadowRoot is added or removed\n // - a di rect child to the host is added or removed\n // - a new shadow root is created\ n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /* *\n * This gets called when a node was added or removed to it.\n */\n Node. prototype.invalidateShadowRenderer = function(force) {\n var renderer = unsaf eUnwrap(this).polymerShadowRenderer_;\n if (renderer) {\n renderer.inval idate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentE lement.prototype.getDistributedNodes =\n HTMLShadowElement.prototype.getDistrib utedNodes = function() {\n // TODO(arv): We should only rerender the dirty an cestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedNodes(this);\n };\n\n Element.prototype.getDestinationIn sertionPoints = function() {\n renderAllPending();\n return getDestination InsertionPoints(this) || [];\n };\n\n HTMLContentElement.prototype.nodeIsInser ted_ =\n HTMLShadowElement.prototype.nodeIsInserted_ = function() {\n // Inv alidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var sh adowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\ n renderer = getRendererForShadowRoot(shadowRoot);\n unsafeUnwrap(this). polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate ();\n };\n\n scope.getRendererForHost = getRendererForHost;\n scope.getShadow Trees = getShadowTrees;\n scope.renderAllPending = renderAllPending;\n\n scope .getDestinationInsertionPoints = getDestinationInsertionPoints;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: re move,\n };\n\n})(window.ShadowDOMPolyfill);\n", 134 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LIC ENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrapp ers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n v ar HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wra ppers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope .assert;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwr ap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields o f a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNod e\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSib ling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling ;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down mean s first and last child\n * @param {!Node} wrapper\n */\n function updateWra pperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper. lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNod eWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childW rapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWr apper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapp er);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insert Before(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNod e = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove( newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (! refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastC hild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n v ar lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } els e {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parent NodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibl ing_ = refChildWrapper.previousSibling;\n }\n\n parentNode.insertBefore(ne wChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwr ap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperU pAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWr apper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibli ng)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (pa rentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n pare ntNodeWrapper.firstChild_ = nodeWrapper;\n\n parentNode.removeChild(node);\n }\n\n var distributedNodesTable = new WeakMap();\n var destinationInsertionPo intsTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n fun ction resetDistributedNodes(insertionPoint) {\n distributedNodesTable.set(ins ertionPoint, []);\n }\n\n function getDistributedNodes(insertionPoint) {\n var rv = distributedNodesTable.get(insertionPoint);\n if (!rv)\n distrib utedNodesTable.set(insertionPoint, rv = []);\n return rv;\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child ;\n }\n return result;\n }\n\n var request = oneOf(window, [\n 'reque stAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimation Frame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var ren derTimer;\n\n function renderAllPending() {\n // TODO(arv): Order these in d ocument order. That way we do not have to\n // render something twice.\n f or (var i = 0; i < pendingDirtyRenderers.length; i++) {\n var renderer = pe ndingDirtyRenderers[i];\n var parentRenderer = renderer.parentRenderer;\n if (parentRenderer && parentRenderer.dirty)\n continue;\n render er.render();\n }\n\n pendingDirtyRenderers = [];\n }\n\n function handle RequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n } \n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\ n function getRendererForHost(host) {\n var renderer = rendererForHostTable. get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\ n\n function getShadowRootAncestor(node) {\n var root = getTreeScope(node).r oot;\n if (root instanceof ShadowRoot)\n return root;\n return null;\ n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendere rForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spli ceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.no de) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"rende r tree\". When we render the\n * composed tree we create a tree of RenderNodes , then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this. node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.child Nodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unw rap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var s plices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var new Index = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < sp lices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[ne wIndex++].sync(added);\n }\n\n var removedCount = splice.removed.l ength;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = ne wChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node; \n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // ha s been added.\n added.set(newChildWrapper, true);\n\n newChild RenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\ n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChil dren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\ n this.host = host;\n this.dirty = false;\n this.invalidateAttributes() ;\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n / / http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#render ing-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty) \n return;\n\n this.invalidateAttributes();\n\n var host = this .host;\n\n this.distribution(host);\n var renderNode = opt_renderNode || new RenderNode(host);\n this.buildRenderTree(renderNode, host);\n\n var topMostRenderer = !opt_renderNode;\n if (topMostRenderer)\n ren derNode.sync();\n\n this.dirty = false;\n },\n\n get parentRenderer() {\n return getTreeScope(this.host).renderer;\n },\n\n invalidate: fu nction() {\n if (!this.dirty) {\n this.dirty = true;\n var pa rentRenderer = this.parentRenderer;\n if (parentRenderer)\n pare ntRenderer.invalidate();\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRe questAnimationFrame, 0);\n }\n },\n\n // http://w3c.github.io/webcomp onents/spec/shadow/#distribution-algorithms\n distribution: function(root) {\ n this.resetAll(root);\n this.distributionResolution(root);\n },\n\ n resetAll: function(node) {\n if (isInsertionPoint(node))\n rese tDistributedNodes(node);\n else\n resetDestinationInsertionPoints(no de);\n\n for (var child = node.firstChild; child; child = child.nextSibling ) {\n this.resetAll(child);\n }\n\n if (node.shadowRoot)\n this.resetAll(node.shadowRoot);\n\n if (node.olderShadowRoot)\n t his.resetAll(node.olderShadowRoot);\n },\n\n // http://w3c.github.io/webco mponents/spec/shadow/#distribution-results\n distributionResolution: function (node) {\n if (isShadowHost(node)) {\n var shadowHost = node;\n // 1.1\n var pool = poolPopulation(shadowHost);\n\n var shadowT rees = getShadowTrees(shadowHost);\n\n // 1.2\n for (var i = 0; i < shadowTrees.length; i++) {\n // 1.2.1\n this.poolDistributio n(shadowTrees[i], pool);\n }\n\n // 1.3\n for (var i = shad owTrees.length - 1; i >= 0; i--) {\n var shadowTree = shadowTrees[i];\n \n // 1.3.1\n // TODO(arv): We should keep the shadow insertio n points on the\n // shadow root (or renderer) so we don't have to sear ch the tree\n // every time.\n var shadow = getShadowInsertion Point(shadowTree);\n\n // 1.3.2\n if (shadow) {\n\n // 1.3.2.1\n var olderShadowRoot = shadowTree.olderShadowRoot;\n if (olderShadowRoot) {\n // 1.3.2.1.1\n pool = poolPopulation(olderShadowRoot);\n }\n\n // 1.3.2.2\n for (var j = 0; j < pool.length; j++) {\n // 1.3.2.2.1\n destributeNodeInto(pool[j], shadow);\n }\n }\n\n // 1.3.3\n this.distributionResolution(shadowTree);\n } \n }\n\n for (var child = node.firstChild; child; child = child.nextSi bling) {\n this.distributionResolution(child);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-distribution-algorithm \n poolDistribution: function (node, pool) {\n if (node instanceof HTMLS hadowElement)\n return;\n\n if (node instanceof HTMLContentElement) {\n var content = node;\n this.updateDependentAttributes(content.g etAttribute('select'));\n\n var anyDistributed = false;\n\n // 1.1 \n for (var i = 0; i < pool.length; i++) {\n var node = pool[i]; \n if (!node)\n continue;\n if (matches(node, conte nt)) {\n destributeNodeInto(node, content);\n pool[i] = un defined;\n anyDistributed = true;\n }\n }\n\n // 1.2\n // Fallback content\n if (!anyDistributed) {\n f or (var child = content.firstChild;\n child;\n child = child.nextSibling) {\n destributeNodeInto(child, content);\n }\n }\n\n return;\n }\n\n for (var child = node.firs tChild; child; child = child.nextSibling) {\n this.poolDistribution(child , pool);\n }\n },\n\n buildRenderTree: function(renderNode, node) {\n var children = this.compose(node);\n for (var i = 0; i < children.len gth; i++) {\n var child = children[i];\n var childRenderNode = ren derNode.append(child);\n this.buildRenderTree(childRenderNode, child);\n }\n\n if (isShadowHost(node)) {\n var renderer = getRendererFor Host(node);\n renderer.dirty = false;\n }\n\n },\n\n compose: function(node) {\n var children = [];\n var p = node.shadowRoot || nod e;\n for (var child = p.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n this.associateNode(p);\n var distributedNodes = getDistributedNodes(child);\n for (var j = 0; j < distributedNodes.length; j++) {\n var distributedNode = distribut edNodes[j];\n if (isFinalDestination(child, distributedNode))\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttri butes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attrib ute\n * being used in the selector.\n * @param {string} selector\n * /\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n / / #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n a ttributes[name] = true;\n });\n\n // Pseudo selectors have been remove d from the spec.\n },\n\n dependsOnAttribute: function(name) {\n retu rn this.attributes[name];\n },\n\n associateNode: function(node) {\n unsafeUnwrap(node).polymerShadowRenderer_ = this;\n }\n };\n\n // http://w3 c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm\n function poolPopulation(node) {\n var pool = [];\n for (var child = node.firstChil d; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n pool.push.apply(pool, getDistributedNodes(child));\n } else {\n pool.push(child);\n }\n }\n return pool;\n }\n\n function getShad owInsertionPoint(node) {\n if (node instanceof HTMLShadowElement)\n retu rn node;\n if (node instanceof HTMLContentElement)\n return null;\n f or (var child = node.firstChild; child; child = child.nextSibling) {\n var res = getShadowInsertionPoint(child);\n if (res)\n return res;\n }\n return null;\n }\n\n function destributeNodeInto(child, insertionPoint) {\n getDistributedNodes(insertionPoint).push(child);\n var points = desti nationInsertionPointsTable.get(child);\n if (!points)\n destinationInser tionPointsTable.set(child, [insertionPoint]);\n else\n points.push(inser tionPoint);\n }\n\n function getDestinationInsertionPoints(node) {\n return destinationInsertionPointsTable.get(node);\n }\n\n function resetDestinationI nsertionPoints(node) {\n // IE11 crashes when delete is used.\n destinatio nInsertionPointsTable.set(node, undefined);\n }\n\n // AllowedSelectors :\n / / TypeSelector\n // *\n // ClassSelector\n // IDSelector\n // Attr ibuteSelector\n // negation\n var selectorStartCharRe = /^(:not\\()?[*.#[a-z A-Z_|]/;\n\n function matches(node, contentElement) {\n var select = content Element.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.tr im();\n if (!select)\n return true;\n\n if (!(node instanceof Element ))\n return false;\n\n if (!selectorStartCharRe.test(select))\n ret urn false;\n\n try {\n return node.matches(select);\n } catch (ex) {\ n // Invalid selector.\n return false;\n }\n }\n\n function isFin alDestination(insertionPoint, node) {\n var points = getDestinationInsertionP oints(node);\n return points && points[points.length - 1] === insertionPoint; \n }\n\n function isInsertionPoint(node) {\n return node instanceof HTMLCon tentElement ||\n node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n // Retu rns the shadow trees as an array, with the youngest tree at the\n // beginning of the array.\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees. push(tree);\n }\n return trees;\n }\n\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when: \n //\n // - a direct child to the ShadowRoot is added or removed\n // - a di rect child to the host is added or removed\n // - a new shadow root is created\ n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /* *\n * This gets called when a node was added or removed to it.\n */\n Node. prototype.invalidateShadowRenderer = function(force) {\n var renderer = unsaf eUnwrap(this).polymerShadowRenderer_;\n if (renderer) {\n renderer.inval idate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentE lement.prototype.getDistributedNodes =\n HTMLShadowElement.prototype.getDistrib utedNodes = function() {\n // TODO(arv): We should only rerender the dirty an cestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedNodes(this);\n };\n\n Element.prototype.getDestinationIn sertionPoints = function() {\n renderAllPending();\n return getDestination InsertionPoints(this) || [];\n };\n\n HTMLContentElement.prototype.nodeIsInser ted_ =\n HTMLShadowElement.prototype.nodeIsInserted_ = function() {\n // Inv alidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var sh adowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\ n renderer = getRendererForShadowRoot(shadowRoot);\n unsafeUnwrap(this). polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate ();\n };\n\n scope.getRendererForHost = getRendererForHost;\n scope.getShadow Trees = getShadowTrees;\n scope.renderAllPending = renderAllPending;\n\n scope .getDestinationInsertionPoints = getDestinationInsertionPoints;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: re move,\n };\n\n})(window.ShadowDOMPolyfill);\n",
135 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope. wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\ n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonEl ement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenEle ment',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElemen t',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutpu tElement',\n // HTMLSelectElement is handled in HTMLSelectElement.js\n 'HT MLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an alread y existing constructor.\n assert(!scope.wrappers[name]);\n\n var Generated Wrapper = function(node) {\n // At this point all of them extend HTMLElemen t.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\ n get form() {\n return wrap(unwrap(this).form);\n },\n });\ n\n registerWrapper(window[name], GeneratedWrapper,\n document.createE lement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n \n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.Sha dowDOMPolyfill);\n", 135 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope. wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\ n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonEl ement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenEle ment',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElemen t',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutpu tElement',\n // HTMLSelectElement is handled in HTMLSelectElement.js\n 'HT MLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an alread y existing constructor.\n assert(!scope.wrappers[name]);\n\n var Generated Wrapper = function(node) {\n // At this point all of them extend HTMLElemen t.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\ n get form() {\n return wrap(unwrap(this).form);\n },\n });\ n\n registerWrapper(window[name], GeneratedWrapper,\n document.createE lement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n \n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.Sha dowDOMPolyfill);\n",
136 "// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = sc ope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope .unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalSelection = window.S election;\n\n function Selection(impl) {\n setWrapper(impl, this);\n }\n S election.prototype = {\n get anchorNode() {\n return wrap(unsafeUnwrap(t his).anchorNode);\n },\n get focusNode() {\n return wrap(unsafeUnwrap (this).focusNode);\n },\n addRange: function(range) {\n unsafeUnwrap( this).addRange(unwrap(range));\n },\n collapse: function(node, index) {\n unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);\n },\n cont ainsNode: function(node, allowPartial) {\n return unsafeUnwrap(this).contai nsNode(unwrapIfNeeded(node), allowPartial);\n },\n extend: function(node, offset) {\n unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);\n } ,\n getRangeAt: function(index) {\n return wrap(unsafeUnwrap(this).getRa ngeAt(index));\n },\n removeRange: function(range) {\n unsafeUnwrap(t his).removeRange(unwrap(range));\n },\n selectAllChildren: function(node) {\n unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));\n },\n toString: function() {\n return unsafeUnwrap(this).toString();\n }\n };\n\n // WebKit extensions. Not implemented.\n // readonly attribute Node bas eNode;\n // readonly attribute long baseOffset;\n // readonly attribute Node e xtentNode;\n // readonly attribute long extentOffset;\n // [RaisesException] v oid setBaseAndExtent([Default=Undefined] optional Node baseNode,\n // [Default=Undefined] optional long baseOffset,\n // [Default=Undefined] optional Node extentNode,\n // [Default=Undefined] optional long extentOffset);\n // [RaisesException, Implem entedAs=collapse] void setPosition([Default=Undefined] optional Node node,\n // [Default=Undefined] optional long offset);\n\n registerWrappe r(window.Selection, Selection, window.getSelection());\n\n scope.wrappers.Selec tion = Selection;\n\n})(window.ShadowDOMPolyfill);\n", 136 "// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = sc ope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope .unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalSelection = window.S election;\n\n function Selection(impl) {\n setWrapper(impl, this);\n }\n S election.prototype = {\n get anchorNode() {\n return wrap(unsafeUnwrap(t his).anchorNode);\n },\n get focusNode() {\n return wrap(unsafeUnwrap (this).focusNode);\n },\n addRange: function(range) {\n unsafeUnwrap( this).addRange(unwrap(range));\n },\n collapse: function(node, index) {\n unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);\n },\n cont ainsNode: function(node, allowPartial) {\n return unsafeUnwrap(this).contai nsNode(unwrapIfNeeded(node), allowPartial);\n },\n extend: function(node, offset) {\n unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);\n } ,\n getRangeAt: function(index) {\n return wrap(unsafeUnwrap(this).getRa ngeAt(index));\n },\n removeRange: function(range) {\n unsafeUnwrap(t his).removeRange(unwrap(range));\n },\n selectAllChildren: function(node) {\n unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));\n },\n toString: function() {\n return unsafeUnwrap(this).toString();\n }\n };\n\n // WebKit extensions. Not implemented.\n // readonly attribute Node bas eNode;\n // readonly attribute long baseOffset;\n // readonly attribute Node e xtentNode;\n // readonly attribute long extentOffset;\n // [RaisesException] v oid setBaseAndExtent([Default=Undefined] optional Node baseNode,\n // [Default=Undefined] optional long baseOffset,\n // [Default=Undefined] optional Node extentNode,\n // [Default=Undefined] optional long extentOffset);\n // [RaisesException, Implem entedAs=collapse] void setPosition([Default=Undefined] optional Node node,\n // [Default=Undefined] optional long offset);\n\n registerWrappe r(window.Selection, Selection, window.getSelection());\n\n scope.wrappers.Selec tion = Selection;\n\n})(window.ShadowDOMPolyfill);\n",
137 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterfa ce = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var Par entNodeInterface = scope.ParentNodeInterface;\n var Selection = scope.wrappers. Selection;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRo ot = scope.wrappers.ShadowRoot;\n var TreeScope = scope.TreeScope;\n var clone Node = scope.cloneNode;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = sco pe.forwardMethodsToWrapper;\n var matchesNames = scope.matchesNames;\n var mix in = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderA llPending = scope.renderAllPending;\n var rewrap = scope.rewrap;\n var setWrap per = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapEventTargetMethods = scope. wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var imple mentationTable = new WeakMap();\n\n function Document(node) {\n Node.call(th is, node);\n this.treeScope_ = new TreeScope(this, null);\n }\n Document.pr ototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'docume ntElement');\n\n // Conceptually both body and head can be in a shadow but supo rting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'bo dy');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridd en so we override a bunch of its methods\n // directly on the instance.\n\n fu nction wrapMethod(name) {\n var original = document[name];\n Document.prot otype[name] = function() {\n return wrap(original.apply(unsafeUnwrap(this), arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFrag ment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'c reateEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById'\ n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(unsafeUnwrap (doc), unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubt ree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot) ;\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\ n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shad owRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (old ShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalGetSelect ion = document.getSelection;\n\n mixin(Document.prototype, {\n adoptNode: fu nction(node) {\n if (node.parentNode)\n node.parentNode.removeChild( node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n el ementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y );\n },\n importNode: function(node, deep) {\n return cloneNode(node, deep, unsafeUnwrap(this));\n },\n getSelection: function() {\n rende rAllPending();\n return new Selection(originalGetSelection.call(unwrap(this )));\n },\n getElementsByName: function(name) {\n return SelectorsInt erface.querySelectorAll.call(this,\n '[name=' + JSON.stringify(String(n ame)) + ']');\n }\n });\n\n if (document.registerElement) {\n var origin alRegisterElement = document.registerElement;\n Document.prototype.registerEl ement = function(tagName, object) {\n var prototype, extendsOption;\n if (object !== undefined) {\n prototype = object.prototype;\n exte ndsOption = object.extends;\n }\n\n if (!prototype)\n prototype = Object.create(HTMLElement.prototype);\n\n\n // If we already used the ob ject as a prototype for another custom\n // element.\n if (scope.nativ ePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n t hrow new Error('NotSupportedError');\n }\n\n // Find first object on t he prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n na tivePrototype = scope.nativePrototypeTable.get(proto);\n if (nativeProtot ype)\n break;\n prototypes.push(proto);\n proto = Object. getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TOD O(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newProtot ype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\ n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/So urce/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs &l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'attachedCallback',\n 'detachedCallba ck',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPr ototype[name] = function() {\n // if this element has been wrapped prio r to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewr ap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (extendsOption)\n p.extends = extendsOption;\n\n function CustomElementConstructor(no de) {\n if (!node) {\n if (extendsOption) {\n return document.createElement(extendsOption, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n setWra pper(node, this);\n }\n CustomElementConstructor.prototype = prototype ;\n CustomElementConstructor.prototype.constructor = CustomElementConstruct or;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor); \n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // reg istration is synchronous so do it last\n var nativeConstructor = originalRe gisterElement.call(unwrap(this),\n tagName, p);\n return CustomEle mentConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocu ment || window.Document, // Gecko adds these to HTMLDocument\n ], [\n ' registerElement',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrappe r([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, / / Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTML HtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'c ontains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getE lementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelec torAll',\n 'removeChild',\n 'replaceChild',\n ].concat(matchesNames));\n\ n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Ge cko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createEl ement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n ' createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementBy Id',\n 'getElementsByName',\n 'getSelection',\n ]);\n\n mixin(Document.p rototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterf ace);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prot otype, {\n get implementation() {\n var implementation = implementationT able.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation) ;\n implementationTable.set(this, implementation);\n return implementa tion;\n },\n\n get defaultView() {\n return wrap(unwrap(this).default View);\n }\n });\n\n registerWrapper(window.Document, Document,\n docu ment.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and I E implements the standard correctly.\n if (window.HTMLDocument)\n registerWr apper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window. HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds the se to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplemen tation(impl) {\n setWrapper(impl, this);\n }\n\n function wrapImplMethod(co nstructor, name) {\n var original = document.implementation[name];\n const ructor.prototype[name] = function() {\n return wrap(original.apply(unsafeUn wrap(this), arguments));\n };\n }\n\n function forwardImplMethod(constructo r, name) {\n var original = document.implementation[name];\n constructor.p rototype[name] = function() {\n return original.apply(unsafeUnwrap(this), a rguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentTy pe');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod( DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation , 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementatio n);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n ' createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'has Feature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrap pers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Documen t;\n\n})(window.ShadowDOMPolyfill);\n", 137 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterfa ce = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var Par entNodeInterface = scope.ParentNodeInterface;\n var Selection = scope.wrappers. Selection;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRo ot = scope.wrappers.ShadowRoot;\n var TreeScope = scope.TreeScope;\n var clone Node = scope.cloneNode;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = sco pe.forwardMethodsToWrapper;\n var matchesNames = scope.matchesNames;\n var mix in = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderA llPending = scope.renderAllPending;\n var rewrap = scope.rewrap;\n var setWrap per = scope.setWrapper;\n var unsafeUnwrap = scope.unsafeUnwrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapEventTargetMethods = scope. wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var imple mentationTable = new WeakMap();\n\n function Document(node) {\n Node.call(th is, node);\n this.treeScope_ = new TreeScope(this, null);\n }\n Document.pr ototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'docume ntElement');\n\n // Conceptually both body and head can be in a shadow but supo rting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'bo dy');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridd en so we override a bunch of its methods\n // directly on the instance.\n\n fu nction wrapMethod(name) {\n var original = document[name];\n Document.prot otype[name] = function() {\n return wrap(original.apply(unsafeUnwrap(this), arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFrag ment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'c reateEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById'\ n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(unsafeUnwrap (doc), unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubt ree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot) ;\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\ n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shad owRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (old ShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalGetSelect ion = document.getSelection;\n\n mixin(Document.prototype, {\n adoptNode: fu nction(node) {\n if (node.parentNode)\n node.parentNode.removeChild( node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n el ementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y );\n },\n importNode: function(node, deep) {\n return cloneNode(node, deep, unsafeUnwrap(this));\n },\n getSelection: function() {\n rende rAllPending();\n return new Selection(originalGetSelection.call(unwrap(this )));\n },\n getElementsByName: function(name) {\n return SelectorsInt erface.querySelectorAll.call(this,\n '[name=' + JSON.stringify(String(n ame)) + ']');\n }\n });\n\n if (document.registerElement) {\n var origin alRegisterElement = document.registerElement;\n Document.prototype.registerEl ement = function(tagName, object) {\n var prototype, extendsOption;\n if (object !== undefined) {\n prototype = object.prototype;\n exte ndsOption = object.extends;\n }\n\n if (!prototype)\n prototype = Object.create(HTMLElement.prototype);\n\n\n // If we already used the ob ject as a prototype for another custom\n // element.\n if (scope.nativ ePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n t hrow new Error('NotSupportedError');\n }\n\n // Find first object on t he prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n na tivePrototype = scope.nativePrototypeTable.get(proto);\n if (nativeProtot ype)\n break;\n prototypes.push(proto);\n proto = Object. getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TOD O(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newProtot ype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\ n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/So urce/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs &l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'attachedCallback',\n 'detachedCallba ck',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPr ototype[name] = function() {\n // if this element has been wrapped prio r to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewr ap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (extendsOption)\n p.extends = extendsOption;\n\n function CustomElementConstructor(no de) {\n if (!node) {\n if (extendsOption) {\n return document.createElement(extendsOption, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n setWra pper(node, this);\n }\n CustomElementConstructor.prototype = prototype ;\n CustomElementConstructor.prototype.constructor = CustomElementConstruct or;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor); \n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // reg istration is synchronous so do it last\n var nativeConstructor = originalRe gisterElement.call(unwrap(this),\n tagName, p);\n return CustomEle mentConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocu ment || window.Document, // Gecko adds these to HTMLDocument\n ], [\n ' registerElement',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrappe r([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, / / Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTML HtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'c ontains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getE lementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelec torAll',\n 'removeChild',\n 'replaceChild',\n ].concat(matchesNames));\n\ n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Ge cko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createEl ement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n ' createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementBy Id',\n 'getElementsByName',\n 'getSelection',\n ]);\n\n mixin(Document.p rototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterf ace);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prot otype, {\n get implementation() {\n var implementation = implementationT able.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation) ;\n implementationTable.set(this, implementation);\n return implementa tion;\n },\n\n get defaultView() {\n return wrap(unwrap(this).default View);\n }\n });\n\n registerWrapper(window.Document, Document,\n docu ment.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and I E implements the standard correctly.\n if (window.HTMLDocument)\n registerWr apper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window. HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds the se to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplemen tation(impl) {\n setWrapper(impl, this);\n }\n\n function wrapImplMethod(co nstructor, name) {\n var original = document.implementation[name];\n const ructor.prototype[name] = function() {\n return wrap(original.apply(unsafeUn wrap(this), arguments));\n };\n }\n\n function forwardImplMethod(constructo r, name) {\n var original = document.implementation[name];\n constructor.p rototype[name] = function() {\n return original.apply(unsafeUnwrap(this), a rguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentTy pe');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod( DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation , 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementatio n);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n ' createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'has Feature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrap pers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Documen t;\n\n})(window.ShadowDOMPolyfill);\n",
138 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope. wrappers.EventTarget;\n var Selection = scope.wrappers.Selection;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllP ending = scope.renderAllPending;\n var unwrap = scope.unwrap;\n var unwrapIfNe eded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWindow = window.Window;\n var originalGetComputedStyle = window.getComputedStyle;\n va r originalGetDefaultComputedStyle = window.getDefaultComputedStyle;\n var origi nalGetSelection = window.getSelection;\n\n function Window(impl) {\n EventTa rget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prot otype);\n\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\ n return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);\n };\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedSty le) {\n OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseud o) {\n return wrap(this || window).getDefaultComputedStyle(\n unwr apIfNeeded(el), pseudo);\n };\n }\n\n OriginalWindow.prototype.getSelection = function() {\n return wrap(this || window).getSelection();\n };\n\n // W ork around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete win dow.getComputedStyle;\n delete window.getSelection;\n\n ['addEventListener', ' removeEventListener', 'dispatchEvent'].forEach(\n function(name) {\n OriginalWindow.prototype[name] = function() {\n var w = wrap(this || w indow);\n return w[name].apply(w, arguments);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n de lete window[name];\n });\n\n mixin(Window.prototype, {\n getComputedSty le: function(el, pseudo) {\n renderAllPending();\n return originalGetC omputedStyle.call(unwrap(this), unwrapIfNeeded(el),\n pseudo);\n },\n getSelection: function() {\n renderAl lPending();\n return new Selection(originalGetSelection.call(unwrap(this))) ;\n },\n\n get document() {\n return wrap(unwrap(this).document);\n }\n });\n\n // Mozilla proprietary extension.\n if (originalGetDefaultCompu tedStyle) {\n Window.prototype.getDefaultComputedStyle = function(el, pseudo) {\n renderAllPending();\n return originalGetDefaultComputedStyle.call (unwrap(this),\n unwrapIfNeeded(el),pseudo);\n };\n }\n\n register Wrapper(OriginalWindow, Window, window);\n\n scope.wrappers.Window = Window;\n\ n})(window.ShadowDOMPolyfill);\n", 138 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope. wrappers.EventTarget;\n var Selection = scope.wrappers.Selection;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllP ending = scope.renderAllPending;\n var unwrap = scope.unwrap;\n var unwrapIfNe eded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWindow = window.Window;\n var originalGetComputedStyle = window.getComputedStyle;\n va r originalGetDefaultComputedStyle = window.getDefaultComputedStyle;\n var origi nalGetSelection = window.getSelection;\n\n function Window(impl) {\n EventTa rget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prot otype);\n\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\ n return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);\n };\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedSty le) {\n OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseud o) {\n return wrap(this || window).getDefaultComputedStyle(\n unwr apIfNeeded(el), pseudo);\n };\n }\n\n OriginalWindow.prototype.getSelection = function() {\n return wrap(this || window).getSelection();\n };\n\n // W ork around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete win dow.getComputedStyle;\n delete window.getDefaultComputedStyle;\n delete window .getSelection;\n\n ['addEventListener', 'removeEventListener', 'dispatchEvent'] .forEach(\n function(name) {\n OriginalWindow.prototype[name] = func tion() {\n var w = wrap(this || window);\n return w[name].appl y(w, arguments);\n };\n\n // Work around for https://bugzilla.mozi lla.org/show_bug.cgi?id=943065\n delete window[name];\n });\n\n mix in(Window.prototype, {\n getComputedStyle: function(el, pseudo) {\n rend erAllPending();\n return originalGetComputedStyle.call(unwrap(this), unwrap IfNeeded(el),\n pseudo);\n },\n getSelection: function() {\n renderAllPending();\n return new Selectio n(originalGetSelection.call(unwrap(this)));\n },\n\n get document() {\n return wrap(unwrap(this).document);\n }\n });\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n Window.prototype.getD efaultComputedStyle = function(el, pseudo) {\n renderAllPending();\n r eturn originalGetDefaultComputedStyle.call(unwrap(this),\n unwrapIfNeed ed(el),pseudo);\n };\n }\n\n registerWrapper(OriginalWindow, Window, window );\n\n scope.wrappers.Window = Window;\n\n})(window.ShadowDOMPolyfill);\n",
139 "/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in t he LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrap = s cope.unwrap;\n\n // DataTransfer (Clipboard in old Blink/WebKit) has a single m ethod that\n // requires wrapping. Since it is only a method we do not need a r eal wrapper,\n // we can just override the method.\n\n var OriginalDataTransfe r = window.DataTransfer || window.Clipboard;\n var OriginalDataTransferSetDragI mage =\n OriginalDataTransfer.prototype.setDragImage;\n\n if (OriginalData TransferSetDragImage) {\n OriginalDataTransfer.prototype.setDragImage = funct ion(image, x, y) {\n OriginalDataTransferSetDragImage.call(this, unwrap(ima ge), x, y);\n };\n }\n\n})(window.ShadowDOMPolyfill);\n", 139 "/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in t he LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrap = s cope.unwrap;\n\n // DataTransfer (Clipboard in old Blink/WebKit) has a single m ethod that\n // requires wrapping. Since it is only a method we do not need a r eal wrapper,\n // we can just override the method.\n\n var OriginalDataTransfe r = window.DataTransfer || window.Clipboard;\n var OriginalDataTransferSetDragI mage =\n OriginalDataTransfer.prototype.setDragImage;\n\n if (OriginalData TransferSetDragImage) {\n OriginalDataTransfer.prototype.setDragImage = funct ion(image, x, y) {\n OriginalDataTransferSetDragImage.call(this, unwrap(ima ge), x, y);\n };\n }\n\n})(window.ShadowDOMPolyfill);\n",
140 "/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in t he LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var registerWr apper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unwr ap = scope.unwrap;\n\n var OriginalFormData = window.FormData;\n\n function Fo rmData(formElement) {\n var impl;\n if (formElement instanceof OriginalFor mData) {\n impl = formElement;\n } else {\n impl = new OriginalForm Data(formElement && unwrap(formElement));\n }\n setWrapper(impl, this);\n }\n\n registerWrapper(OriginalFormData, FormData, new OriginalFormData());\n\n scope.wrappers.FormData = FormData;\n\n})(window.ShadowDOMPolyfill);\n", 140 "/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in t he LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var registerWr apper = scope.registerWrapper;\n var setWrapper = scope.setWrapper;\n var unwr ap = scope.unwrap;\n\n var OriginalFormData = window.FormData;\n\n function Fo rmData(formElement) {\n var impl;\n if (formElement instanceof OriginalFor mData) {\n impl = formElement;\n } else {\n impl = new OriginalForm Data(formElement && unwrap(formElement));\n }\n setWrapper(impl, this);\n }\n\n registerWrapper(OriginalFormData, FormData, new OriginalFormData());\n\n scope.wrappers.FormData = FormData;\n\n})(window.ShadowDOMPolyfill);\n",
141 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope .isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement', \n // Do not create an applet element by default since it shows a warning in\ n // IE.\n // https://github.com/Polymer/polymer/issues/217\n // 'apple t': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'audio': 'HTMLAudi oElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'br': 'HTMLBRElement',\n 'button': 'HTMLButtonElement',\n 'canvas': 'HTMLC anvasElement',\n 'caption': 'HTMLTableCaptionElement',\n 'col': 'HTMLTable ColElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'content': 'HTMLContentElement',\n 'data': 'HTMLDataElement',\ n 'datalist': 'HTMLDataListElement',\n 'del': 'HTMLModElement',\n 'dir' : 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'dl': 'HTMLDListEle ment',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement', \n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': ' HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'h1': 'HTMLHeadi ngElement',\n 'head': 'HTMLHeadElement',\n 'hr': 'HTMLHRElement',\n 'ht ml': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'img': 'HTMLIma geElement',\n 'input': 'HTMLInputElement',\n 'keygen': 'HTMLKeygenElement' ,\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'li ': 'HTMLLIElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement' ,\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'me nuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'H TMLMeterElement',\n 'object': 'HTMLObjectElement',\n 'ol': 'HTMLOListEleme nt',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement', \n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'par am': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLPro gressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement', \n 'select': 'HTMLSelectElement',\n 'shadow': 'HTMLShadowElement',\n 's ource': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTML StyleElement',\n 'table': 'HTMLTableElement',\n 'tbody': 'HTMLTableSection Element',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show _bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'template': 'HTMLTemplateElement',\n 'textarea': 'HTMLTextAreaElement',\n 'thead': 'HTMLTableSectionElement',\n 'time': 'HTMLTimeElement',\n 'title': 'HTMLTitleElement',\n 'tr': 'HTML TableRowElement',\n 'track': 'HTMLTrackElement',\n 'ul': 'HTMLUListElement ',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tag Name) {\n var nativeConstructorName = elements[tagName];\n var nativeConst ructor = window[nativeConstructorName];\n if (!nativeConstructor)\n retu rn;\n var element = document.createElement(tagName);\n var wrapperConstruc tor = element.constructor;\n window[nativeConstructorName] = wrapperConstruct or;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.ge tOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = s cope.wrappers[name]\n });\n\n})(window.ShadowDOMPolyfill);\n", 141 "// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LI CENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope .isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement', \n // Do not create an applet element by default since it shows a warning in\ n // IE.\n // https://github.com/Polymer/polymer/issues/217\n // 'apple t': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'audio': 'HTMLAudi oElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'br': 'HTMLBRElement',\n 'button': 'HTMLButtonElement',\n 'canvas': 'HTMLC anvasElement',\n 'caption': 'HTMLTableCaptionElement',\n 'col': 'HTMLTable ColElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'content': 'HTMLContentElement',\n 'data': 'HTMLDataElement',\ n 'datalist': 'HTMLDataListElement',\n 'del': 'HTMLModElement',\n 'dir' : 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'dl': 'HTMLDListEle ment',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement', \n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': ' HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'h1': 'HTMLHeadi ngElement',\n 'head': 'HTMLHeadElement',\n 'hr': 'HTMLHRElement',\n 'ht ml': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'img': 'HTMLIma geElement',\n 'input': 'HTMLInputElement',\n 'keygen': 'HTMLKeygenElement' ,\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'li ': 'HTMLLIElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement' ,\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'me nuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'H TMLMeterElement',\n 'object': 'HTMLObjectElement',\n 'ol': 'HTMLOListEleme nt',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement', \n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'par am': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLPro gressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement', \n 'select': 'HTMLSelectElement',\n 'shadow': 'HTMLShadowElement',\n 's ource': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTML StyleElement',\n 'table': 'HTMLTableElement',\n 'tbody': 'HTMLTableSection Element',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show _bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'template': 'HTMLTemplateElement',\n 'textarea': 'HTMLTextAreaElement',\n 'thead': 'HTMLTableSectionElement',\n 'time': 'HTMLTimeElement',\n 'title': 'HTMLTitleElement',\n 'tr': 'HTML TableRowElement',\n 'track': 'HTMLTrackElement',\n 'ul': 'HTMLUListElement ',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tag Name) {\n var nativeConstructorName = elements[tagName];\n var nativeConst ructor = window[nativeConstructorName];\n if (!nativeConstructor)\n retu rn;\n var element = document.createElement(tagName);\n var wrapperConstruc tor = element.constructor;\n window[nativeConstructorName] = wrapperConstruct or;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.ge tOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = s cope.wrappers[name]\n });\n\n})(window.ShadowDOMPolyfill);\n",
142 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n / / convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.u nwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize ot her types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, b ut\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\ n for (var c in elts) {\n window[c] = function() { throw 'Patched Constr uctor'; };\n window[c].prototype = Object.getPrototypeOf(\n docume nt.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name \n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.g etOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCrea teShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createSh adowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototy pe.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n\n function qu eryShadow(node, selector) {\n var m, el = node.firstElementChild;\n var sh adows, sr, i;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for(i = shadow s.length - 1; i >= 0; i--) {\n m = shadows[i].querySelector(selector);\n if (m) {\n return m;\n }\n }\n while(el) {\n m = query Shadow(el, selector);\n if (m) {\n return m;\n }\n el = el .nextElementSibling;\n }\n return null;\n }\n\n function queryAllShadows (node, selector, results) {\n var el = node.firstElementChild;\n var temp, sr, shadows, i, j;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for (i = shadows.length - 1; i >= 0; i--) {\n temp = shadows[i].querySelectorAll(se lector);\n for(j = 0; j < temp.length; j++) {\n results.push(temp[j] );\n }\n }\n while (el) {\n queryAllShadows(el, selector, result s);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n sco pe.queryAllShadows = function(node, selector, all) {\n if (all) {\n retu rn queryAllShadows(node, selector, []);\n } else {\n return queryShadow( node, selector);\n }\n };\n})(window.Platform);\n", 142 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n / / convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.u nwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize ot her types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, b ut\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\ n for (var c in elts) {\n window[c] = function() { throw 'Patched Constr uctor'; };\n window[c].prototype = Object.getPrototypeOf(\n docume nt.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name \n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.g etOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCrea teShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createSh adowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototy pe.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n\n function qu eryShadow(node, selector) {\n var m, el = node.firstElementChild;\n var sh adows, sr, i;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for(i = shadow s.length - 1; i >= 0; i--) {\n m = shadows[i].querySelector(selector);\n if (m) {\n return m;\n }\n }\n while(el) {\n m = query Shadow(el, selector);\n if (m) {\n return m;\n }\n el = el .nextElementSibling;\n }\n return null;\n }\n\n function queryAllShadows (node, selector, results) {\n var el = node.firstElementChild;\n var temp, sr, shadows, i, j;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for (i = shadows.length - 1; i >= 0; i--) {\n temp = shadows[i].querySelectorAll(se lector);\n for(j = 0; j < temp.length; j++) {\n results.push(temp[j] );\n }\n }\n while (el) {\n queryAllShadows(el, selector, result s);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n sco pe.queryAllShadows = function(node, selector, all) {\n if (all) {\n retu rn queryAllShadows(node, selector, []);\n } else {\n return queryShadow( node, selector);\n }\n };\n})(window.Platform);\n",
143 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/*\n This is a limited s him for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/ tip/spec/shadow/index.html#styles\n \n The intention here is to support only t he styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromi sing performance significantly. \n For ShadowDOM styling that's not covered her e, a set of best practices\n can be provided that should allow users to accompl ish more complex styling.\n\n The following is a list of specific ShadowDOM sty ling features and a brief\n discussion of the approach used to shim.\n\n Shimm ed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadow Root's host\n element using the :host rule. To shim this feature, the :host sty les are \n reformatted and prefixed with a given scope name and promoted to a \ n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n :host {\n background: red;\n }\n }\n \n be comes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Sty les defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polyme r uses one of two techniques to imlement\n this feature.\n \n By default, rul es are prefixed with the host element tag name \n as a descendant selector. Thi s ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x- foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scope d by adding an attribute selector suffix to each\n simple selector that contain s the host element tag name. Each element \n in the element's ShadowDOM templat e is also given the scope attribute. \n Thus, these rules match only elements t hat have the scope attribute.\n For example, given a scope name of x-foo, a rul e like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outsi de a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\ n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possibl e ways to do this that \n were rejected due to complexity and/or performance co ncerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alt ernative, users should make sure to use selectors\n specific to the scope in wh ich they are working.\n \n * ::distributed: This behavior is not emulated. It' s often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users ca n also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\ n \n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n ::content(div) {\n backgr ound: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styl ing shim to use the selector \n in comments in lieu of the next selector when r unning under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictSty ling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally t ag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim :host and scoping\n shimStyling: functio n(root, name, extendsName) {\n var scopeStyles = this.prepareRoot(root, name, extendsName);\n var typeExtension = this.isTypeExtension(extendsName);\n var scopeSelector = this.makeScopeSelector(name, typeExtension);\n // use cac hing to make working with styles nodes easier and to facilitate\n // lookup o f extendee\n var cssText = stylesToCssText(scopeStyles, true);\n cssText = this.scopeCssText(cssText, scopeSelector);\n // cache shimmed css on root fo r user extensibility\n if (root) {\n root.shimmedStyle = cssText;\n } \n // add style to document\n this.addCssToDocument(cssText, name);\n },\ n /*\n * Shim a style element with the given selector. Returns cssText that ca n\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css). \n */\n shimStyle: function(style, selector) {\n return this.shimCssText(st yle.textContent, selector);\n },\n /*\n * Shim some cssText with the given se lector. Returns cssText that can\n * be included in the document via Platform.S hadowCSS.addCssToDocument(css).\n */\n shimCssText: function(cssText, selector ) {\n cssText = this.insertDirectives(cssText);\n return this.scopeCssText (cssText, selector);\n },\n makeScopeSelector: function(name, typeExtension) { \n if (name) {\n return typeExtension ? '[is=' + name + ']' : name;\n }\n return '';\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n prepareRoot: function(roo t, name, extendsName) {\n var def = this.registerRoot(root, name, extendsName );\n this.replaceTextInStyles(def.rootStyles, this.insertDirectives);\n // remove existing style elements\n this.removeStyles(root, def.rootStyles);\n // apply strict attr\n if (this.strictStyling) {\n this.applyScopeToC ontent(root, name);\n }\n return def.scopeStyles;\n },\n removeStyles: f unction(root, styles) {\n for (var i=0, l=styles.length, s; (i<l) && (s=style s[i]); i++) {\n s.parentNode.removeChild(s);\n }\n },\n registerRoot: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = this.findStyles(root);\n def.rootStyles = styles;\n def.scopeSty les = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n i f (extendee) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeSty les);\n }\n return def;\n },\n findStyles: function(root) {\n if (!ro ot) {\n return [];\n }\n var styles = root.querySelectorAll('style'); \n return Array.prototype.filter.call(styles, function(s) {\n return !s. hasAttribute(NO_SHIM_ATTRIBUTE);\n });\n },\n applyScopeToContent: function (root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySe lectorAll('template'),\n function(template) {\n this.applySc opeToContent(template.content, name);\n },\n this);\n }\n },\n insertDirectives: function(cssText) {\n cssText = this.insertPolyfillDi rectivesInCssText(cssText);\n return this.insertPolyfillRulesInCssText(cssTex t);\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert r ules.\n * \n * For example, we convert this rule:\n * \n * polyfill-next -selector { content: ':host menu-item'; }\n * ::content menu-item {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDir ectivesInCssText: function(cssText) {\n // TODO(sorvell): remove either conte nt or comment\n cssText = cssText.replace(cssCommentNextSelectorRe, function( match, p1) {\n // remove end comment delimiter and add block start\n r eturn p1.slice(0, -2) + '{';\n });\n return cssText.replace(cssContentNext SelectorRe, function(match, p1) {\n return p1 + ' {';\n });\n },\n /*\ n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRulesInCssText: functio n(cssText) {\n // TODO(sorvell): remove either content or comment\n cssTex t = cssText.replace(cssCommentRuleRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n return cssText.r eplace(cssContentRuleRe, function(match, p1, p2, p3) {\n var rule = match.r eplace(p1, '').replace(p2, '');\n return p3 + rule;\n });\n },\n /* En sure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {.. . } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n scopeCssText: function(cssText, scopeSelector) {\n var unscoped = thi s.extractUnscopedRulesFromCssText(cssText);\n cssText = this.insertPolyfillHo stInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssTex t = this.convertColonHostContext(cssText);\n cssText = this.convertShadowDOMS electors(cssText);\n if (scopeSelector) {\n var self = this, cssText;\n withCssRules(cssText, function(rules) {\n cssText = self.scopeRules( rules, scopeSelector);\n });\n\n }\n cssText = cssText + '\\n' + unsc oped;\n return cssText.trim();\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CS SOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safar i.)\n * For example, we convert this rule:\n * \n * (comment start) @polyf ill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractUnscopedRulesFromCssText: fun ction(cssText) {\n // TODO(sorvell): remove either content or comment\n va r r = '', m;\n while (m = cssCommentUnscopedRuleRe.exec(cssText)) {\n r += m[1].slice(0, -1) + '\\n\\n';\n }\n while (m = cssContentUnscopedRuleRe .exec(cssText)) {\n r += m[0].replace(m[2], '').replace(m[1], m[3]) + '\\n\ \n';\n }\n return r;\n },\n /*\n * convert a rule like :host(.foo) > . bar { }\n *\n * to\n *\n * scopeName.foo > .bar\n */\n convertColonHos t: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostRe ,\n this.colonHostPartReplacer);\n },\n /*\n * convert a rule like :h ost-context(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .f oo scopeName > .bar { }\n * \n * and\n *\n * :host-context(.foo:host) .b ar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n conv ertColonHostContext: function(cssText) {\n return this.convertColonRule(cssTe xt, cssColonHostContextRe,\n this.colonHostContextPartReplacer);\n },\n convertColonRule: function(cssText, regExp, partReplacer) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(regExp, functi on(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n r.push(partRe placer(p1, p, p3));\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n colonHostContextPartReplacer: fu nction(host, part, suffix) {\n if (part.match(polyfillHost)) {\n return this.colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n },\n colonHostP artReplacer: function(host, part, suffix) {\n return host + part.replace(poly fillHost, '') + suffix;\n },\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n convertSh adowDOMSelectors: function(cssText) {\n for (var i=0; i < shadowDOMSelectorsR e.length; i++) {\n cssText = cssText.replace(shadowDOMSelectorsRe[i], ' '); \n }\n return cssText;\n },\n // change a selector like 'div' to 'name d iv'\n scopeRules: function(cssRules, scopeSelector) {\n var cssText = '';\n if (cssRules) {\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText !== undefi ned)) {\n cssText += this.scopeSelector(rule.selectorText, scopeSelecto r, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.pr opertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.type === CSSRule .MEDIA_RULE) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n'; \n cssText += this.scopeRules(rule.cssRules, scopeSelector);\n cssText += '\\n}\\n\\n';\n } else {\n // TODO(sjmiles): KEYFRAM ES_RULE in IE11 throws when we query cssText\n // 'cssText' in rule ret urns true, but rule.cssText throws anyway\n // We can test the rule typ e, e.g.\n // else if (rule.type !== CSSRule.KEYFRAMES_RULE && rule.cs sText) {\n // but this will prevent cssText propagation in other browse rs which\n // support it.\n // KEYFRAMES_RULE has a CSSRuleSet , so the text can probably be reconstructed\n // from that collection; this would be a proper fix.\n // For now, I'm trapping the exception so IE11 is unblocked in other areas.\n try {\n if (rule.cssTex t) {\n cssText += rule.cssText + '\\n\\n';\n }\n } catch(x) {\n // squelch\n }\n }\n }, this);\ n }\n return cssText;\n },\n scopeSelector: function(selector, scopeSele ctor, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach (function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, scop eSelector)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, scopeSelector) :\n this.ap plySelectorScope(p, scopeSelector);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, scopeS elector) {\n if (Array.isArray(scopeSelector)) {\n return true;\n }\n var re = this.makeScopeMatcher(scopeSelector);\n return !selector.match(r e);\n },\n makeScopeMatcher: function(scopeSelector) {\n scopeSelector = sc opeSelector.replace(/\\[/g, '\\\\[').replace(/\\[/g, '\\\\]');\n return new R egExp('^(' + scopeSelector + ')' + selectorReSuffix, 'm');\n },\n applySelecto rScope: function(selector, selectorScope) {\n return Array.isArray(selectorSc ope) ?\n this.applySelectorScopeList(selector, selectorScope) :\n this.applySimpleSelectorScope(selector, selectorScope);\n },\n // apply an arr ay of selectors\n applySelectorScopeList: function(selector, scopeSelectorList) {\n var r = [];\n for (var i=0, s; (s=scopeSelectorList[i]); i++) {\n r.push(this.applySimpleSelectorScope(selector, s));\n }\n return r.join( ', ');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: fun ction(selector, scopeSelector) {\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scopeSelector);\n return selector.replace(polyfillHostRe, scopeSelector + ' ');\n } else {\n return scopeSelector + ' ' + selector;\n }\n },\n // return a selector w ith [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .fo o[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, s copeSelector) {\n scopeSelector = scopeSelector.replace(/\\[is=([^\\]]*)\\]/g , '$1');\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + scopeSelector + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().repl ace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf (attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(colonHostContextRe, polyfillHostContext).replace(\n colo nHostRe, polyfillHost);\n },\n propertiesFromRule: function(rule) {\n var c ssText = rule.style.cssText;\n // TODO(sorvell): Safari cssom incorrectly rem oves quotes from the content\n // property. (https://bugs.webkit.org/show_bug .cgi?id=118045)\n // don't replace attr rules\n if (rule.style.content && !rule.style.content.match(/['\"]+|attr/)) {\n cssText = cssText.replace(/co ntent:[^;]*;/g, 'content: \\'' + \n rule.style.content + '\\';');\n }\n // TODO(sorvell): we can workaround this issue here, but we need a list\n // of troublesome properties to fix https://github.com/Polymer/platform/issu es/53\n //\n // inherit rules can be omitted from cssText\n // TODO(sor vell): remove when Blink bug is fixed:\n // https://code.google.com/p/chromiu m/issues/detail?id=358273\n var style = rule.style;\n for (var i in style) {\n if (style[i] === 'initial') {\n cssText += i + ': initial; ';\n }\n }\n return cssText;\n },\n replaceTextInStyles: function(style s, action) {\n if (styles && action) {\n if (!(styles instanceof Array)) {\n styles = [styles];\n }\n Array.prototype.forEach.call(styl es, function(s) {\n s.textContent = action.call(this, s.textContent);\n }, this);\n }\n },\n addCssToDocument: function(cssText, name) {\n i f (cssText.match('@import')) {\n addOwnSheet(cssText, name);\n } else {\ n addCssToDocument(cssText);\n }\n }\n};\n\nvar selectorRe = /([^{]*)({ [\\s\\S]*?})/gim,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\ n // TODO(sorvell): remove either content or comment\n cssCommentNextSelec torRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\\:[\\s]*?['\"](.* ?)['\"][;\\s]*}([^{]*?){/gim, \n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\* +)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['\"] (.*?)['\"])[;\\s]*[^}]*}/gim,\n // TODO(sorvell): remove either content or co mment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\* +([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped- rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n // note: :host-context pre-processed to -shadowcsshostcontext.\n polyfillH ostContext = '-shadowcsscontext',\n parenSuffix = ')(?:\\\\((' +\n '(? :\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\n cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),\n cssColonHostContextR e = new RegExp('(' + polyfillHostContext + parenSuffix, 'gim'),\n selectorReS uffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n colonHostRe = /\\:host/gim,\n colonHostContextRe = /\\:host-context/gim,\n /* host name without combina tor */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n pol yfillHostRe = new RegExp(polyfillHost, 'gim'),\n polyfillHostContextRe = new RegExp(polyfillHostContext, 'gim'),\n shadowDOMSelectorsRe = [\n /\\^\\^ /g,\n /\\^/g,\n /\\/shadow\\//g,\n /\\/shadow-deep\\//g,\n / ::shadow/g,\n /\\/deep\\//g,\n /::content/g\n ];\n\nfunction styles ToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.fo rEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n }) ;\n // strip comments for easier processing\n if (!preserveComments) {\n cs sText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunctio n cssTextToStyle(cssText) {\n var style = document.createElement('style');\n s tyle.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = [];\n if (style.sheet) {\n // TODO(sorvell): Firefox throws wh en accessing the rules of a stylesheet\n // with an @import\n // https://b ugzilla.mozilla.org/show_bug.cgi?id=625013\n try {\n rules = style.sheet .cssRules;\n } catch(e) {\n //\n }\n } else {\n console.warn('she et not found', style);\n }\n style.parentNode.removeChild(style);\n return ru les;\n}\n\nvar frame = document.createElement('iframe');\nframe.style.display = 'none';\n\nfunction initFrame() {\n frame.initialized = true;\n document.body. appendChild(frame);\n var doc = frame.contentDocument;\n var base = doc.create Element('base');\n base.href = document.baseURI;\n doc.head.appendChild(base); \n}\n\nfunction inFrame(fn) {\n if (!frame.initialized) {\n initFrame();\n }\n document.body.appendChild(frame);\n fn(frame.contentDocument);\n document .body.removeChild(frame);\n}\n\n// TODO(sorvell): use an iframe if the cssText c ontains an @import to workaround\n// https://code.google.com/p/chromium/issues/d etail?id=345114\nvar isChrome = navigator.userAgent.match('Chrome');\nfunction w ithCssRules(cssText, callback) {\n if (!callback) {\n return;\n }\n var ru les;\n if (cssText.match('@import') && isChrome) {\n var style = cssTextToSt yle(cssText);\n inFrame(function(doc) {\n doc.head.appendChild(style.imp l);\n rules = style.sheet.cssRules;\n callback(rules);\n });\n } e lse {\n rules = cssToRules(cssText);\n callback(rules);\n }\n}\n\nfunctio n rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunct ion addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(do cument.createTextNode(cssText));\n }\n}\n\nfunction addOwnSheet(cssText, name) {\n var style = cssTextToStyle(cssText);\n style.setAttribute(name, '');\n st yle.setAttribute(SHIMMED_ATTRIBUTE, '');\n document.head.appendChild(style);\n} \n\nvar SHIM_ATTRIBUTE = 'shim-shadowdom';\nvar SHIMMED_ATTRIBUTE = 'shim-shadow dom-css';\nvar NO_SHIM_ATTRIBUTE = 'no-shim';\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.s etAttribute(SHIMMED_ATTRIBUTE, '');\n sheet[SHIMMED_ATTRIBUTE] = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowD OMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.inser tBefore(getSheet(), head.childNodes[0]);\n\n // TODO(sorvell): monkey-patching HTMLImports is abusive;\n // consider a better solution.\n document.addEventLi stener('DOMContentLoaded', function() {\n var urlResolver = scope.urlResolver ;\n \n if (window.HTMLImports && !HTMLImports.useNative) {\n var SHIM _SHEET_SELECTOR = 'link[rel=stylesheet]' +\n '[' + SHIM_ATTRIBUTE + ']' ;\n var SHIM_STYLE_SELECTOR = 'style[' + SHIM_ATTRIBUTE + ']';\n HTMLI mports.importer.documentPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n HT MLImports.importer.importsPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n\n HTMLImports.parser.documentSelectors = [\n HTMLImports.parser.documentS electors,\n SHIM_SHEET_SELECTOR,\n SHIM_STYLE_SELECTOR\n ].jo in(',');\n \n var originalParseGeneric = HTMLImports.parser.parseGeneric;\ n\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt[SHIM MED_ATTRIBUTE]) {\n return;\n }\n var style = elt.__impor tElement || elt;\n if (!style.hasAttribute(SHIM_ATTRIBUTE)) {\n originalParseGeneric.call(this, elt);\n return;\n }\n if (elt.__resource) {\n style = elt.ownerDocument.createElement('style');\ n style.textContent = urlResolver.resolveCssText(\n elt.__ resource, elt.href);\n } else {\n urlResolver.resolveStyle(style ); \n }\n style.textContent = ShadowCSS.shimStyle(style);\n style.removeAttribute(SHIM_ATTRIBUTE, '');\n style.setAttribute(SHIMMED _ATTRIBUTE, '');\n style[SHIMMED_ATTRIBUTE] = true;\n // place in document\n if (style.parentNode !== head) {\n // replace links i n head\n if (elt.parentNode === head) {\n head.replaceChild( style, elt);\n } else {\n this.addElementToDocument(style);\ n }\n }\n style.__importParsed = true;\n this.mark ParsingComplete(elt);\n this.parseNext();\n }\n\n var hasResour ce = HTMLImports.parser.hasResource;\n HTMLImports.parser.hasResource = fun ction(node) {\n if (node.localName === 'link' && node.rel === 'stylesheet ' &&\n node.hasAttribute(SHIM_ATTRIBUTE)) {\n return (node._ _resource);\n } else {\n return hasResource.call(this, node);\n }\n }\n\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS; \n\n})(window.Platform);\n", 143 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/*\n This is a limited s him for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/ tip/spec/shadow/index.html#styles\n \n The intention here is to support only t he styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromi sing performance significantly. \n For ShadowDOM styling that's not covered her e, a set of best practices\n can be provided that should allow users to accompl ish more complex styling.\n\n The following is a list of specific ShadowDOM sty ling features and a brief\n discussion of the approach used to shim.\n\n Shimm ed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadow Root's host\n element using the :host rule. To shim this feature, the :host sty les are \n reformatted and prefixed with a given scope name and promoted to a \ n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n :host {\n background: red;\n }\n }\n \n be comes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Sty les defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polyme r uses one of two techniques to imlement\n this feature.\n \n By default, rul es are prefixed with the host element tag name \n as a descendant selector. Thi s ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x- foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scope d by adding an attribute selector suffix to each\n simple selector that contain s the host element tag name. Each element \n in the element's ShadowDOM templat e is also given the scope attribute. \n Thus, these rules match only elements t hat have the scope attribute.\n For example, given a scope name of x-foo, a rul e like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outsi de a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\ n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possibl e ways to do this that \n were rejected due to complexity and/or performance co ncerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alt ernative, users should make sure to use selectors\n specific to the scope in wh ich they are working.\n \n * ::distributed: This behavior is not emulated. It' s often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users ca n also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\ n \n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n ::content(div) {\n backgr ound: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styl ing shim to use the selector \n in comments in lieu of the next selector when r unning under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictSty ling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally t ag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim :host and scoping\n shimStyling: functio n(root, name, extendsName) {\n var scopeStyles = this.prepareRoot(root, name, extendsName);\n var typeExtension = this.isTypeExtension(extendsName);\n var scopeSelector = this.makeScopeSelector(name, typeExtension);\n // use cac hing to make working with styles nodes easier and to facilitate\n // lookup o f extendee\n var cssText = stylesToCssText(scopeStyles, true);\n cssText = this.scopeCssText(cssText, scopeSelector);\n // cache shimmed css on root fo r user extensibility\n if (root) {\n root.shimmedStyle = cssText;\n } \n // add style to document\n this.addCssToDocument(cssText, name);\n },\ n /*\n * Shim a style element with the given selector. Returns cssText that ca n\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css). \n */\n shimStyle: function(style, selector) {\n return this.shimCssText(st yle.textContent, selector);\n },\n /*\n * Shim some cssText with the given se lector. Returns cssText that can\n * be included in the document via Platform.S hadowCSS.addCssToDocument(css).\n */\n shimCssText: function(cssText, selector ) {\n cssText = this.insertDirectives(cssText);\n return this.scopeCssText (cssText, selector);\n },\n makeScopeSelector: function(name, typeExtension) { \n if (name) {\n return typeExtension ? '[is=' + name + ']' : name;\n }\n return '';\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n prepareRoot: function(roo t, name, extendsName) {\n var def = this.registerRoot(root, name, extendsName );\n this.replaceTextInStyles(def.rootStyles, this.insertDirectives);\n // remove existing style elements\n this.removeStyles(root, def.rootStyles);\n // apply strict attr\n if (this.strictStyling) {\n this.applyScopeToC ontent(root, name);\n }\n return def.scopeStyles;\n },\n removeStyles: f unction(root, styles) {\n for (var i=0, l=styles.length, s; (i<l) && (s=style s[i]); i++) {\n s.parentNode.removeChild(s);\n }\n },\n registerRoot: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = this.findStyles(root);\n def.rootStyles = styles;\n def.scopeSty les = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n i f (extendee) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeSty les);\n }\n return def;\n },\n findStyles: function(root) {\n if (!ro ot) {\n return [];\n }\n var styles = root.querySelectorAll('style'); \n return Array.prototype.filter.call(styles, function(s) {\n return !s. hasAttribute(NO_SHIM_ATTRIBUTE);\n });\n },\n applyScopeToContent: function (root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySe lectorAll('template'),\n function(template) {\n this.applySc opeToContent(template.content, name);\n },\n this);\n }\n },\n insertDirectives: function(cssText) {\n cssText = this.insertPolyfillDi rectivesInCssText(cssText);\n return this.insertPolyfillRulesInCssText(cssTex t);\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert r ules.\n * \n * For example, we convert this rule:\n * \n * polyfill-next -selector { content: ':host menu-item'; }\n * ::content menu-item {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDir ectivesInCssText: function(cssText) {\n // TODO(sorvell): remove either conte nt or comment\n cssText = cssText.replace(cssCommentNextSelectorRe, function( match, p1) {\n // remove end comment delimiter and add block start\n r eturn p1.slice(0, -2) + '{';\n });\n return cssText.replace(cssContentNext SelectorRe, function(match, p1) {\n return p1 + ' {';\n });\n },\n /*\ n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRulesInCssText: functio n(cssText) {\n // TODO(sorvell): remove either content or comment\n cssTex t = cssText.replace(cssCommentRuleRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n return cssText.r eplace(cssContentRuleRe, function(match, p1, p2, p3) {\n var rule = match.r eplace(p1, '').replace(p2, '');\n return p3 + rule;\n });\n },\n /* En sure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {.. . } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n scopeCssText: function(cssText, scopeSelector) {\n var unscoped = thi s.extractUnscopedRulesFromCssText(cssText);\n cssText = this.insertPolyfillHo stInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssTex t = this.convertColonHostContext(cssText);\n cssText = this.convertShadowDOMS electors(cssText);\n if (scopeSelector) {\n var self = this, cssText;\n withCssRules(cssText, function(rules) {\n cssText = self.scopeRules( rules, scopeSelector);\n });\n\n }\n cssText = cssText + '\\n' + unsc oped;\n return cssText.trim();\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CS SOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safar i.)\n * For example, we convert this rule:\n * \n * (comment start) @polyf ill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractUnscopedRulesFromCssText: fun ction(cssText) {\n // TODO(sorvell): remove either content or comment\n va r r = '', m;\n while (m = cssCommentUnscopedRuleRe.exec(cssText)) {\n r += m[1].slice(0, -1) + '\\n\\n';\n }\n while (m = cssContentUnscopedRuleRe .exec(cssText)) {\n r += m[0].replace(m[2], '').replace(m[1], m[3]) + '\\n\ \n';\n }\n return r;\n },\n /*\n * convert a rule like :host(.foo) > . bar { }\n *\n * to\n *\n * scopeName.foo > .bar\n */\n convertColonHos t: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostRe ,\n this.colonHostPartReplacer);\n },\n /*\n * convert a rule like :h ost-context(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .f oo scopeName > .bar { }\n * \n * and\n *\n * :host-context(.foo:host) .b ar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n conv ertColonHostContext: function(cssText) {\n return this.convertColonRule(cssTe xt, cssColonHostContextRe,\n this.colonHostContextPartReplacer);\n },\n convertColonRule: function(cssText, regExp, partReplacer) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(regExp, functi on(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n r.push(partRe placer(p1, p, p3));\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n colonHostContextPartReplacer: fu nction(host, part, suffix) {\n if (part.match(polyfillHost)) {\n return this.colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n },\n colonHostP artReplacer: function(host, part, suffix) {\n return host + part.replace(poly fillHost, '') + suffix;\n },\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n convertSh adowDOMSelectors: function(cssText) {\n for (var i=0; i < shadowDOMSelectorsR e.length; i++) {\n cssText = cssText.replace(shadowDOMSelectorsRe[i], ' '); \n }\n return cssText;\n },\n // change a selector like 'div' to 'name d iv'\n scopeRules: function(cssRules, scopeSelector) {\n var cssText = '';\n if (cssRules) {\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText !== undefi ned)) {\n cssText += this.scopeSelector(rule.selectorText, scopeSelecto r, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.pr opertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.type === CSSRule .MEDIA_RULE) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n'; \n cssText += this.scopeRules(rule.cssRules, scopeSelector);\n cssText += '\\n}\\n\\n';\n } else {\n // TODO(sjmiles): KEYFRAM ES_RULE in IE11 throws when we query cssText\n // 'cssText' in rule ret urns true, but rule.cssText throws anyway\n // We can test the rule typ e, e.g.\n // else if (rule.type !== CSSRule.KEYFRAMES_RULE && rule.cs sText) {\n // but this will prevent cssText propagation in other browse rs which\n // support it.\n // KEYFRAMES_RULE has a CSSRuleSet , so the text can probably be reconstructed\n // from that collection; this would be a proper fix.\n // For now, I'm trapping the exception so IE11 is unblocked in other areas.\n try {\n if (rule.cssTex t) {\n cssText += rule.cssText + '\\n\\n';\n }\n } catch(x) {\n // squelch\n }\n }\n }, this);\ n }\n return cssText;\n },\n scopeSelector: function(selector, scopeSele ctor, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach (function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, scop eSelector)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, scopeSelector) :\n this.ap plySelectorScope(p, scopeSelector);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, scopeS elector) {\n if (Array.isArray(scopeSelector)) {\n return true;\n }\n var re = this.makeScopeMatcher(scopeSelector);\n return !selector.match(r e);\n },\n makeScopeMatcher: function(scopeSelector) {\n scopeSelector = sc opeSelector.replace(/\\[/g, '\\\\[').replace(/\\[/g, '\\\\]');\n return new R egExp('^(' + scopeSelector + ')' + selectorReSuffix, 'm');\n },\n applySelecto rScope: function(selector, selectorScope) {\n return Array.isArray(selectorSc ope) ?\n this.applySelectorScopeList(selector, selectorScope) :\n this.applySimpleSelectorScope(selector, selectorScope);\n },\n // apply an arr ay of selectors\n applySelectorScopeList: function(selector, scopeSelectorList) {\n var r = [];\n for (var i=0, s; (s=scopeSelectorList[i]); i++) {\n r.push(this.applySimpleSelectorScope(selector, s));\n }\n return r.join( ', ');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: fun ction(selector, scopeSelector) {\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scopeSelector);\n return selector.replace(polyfillHostRe, scopeSelector + ' ');\n } else {\n return scopeSelector + ' ' + selector;\n }\n },\n // return a selector w ith [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .fo o[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, s copeSelector) {\n scopeSelector = scopeSelector.replace(/\\[is=([^\\]]*)\\]/g , '$1');\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + scopeSelector + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().repl ace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf (attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(colonHostContextRe, polyfillHostContext).replace(\n colo nHostRe, polyfillHost);\n },\n propertiesFromRule: function(rule) {\n var c ssText = rule.style.cssText;\n // TODO(sorvell): Safari cssom incorrectly rem oves quotes from the content\n // property. (https://bugs.webkit.org/show_bug .cgi?id=118045)\n // don't replace attr rules\n if (rule.style.content && !rule.style.content.match(/['\"]+|attr/)) {\n cssText = cssText.replace(/co ntent:[^;]*;/g, 'content: \\'' + \n rule.style.content + '\\';');\n }\n // TODO(sorvell): we can workaround this issue here, but we need a list\n // of troublesome properties to fix https://github.com/Polymer/platform/issu es/53\n //\n // inherit rules can be omitted from cssText\n // TODO(sor vell): remove when Blink bug is fixed:\n // https://code.google.com/p/chromiu m/issues/detail?id=358273\n var style = rule.style;\n for (var i in style) {\n if (style[i] === 'initial') {\n cssText += i + ': initial; ';\n }\n }\n return cssText;\n },\n replaceTextInStyles: function(style s, action) {\n if (styles && action) {\n if (!(styles instanceof Array)) {\n styles = [styles];\n }\n Array.prototype.forEach.call(styl es, function(s) {\n s.textContent = action.call(this, s.textContent);\n }, this);\n }\n },\n addCssToDocument: function(cssText, name) {\n i f (cssText.match('@import')) {\n addOwnSheet(cssText, name);\n } else {\ n addCssToDocument(cssText);\n }\n }\n};\n\nvar selectorRe = /([^{]*)({ [\\s\\S]*?})/gim,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\ n // TODO(sorvell): remove either content or comment\n cssCommentNextSelec torRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\\:[\\s]*?['\"](.* ?)['\"][;\\s]*}([^{]*?){/gim, \n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\* +)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['\"] (.*?)['\"])[;\\s]*[^}]*}/gim,\n // TODO(sorvell): remove either content or co mment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\* +([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped- rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n // note: :host-context pre-processed to -shadowcsshostcontext.\n polyfillH ostContext = '-shadowcsscontext',\n parenSuffix = ')(?:\\\\((' +\n '(? :\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\n cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),\n cssColonHostContextR e = new RegExp('(' + polyfillHostContext + parenSuffix, 'gim'),\n selectorReS uffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n colonHostRe = /\\:host/gim,\n colonHostContextRe = /\\:host-context/gim,\n /* host name without combina tor */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n pol yfillHostRe = new RegExp(polyfillHost, 'gim'),\n polyfillHostContextRe = new RegExp(polyfillHostContext, 'gim'),\n shadowDOMSelectorsRe = [\n /\\^\\^ /g,\n /\\^/g,\n /\\/shadow\\//g,\n /\\/shadow-deep\\//g,\n / ::shadow/g,\n /\\/deep\\//g,\n /::content/g\n ];\n\nfunction styles ToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.fo rEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n }) ;\n // strip comments for easier processing\n if (!preserveComments) {\n cs sText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunctio n cssTextToStyle(cssText) {\n var style = document.createElement('style');\n s tyle.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = [];\n if (style.sheet) {\n // TODO(sorvell): Firefox throws wh en accessing the rules of a stylesheet\n // with an @import\n // https://b ugzilla.mozilla.org/show_bug.cgi?id=625013\n try {\n rules = style.sheet .cssRules;\n } catch(e) {\n //\n }\n } else {\n console.warn('she et not found', style);\n }\n style.parentNode.removeChild(style);\n return ru les;\n}\n\nvar frame = document.createElement('iframe');\nframe.style.display = 'none';\n\nfunction initFrame() {\n frame.initialized = true;\n document.body. appendChild(frame);\n var doc = frame.contentDocument;\n var base = doc.create Element('base');\n base.href = document.baseURI;\n doc.head.appendChild(base); \n}\n\nfunction inFrame(fn) {\n if (!frame.initialized) {\n initFrame();\n }\n document.body.appendChild(frame);\n fn(frame.contentDocument);\n document .body.removeChild(frame);\n}\n\n// TODO(sorvell): use an iframe if the cssText c ontains an @import to workaround\n// https://code.google.com/p/chromium/issues/d etail?id=345114\nvar isChrome = navigator.userAgent.match('Chrome');\nfunction w ithCssRules(cssText, callback) {\n if (!callback) {\n return;\n }\n var ru les;\n if (cssText.match('@import') && isChrome) {\n var style = cssTextToSt yle(cssText);\n inFrame(function(doc) {\n doc.head.appendChild(style.imp l);\n rules = style.sheet.cssRules;\n callback(rules);\n });\n } e lse {\n rules = cssToRules(cssText);\n callback(rules);\n }\n}\n\nfunctio n rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunct ion addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(do cument.createTextNode(cssText));\n }\n}\n\nfunction addOwnSheet(cssText, name) {\n var style = cssTextToStyle(cssText);\n style.setAttribute(name, '');\n st yle.setAttribute(SHIMMED_ATTRIBUTE, '');\n document.head.appendChild(style);\n} \n\nvar SHIM_ATTRIBUTE = 'shim-shadowdom';\nvar SHIMMED_ATTRIBUTE = 'shim-shadow dom-css';\nvar NO_SHIM_ATTRIBUTE = 'no-shim';\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.s etAttribute(SHIMMED_ATTRIBUTE, '');\n sheet[SHIMMED_ATTRIBUTE] = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowD OMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.inser tBefore(getSheet(), head.childNodes[0]);\n\n // TODO(sorvell): monkey-patching HTMLImports is abusive;\n // consider a better solution.\n document.addEventLi stener('DOMContentLoaded', function() {\n var urlResolver = scope.urlResolver ;\n \n if (window.HTMLImports && !HTMLImports.useNative) {\n var SHIM _SHEET_SELECTOR = 'link[rel=stylesheet]' +\n '[' + SHIM_ATTRIBUTE + ']' ;\n var SHIM_STYLE_SELECTOR = 'style[' + SHIM_ATTRIBUTE + ']';\n HTMLI mports.importer.documentPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n HT MLImports.importer.importsPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n\n HTMLImports.parser.documentSelectors = [\n HTMLImports.parser.documentS electors,\n SHIM_SHEET_SELECTOR,\n SHIM_STYLE_SELECTOR\n ].jo in(',');\n \n var originalParseGeneric = HTMLImports.parser.parseGeneric;\ n\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt[SHIM MED_ATTRIBUTE]) {\n return;\n }\n var style = elt.__impor tElement || elt;\n if (!style.hasAttribute(SHIM_ATTRIBUTE)) {\n originalParseGeneric.call(this, elt);\n return;\n }\n if (elt.__resource) {\n style = elt.ownerDocument.createElement('style');\ n style.textContent = urlResolver.resolveCssText(\n elt.__ resource, elt.href);\n } else {\n urlResolver.resolveStyle(style ); \n }\n style.textContent = ShadowCSS.shimStyle(style);\n style.removeAttribute(SHIM_ATTRIBUTE, '');\n style.setAttribute(SHIMMED _ATTRIBUTE, '');\n style[SHIMMED_ATTRIBUTE] = true;\n // place in document\n if (style.parentNode !== head) {\n // replace links i n head\n if (elt.parentNode === head) {\n head.replaceChild( style, elt);\n } else {\n this.addElementToDocument(style);\ n }\n }\n style.__importParsed = true;\n this.mark ParsingComplete(elt);\n this.parseNext();\n }\n\n var hasResour ce = HTMLImports.parser.hasResource;\n HTMLImports.parser.hasResource = fun ction(node) {\n if (node.localName === 'link' && node.rel === 'stylesheet ' &&\n node.hasAttribute(SHIM_ATTRIBUTE)) {\n return (node._ _resource);\n } else {\n return hasResource.call(this, node);\n }\n }\n\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS; \n\n})(window.Platform);\n",
144 "} else {", 144 "} else {",
145 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n / / so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n window.wra p = window.unwrap = function(n){\n return n;\n }\n\n addEventListener('DOMC ontentLoaded', function() {\n if (CustomElements.useNative === false) {\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Elem ent.prototype.createShadowRoot = function() {\n var root = originalCreate ShadowRoot.call(this);\n CustomElements.watchShadow(this);\n retur n root;\n };\n }\n });\n\n Platform.templateContent = function(inTempl ate) {\n // if MDV exists, it may need to boostrap this template to reveal co ntent\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(inTemplate);\n }\n // fallback when the re is no Shadow DOM polyfill, no MDV polyfill, and no\n // native template su pport\n if (!inTemplate.content && !inTemplate._content) {\n var frag = document.createDocumentFragment();\n while (inTemplate.firstChild) {\n frag.appendChild(inTemplate.firstChild);\n }\n inTemplate._content = frag;\n }\n return inTemplate.content || inTemplate._content;\n };\n\n} )(window.Platform);\n", 145 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n / / so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n window.wra p = window.unwrap = function(n){\n return n;\n }\n\n addEventListener('DOMC ontentLoaded', function() {\n if (CustomElements.useNative === false) {\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Elem ent.prototype.createShadowRoot = function() {\n var root = originalCreate ShadowRoot.call(this);\n CustomElements.watchShadow(this);\n retur n root;\n };\n }\n });\n\n Platform.templateContent = function(inTempl ate) {\n // if MDV exists, it may need to boostrap this template to reveal co ntent\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(inTemplate);\n }\n // fallback when the re is no Shadow DOM polyfill, no MDV polyfill, and no\n // native template su pport\n if (!inTemplate.content && !inTemplate._content) {\n var frag = document.createDocumentFragment();\n while (inTemplate.firstChild) {\n frag.appendChild(inTemplate.firstChild);\n }\n inTemplate._content = frag;\n }\n return inTemplate.content || inTemplate._content;\n };\n\n} )(window.Platform);\n",
146 "}", 146 "}",
147 "/* Any copyright is dedicated to the Public Domain.\n * http://creativecomm ons.org/publicdomain/zero/1.0/ */\n\n(function(scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope. forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n hasWorki ngUrl = u.href === 'http://a/b';\n } catch(e) {}\n }\n\n if (hasWorkingUrl) \n return;\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\ n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['% 2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping[ '%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRela tiveScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n funct ion invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n fu nction IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this)\n }\n // XXX\n return h.toLowerCase()\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf (unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponen t(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x 7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return enc odeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOver ride, base) {\n function err(message) {\n errors.push(message)\n }\n\ n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n err ors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this ._isInvalid) {\n var c = input[cursor];\n switch (state) {\n ca se 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c .toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else i f (!stateOverride) {\n buffer = '';\n state = 'no scheme'; \n continue;\n } else {\n err('Invalid scheme.'); \n break loop;\n }\n break;\n\n case 'scheme ':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerC ase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme) ) {\n this._isRelative = true;\n }\n if ('fil e' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n stat e = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n st ate = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme'; \n continue;\n } else if (EOF == c) {\n break loo p;\n } else {\n err('Code point not allowed in scheme: ' + c )\n break loop;\n }\n break;\n\n case 'schem e data':\n if ('?' == c) {\n query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#'; \n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\ n this._schemeData += percentEscape(c);\n }\n } \n break;\n\n case 'no scheme':\n if (!base || !(isRela tiveScheme(base._scheme))) {\n err('Missing scheme.');\n i nvalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or autho rity':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, g ot: ' + c);\n state = 'relative';\n continue\n }\ n break;\n\n case 'relative':\n this._isRelative = true ;\n if ('file' != this._scheme)\n this._scheme = base._schem e;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n break loop;\n } else if (' /' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._ port = base._port;\n this._path = base._path.slice();\n th is._query = '?';\n state = 'query';\n } else if ('#' == c) { \n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._quer y;\n this._fragment = '#';\n state = 'fragment';\n } else {\n var nextC = input[cursor+1]\n var nextNextC = input[cursor+2]\n if (\n 'file' != this._scheme || !ALP HA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (E OF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC & & '#' != nextNextC)) {\n this._host = base._host;\n th is._port = base._port;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative sla sh':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._h ost = base._host;\n this._port = base._port;\n }\n state = 'relative path';\n continue;\n }\n br eak;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"E xpected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority sec ond slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c); \n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= b uffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\ \\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA .test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n sta te = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._hos t = IDNAToASCII.call(this, buffer);\n buffer = '';\n s tate = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid wh itespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\ \\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call( this, buffer);\n buffer = '';\n state = 'relative path sta rt';\n if (stateOverride) {\n break loop;\n } \n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code poin t in host/hostname: ' + c);\n }\n break;\n\n case 'port ':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverrid e) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this ._port = temp + '';\n }\n buffer = '';\n }\ n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code po int in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if (' \\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n contin ue;\n }\n break;\n\n case 'relative path':\n i f (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = re lativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('') ;\n }\n } else if ('.' == buffer && '/' != c && '\\\\' ! = c) {\n this._path.push('');\n } else if ('.' != buffer ) {\n if ('file' == this._scheme && this._path.length == 0 && buffe r.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n b uffer = buffer[0] + ':';\n }\n this._path.push(buffer) ;\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragm ent';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += p ercentEscapeQuery(c);\n }\n break;\n\n case 'fragment': \n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor+ +;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._scheme Data = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n t his._fragment = '';\n this._isInvalid = false;\n this._isRelative = false; \n }\n\n // Does not process domain names or IP addresses.\n // Does not hand le encoding for the query parameter.\n function jURL(url, base /* , encoding */ ) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jU RL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var inpu t = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.p rototype = {\n get href() {\n if (this._isInvalid)\n return this. _url;\n\n var authority = '';\n if ('' != this._username || null != th is._password) {\n authority = this._username +\n (null != this ._password ? ':' + this._password : '') + '@';\n }\n\n return this.pro tocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get pr otocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInval id ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname () {\n return this._host;\n },\n set hostname(hostname) {\n if ( this._isInvalid || !this._isRelative)\n return;\n parse.call(this, h ostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this ._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n ge t search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (thi s._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call( this, search, 'query');\n },\n\n get hash() {\n return this._isInvali d || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\ n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1) ;\n parse.call(this, hash, 'fragment');\n }\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n jURL.c reateObjectURL = function(blob) {\n // IE extension allows a second optiona l options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh77230 2(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arg uments);\n };\n jURL.revokeObjectURL = function(url) {\n OriginalURL. revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\n\n})(this);\n", 147 "/* Any copyright is dedicated to the Public Domain.\n * http://creativecomm ons.org/publicdomain/zero/1.0/ */\n\n(function(scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope. forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n hasWorki ngUrl = u.href === 'http://a/b';\n } catch(e) {}\n }\n\n if (hasWorkingUrl) \n return;\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\ n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['% 2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping[ '%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRela tiveScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n funct ion invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n fu nction IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this)\n }\n // XXX\n return h.toLowerCase()\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf (unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponen t(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x 7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return enc odeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOver ride, base) {\n function err(message) {\n errors.push(message)\n }\n\ n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n err ors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this ._isInvalid) {\n var c = input[cursor];\n switch (state) {\n ca se 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c .toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else i f (!stateOverride) {\n buffer = '';\n state = 'no scheme'; \n continue;\n } else {\n err('Invalid scheme.'); \n break loop;\n }\n break;\n\n case 'scheme ':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerC ase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme) ) {\n this._isRelative = true;\n }\n if ('fil e' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n stat e = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n st ate = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme'; \n continue;\n } else if (EOF == c) {\n break loo p;\n } else {\n err('Code point not allowed in scheme: ' + c )\n break loop;\n }\n break;\n\n case 'schem e data':\n if ('?' == c) {\n query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#'; \n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\ n this._schemeData += percentEscape(c);\n }\n } \n break;\n\n case 'no scheme':\n if (!base || !(isRela tiveScheme(base._scheme))) {\n err('Missing scheme.');\n i nvalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or autho rity':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, g ot: ' + c);\n state = 'relative';\n continue\n }\ n break;\n\n case 'relative':\n this._isRelative = true ;\n if ('file' != this._scheme)\n this._scheme = base._schem e;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n break loop;\n } else if (' /' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._ port = base._port;\n this._path = base._path.slice();\n th is._query = '?';\n state = 'query';\n } else if ('#' == c) { \n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._quer y;\n this._fragment = '#';\n state = 'fragment';\n } else {\n var nextC = input[cursor+1]\n var nextNextC = input[cursor+2]\n if (\n 'file' != this._scheme || !ALP HA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (E OF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC & & '#' != nextNextC)) {\n this._host = base._host;\n th is._port = base._port;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative sla sh':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._h ost = base._host;\n this._port = base._port;\n }\n state = 'relative path';\n continue;\n }\n br eak;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"E xpected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority sec ond slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c); \n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= b uffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\ \\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA .test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n sta te = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._hos t = IDNAToASCII.call(this, buffer);\n buffer = '';\n s tate = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid wh itespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\ \\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call( this, buffer);\n buffer = '';\n state = 'relative path sta rt';\n if (stateOverride) {\n break loop;\n } \n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code poin t in host/hostname: ' + c);\n }\n break;\n\n case 'port ':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverrid e) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this ._port = temp + '';\n }\n buffer = '';\n }\ n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code po int in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if (' \\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n contin ue;\n }\n break;\n\n case 'relative path':\n i f (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = re lativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('') ;\n }\n } else if ('.' == buffer && '/' != c && '\\\\' ! = c) {\n this._path.push('');\n } else if ('.' != buffer ) {\n if ('file' == this._scheme && this._path.length == 0 && buffe r.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n b uffer = buffer[0] + ':';\n }\n this._path.push(buffer) ;\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragm ent';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += p ercentEscapeQuery(c);\n }\n break;\n\n case 'fragment': \n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor+ +;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._scheme Data = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n t his._fragment = '';\n this._isInvalid = false;\n this._isRelative = false; \n }\n\n // Does not process domain names or IP addresses.\n // Does not hand le encoding for the query parameter.\n function jURL(url, base /* , encoding */ ) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jU RL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var inpu t = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.p rototype = {\n get href() {\n if (this._isInvalid)\n return this. _url;\n\n var authority = '';\n if ('' != this._username || null != th is._password) {\n authority = this._username +\n (null != this ._password ? ':' + this._password : '') + '@';\n }\n\n return this.pro tocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get pr otocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInval id ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname () {\n return this._host;\n },\n set hostname(hostname) {\n if ( this._isInvalid || !this._isRelative)\n return;\n parse.call(this, h ostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this ._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n ge t search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (thi s._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call( this, search, 'query');\n },\n\n get hash() {\n return this._isInvali d || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\ n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1) ;\n parse.call(this, hash, 'fragment');\n }\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n jURL.c reateObjectURL = function(blob) {\n // IE extension allows a second optiona l options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh77230 2(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arg uments);\n };\n jURL.revokeObjectURL = function(url) {\n OriginalURL. revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\n\n})(this);\n",
148 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Func tion.prototype.bind = function(scope) {\n var self = this;\n var args = Ar ray.prototype.slice.call(arguments, 1);\n return function() {\n var args 2 = args.slice();\n args2.push.apply(args2, arguments);\n return self. apply(scope, args2);\n };\n };\n}\n\n// mixin\n\n// copy all properties from inProps (et al) to inObj\nfunction mixin(inObj/*, inProps, inMoreProps, ...*/) {\n var obj = inObj || {};\n for (var i = 1; i < arguments.length; i++) {\n var p = arguments[i];\n try {\n for (var n in p) {\n copyPropert y(n, p, obj);\n }\n } catch(x) {\n }\n }\n return obj;\n}\n\n// cop y property inName from inSource object to inTarget object\nfunction copyProperty (inName, inSource, inTarget) {\n var pd = getPropertyDescriptor(inSource, inNam e);\n Object.defineProperty(inTarget, inName, pd);\n}\n\n// get property descri ptor for inName on inObject, even if\n// inName exists on some link in inObject' s prototype chain\nfunction getPropertyDescriptor(inObject, inName) {\n if (inO bject) {\n var pd = Object.getOwnPropertyDescriptor(inObject, inName);\n r eturn pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);\n } \n}\n\n// export\n\nscope.mixin = mixin;\n\n})(window.Platform);\n", 148 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Func tion.prototype.bind = function(scope) {\n var self = this;\n var args = Ar ray.prototype.slice.call(arguments, 1);\n return function() {\n var args 2 = args.slice();\n args2.push.apply(args2, arguments);\n return self. apply(scope, args2);\n };\n };\n}\n\n// mixin\n\n// copy all properties from inProps (et al) to inObj\nfunction mixin(inObj/*, inProps, inMoreProps, ...*/) {\n var obj = inObj || {};\n for (var i = 1; i < arguments.length; i++) {\n var p = arguments[i];\n try {\n for (var n in p) {\n copyPropert y(n, p, obj);\n }\n } catch(x) {\n }\n }\n return obj;\n}\n\n// cop y property inName from inSource object to inTarget object\nfunction copyProperty (inName, inSource, inTarget) {\n var pd = getPropertyDescriptor(inSource, inNam e);\n Object.defineProperty(inTarget, inName, pd);\n}\n\n// get property descri ptor for inName on inObject, even if\n// inName exists on some link in inObject' s prototype chain\nfunction getPropertyDescriptor(inObject, inName) {\n if (inO bject) {\n var pd = Object.getOwnPropertyDescriptor(inObject, inName);\n r eturn pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);\n } \n}\n\n// export\n\nscope.mixin = mixin;\n\n})(window.Platform);\n",
(...skipping 18 matching lines...) Expand all
167 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// import\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse onc e\n inDocument.__parsed = true;\n // all parsable elements in inDocume nt (depth-first pre-order traversal)\n var elts = inDocument.querySelectorA ll(parser.selectors);\n // for each parsable node type, call the mapped par sing method\n forEach(elts, function(e) {\n parser[parser.map[e.loca lName]](e);\n });\n // upgrade all upgradeable static elements, anythi ng dynamically\n // created should be caught by observer\n CustomEleme nts.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: functi on(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.pa rseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (li nkElt.import) {\n parser.parse(linkElt.import);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.g etAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.fo rEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nscope.parser = parser ;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.CustomElements);", 167 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// import\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse onc e\n inDocument.__parsed = true;\n // all parsable elements in inDocume nt (depth-first pre-order traversal)\n var elts = inDocument.querySelectorA ll(parser.selectors);\n // for each parsable node type, call the mapped par sing method\n forEach(elts, function(e) {\n parser[parser.map[e.loca lName]](e);\n });\n // upgrade all upgradeable static elements, anythi ng dynamically\n // created should be caught by observer\n CustomEleme nts.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: functi on(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.pa rseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (li nkElt.import) {\n parser.parse(linkElt.import);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.g etAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.fo rEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nscope.parser = parser ;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.CustomElements);",
168 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope){\n\n// boo tstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.pa rser.parse(document);\n // one more pass before register is 'live'\n CustomEle ments.upgradeDocument(document);\n // install upgrade hook if HTMLImports are a vailable\n if (window.HTMLImports) {\n HTMLImports.__importsParsingHook = fu nction(elt) {\n CustomElements.parser.parse(elt.import);\n }\n }\n // set internal 'ready' flag, now document.registerElement will trigger \n // sync hronous upgrades\n CustomElements.ready = true;\n // async to ensure *native* custom elements upgrade prior to this\n // DOMContentLoaded can fire before ele ments upgrade (e.g. when there's\n // an external script)\n setTimeout(functio n() {\n // capture blunt profiling data\n CustomElements.readyTime = Date. now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElem ents.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.dispatchEvent(\n new CustomEvent('WebCompon entsReady', {bubbles: true})\n );\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(i nType, params) {\n params = params || {};\n var e = document.createEvent(' CustomEvent');\n e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(p arams.cancelable), params.detail);\n return e;\n };\n window.CustomEvent.pr ototype = window.Event.prototype;\n}\n\n// When loading at readyState complete t ime (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLIm ports must already be loaded.\nif (document.readyState === 'complete' || scope.f lags.eager) {\n bootstrap();\n// When loading at readyState interactive time, b ootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready )) {\n bootstrap();\n// When loading at other readyStates, wait for the appropr iate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImport s && !HTMLImports.ready ?\n 'HTMLImportsLoaded' : 'DOMContentLoaded';\n wi ndow.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\n" , 168 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n(function(scope){\n\n// boo tstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.pa rser.parse(document);\n // one more pass before register is 'live'\n CustomEle ments.upgradeDocument(document);\n // install upgrade hook if HTMLImports are a vailable\n if (window.HTMLImports) {\n HTMLImports.__importsParsingHook = fu nction(elt) {\n CustomElements.parser.parse(elt.import);\n }\n }\n // set internal 'ready' flag, now document.registerElement will trigger \n // sync hronous upgrades\n CustomElements.ready = true;\n // async to ensure *native* custom elements upgrade prior to this\n // DOMContentLoaded can fire before ele ments upgrade (e.g. when there's\n // an external script)\n setTimeout(functio n() {\n // capture blunt profiling data\n CustomElements.readyTime = Date. now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElem ents.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.dispatchEvent(\n new CustomEvent('WebCompon entsReady', {bubbles: true})\n );\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(i nType, params) {\n params = params || {};\n var e = document.createEvent(' CustomEvent');\n e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(p arams.cancelable), params.detail);\n return e;\n };\n window.CustomEvent.pr ototype = window.Event.prototype;\n}\n\n// When loading at readyState complete t ime (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLIm ports must already be loaded.\nif (document.readyState === 'complete' || scope.f lags.eager) {\n bootstrap();\n// When loading at readyState interactive time, b ootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready )) {\n bootstrap();\n// When loading at other readyStates, wait for the appropr iate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImport s && !HTMLImports.ready ?\n 'HTMLImportsLoaded' : 'DOMContentLoaded';\n wi ndow.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\n" ,
169 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function() {\n\nif (wind ow.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocume nt'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach (function(fn) {\n CustomElements[fn] = function(inNode) {\n return origi nal[fn](wrap(inNode));\n };\n });\n\n}\n\n})();\n", 169 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function() {\n\nif (wind ow.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocume nt'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach (function(fn) {\n CustomElements[fn] = function(inNode) {\n return origi nal[fn](wrap(inNode));\n };\n });\n\n}\n\n})();\n",
170 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var endOfMicrotask = scope.endOfMicrotask;\n\n // Generic url loader\n function L oader(regex) {\n this.cache = Object.create(null);\n this.map = Object.cre ate(null);\n this.requests = 0;\n this.regex = regex;\n }\n Loader.proto type = {\n\n // TODO(dfreedm): there may be a better factoring here\n // e xtract absolute urls from the text (full of relative urls)\n extractUrls: fun ction(text, base) {\n var matches = [];\n var matched, u;\n while ((matched = this.regex.exec(text))) {\n u = new URL(matched[1], base);\n matches.push({matched: matched[0], url: u.href});\n }\n return matches;\n },\n // take a text blob, a root url, and a callback and load all the urls found within the text\n // returns a map of absolute url to text \n process: function(text, root, callback) {\n var matches = this.extrac tUrls(text, root);\n\n // every call to process returns all the text this l oader has ever received\n var done = callback.bind(null, this.map);\n this.fetch(matches, done);\n },\n // build a mapping of url -> text from m atches\n fetch: function(matches, callback) {\n var inflight = matches.l ength;\n\n // return early if there is no fetching to be done\n if (!i nflight) {\n return callback();\n }\n\n // wait for all subrequ ests to return\n var done = function() {\n if (--inflight === 0) {\n callback();\n }\n };\n\n // start fetching all subreq uests\n var m, req, url;\n for (var i = 0; i < inflight; i++) {\n m = matches[i];\n url = m.url;\n req = this.cache[url];\n // if this url has already been requested, skip requesting it again\n i f (!req) {\n req = this.xhr(url);\n req.match = m;\n this.cache[url] = req;\n }\n // wait for the request to process it s subrequests\n req.wait(done);\n }\n },\n handleXhr: function (request) {\n var match = request.match;\n var url = match.url;\n\n // handle errors with an empty string\n var response = request.response || request.responseText || '';\n this.map[url] = response;\n this.fetc h(this.extractUrls(response, url), request.resolve);\n },\n xhr: function( url) {\n this.requests++;\n var request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.send();\n request.onerror = request.onload = this.handleXhr.bind(this, request);\n\n // queue of tasks to run after XHR returns\n request.pending = [];\n request.resolve = function() {\n var pending = request.pending;\n for(var i = 0; i < pending.length; i++) {\n pending[i]();\n }\n request.pen ding = null;\n };\n\n // if we have already resolved, pending is null, async call the callback\n request.wait = function(fn) {\n if (reque st.pending) {\n request.pending.push(fn);\n } else {\n endOfMicrotask(fn);\n }\n };\n\n return request;\n }\n };\n \n scope.Loader = Loader;\n})(window.Platform);\n", 170 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var endOfMicrotask = scope.endOfMicrotask;\n\n // Generic url loader\n function L oader(regex) {\n this.cache = Object.create(null);\n this.map = Object.cre ate(null);\n this.requests = 0;\n this.regex = regex;\n }\n Loader.proto type = {\n\n // TODO(dfreedm): there may be a better factoring here\n // e xtract absolute urls from the text (full of relative urls)\n extractUrls: fun ction(text, base) {\n var matches = [];\n var matched, u;\n while ((matched = this.regex.exec(text))) {\n u = new URL(matched[1], base);\n matches.push({matched: matched[0], url: u.href});\n }\n return matches;\n },\n // take a text blob, a root url, and a callback and load all the urls found within the text\n // returns a map of absolute url to text \n process: function(text, root, callback) {\n var matches = this.extrac tUrls(text, root);\n\n // every call to process returns all the text this l oader has ever received\n var done = callback.bind(null, this.map);\n this.fetch(matches, done);\n },\n // build a mapping of url -> text from m atches\n fetch: function(matches, callback) {\n var inflight = matches.l ength;\n\n // return early if there is no fetching to be done\n if (!i nflight) {\n return callback();\n }\n\n // wait for all subrequ ests to return\n var done = function() {\n if (--inflight === 0) {\n callback();\n }\n };\n\n // start fetching all subreq uests\n var m, req, url;\n for (var i = 0; i < inflight; i++) {\n m = matches[i];\n url = m.url;\n req = this.cache[url];\n // if this url has already been requested, skip requesting it again\n i f (!req) {\n req = this.xhr(url);\n req.match = m;\n this.cache[url] = req;\n }\n // wait for the request to process it s subrequests\n req.wait(done);\n }\n },\n handleXhr: function (request) {\n var match = request.match;\n var url = match.url;\n\n // handle errors with an empty string\n var response = request.response || request.responseText || '';\n this.map[url] = response;\n this.fetc h(this.extractUrls(response, url), request.resolve);\n },\n xhr: function( url) {\n this.requests++;\n var request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.send();\n request.onerror = request.onload = this.handleXhr.bind(this, request);\n\n // queue of tasks to run after XHR returns\n request.pending = [];\n request.resolve = function() {\n var pending = request.pending;\n for(var i = 0; i < pending.length; i++) {\n pending[i]();\n }\n request.pen ding = null;\n };\n\n // if we have already resolved, pending is null, async call the callback\n request.wait = function(fn) {\n if (reque st.pending) {\n request.pending.push(fn);\n } else {\n endOfMicrotask(fn);\n }\n };\n\n return request;\n }\n };\n \n scope.Loader = Loader;\n})(window.Platform);\n",
171 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar urlResolver = scope.urlResolver;\nvar Loader = scope.Loader;\n\nfunction StyleR esolver() {\n this.loader = new Loader(this.regex);\n}\nStyleResolver.prototype = {\n regex: /@import\\s+(?:url)?[\"'\\(]*([^'\"\\)]*)['\"\\)]*;/g,\n // Recu rsively replace @imports with the text at that url\n resolve: function(text, ur l, callback) {\n var done = function(map) {\n callback(this.flatten(text , url, map));\n }.bind(this);\n this.loader.process(text, url, done);\n } ,\n // resolve the textContent of a style node\n resolveNode: function(style, url, callback) {\n var text = style.textContent;\n var done = function(tex t) {\n style.textContent = text;\n callback(style);\n };\n this. resolve(text, url, done);\n },\n // flatten all the @imports to text\n flatte n: function(text, base, map) {\n var matches = this.loader.extractUrls(text, base);\n var match, url, intermediate;\n for (var i = 0; i < matches.lengt h; i++) {\n match = matches[i];\n url = match.url;\n // resolve a ny css text to be relative to the importer, keep absolute url\n intermediat e = urlResolver.resolveCssText(map[url], url, true);\n // flatten intermedi ate @imports\n intermediate = this.flatten(intermediate, base, map);\n text = text.replace(match.matched, intermediate);\n }\n return text;\n } ,\n loadStyles: function(styles, base, callback) {\n var loaded=0, l = style s.length;\n // called in the context of the style\n function loadedStyle(s tyle) {\n loaded++;\n if (loaded === l && callback) {\n callbac k();\n }\n }\n for (var i=0, s; (i<l) && (s=styles[i]); i++) {\n this.resolveNode(s, base, loadedStyle);\n }\n }\n};\n\nvar styleResolver = new StyleResolver();\n\n// exports\nscope.styleResolver = styleResolver;\n\n})(w indow.Platform);\n", 171 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar urlResolver = scope.urlResolver;\nvar Loader = scope.Loader;\n\nfunction StyleR esolver() {\n this.loader = new Loader(this.regex);\n}\nStyleResolver.prototype = {\n regex: /@import\\s+(?:url)?[\"'\\(]*([^'\"\\)]*)['\"\\)]*;/g,\n // Recu rsively replace @imports with the text at that url\n resolve: function(text, ur l, callback) {\n var done = function(map) {\n callback(this.flatten(text , url, map));\n }.bind(this);\n this.loader.process(text, url, done);\n } ,\n // resolve the textContent of a style node\n resolveNode: function(style, url, callback) {\n var text = style.textContent;\n var done = function(tex t) {\n style.textContent = text;\n callback(style);\n };\n this. resolve(text, url, done);\n },\n // flatten all the @imports to text\n flatte n: function(text, base, map) {\n var matches = this.loader.extractUrls(text, base);\n var match, url, intermediate;\n for (var i = 0; i < matches.lengt h; i++) {\n match = matches[i];\n url = match.url;\n // resolve a ny css text to be relative to the importer, keep absolute url\n intermediat e = urlResolver.resolveCssText(map[url], url, true);\n // flatten intermedi ate @imports\n intermediate = this.flatten(intermediate, base, map);\n text = text.replace(match.matched, intermediate);\n }\n return text;\n } ,\n loadStyles: function(styles, base, callback) {\n var loaded=0, l = style s.length;\n // called in the context of the style\n function loadedStyle(s tyle) {\n loaded++;\n if (loaded === l && callback) {\n callbac k();\n }\n }\n for (var i=0, s; (i<l) && (s=styles[i]); i++) {\n this.resolveNode(s, base, loadedStyle);\n }\n }\n};\n\nvar styleResolver = new StyleResolver();\n\n// exports\nscope.styleResolver = styleResolver;\n\n})(w indow.Platform);\n",
172 "// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer. github.io/LICENSE.txt\n// The complete set of authors may be found at http://pol ymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant fou nd at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict ';\n\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n \n function getTreeScope(node) {\n while (node.parentNode) {\n node = n ode.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n Node.prototype.bind = function(name, observable) {\n console.error('Unhandled binding to Node: ', this, name, observable);\n };\n\n Node.prototype.bindFinished = function() {};\n\n function updateBindings(node, name, binding) {\n var bindings = node.bindings_;\n if (!bindings)\n bindings = node.bindings_ = {};\n\n if (bindings[name])\n binding[name] .close();\n\n return bindings[name] = binding;\n }\n\n function returnBindi ng(node, name, binding) {\n return binding;\n }\n\n function sanitizeValue( value) {\n return value == null ? '' : value;\n }\n\n function updateText(n ode, value) {\n node.data = sanitizeValue(value);\n }\n\n function textBind ing(node) {\n return function(value) {\n return updateText(node, value); \n };\n }\n\n var maybeUpdateBindings = returnBinding;\n\n Object.definePr operty(Platform, 'enableBindingsReflection', {\n get: function() {\n ret urn maybeUpdateBindings === updateBindings;\n },\n set: function(enable) { \n maybeUpdateBindings = enable ? updateBindings : returnBinding;\n re turn enable;\n },\n configurable: true\n });\n\n Text.prototype.bind = f unction(name, value, oneTime) {\n if (name !== 'textContent')\n return N ode.prototype.bind.call(this, name, value, oneTime);\n\n if (oneTime)\n return updateText(this, value);\n\n var observable = value;\n updateText(t his, observable.open(textBinding(this)));\n return maybeUpdateBindings(this, name, observable);\n }\n\n function updateAttribute(el, name, conditional, val ue) {\n if (conditional) {\n if (value)\n el.setAttribute(name, ' ');\n else\n el.removeAttribute(name);\n return;\n }\n\n el.setAttribute(name, sanitizeValue(value));\n }\n\n function attributeBinding (el, name, conditional) {\n return function(value) {\n updateAttribute(e l, name, conditional, value);\n };\n }\n\n Element.prototype.bind = functio n(name, value, oneTime) {\n var conditional = name[name.length - 1] == '?';\n if (conditional) {\n this.removeAttribute(name);\n name = name.sli ce(0, -1);\n }\n\n if (oneTime)\n return updateAttribute(this, name, conditional, value);\n\n\n var observable = value;\n updateAttribute(this, name, conditional,\n observable.open(attributeBinding(this, name, condit ional)));\n\n return maybeUpdateBindings(this, name, observable);\n };\n\n var checkboxEventType;\n (function() {\n // Attempt to feature-detect which event (change or click) is fired first\n // for checkboxes.\n var div = do cument.createElement('div');\n var checkbox = div.appendChild(document.create Element('input'));\n checkbox.setAttribute('type', 'checkbox');\n var firs t;\n var count = 0;\n checkbox.addEventListener('click', function(e) {\n count++;\n first = first || 'click';\n });\n checkbox.addEventLis tener('change', function() {\n count++;\n first = first || 'change';\n });\n\n var event = document.createEvent('MouseEvent');\n event.initMo useEvent(\"click\", true, true, window, 0, 0, 0, 0, 0, false,\n false, fa lse, false, 0, null);\n checkbox.dispatchEvent(event);\n // WebKit/Blink d on't fire the change event if the element is outside the\n // document, so as sume 'change' for that case.\n checkboxEventType = count == 1 ? 'change' : fi rst;\n })();\n\n function getEventForInputType(element) {\n switch (element .type) {\n case 'checkbox':\n return checkboxEventType;\n case 'radio':\n case 'select-multiple':\n case 'select-one':\n retur n 'change';\n case 'range':\n if (/Trident|MSIE/.test(navigator.user Agent))\n return 'change';\n default:\n return 'input';\n }\n }\n\n function updateInput(input, property, value, santizeFn) {\n inp ut[property] = (santizeFn || sanitizeValue)(value);\n }\n\n function inputBind ing(input, property, santizeFn) {\n return function(value) {\n return up dateInput(input, property, value, santizeFn);\n }\n }\n\n function noop() { }\n\n function bindInputEvent(input, property, observable, postEventFn) {\n var eventType = getEventForInputType(input);\n\n function eventHandler() {\n observable.setValue(input[property]);\n observable.discardChanges();\n (postEventFn || noop)(input);\n Platform.performMicrotaskCheckpoint() ;\n }\n input.addEventListener(eventType, eventHandler);\n\n return {\n close: function() {\n input.removeEventListener(eventType, eventHan dler);\n observable.close();\n },\n\n observable_: observable\n }\n }\n\n function booleanSanitize(value) {\n return Boolean(value);\n }\n\n // |element| is assumed to be an HTMLInputElement with |type| == 'radio' .\n // Returns an array containing all radio buttons other than |element| that\ n // have the same |name|, either in the form that |element| belongs to or,\n // if no form, in the document tree to which |element| belongs.\n //\n // This implementation is based upon the HTML spec definition of a\n // \"radio button group\":\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/nu mber-state.html#radio-button-group\n //\n function getAssociatedRadioButtons(e lement) {\n if (element.form) {\n return filter(element.form.elements, f unction(el) {\n return el != element &&\n el.tagName == 'INPUT ' &&\n el.type == 'radio' &&\n el.name == element.name;\n });\n } else {\n var treeScope = getTreeScope(element);\n if ( !treeScope)\n return [];\n var radios = treeScope.querySelectorAll(\ n 'input[type=\"radio\"][name=\"' + element.name + '\"]');\n retur n filter(radios, function(el) {\n return el != element && !el.form;\n });\n }\n }\n\n function checkedPostEvent(input) {\n // Only the radio button that is getting checked gets an event. We\n // therefore find all the associated radio buttons and update their\n // check binding manually.\n if (input.tagName === 'INPUT' &&\n input.type === 'radio') {\n getAs sociatedRadioButtons(input).forEach(function(radio) {\n var checkedBindin g = radio.bindings_.checked;\n if (checkedBinding) {\n // Set th e value directly to avoid an infinite call stack.\n checkedBinding.obse rvable_.setValue(false);\n }\n });\n }\n }\n\n HTMLInputElement .prototype.bind = function(name, value, oneTime) {\n if (name !== 'value' && name !== 'checked')\n return HTMLElement.prototype.bind.call(this, name, va lue, oneTime);\n\n this.removeAttribute(name);\n var sanitizeFn = name == 'checked' ? booleanSanitize : sanitizeValue;\n var postEventFn = name == 'che cked' ? checkedPostEvent : noop;\n\n if (oneTime)\n return updateInput(t his, name, value, sanitizeFn);\n\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable, postEventFn);\n updateInput(this, n ame,\n observable.open(inputBinding(this, name, sanitizeFn)),\n sanitizeFn);\n\n // Checkboxes may need to update bindings of o ther checkboxes.\n return updateBindings(this, name, binding);\n }\n\n HTML TextAreaElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, on eTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateInput(this, 'value', value);\n\n var observable = value;\n var bindi ng = bindInputEvent(this, 'value', observable);\n updateInput(this, 'value',\ n observable.open(inputBinding(this, 'value', sanitizeValue)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n function updateOp tion(option, value) {\n var parentNode = option.parentNode;;\n var select; \n var selectBinding;\n var oldValue;\n if (parentNode instanceof HTMLS electElement &&\n parentNode.bindings_ &&\n parentNode.bindings_.v alue) {\n select = parentNode;\n selectBinding = select.bindings_.valu e;\n oldValue = select.value;\n }\n\n option.value = sanitizeValue(va lue);\n\n if (select && select.value != oldValue) {\n selectBinding.obse rvable_.setValue(select.value);\n selectBinding.observable_.discardChanges( );\n Platform.performMicrotaskCheckpoint();\n }\n }\n\n function optio nBinding(option) {\n return function(value) {\n updateOption(option, val ue);\n }\n }\n\n HTMLOptionElement.prototype.bind = function(name, value, o neTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.ca ll(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateOption(this, value);\n\n var observable = value ;\n var binding = bindInputEvent(this, 'value', observable);\n updateOptio n(this, observable.open(optionBinding(this)));\n return maybeUpdateBindings(t his, name, binding);\n }\n\n HTMLSelectElement.prototype.bind = function(name, value, oneTime) {\n if (name === 'selectedindex')\n name = 'selectedInd ex';\n\n if (name !== 'selectedIndex' && name !== 'value')\n return HTML Element.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttri bute(name);\n\n if (oneTime)\n return updateInput(this, name, value);\n\ n var observable = value;\n var binding = bindInputEvent(this, name, obser vable);\n updateInput(this, name,\n observable.open(inputBindi ng(this, name)));\n\n // Option update events may need to access select bindi ngs.\n return updateBindings(this, name, binding);\n }\n})(this);\n", 172 "// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer. github.io/LICENSE.txt\n// The complete set of authors may be found at http://pol ymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant fou nd at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict ';\n\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n \n function getTreeScope(node) {\n while (node.parentNode) {\n node = n ode.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n Node.prototype.bind = function(name, observable) {\n console.error('Unhandled binding to Node: ', this, name, observable);\n };\n\n Node.prototype.bindFinished = function() {};\n\n function updateBindings(node, name, binding) {\n var bindings = node.bindings_;\n if (!bindings)\n bindings = node.bindings_ = {};\n\n if (bindings[name])\n binding[name] .close();\n\n return bindings[name] = binding;\n }\n\n function returnBindi ng(node, name, binding) {\n return binding;\n }\n\n function sanitizeValue( value) {\n return value == null ? '' : value;\n }\n\n function updateText(n ode, value) {\n node.data = sanitizeValue(value);\n }\n\n function textBind ing(node) {\n return function(value) {\n return updateText(node, value); \n };\n }\n\n var maybeUpdateBindings = returnBinding;\n\n Object.definePr operty(Platform, 'enableBindingsReflection', {\n get: function() {\n ret urn maybeUpdateBindings === updateBindings;\n },\n set: function(enable) { \n maybeUpdateBindings = enable ? updateBindings : returnBinding;\n re turn enable;\n },\n configurable: true\n });\n\n Text.prototype.bind = f unction(name, value, oneTime) {\n if (name !== 'textContent')\n return N ode.prototype.bind.call(this, name, value, oneTime);\n\n if (oneTime)\n return updateText(this, value);\n\n var observable = value;\n updateText(t his, observable.open(textBinding(this)));\n return maybeUpdateBindings(this, name, observable);\n }\n\n function updateAttribute(el, name, conditional, val ue) {\n if (conditional) {\n if (value)\n el.setAttribute(name, ' ');\n else\n el.removeAttribute(name);\n return;\n }\n\n el.setAttribute(name, sanitizeValue(value));\n }\n\n function attributeBinding (el, name, conditional) {\n return function(value) {\n updateAttribute(e l, name, conditional, value);\n };\n }\n\n Element.prototype.bind = functio n(name, value, oneTime) {\n var conditional = name[name.length - 1] == '?';\n if (conditional) {\n this.removeAttribute(name);\n name = name.sli ce(0, -1);\n }\n\n if (oneTime)\n return updateAttribute(this, name, conditional, value);\n\n\n var observable = value;\n updateAttribute(this, name, conditional,\n observable.open(attributeBinding(this, name, condit ional)));\n\n return maybeUpdateBindings(this, name, observable);\n };\n\n var checkboxEventType;\n (function() {\n // Attempt to feature-detect which event (change or click) is fired first\n // for checkboxes.\n var div = do cument.createElement('div');\n var checkbox = div.appendChild(document.create Element('input'));\n checkbox.setAttribute('type', 'checkbox');\n var firs t;\n var count = 0;\n checkbox.addEventListener('click', function(e) {\n count++;\n first = first || 'click';\n });\n checkbox.addEventLis tener('change', function() {\n count++;\n first = first || 'change';\n });\n\n var event = document.createEvent('MouseEvent');\n event.initMo useEvent(\"click\", true, true, window, 0, 0, 0, 0, 0, false,\n false, fa lse, false, 0, null);\n checkbox.dispatchEvent(event);\n // WebKit/Blink d on't fire the change event if the element is outside the\n // document, so as sume 'change' for that case.\n checkboxEventType = count == 1 ? 'change' : fi rst;\n })();\n\n function getEventForInputType(element) {\n switch (element .type) {\n case 'checkbox':\n return checkboxEventType;\n case 'radio':\n case 'select-multiple':\n case 'select-one':\n retur n 'change';\n case 'range':\n if (/Trident|MSIE/.test(navigator.user Agent))\n return 'change';\n default:\n return 'input';\n }\n }\n\n function updateInput(input, property, value, santizeFn) {\n inp ut[property] = (santizeFn || sanitizeValue)(value);\n }\n\n function inputBind ing(input, property, santizeFn) {\n return function(value) {\n return up dateInput(input, property, value, santizeFn);\n }\n }\n\n function noop() { }\n\n function bindInputEvent(input, property, observable, postEventFn) {\n var eventType = getEventForInputType(input);\n\n function eventHandler() {\n observable.setValue(input[property]);\n observable.discardChanges();\n (postEventFn || noop)(input);\n Platform.performMicrotaskCheckpoint() ;\n }\n input.addEventListener(eventType, eventHandler);\n\n return {\n close: function() {\n input.removeEventListener(eventType, eventHan dler);\n observable.close();\n },\n\n observable_: observable\n }\n }\n\n function booleanSanitize(value) {\n return Boolean(value);\n }\n\n // |element| is assumed to be an HTMLInputElement with |type| == 'radio' .\n // Returns an array containing all radio buttons other than |element| that\ n // have the same |name|, either in the form that |element| belongs to or,\n // if no form, in the document tree to which |element| belongs.\n //\n // This implementation is based upon the HTML spec definition of a\n // \"radio button group\":\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/nu mber-state.html#radio-button-group\n //\n function getAssociatedRadioButtons(e lement) {\n if (element.form) {\n return filter(element.form.elements, f unction(el) {\n return el != element &&\n el.tagName == 'INPUT ' &&\n el.type == 'radio' &&\n el.name == element.name;\n });\n } else {\n var treeScope = getTreeScope(element);\n if ( !treeScope)\n return [];\n var radios = treeScope.querySelectorAll(\ n 'input[type=\"radio\"][name=\"' + element.name + '\"]');\n retur n filter(radios, function(el) {\n return el != element && !el.form;\n });\n }\n }\n\n function checkedPostEvent(input) {\n // Only the radio button that is getting checked gets an event. We\n // therefore find all the associated radio buttons and update their\n // check binding manually.\n if (input.tagName === 'INPUT' &&\n input.type === 'radio') {\n getAs sociatedRadioButtons(input).forEach(function(radio) {\n var checkedBindin g = radio.bindings_.checked;\n if (checkedBinding) {\n // Set th e value directly to avoid an infinite call stack.\n checkedBinding.obse rvable_.setValue(false);\n }\n });\n }\n }\n\n HTMLInputElement .prototype.bind = function(name, value, oneTime) {\n if (name !== 'value' && name !== 'checked')\n return HTMLElement.prototype.bind.call(this, name, va lue, oneTime);\n\n this.removeAttribute(name);\n var sanitizeFn = name == 'checked' ? booleanSanitize : sanitizeValue;\n var postEventFn = name == 'che cked' ? checkedPostEvent : noop;\n\n if (oneTime)\n return updateInput(t his, name, value, sanitizeFn);\n\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable, postEventFn);\n updateInput(this, n ame,\n observable.open(inputBinding(this, name, sanitizeFn)),\n sanitizeFn);\n\n // Checkboxes may need to update bindings of o ther checkboxes.\n return updateBindings(this, name, binding);\n }\n\n HTML TextAreaElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, on eTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateInput(this, 'value', value);\n\n var observable = value;\n var bindi ng = bindInputEvent(this, 'value', observable);\n updateInput(this, 'value',\ n observable.open(inputBinding(this, 'value', sanitizeValue)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n function updateOp tion(option, value) {\n var parentNode = option.parentNode;;\n var select; \n var selectBinding;\n var oldValue;\n if (parentNode instanceof HTMLS electElement &&\n parentNode.bindings_ &&\n parentNode.bindings_.v alue) {\n select = parentNode;\n selectBinding = select.bindings_.valu e;\n oldValue = select.value;\n }\n\n option.value = sanitizeValue(va lue);\n\n if (select && select.value != oldValue) {\n selectBinding.obse rvable_.setValue(select.value);\n selectBinding.observable_.discardChanges( );\n Platform.performMicrotaskCheckpoint();\n }\n }\n\n function optio nBinding(option) {\n return function(value) {\n updateOption(option, val ue);\n }\n }\n\n HTMLOptionElement.prototype.bind = function(name, value, o neTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.ca ll(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateOption(this, value);\n\n var observable = value ;\n var binding = bindInputEvent(this, 'value', observable);\n updateOptio n(this, observable.open(optionBinding(this)));\n return maybeUpdateBindings(t his, name, binding);\n }\n\n HTMLSelectElement.prototype.bind = function(name, value, oneTime) {\n if (name === 'selectedindex')\n name = 'selectedInd ex';\n\n if (name !== 'selectedIndex' && name !== 'value')\n return HTML Element.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttri bute(name);\n\n if (oneTime)\n return updateInput(this, name, value);\n\ n var observable = value;\n var binding = bindInputEvent(this, name, obser vable);\n updateInput(this, name,\n observable.open(inputBindi ng(this, name)));\n\n // Option update events may need to access select bindi ngs.\n return updateBindings(this, name, binding);\n }\n})(this);\n",
173 "// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer. github.io/LICENSE.txt\n// The complete set of authors may be found at http://pol ymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant fou nd at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict ';\n\n function assert(v) {\n if (!v)\n throw new Error('Assertion fail ed');\n }\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype. forEach);\n\n function getFragmentRoot(node) {\n var p;\n while (p = node .parentNode) {\n node = p;\n }\n\n return node;\n }\n\n function se archRefId(node, id) {\n if (!id)\n return;\n\n var ref;\n var sele ctor = '#' + id;\n while (!ref) {\n node = getFragmentRoot(node);\n\n if (node.protoContent_)\n ref = node.protoContent_.querySelector(selec tor);\n else if (node.getElementById)\n ref = node.getElementById(id );\n\n if (ref || !node.templateCreator_)\n break\n\n node = no de.templateCreator_;\n }\n\n return ref;\n }\n\n function getInstanceRoo t(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n return node.templateCreator_ ? node : null;\n }\n\n var Map;\n if (global .Map && typeof global.Map.prototype.forEach === 'function') {\n Map = global. Map;\n } else {\n Map = function() {\n this.keys = [];\n this.valu es = [];\n };\n\n Map.prototype = {\n set: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n t his.keys.push(key);\n this.values.push(value);\n } else {\n this.values[index] = value;\n }\n },\n\n get: function(key ) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return;\n\n return this.values[index];\n },\n\n delete: fun ction(key, value) {\n var index = this.keys.indexOf(key);\n if (in dex < 0)\n return false;\n\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return true;\n },\n\n forEach : function(f, opt_this) {\n for (var i = 0; i < this.keys.length; i++)\n f.call(opt_this || this, this.values[i], this.keys[i], this);\n }\ n };\n }\n\n // JScript does not have __proto__. We wrap all object literal s with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' i n {}) ?\n function(obj) { return obj; } :\n function(obj) {\n v ar proto = obj.__proto__;\n if (!proto)\n return obj;\n v ar newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).fo rEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n } );\n return newObject;\n };\n\n // IE does not support have Documen t.prototype.contains.\n if (typeof document.contains != 'function') {\n Docu ment.prototype.contains = function(node) {\n if (node === this || node.pare ntNode === this)\n return true;\n return this.documentElement.contai ns(node);\n }\n }\n\n var BIND = 'bind';\n var REPEAT = 'repeat';\n var I F = 'if';\n\n var templateAttributeDirectives = {\n 'template': true,\n ' repeat': true,\n 'bind': true,\n 'ref': true\n };\n\n var semanticTempla teElements = {\n 'THEAD': true,\n 'TBODY': true,\n 'TFOOT': true,\n 'TH': true,\n 'TR': true,\n 'TD': true,\n 'COLGROUP': true,\n 'COL': true,\n 'CAPTION': true,\n 'OPTION': true,\n 'OPTGROUP': true\n };\n\ n var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';\n if (h asTemplateElement) {\n // TODO(rafaelw): Remove when fix for\n // https:// codereview.chromium.org/164803002/\n // makes it to Chrome release.\n (fun ction() {\n var t = document.createElement('template');\n var d = t.co ntent.ownerDocument;\n var html = d.appendChild(d.createElement('html'));\n var head = html.appendChild(d.createElement('head'));\n var base = d. createElement('base');\n base.href = document.baseURI;\n head.appendCh ild(base);\n })();\n }\n\n var allTemplatesSelectors = 'template, ' +\n Object.keys(semanticTemplateElements).map(function(tagName) {\n return tagName.toLowerCase() + '[template]';\n }).join(', ');\n\n function isSVGT emplate(el) {\n return el.tagName == 'template' &&\n el.namespaceUR I == 'http://www.w3.org/2000/svg';\n }\n\n function isHTMLTemplate(el) {\n return el.tagName == 'TEMPLATE' &&\n el.namespaceURI == 'http://www.w3 .org/1999/xhtml';\n }\n\n function isAttributeTemplate(el) {\n return Boole an(semanticTemplateElements[el.tagName] &&\n el.hasAttribute(' template'));\n }\n\n function isTemplate(el) {\n if (el.isTemplate_ === und efined)\n el.isTemplate_ = el.tagName == 'TEMPLATE' || isAttributeTemplate( el);\n\n return el.isTemplate_;\n }\n\n // FIXME: Observe templates being a dded/removed from documents\n // FIXME: Expose imperative API to decorate and o bserve templates in\n // \"disconnected tress\" (e.g. ShadowRoot)\n document.a ddEventListener('DOMContentLoaded', function(e) {\n bootstrapTemplatesRecursi velyFrom(document);\n // FIXME: Is this needed? Seems like it shouldn't be.\n Platform.performMicrotaskCheckpoint();\n }, false);\n\n function forAllTem platesFrom(node, fn) {\n var subTemplates = node.querySelectorAll(allTemplate sSelectors);\n\n if (isTemplate(node))\n fn(node)\n forEach(subTempla tes, fn);\n }\n\n function bootstrapTemplatesRecursivelyFrom(node) {\n func tion bootstrap(template) {\n if (!HTMLTemplateElement.decorate(template))\n bootstrapTemplatesRecursivelyFrom(template.content);\n }\n\n forAl lTemplatesFrom(node, bootstrap);\n }\n\n if (!hasTemplateElement) {\n /**\n * This represents a <template> element.\n * @constructor\n * @exten ds {HTMLElement}\n */\n global.HTMLTemplateElement = function() {\n throw TypeError('Illegal constructor');\n };\n }\n\n var hasProto = '__prot o__' in {};\n\n function mixin(to, from) {\n Object.getOwnPropertyNames(from ).forEach(function(name) {\n Object.defineProperty(to, name,\n Object.getOwnPropertyDescriptor(from, name));\n });\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#df n-template-contents-owner\n function getOrCreateTemplateContentsOwner(template) {\n var doc = template.ownerDocument\n if (!doc.defaultView)\n retur n doc;\n var d = doc.templateContentsOwner_;\n if (!d) {\n // TODO(ar v): This should either be a Document or HTMLDocument depending\n // on doc. \n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild ) {\n d.removeChild(d.lastChild);\n }\n doc.templateContentsOwn er_ = d;\n }\n return d;\n }\n\n function getTemplateStagingDocument(tem plate) {\n if (!template.stagingDocument_) {\n var owner = template.owne rDocument;\n if (!owner.stagingDocument_) {\n owner.stagingDocument_ = owner.implementation.createHTMLDocument('');\n owner.stagingDocument_. isStagingDocument = true;\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome r elease.\n var base = owner.stagingDocument_.createElement('base');\n base.href = document.baseURI;\n owner.stagingDocument_.head.appendChil d(base);\n\n owner.stagingDocument_.stagingDocument_ = owner.stagingDocum ent_;\n }\n\n template.stagingDocument_ = owner.stagingDocument_;\n }\n\n return template.stagingDocument_;\n }\n\n // For non-template browse rs, the parser will disallow <template> in certain\n // locations, so we allow \"attribute templates\" which combine the template\n // element with the top-le vel container node of the content, e.g.\n //\n // <tr template repeat=\"{{ f oo }}\"\" class=\"bar\"><td>Bar</td></tr>\n //\n // becomes\n //\n // <tem plate repeat=\"{{ foo }}\">\n // + #document-fragment\n // + <tr class=\ "bar\">\n // + <td>Bar</td>\n //\n function extractTemplateFromAttribut eTemplate(el) {\n var template = el.ownerDocument.createElement('template');\ n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attribute s;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n if (templateAttributeDirectives[attrib.name]) {\n if (attrib.name !== 'template')\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n }\n\n return template;\n }\n\n function extractTemplateFromSVGTemplate(el) {\n v ar template = el.ownerDocument.createElement('template');\n el.parentNode.ins ertBefore(template, el);\n\n var attribs = el.attributes;\n var count = at tribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute( attrib.name);\n }\n\n el.parentNode.removeChild(el);\n return template; \n }\n\n function liftNonNativeTemplateChildrenIntoContent(template, el, useRo ot) {\n var content = template.content;\n if (useRoot) {\n content.ap pendChild(el);\n return;\n }\n\n var child;\n while (child = el.fi rstChild) {\n content.appendChild(child);\n }\n }\n\n var templateObse rver;\n if (typeof MutationObserver == 'function') {\n templateObserver = ne w MutationObserver(function(records) {\n for (var i = 0; i < records.length ; i++) {\n records[i].target.refChanged_();\n }\n });\n }\n\n / **\n * Ensures proper API and content model for template elements.\n * @para m {HTMLTemplateElement} opt_instanceRef The template element which\n * |el | template element will return as the value of its ref(), and whose\n * co ntent will be used as source when createInstance() is invoked.\n */\n HTMLTem plateElement.decorate = function(el, opt_instanceRef) {\n if (el.templateIsDe corated_)\n return false;\n\n var templateElement = el;\n templateEle ment.templateIsDecorated_ = true;\n\n var isNativeHTMLTemplate = isHTMLTempla te(templateElement) &&\n hasTemplateElement;\n var bootstrapContents = isNativeHTMLTemplate;\n var liftContents = !isNativeH TMLTemplate;\n var liftRoot = false;\n\n if (!isNativeHTMLTemplate) {\n if (isAttributeTemplate(templateElement)) {\n assert(!opt_instanceRef) ;\n templateElement = extractTemplateFromAttributeTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = has TemplateElement;\n liftRoot = true;\n } else if (isSVGTemplate(templ ateElement)) {\n templateElement = extractTemplateFromSVGTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplat e = hasTemplateElement;\n }\n }\n\n if (!isNativeHTMLTemplate) {\n fixTemplateElementPrototype(templateElement);\n var doc = getOrCreateTem plateContentsOwner(templateElement);\n templateElement.content_ = doc.creat eDocumentFragment();\n }\n\n if (opt_instanceRef) {\n // template is contained within an instance, its direct content must be\n // empty\n templateElement.instanceRef_ = opt_instanceRef;\n } else if (liftContents) {\ n liftNonNativeTemplateChildrenIntoContent(templateElement,\n el,\n liftRoot);\n } else if (bootstrapContents) {\n bootstrapTemplatesRe cursivelyFrom(templateElement.content);\n }\n\n return true;\n };\n\n // TODO(rafaelw): This used to decorate recursively all templates from a given\n // node. This happens by default on 'DOMContentLoaded', but may be needed\n // in subtrees not descendent from document (e.g. ShadowRoot).\n // Review whether this is the right public API.\n HTMLTemplateElement.bootstrap = bootstrapTempl atesRecursivelyFrom;\n\n var htmlElement = global.HTMLUnknownElement || HTMLEle ment;\n\n var contentDescriptor = {\n get: function() {\n return this.c ontent_;\n },\n enumerable: true,\n configurable: true\n };\n\n if (! hasTemplateElement) {\n // Gecko is more picky with the prototype than WebKit . Make sure to use the\n // same prototype as created in the constructor.\n HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);\n\n O bject.defineProperty(HTMLTemplateElement.prototype, 'content',\n contentDescriptor);\n }\n\n function fixTemplateElementPrototype(el) {\n if (hasProto)\n el.__proto__ = HTMLTemplateElement.prototype;\n else\n mixin(el, HTMLTemplateElement.prototype);\n }\n\n function ensureS etModelScheduled(template) {\n if (!template.setModelFn_) {\n template.s etModelFn_ = function() {\n template.setModelFnScheduled_ = false;\n var map = getBindings(template,\n template.delegate_ && template.d elegate_.prepareBinding);\n processBindings(template, map, template.model _);\n };\n }\n\n if (!template.setModelFnScheduled_) {\n templat e.setModelFnScheduled_ = true;\n Observer.runEOM_(template.setModelFn_);\n }\n }\n\n mixin(HTMLTemplateElement.prototype, {\n bind: function(name, value, oneTime) {\n if (name != 'ref')\n return Element.prototype.bi nd.call(this, name, value, oneTime);\n\n var self = this;\n var ref = oneTime ? value : value.open(function(ref) {\n self.setAttribute('ref', r ef);\n self.refChanged_();\n });\n\n this.setAttribute('ref', r ef);\n this.refChanged_();\n if (oneTime)\n return;\n\n if (!this.bindings_) {\n this.bindings_ = { ref: value };\n } else {\n this.bindings_.ref = value;\n }\n\n return value;\n },\n\n processBindingDirectives_: function(directives) {\n if (this.iterator_)\ n this.iterator_.closeDeps();\n\n if (!directives.if && !directives. bind && !directives.repeat) {\n if (this.iterator_) {\n this.ite rator_.close();\n this.iterator_ = undefined;\n }\n\n ret urn;\n }\n\n if (!this.iterator_) {\n this.iterator_ = new Temp lateIterator(this);\n }\n\n this.iterator_.updateDependencies(directiv es, this.model_);\n\n if (templateObserver) {\n templateObserver.obs erve(this, { attributes: true,\n attribu teFilter: ['ref'] });\n }\n\n return this.iterator_;\n },\n\n cr eateInstance: function(model, bindingDelegate, delegate_) {\n if (bindingDe legate)\n delegate_ = this.newDelegate_(bindingDelegate);\n else if (!delegate_)\n delegate_ = this.delegate_;\n\n if (!this.refContent_ )\n this.refContent_ = this.ref_.content;\n var content = this.refCo ntent_;\n if (content.firstChild === null)\n return emptyInstance;\n \n var map = getInstanceBindingMap(content, delegate_);\n var stagingD ocument = getTemplateStagingDocument(this);\n var instance = stagingDocumen t.createDocumentFragment();\n instance.templateCreator_ = this;\n inst ance.protoContent_ = content;\n instance.bindings_ = [];\n instance.te rminator_ = null;\n var instanceRecord = instance.templateInstance_ = {\n firstNode: null,\n lastNode: null,\n model: model\n };\ n\n var i = 0;\n var collectTerminator = false;\n for (var child = content.firstChild; child; child = child.nextSibling) {\n // The termin ator of the instance is the clone of the last child of the\n // content. If the last child is an active template, it may produce\n // instances as a result of production, so simply collecting the last\n // child of the instance after it has finished producing may be wrong.\n if (child.nextSi bling === null)\n collectTerminator = true;\n\n var clone = clon eAndBindInstance(child, instance, stagingDocument,\n map.children[i++],\n model, \n delegate_,\n instance.bindings_);\n clone.templateInstance_ = instance Record;\n if (collectTerminator)\n instance.terminator_ = clone; \n }\n\n instanceRecord.firstNode = instance.firstChild;\n instan ceRecord.lastNode = instance.lastChild;\n instance.templateCreator_ = undef ined;\n instance.protoContent_ = undefined;\n return instance;\n }, \n\n get model() {\n return this.model_;\n },\n\n set model(model) {\n this.model_ = model;\n ensureSetModelScheduled(this);\n },\n\n get bindingDelegate() {\n return this.delegate_ && this.delegate_.raw;\ n },\n\n refChanged_: function() {\n if (!this.iterator_ || this.refC ontent_ === this.ref_.content)\n return;\n\n this.refContent_ = unde fined;\n this.iterator_.valueChanged();\n this.iterator_.updateIterate dValue(this.iterator_.getUpdatedValue());\n },\n\n clear: function() {\n this.model_ = undefined;\n this.delegate_ = undefined;\n if (this. bindings_ && this.bindings_.ref)\n this.bindings_.ref.close()\n this .refContent_ = undefined;\n if (!this.iterator_)\n return;\n th is.iterator_.valueChanged();\n this.iterator_.close()\n this.iterator_ = undefined;\n },\n\n setDelegate_: function(delegate) {\n this.dele gate_ = delegate;\n this.bindingMap_ = undefined;\n if (this.iterator_ ) {\n this.iterator_.instancePositionChangedFn_ = undefined;\n thi s.iterator_.instanceModelFn_ = undefined;\n }\n },\n\n newDelegate_: function(bindingDelegate) {\n if (!bindingDelegate)\n return;\n\n function delegateFn(name) {\n var fn = bindingDelegate && bindingDeleg ate[name];\n if (typeof fn != 'function')\n return;\n\n r eturn function() {\n return fn.apply(bindingDelegate, arguments);\n };\n }\n\n return {\n bindingMaps: {},\n raw: bindin gDelegate,\n prepareBinding: delegateFn('prepareBinding'),\n prepa reInstanceModel: delegateFn('prepareInstanceModel'),\n prepareInstancePos itionChanged:\n delegateFn('prepareInstancePositionChanged')\n } ;\n },\n\n set bindingDelegate(bindingDelegate) {\n if (this.delegate _) {\n throw Error('Template must be cleared before a new bindingDelegate ' +\n 'can be assigned');\n }\n\n this.setDelegate _(this.newDelegate_(bindingDelegate));\n },\n\n get ref_() {\n var re f = searchRefId(this, this.getAttribute('ref'));\n if (!ref)\n ref = this.instanceRef_;\n\n if (!ref)\n return this;\n\n var nextRe f = ref.ref_;\n return nextRef ? nextRef : ref;\n }\n });\n\n // Retur ns\n // a) undefined if there are no mustaches.\n // b) [TEXT, (ONE_TIME?, PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.\n function parse Mustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n re turn;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, la stIndex = 0, endIndex = 0;\n var onlyOneTime = true;\n while (lastIndex < length) {\n var startIndex = s.indexOf('{{', lastIndex);\n var oneTime Start = s.indexOf('[[', lastIndex);\n var oneTime = false;\n var termi nator = '}}';\n\n if (oneTimeStart >= 0 &&\n (startIndex < 0 || on eTimeStart < startIndex)) {\n startIndex = oneTimeStart;\n oneTime = true;\n terminator = ']]';\n }\n\n endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens. push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(st artIndex + 2, endIndex).trim();\n tokens.push(oneTime); // ONE_TIME?\n onlyOneTime = onlyOneTime && oneTime;\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node);\n // D on't try to parse the expression if there's a prepareBinding function\n if (delegateFn == null) {\n tokens.push(Path.get(pathString)); // PATH\n } else {\n tokens.push(null);\n }\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 5;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[4] == '';\n tokens.on lyOneTime = onlyOneTime;\n\n tokens.combinator = function(values) {\n va r newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 4) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 4];\n if (value !== undefined)\n newValue += value;\n newValue += tokens [i + 3];\n }\n\n return newValue;\n }\n\n return tokens;\n };\n \n function processOneTimeBinding(name, tokens, node, model) {\n if (tokens. hasOnePath) {\n var delegateFn = tokens[3];\n var value = delegateFn ? delegateFn(model, node, true) :\n tokens[2].getVa lueFrom(model);\n return tokens.isSimplePath ? value : tokens.combinator(va lue);\n }\n\n var values = [];\n for (var i = 1; i < tokens.length; i + = 4) {\n var delegateFn = tokens[i + 2];\n values[(i - 1) / 4] = deleg ateFn ? delegateFn(model, node) :\n tokens[i + 1].getValueFrom(model);\ n }\n\n return tokens.combinator(values);\n }\n\n function processSingle PathBinding(name, tokens, node, model) {\n var delegateFn = tokens[3];\n v ar observer = delegateFn ? delegateFn(model, node, false) :\n new PathObs erver(model, tokens[2]);\n\n return tokens.isSimplePath ? observer :\n new ObserverTransform(observer, tokens.combinator);\n }\n\n function processB inding(name, tokens, node, model) {\n if (tokens.onlyOneTime)\n return p rocessOneTimeBinding(name, tokens, node, model);\n\n if (tokens.hasOnePath)\n return processSinglePathBinding(name, tokens, node, model);\n\n var obs erver = new CompoundObserver();\n\n for (var i = 1; i < tokens.length; i += 4 ) {\n var oneTime = tokens[i];\n var delegateFn = tokens[i + 2];\n\n if (delegateFn) {\n var value = delegateFn(model, node, oneTime);\n if (oneTime)\n observer.addPath(value)\n else\n o bserver.addObserver(value);\n continue;\n }\n\n var path = toke ns[i + 1];\n if (oneTime)\n observer.addPath(path.getValueFrom(model ))\n else\n observer.addPath(model, path);\n }\n\n return new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBindin gs(node, bindings, model, instanceBindings) {\n for (var i = 0; i < bindings. length; i += 2) {\n var name = bindings[i]\n var tokens = bindings[i + 1];\n var value = processBinding(name, tokens, node, model);\n var bi nding = node.bind(name, value, tokens.onlyOneTime);\n if (binding && instan ceBindings)\n instanceBindings.push(binding);\n }\n\n node.bindFini shed();\n if (!bindings.isTemplate)\n return;\n\n node.model_ = model ;\n var iter = node.processBindingDirectives_(bindings);\n if (instanceBin dings && iter)\n instanceBindings.push(iter);\n }\n\n function parseWithD efault(el, name, prepareBindingFn) {\n var v = el.getAttribute(name);\n re turn parseMustaches(v == '' ? '{{}}' : v, name, el, prepareBindingFn);\n }\n\n function parseAttributeBindings(element, prepareBindingFn) {\n assert(elemen t);\n\n var bindings = [];\n var ifFound = false;\n var bindFound = fal se;\n\n for (var i = 0; i < element.attributes.length; i++) {\n var attr = element.attributes[i];\n var name = attr.name;\n var value = attr.v alue;\n\n // Allow bindings expressed in attributes to be prefixed with und erbars.\n // We do this to allow correct semantics for browsers that don't implement\n // <template> where certain attributes might trigger side-effec ts -- and\n // for IE which sanitizes certain attributes, disallowing musta che\n // replacements in their text.\n while (name[0] === '_') {\n name = name.substring(1);\n }\n\n if (isTemplate(element) &&\n (name === IF || name === BIND || name === REPEAT)) {\n continue;\n }\n\n var tokens = parseMustaches(value, name, element,\n prepareBindingFn);\n if (!tokens)\n continue;\n \n bindings.push(name, tokens);\n }\n\n if (isTemplate(element)) {\n bindings.isTemplate = true;\n bindings.if = parseWithDefault(element, IF, prepareBindingFn);\n bindings.bind = parseWithDefault(element, BIND, pr epareBindingFn);\n bindings.repeat = parseWithDefault(element, REPEAT, prep areBindingFn);\n\n if (bindings.if && !bindings.bind && !bindings.repeat)\n bindings.bind = parseMustaches('{{}}', BIND, element, prepareBindingFn); \n }\n\n return bindings;\n }\n\n function getBindings(node, prepareBind ingFn) {\n if (node.nodeType === Node.ELEMENT_NODE)\n return parseAttrib uteBindings(node, prepareBindingFn);\n\n if (node.nodeType === Node.TEXT_NODE ) {\n var tokens = parseMustaches(node.data, 'textContent', node,\n prepareBindingFn);\n if (tokens)\n return ['textContent', tokens];\n }\n\n return [];\n }\n\n function cloneAndBin dInstance(node, parent, stagingDocument, bindings, model,\n delegate,\n instanceBindings,\n instanceRecord) {\n var clone = parent.appendChild(s tagingDocument.importNode(node, false));\n\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n cloneAndBindInstanc e(child, clone, stagingDocument,\n bindings.children[ i++],\n model,\n delegate, \n instanceBindings);\n }\n\n if (bindings.isTe mplate) {\n HTMLTemplateElement.decorate(clone, node);\n if (delegate) \n clone.setDelegate_(delegate);\n }\n\n processBindings(clone, bin dings, model, instanceBindings);\n return clone;\n }\n\n function createIns tanceBindingMap(node, prepareBindingFn) {\n var map = getBindings(node, prepa reBindingFn);\n map.children = {};\n var index = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n map.children[index++ ] = createInstanceBindingMap(child, prepareBindingFn);\n }\n\n return map; \n }\n\n var contentUidCounter = 1;\n\n // TODO(rafaelw): Setup a MutationObs erver on content which clears the id\n // so that bindingMaps regenerate when t he template.content changes.\n function getContentUid(content) {\n var id = content.id_;\n if (!id)\n id = content.id_ = contentUidCounter++;\n r eturn id;\n }\n\n // Each delegate is associated with a set of bindingMaps, on e for each\n // content which may be used by a template. The intent is that eac h binding\n // delegate gets the opportunity to prepare the instance (via the p repare*\n // delegate calls) once across all uses.\n // TODO(rafaelw): Separat e out the parse map from the binding map. In the\n // current implementation, i f two delegates need a binding map for the same\n // content, the second will h ave to reparse.\n function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = dele gate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindin gMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prep areBinding) || [];\n }\n return map;\n }\n\n var map = content.b indingMap_;\n if (!map) {\n map = content.bindingMap_ =\n creat eInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }\n\n Object.defineProperty(Node.prototype, 'templateInstance', {\n get: function( ) {\n var instance = this.templateInstance_;\n return instance ? insta nce :\n (this.parentNode ? this.parentNode.templateInstance : undefined );\n }\n });\n\n var emptyInstance = document.createDocumentFragment();\n emptyInstance.bindings_ = [];\n emptyInstance.terminator_ = null;\n\n function TemplateIterator(templateElement) {\n this.closed = false;\n this.templat eElement_ = templateElement;\n this.instances = [];\n this.deps = undefine d;\n this.iteratedValue = [];\n this.presentValue = undefined;\n this.a rrayObserver = undefined;\n }\n\n TemplateIterator.prototype = {\n closeDep s: function() {\n var deps = this.deps;\n if (deps) {\n if (dep s.ifOneTime === false)\n deps.ifValue.close();\n if (deps.oneTim e === false)\n deps.value.close();\n }\n },\n\n updateDepend encies: function(directives, model) {\n this.closeDeps();\n\n var deps = this.deps = {};\n var template = this.templateElement_;\n\n var ifV alue = true;\n if (directives.if) {\n deps.hasIf = true;\n de ps.ifOneTime = directives.if.onlyOneTime;\n deps.ifValue = processBinding (IF, directives.if, template, model);\n\n ifValue = deps.ifValue;\n\n // oneTime if & predicate is false. nothing else to do.\n if (deps.if OneTime && !ifValue) {\n this.valueChanged();\n return;\n }\n\n if (!deps.ifOneTime)\n ifValue = ifValue.open(this.upda teIfValue, this);\n }\n\n if (directives.repeat) {\n deps.repea t = true;\n deps.oneTime = directives.repeat.onlyOneTime;\n deps.v alue = processBinding(REPEAT, directives.repeat, template, model);\n } else {\n deps.repeat = false;\n deps.oneTime = directives.bind.onlyOne Time;\n deps.value = processBinding(BIND, directives.bind, template, mode l);\n }\n\n var value = deps.value;\n if (!deps.oneTime)\n value = value.open(this.updateIteratedValue, this);\n\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n\n this.updateValue( value);\n },\n\n /**\n * Gets the updated value of the bind/repeat. Th is can potentially call\n * user code (if a bindingDelegate is set up) so we try to avoid it if we\n * already have the value in hand (from Observer.ope n).\n */\n getUpdatedValue: function() {\n var value = this.deps.val ue;\n if (!this.deps.oneTime)\n value = value.discardChanges();\n return value;\n },\n\n updateIfValue: function(ifValue) {\n if (!i fValue) {\n this.valueChanged();\n return;\n }\n\n this. updateValue(this.getUpdatedValue());\n },\n\n updateIteratedValue: functio n(value) {\n if (this.deps.hasIf) {\n var ifValue = this.deps.ifValu e;\n if (!this.deps.ifOneTime)\n ifValue = ifValue.discardChange s();\n if (!ifValue) {\n this.valueChanged();\n return; \n }\n }\n\n this.updateValue(value);\n },\n\n updateValu e: function(value) {\n if (!this.deps.repeat)\n value = [value];\n var observe = this.deps.repeat &&\n !this.deps.oneTime && \n Array.isArray(value);\n this.valueChanged(value, obse rve);\n },\n\n valueChanged: function(value, observeValue) {\n if (!A rray.isArray(value))\n value = [];\n\n if (value === this.iteratedVa lue)\n return;\n\n this.unobserve();\n this.presentValue = valu e;\n if (observeValue) {\n this.arrayObserver = new ArrayObserver(th is.presentValue);\n this.arrayObserver.open(this.handleSplices, this);\n }\n\n this.handleSplices(ArrayObserver.calculateSplices(this.presentVa lue,\n this.iteratedValue ));\n },\n\n getLastInstanceNode: function(index) {\n if (index == -1 )\n return this.templateElement_;\n var instance = this.instances[in dex];\n var terminator = instance.terminator_;\n if (!terminator)\n return this.getLastInstanceNode(index - 1);\n\n if (terminator.nodeTyp e !== Node.ELEMENT_NODE ||\n this.templateElement_ === terminator) {\n return terminator;\n }\n\n var subtemplateIterator = terminator .iterator_;\n if (!subtemplateIterator)\n return terminator;\n\n return subtemplateIterator.getLastTemplateNode();\n },\n\n getLastTempla teNode: function() {\n return this.getLastInstanceNode(this.instances.lengt h - 1);\n },\n\n insertInstanceAt: function(index, fragment) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var parent = this.templateElement_.parentNode;\n this.instances.splice(index, 0, fragmen t);\n\n parent.insertBefore(fragment, previousInstanceLast.nextSibling);\n },\n\n extractInstanceAt: function(index) {\n var previousInstanceLas t = this.getLastInstanceNode(index - 1);\n var lastNode = this.getLastInsta nceNode(index);\n var parent = this.templateElement_.parentNode;\n var instance = this.instances.splice(index, 1)[0];\n\n while (lastNode !== pre viousInstanceLast) {\n var node = previousInstanceLast.nextSibling;\n if (node == lastNode)\n lastNode = previousInstanceLast;\n\n instance.appendChild(parent.removeChild(node));\n }\n\n return instan ce;\n },\n\n getDelegateFn: function(fn) {\n fn = fn && fn(this.templ ateElement_);\n return typeof fn === 'function' ? fn : null;\n },\n\n handleSplices: function(splices) {\n if (this.closed || !splices.length)\n return;\n\n var template = this.templateElement_;\n\n if (!tem plate.parentNode) {\n this.close();\n return;\n }\n\n Ar rayObserver.applySplices(this.iteratedValue, this.presentValue,\n splices);\n\n var delegate = template.delegate_;\n i f (this.instanceModelFn_ === undefined) {\n this.instanceModelFn_ =\n this.getDelegateFn(delegate && delegate.prepareInstanceModel);\n }\ n\n if (this.instancePositionChangedFn_ === undefined) {\n this.inst ancePositionChangedFn_ =\n this.getDelegateFn(delegate &&\n delegate.prepareInstancePositionChanged);\n }\n\n // Instance Removals\n var instanceCache = new Map;\n var removeDelta = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = sp lices[i];\n var removed = splice.removed;\n for (var j = 0; j < re moved.length; j++) {\n var model = removed[j];\n var instance = this.extractInstanceAt(splice.index + removeDelta);\n if (instance != = emptyInstance) {\n instanceCache.set(model, instance);\n } \n }\n\n removeDelta -= splice.addedCount;\n }\n\n // In stance Insertions\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var addIndex = splice.index;\n for (; addI ndex < splice.index + splice.addedCount; addIndex++) {\n var model = th is.iteratedValue[addIndex];\n var instance = instanceCache.get(model);\ n if (instance) {\n instanceCache.delete(model);\n } else {\n if (this.instanceModelFn_) {\n model = this.i nstanceModelFn_(model);\n }\n\n if (model === undefined) { \n instance = emptyInstance;\n } else {\n i nstance = template.createInstance(model, undefined, delegate);\n }\n }\n\n this.insertInstanceAt(addIndex, instance);\n }\n }\n\n instanceCache.forEach(function(instance) {\n this.closeIn stanceBindings(instance);\n }, this);\n\n if (this.instancePositionCha ngedFn_)\n this.reportInstancesMoved(splices);\n },\n\n reportInsta nceMoved: function(index) {\n var instance = this.instances[index];\n if (instance === emptyInstance)\n return;\n\n this.instancePositionC hangedFn_(instance.templateInstance_, index);\n },\n\n reportInstancesMove d: function(splices) {\n var index = 0;\n var offset = 0;\n for ( var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n if (offset != 0) {\n while (index < splice.index) {\n this. reportInstanceMoved(index);\n index++;\n }\n } else { \n index = splice.index;\n }\n\n while (index < splice.in dex + splice.addedCount) {\n this.reportInstanceMoved(index);\n index++;\n }\n\n offset += splice.addedCount - splice.removed.le ngth;\n }\n\n if (offset == 0)\n return;\n\n var length = this.instances.length;\n while (index < length) {\n this.reportInsta nceMoved(index);\n index++;\n }\n },\n\n closeInstanceBindings : function(instance) {\n var bindings = instance.bindings_;\n for (var i = 0; i < bindings.length; i++) {\n bindings[i].close();\n }\n },\n\n unobserve: function() {\n if (!this.arrayObserver)\n retur n;\n\n this.arrayObserver.close();\n this.arrayObserver = undefined;\n },\n\n close: function() {\n if (this.closed)\n return;\n this.unobserve();\n for (var i = 0; i < this.instances.length; i++) {\n this.closeInstanceBindings(this.instances[i]);\n }\n\n this.inst ances.length = 0;\n this.closeDeps();\n this.templateElement_.iterator _ = undefined;\n this.closed = true;\n }\n };\n\n // Polyfill-specific API.\n HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;\n})(thi s);\n", 173 "// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n// This code may only be used under the BSD style license found at http://polymer. github.io/LICENSE.txt\n// The complete set of authors may be found at http://pol ymer.github.io/AUTHORS.txt\n// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code distributed by Google as part of the polymer project is also\n// subject to an additional IP rights grant fou nd at http://polymer.github.io/PATENTS.txt\n\n(function(global) {\n 'use strict ';\n\n function assert(v) {\n if (!v)\n throw new Error('Assertion fail ed');\n }\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype. forEach);\n\n function getFragmentRoot(node) {\n var p;\n while (p = node .parentNode) {\n node = p;\n }\n\n return node;\n }\n\n function se archRefId(node, id) {\n if (!id)\n return;\n\n var ref;\n var sele ctor = '#' + id;\n while (!ref) {\n node = getFragmentRoot(node);\n\n if (node.protoContent_)\n ref = node.protoContent_.querySelector(selec tor);\n else if (node.getElementById)\n ref = node.getElementById(id );\n\n if (ref || !node.templateCreator_)\n break\n\n node = no de.templateCreator_;\n }\n\n return ref;\n }\n\n function getInstanceRoo t(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n return node.templateCreator_ ? node : null;\n }\n\n var Map;\n if (global .Map && typeof global.Map.prototype.forEach === 'function') {\n Map = global. Map;\n } else {\n Map = function() {\n this.keys = [];\n this.valu es = [];\n };\n\n Map.prototype = {\n set: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n t his.keys.push(key);\n this.values.push(value);\n } else {\n this.values[index] = value;\n }\n },\n\n get: function(key ) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return;\n\n return this.values[index];\n },\n\n delete: fun ction(key, value) {\n var index = this.keys.indexOf(key);\n if (in dex < 0)\n return false;\n\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return true;\n },\n\n forEach : function(f, opt_this) {\n for (var i = 0; i < this.keys.length; i++)\n f.call(opt_this || this, this.values[i], this.keys[i], this);\n }\ n };\n }\n\n // JScript does not have __proto__. We wrap all object literal s with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' i n {}) ?\n function(obj) { return obj; } :\n function(obj) {\n v ar proto = obj.__proto__;\n if (!proto)\n return obj;\n v ar newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).fo rEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n } );\n return newObject;\n };\n\n // IE does not support have Documen t.prototype.contains.\n if (typeof document.contains != 'function') {\n Docu ment.prototype.contains = function(node) {\n if (node === this || node.pare ntNode === this)\n return true;\n return this.documentElement.contai ns(node);\n }\n }\n\n var BIND = 'bind';\n var REPEAT = 'repeat';\n var I F = 'if';\n\n var templateAttributeDirectives = {\n 'template': true,\n ' repeat': true,\n 'bind': true,\n 'ref': true\n };\n\n var semanticTempla teElements = {\n 'THEAD': true,\n 'TBODY': true,\n 'TFOOT': true,\n 'TH': true,\n 'TR': true,\n 'TD': true,\n 'COLGROUP': true,\n 'COL': true,\n 'CAPTION': true,\n 'OPTION': true,\n 'OPTGROUP': true\n };\n\ n var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';\n if (h asTemplateElement) {\n // TODO(rafaelw): Remove when fix for\n // https:// codereview.chromium.org/164803002/\n // makes it to Chrome release.\n (fun ction() {\n var t = document.createElement('template');\n var d = t.co ntent.ownerDocument;\n var html = d.appendChild(d.createElement('html'));\n var head = html.appendChild(d.createElement('head'));\n var base = d. createElement('base');\n base.href = document.baseURI;\n head.appendCh ild(base);\n })();\n }\n\n var allTemplatesSelectors = 'template, ' +\n Object.keys(semanticTemplateElements).map(function(tagName) {\n return tagName.toLowerCase() + '[template]';\n }).join(', ');\n\n function isSVGT emplate(el) {\n return el.tagName == 'template' &&\n el.namespaceUR I == 'http://www.w3.org/2000/svg';\n }\n\n function isHTMLTemplate(el) {\n return el.tagName == 'TEMPLATE' &&\n el.namespaceURI == 'http://www.w3 .org/1999/xhtml';\n }\n\n function isAttributeTemplate(el) {\n return Boole an(semanticTemplateElements[el.tagName] &&\n el.hasAttribute(' template'));\n }\n\n function isTemplate(el) {\n if (el.isTemplate_ === und efined)\n el.isTemplate_ = el.tagName == 'TEMPLATE' || isAttributeTemplate( el);\n\n return el.isTemplate_;\n }\n\n // FIXME: Observe templates being a dded/removed from documents\n // FIXME: Expose imperative API to decorate and o bserve templates in\n // \"disconnected tress\" (e.g. ShadowRoot)\n document.a ddEventListener('DOMContentLoaded', function(e) {\n bootstrapTemplatesRecursi velyFrom(document);\n // FIXME: Is this needed? Seems like it shouldn't be.\n Platform.performMicrotaskCheckpoint();\n }, false);\n\n function forAllTem platesFrom(node, fn) {\n var subTemplates = node.querySelectorAll(allTemplate sSelectors);\n\n if (isTemplate(node))\n fn(node)\n forEach(subTempla tes, fn);\n }\n\n function bootstrapTemplatesRecursivelyFrom(node) {\n func tion bootstrap(template) {\n if (!HTMLTemplateElement.decorate(template))\n bootstrapTemplatesRecursivelyFrom(template.content);\n }\n\n forAl lTemplatesFrom(node, bootstrap);\n }\n\n if (!hasTemplateElement) {\n /**\n * This represents a <template> element.\n * @constructor\n * @exten ds {HTMLElement}\n */\n global.HTMLTemplateElement = function() {\n throw TypeError('Illegal constructor');\n };\n }\n\n var hasProto = '__prot o__' in {};\n\n function mixin(to, from) {\n Object.getOwnPropertyNames(from ).forEach(function(name) {\n Object.defineProperty(to, name,\n Object.getOwnPropertyDescriptor(from, name));\n });\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#df n-template-contents-owner\n function getOrCreateTemplateContentsOwner(template) {\n var doc = template.ownerDocument\n if (!doc.defaultView)\n retur n doc;\n var d = doc.templateContentsOwner_;\n if (!d) {\n // TODO(ar v): This should either be a Document or HTMLDocument depending\n // on doc. \n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild ) {\n d.removeChild(d.lastChild);\n }\n doc.templateContentsOwn er_ = d;\n }\n return d;\n }\n\n function getTemplateStagingDocument(tem plate) {\n if (!template.stagingDocument_) {\n var owner = template.owne rDocument;\n if (!owner.stagingDocument_) {\n owner.stagingDocument_ = owner.implementation.createHTMLDocument('');\n owner.stagingDocument_. isStagingDocument = true;\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome r elease.\n var base = owner.stagingDocument_.createElement('base');\n base.href = document.baseURI;\n owner.stagingDocument_.head.appendChil d(base);\n\n owner.stagingDocument_.stagingDocument_ = owner.stagingDocum ent_;\n }\n\n template.stagingDocument_ = owner.stagingDocument_;\n }\n\n return template.stagingDocument_;\n }\n\n // For non-template browse rs, the parser will disallow <template> in certain\n // locations, so we allow \"attribute templates\" which combine the template\n // element with the top-le vel container node of the content, e.g.\n //\n // <tr template repeat=\"{{ f oo }}\"\" class=\"bar\"><td>Bar</td></tr>\n //\n // becomes\n //\n // <tem plate repeat=\"{{ foo }}\">\n // + #document-fragment\n // + <tr class=\ "bar\">\n // + <td>Bar</td>\n //\n function extractTemplateFromAttribut eTemplate(el) {\n var template = el.ownerDocument.createElement('template');\ n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attribute s;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n if (templateAttributeDirectives[attrib.name]) {\n if (attrib.name !== 'template')\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n }\n\n return template;\n }\n\n function extractTemplateFromSVGTemplate(el) {\n v ar template = el.ownerDocument.createElement('template');\n el.parentNode.ins ertBefore(template, el);\n\n var attribs = el.attributes;\n var count = at tribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute( attrib.name);\n }\n\n el.parentNode.removeChild(el);\n return template; \n }\n\n function liftNonNativeTemplateChildrenIntoContent(template, el, useRo ot) {\n var content = template.content;\n if (useRoot) {\n content.ap pendChild(el);\n return;\n }\n\n var child;\n while (child = el.fi rstChild) {\n content.appendChild(child);\n }\n }\n\n var templateObse rver;\n if (typeof MutationObserver == 'function') {\n templateObserver = ne w MutationObserver(function(records) {\n for (var i = 0; i < records.length ; i++) {\n records[i].target.refChanged_();\n }\n });\n }\n\n / **\n * Ensures proper API and content model for template elements.\n * @para m {HTMLTemplateElement} opt_instanceRef The template element which\n * |el | template element will return as the value of its ref(), and whose\n * co ntent will be used as source when createInstance() is invoked.\n */\n HTMLTem plateElement.decorate = function(el, opt_instanceRef) {\n if (el.templateIsDe corated_)\n return false;\n\n var templateElement = el;\n templateEle ment.templateIsDecorated_ = true;\n\n var isNativeHTMLTemplate = isHTMLTempla te(templateElement) &&\n hasTemplateElement;\n var bootstrapContents = isNativeHTMLTemplate;\n var liftContents = !isNativeH TMLTemplate;\n var liftRoot = false;\n\n if (!isNativeHTMLTemplate) {\n if (isAttributeTemplate(templateElement)) {\n assert(!opt_instanceRef) ;\n templateElement = extractTemplateFromAttributeTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = has TemplateElement;\n liftRoot = true;\n } else if (isSVGTemplate(templ ateElement)) {\n templateElement = extractTemplateFromSVGTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplat e = hasTemplateElement;\n }\n }\n\n if (!isNativeHTMLTemplate) {\n fixTemplateElementPrototype(templateElement);\n var doc = getOrCreateTem plateContentsOwner(templateElement);\n templateElement.content_ = doc.creat eDocumentFragment();\n }\n\n if (opt_instanceRef) {\n // template is contained within an instance, its direct content must be\n // empty\n templateElement.instanceRef_ = opt_instanceRef;\n } else if (liftContents) {\ n liftNonNativeTemplateChildrenIntoContent(templateElement,\n el,\n liftRoot);\n } else if (bootstrapContents) {\n bootstrapTemplatesRe cursivelyFrom(templateElement.content);\n }\n\n return true;\n };\n\n // TODO(rafaelw): This used to decorate recursively all templates from a given\n // node. This happens by default on 'DOMContentLoaded', but may be needed\n // in subtrees not descendent from document (e.g. ShadowRoot).\n // Review whether this is the right public API.\n HTMLTemplateElement.bootstrap = bootstrapTempl atesRecursivelyFrom;\n\n var htmlElement = global.HTMLUnknownElement || HTMLEle ment;\n\n var contentDescriptor = {\n get: function() {\n return this.c ontent_;\n },\n enumerable: true,\n configurable: true\n };\n\n if (! hasTemplateElement) {\n // Gecko is more picky with the prototype than WebKit . Make sure to use the\n // same prototype as created in the constructor.\n HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);\n\n O bject.defineProperty(HTMLTemplateElement.prototype, 'content',\n contentDescriptor);\n }\n\n function fixTemplateElementPrototype(el) {\n if (hasProto)\n el.__proto__ = HTMLTemplateElement.prototype;\n else\n mixin(el, HTMLTemplateElement.prototype);\n }\n\n function ensureS etModelScheduled(template) {\n if (!template.setModelFn_) {\n template.s etModelFn_ = function() {\n template.setModelFnScheduled_ = false;\n var map = getBindings(template,\n template.delegate_ && template.d elegate_.prepareBinding);\n processBindings(template, map, template.model _);\n };\n }\n\n if (!template.setModelFnScheduled_) {\n templat e.setModelFnScheduled_ = true;\n Observer.runEOM_(template.setModelFn_);\n }\n }\n\n mixin(HTMLTemplateElement.prototype, {\n bind: function(name, value, oneTime) {\n if (name != 'ref')\n return Element.prototype.bi nd.call(this, name, value, oneTime);\n\n var self = this;\n var ref = oneTime ? value : value.open(function(ref) {\n self.setAttribute('ref', r ef);\n self.refChanged_();\n });\n\n this.setAttribute('ref', r ef);\n this.refChanged_();\n if (oneTime)\n return;\n\n if (!this.bindings_) {\n this.bindings_ = { ref: value };\n } else {\n this.bindings_.ref = value;\n }\n\n return value;\n },\n\n processBindingDirectives_: function(directives) {\n if (this.iterator_)\ n this.iterator_.closeDeps();\n\n if (!directives.if && !directives. bind && !directives.repeat) {\n if (this.iterator_) {\n this.ite rator_.close();\n this.iterator_ = undefined;\n }\n\n ret urn;\n }\n\n if (!this.iterator_) {\n this.iterator_ = new Temp lateIterator(this);\n }\n\n this.iterator_.updateDependencies(directiv es, this.model_);\n\n if (templateObserver) {\n templateObserver.obs erve(this, { attributes: true,\n attribu teFilter: ['ref'] });\n }\n\n return this.iterator_;\n },\n\n cr eateInstance: function(model, bindingDelegate, delegate_) {\n if (bindingDe legate)\n delegate_ = this.newDelegate_(bindingDelegate);\n else if (!delegate_)\n delegate_ = this.delegate_;\n\n if (!this.refContent_ )\n this.refContent_ = this.ref_.content;\n var content = this.refCo ntent_;\n if (content.firstChild === null)\n return emptyInstance;\n \n var map = getInstanceBindingMap(content, delegate_);\n var stagingD ocument = getTemplateStagingDocument(this);\n var instance = stagingDocumen t.createDocumentFragment();\n instance.templateCreator_ = this;\n inst ance.protoContent_ = content;\n instance.bindings_ = [];\n instance.te rminator_ = null;\n var instanceRecord = instance.templateInstance_ = {\n firstNode: null,\n lastNode: null,\n model: model\n };\ n\n var i = 0;\n var collectTerminator = false;\n for (var child = content.firstChild; child; child = child.nextSibling) {\n // The termin ator of the instance is the clone of the last child of the\n // content. If the last child is an active template, it may produce\n // instances as a result of production, so simply collecting the last\n // child of the instance after it has finished producing may be wrong.\n if (child.nextSi bling === null)\n collectTerminator = true;\n\n var clone = clon eAndBindInstance(child, instance, stagingDocument,\n map.children[i++],\n model, \n delegate_,\n instance.bindings_);\n clone.templateInstance_ = instance Record;\n if (collectTerminator)\n instance.terminator_ = clone; \n }\n\n instanceRecord.firstNode = instance.firstChild;\n instan ceRecord.lastNode = instance.lastChild;\n instance.templateCreator_ = undef ined;\n instance.protoContent_ = undefined;\n return instance;\n }, \n\n get model() {\n return this.model_;\n },\n\n set model(model) {\n this.model_ = model;\n ensureSetModelScheduled(this);\n },\n\n get bindingDelegate() {\n return this.delegate_ && this.delegate_.raw;\ n },\n\n refChanged_: function() {\n if (!this.iterator_ || this.refC ontent_ === this.ref_.content)\n return;\n\n this.refContent_ = unde fined;\n this.iterator_.valueChanged();\n this.iterator_.updateIterate dValue(this.iterator_.getUpdatedValue());\n },\n\n clear: function() {\n this.model_ = undefined;\n this.delegate_ = undefined;\n if (this. bindings_ && this.bindings_.ref)\n this.bindings_.ref.close()\n this .refContent_ = undefined;\n if (!this.iterator_)\n return;\n th is.iterator_.valueChanged();\n this.iterator_.close()\n this.iterator_ = undefined;\n },\n\n setDelegate_: function(delegate) {\n this.dele gate_ = delegate;\n this.bindingMap_ = undefined;\n if (this.iterator_ ) {\n this.iterator_.instancePositionChangedFn_ = undefined;\n thi s.iterator_.instanceModelFn_ = undefined;\n }\n },\n\n newDelegate_: function(bindingDelegate) {\n if (!bindingDelegate)\n return;\n\n function delegateFn(name) {\n var fn = bindingDelegate && bindingDeleg ate[name];\n if (typeof fn != 'function')\n return;\n\n r eturn function() {\n return fn.apply(bindingDelegate, arguments);\n };\n }\n\n return {\n bindingMaps: {},\n raw: bindin gDelegate,\n prepareBinding: delegateFn('prepareBinding'),\n prepa reInstanceModel: delegateFn('prepareInstanceModel'),\n prepareInstancePos itionChanged:\n delegateFn('prepareInstancePositionChanged')\n } ;\n },\n\n set bindingDelegate(bindingDelegate) {\n if (this.delegate _) {\n throw Error('Template must be cleared before a new bindingDelegate ' +\n 'can be assigned');\n }\n\n this.setDelegate _(this.newDelegate_(bindingDelegate));\n },\n\n get ref_() {\n var re f = searchRefId(this, this.getAttribute('ref'));\n if (!ref)\n ref = this.instanceRef_;\n\n if (!ref)\n return this;\n\n var nextRe f = ref.ref_;\n return nextRef ? nextRef : ref;\n }\n });\n\n // Retur ns\n // a) undefined if there are no mustaches.\n // b) [TEXT, (ONE_TIME?, PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.\n function parse Mustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n re turn;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, la stIndex = 0, endIndex = 0;\n var onlyOneTime = true;\n while (lastIndex < length) {\n var startIndex = s.indexOf('{{', lastIndex);\n var oneTime Start = s.indexOf('[[', lastIndex);\n var oneTime = false;\n var termi nator = '}}';\n\n if (oneTimeStart >= 0 &&\n (startIndex < 0 || on eTimeStart < startIndex)) {\n startIndex = oneTimeStart;\n oneTime = true;\n terminator = ']]';\n }\n\n endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens. push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(st artIndex + 2, endIndex).trim();\n tokens.push(oneTime); // ONE_TIME?\n onlyOneTime = onlyOneTime && oneTime;\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node);\n // D on't try to parse the expression if there's a prepareBinding function\n if (delegateFn == null) {\n tokens.push(Path.get(pathString)); // PATH\n } else {\n tokens.push(null);\n }\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 5;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[4] == '';\n tokens.on lyOneTime = onlyOneTime;\n\n tokens.combinator = function(values) {\n va r newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 4) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 4];\n if (value !== undefined)\n newValue += value;\n newValue += tokens [i + 3];\n }\n\n return newValue;\n }\n\n return tokens;\n };\n \n function processOneTimeBinding(name, tokens, node, model) {\n if (tokens. hasOnePath) {\n var delegateFn = tokens[3];\n var value = delegateFn ? delegateFn(model, node, true) :\n tokens[2].getVa lueFrom(model);\n return tokens.isSimplePath ? value : tokens.combinator(va lue);\n }\n\n var values = [];\n for (var i = 1; i < tokens.length; i + = 4) {\n var delegateFn = tokens[i + 2];\n values[(i - 1) / 4] = deleg ateFn ? delegateFn(model, node) :\n tokens[i + 1].getValueFrom(model);\ n }\n\n return tokens.combinator(values);\n }\n\n function processSingle PathBinding(name, tokens, node, model) {\n var delegateFn = tokens[3];\n v ar observer = delegateFn ? delegateFn(model, node, false) :\n new PathObs erver(model, tokens[2]);\n\n return tokens.isSimplePath ? observer :\n new ObserverTransform(observer, tokens.combinator);\n }\n\n function processB inding(name, tokens, node, model) {\n if (tokens.onlyOneTime)\n return p rocessOneTimeBinding(name, tokens, node, model);\n\n if (tokens.hasOnePath)\n return processSinglePathBinding(name, tokens, node, model);\n\n var obs erver = new CompoundObserver();\n\n for (var i = 1; i < tokens.length; i += 4 ) {\n var oneTime = tokens[i];\n var delegateFn = tokens[i + 2];\n\n if (delegateFn) {\n var value = delegateFn(model, node, oneTime);\n if (oneTime)\n observer.addPath(value)\n else\n o bserver.addObserver(value);\n continue;\n }\n\n var path = toke ns[i + 1];\n if (oneTime)\n observer.addPath(path.getValueFrom(model ))\n else\n observer.addPath(model, path);\n }\n\n return new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBindin gs(node, bindings, model, instanceBindings) {\n for (var i = 0; i < bindings. length; i += 2) {\n var name = bindings[i]\n var tokens = bindings[i + 1];\n var value = processBinding(name, tokens, node, model);\n var bi nding = node.bind(name, value, tokens.onlyOneTime);\n if (binding && instan ceBindings)\n instanceBindings.push(binding);\n }\n\n node.bindFini shed();\n if (!bindings.isTemplate)\n return;\n\n node.model_ = model ;\n var iter = node.processBindingDirectives_(bindings);\n if (instanceBin dings && iter)\n instanceBindings.push(iter);\n }\n\n function parseWithD efault(el, name, prepareBindingFn) {\n var v = el.getAttribute(name);\n re turn parseMustaches(v == '' ? '{{}}' : v, name, el, prepareBindingFn);\n }\n\n function parseAttributeBindings(element, prepareBindingFn) {\n assert(elemen t);\n\n var bindings = [];\n var ifFound = false;\n var bindFound = fal se;\n\n for (var i = 0; i < element.attributes.length; i++) {\n var attr = element.attributes[i];\n var name = attr.name;\n var value = attr.v alue;\n\n // Allow bindings expressed in attributes to be prefixed with und erbars.\n // We do this to allow correct semantics for browsers that don't implement\n // <template> where certain attributes might trigger side-effec ts -- and\n // for IE which sanitizes certain attributes, disallowing musta che\n // replacements in their text.\n while (name[0] === '_') {\n name = name.substring(1);\n }\n\n if (isTemplate(element) &&\n (name === IF || name === BIND || name === REPEAT)) {\n continue;\n }\n\n var tokens = parseMustaches(value, name, element,\n prepareBindingFn);\n if (!tokens)\n continue;\n \n bindings.push(name, tokens);\n }\n\n if (isTemplate(element)) {\n bindings.isTemplate = true;\n bindings.if = parseWithDefault(element, IF, prepareBindingFn);\n bindings.bind = parseWithDefault(element, BIND, pr epareBindingFn);\n bindings.repeat = parseWithDefault(element, REPEAT, prep areBindingFn);\n\n if (bindings.if && !bindings.bind && !bindings.repeat)\n bindings.bind = parseMustaches('{{}}', BIND, element, prepareBindingFn); \n }\n\n return bindings;\n }\n\n function getBindings(node, prepareBind ingFn) {\n if (node.nodeType === Node.ELEMENT_NODE)\n return parseAttrib uteBindings(node, prepareBindingFn);\n\n if (node.nodeType === Node.TEXT_NODE ) {\n var tokens = parseMustaches(node.data, 'textContent', node,\n prepareBindingFn);\n if (tokens)\n return ['textContent', tokens];\n }\n\n return [];\n }\n\n function cloneAndBin dInstance(node, parent, stagingDocument, bindings, model,\n delegate,\n instanceBindings,\n instanceRecord) {\n var clone = parent.appendChild(s tagingDocument.importNode(node, false));\n\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n cloneAndBindInstanc e(child, clone, stagingDocument,\n bindings.children[ i++],\n model,\n delegate, \n instanceBindings);\n }\n\n if (bindings.isTe mplate) {\n HTMLTemplateElement.decorate(clone, node);\n if (delegate) \n clone.setDelegate_(delegate);\n }\n\n processBindings(clone, bin dings, model, instanceBindings);\n return clone;\n }\n\n function createIns tanceBindingMap(node, prepareBindingFn) {\n var map = getBindings(node, prepa reBindingFn);\n map.children = {};\n var index = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n map.children[index++ ] = createInstanceBindingMap(child, prepareBindingFn);\n }\n\n return map; \n }\n\n var contentUidCounter = 1;\n\n // TODO(rafaelw): Setup a MutationObs erver on content which clears the id\n // so that bindingMaps regenerate when t he template.content changes.\n function getContentUid(content) {\n var id = content.id_;\n if (!id)\n id = content.id_ = contentUidCounter++;\n r eturn id;\n }\n\n // Each delegate is associated with a set of bindingMaps, on e for each\n // content which may be used by a template. The intent is that eac h binding\n // delegate gets the opportunity to prepare the instance (via the p repare*\n // delegate calls) once across all uses.\n // TODO(rafaelw): Separat e out the parse map from the binding map. In the\n // current implementation, i f two delegates need a binding map for the same\n // content, the second will h ave to reparse.\n function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = dele gate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindin gMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prep areBinding) || [];\n }\n return map;\n }\n\n var map = content.b indingMap_;\n if (!map) {\n map = content.bindingMap_ =\n creat eInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }\n\n Object.defineProperty(Node.prototype, 'templateInstance', {\n get: function( ) {\n var instance = this.templateInstance_;\n return instance ? insta nce :\n (this.parentNode ? this.parentNode.templateInstance : undefined );\n }\n });\n\n var emptyInstance = document.createDocumentFragment();\n emptyInstance.bindings_ = [];\n emptyInstance.terminator_ = null;\n\n function TemplateIterator(templateElement) {\n this.closed = false;\n this.templat eElement_ = templateElement;\n this.instances = [];\n this.deps = undefine d;\n this.iteratedValue = [];\n this.presentValue = undefined;\n this.a rrayObserver = undefined;\n }\n\n TemplateIterator.prototype = {\n closeDep s: function() {\n var deps = this.deps;\n if (deps) {\n if (dep s.ifOneTime === false)\n deps.ifValue.close();\n if (deps.oneTim e === false)\n deps.value.close();\n }\n },\n\n updateDepend encies: function(directives, model) {\n this.closeDeps();\n\n var deps = this.deps = {};\n var template = this.templateElement_;\n\n var ifV alue = true;\n if (directives.if) {\n deps.hasIf = true;\n de ps.ifOneTime = directives.if.onlyOneTime;\n deps.ifValue = processBinding (IF, directives.if, template, model);\n\n ifValue = deps.ifValue;\n\n // oneTime if & predicate is false. nothing else to do.\n if (deps.if OneTime && !ifValue) {\n this.valueChanged();\n return;\n }\n\n if (!deps.ifOneTime)\n ifValue = ifValue.open(this.upda teIfValue, this);\n }\n\n if (directives.repeat) {\n deps.repea t = true;\n deps.oneTime = directives.repeat.onlyOneTime;\n deps.v alue = processBinding(REPEAT, directives.repeat, template, model);\n } else {\n deps.repeat = false;\n deps.oneTime = directives.bind.onlyOne Time;\n deps.value = processBinding(BIND, directives.bind, template, mode l);\n }\n\n var value = deps.value;\n if (!deps.oneTime)\n value = value.open(this.updateIteratedValue, this);\n\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n\n this.updateValue( value);\n },\n\n /**\n * Gets the updated value of the bind/repeat. Th is can potentially call\n * user code (if a bindingDelegate is set up) so we try to avoid it if we\n * already have the value in hand (from Observer.ope n).\n */\n getUpdatedValue: function() {\n var value = this.deps.val ue;\n if (!this.deps.oneTime)\n value = value.discardChanges();\n return value;\n },\n\n updateIfValue: function(ifValue) {\n if (!i fValue) {\n this.valueChanged();\n return;\n }\n\n this. updateValue(this.getUpdatedValue());\n },\n\n updateIteratedValue: functio n(value) {\n if (this.deps.hasIf) {\n var ifValue = this.deps.ifValu e;\n if (!this.deps.ifOneTime)\n ifValue = ifValue.discardChange s();\n if (!ifValue) {\n this.valueChanged();\n return; \n }\n }\n\n this.updateValue(value);\n },\n\n updateValu e: function(value) {\n if (!this.deps.repeat)\n value = [value];\n var observe = this.deps.repeat &&\n !this.deps.oneTime && \n Array.isArray(value);\n this.valueChanged(value, obse rve);\n },\n\n valueChanged: function(value, observeValue) {\n if (!A rray.isArray(value))\n value = [];\n\n if (value === this.iteratedVa lue)\n return;\n\n this.unobserve();\n this.presentValue = valu e;\n if (observeValue) {\n this.arrayObserver = new ArrayObserver(th is.presentValue);\n this.arrayObserver.open(this.handleSplices, this);\n }\n\n this.handleSplices(ArrayObserver.calculateSplices(this.presentVa lue,\n this.iteratedValue ));\n },\n\n getLastInstanceNode: function(index) {\n if (index == -1 )\n return this.templateElement_;\n var instance = this.instances[in dex];\n var terminator = instance.terminator_;\n if (!terminator)\n return this.getLastInstanceNode(index - 1);\n\n if (terminator.nodeTyp e !== Node.ELEMENT_NODE ||\n this.templateElement_ === terminator) {\n return terminator;\n }\n\n var subtemplateIterator = terminator .iterator_;\n if (!subtemplateIterator)\n return terminator;\n\n return subtemplateIterator.getLastTemplateNode();\n },\n\n getLastTempla teNode: function() {\n return this.getLastInstanceNode(this.instances.lengt h - 1);\n },\n\n insertInstanceAt: function(index, fragment) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var parent = this.templateElement_.parentNode;\n this.instances.splice(index, 0, fragmen t);\n\n parent.insertBefore(fragment, previousInstanceLast.nextSibling);\n },\n\n extractInstanceAt: function(index) {\n var previousInstanceLas t = this.getLastInstanceNode(index - 1);\n var lastNode = this.getLastInsta nceNode(index);\n var parent = this.templateElement_.parentNode;\n var instance = this.instances.splice(index, 1)[0];\n\n while (lastNode !== pre viousInstanceLast) {\n var node = previousInstanceLast.nextSibling;\n if (node == lastNode)\n lastNode = previousInstanceLast;\n\n instance.appendChild(parent.removeChild(node));\n }\n\n return instan ce;\n },\n\n getDelegateFn: function(fn) {\n fn = fn && fn(this.templ ateElement_);\n return typeof fn === 'function' ? fn : null;\n },\n\n handleSplices: function(splices) {\n if (this.closed || !splices.length)\n return;\n\n var template = this.templateElement_;\n\n if (!tem plate.parentNode) {\n this.close();\n return;\n }\n\n Ar rayObserver.applySplices(this.iteratedValue, this.presentValue,\n splices);\n\n var delegate = template.delegate_;\n i f (this.instanceModelFn_ === undefined) {\n this.instanceModelFn_ =\n this.getDelegateFn(delegate && delegate.prepareInstanceModel);\n }\ n\n if (this.instancePositionChangedFn_ === undefined) {\n this.inst ancePositionChangedFn_ =\n this.getDelegateFn(delegate &&\n delegate.prepareInstancePositionChanged);\n }\n\n // Instance Removals\n var instanceCache = new Map;\n var removeDelta = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = sp lices[i];\n var removed = splice.removed;\n for (var j = 0; j < re moved.length; j++) {\n var model = removed[j];\n var instance = this.extractInstanceAt(splice.index + removeDelta);\n if (instance != = emptyInstance) {\n instanceCache.set(model, instance);\n } \n }\n\n removeDelta -= splice.addedCount;\n }\n\n // In stance Insertions\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var addIndex = splice.index;\n for (; addI ndex < splice.index + splice.addedCount; addIndex++) {\n var model = th is.iteratedValue[addIndex];\n var instance = instanceCache.get(model);\ n if (instance) {\n instanceCache.delete(model);\n } else {\n if (this.instanceModelFn_) {\n model = this.i nstanceModelFn_(model);\n }\n\n if (model === undefined) { \n instance = emptyInstance;\n } else {\n i nstance = template.createInstance(model, undefined, delegate);\n }\n }\n\n this.insertInstanceAt(addIndex, instance);\n }\n }\n\n instanceCache.forEach(function(instance) {\n this.closeIn stanceBindings(instance);\n }, this);\n\n if (this.instancePositionCha ngedFn_)\n this.reportInstancesMoved(splices);\n },\n\n reportInsta nceMoved: function(index) {\n var instance = this.instances[index];\n if (instance === emptyInstance)\n return;\n\n this.instancePositionC hangedFn_(instance.templateInstance_, index);\n },\n\n reportInstancesMove d: function(splices) {\n var index = 0;\n var offset = 0;\n for ( var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n if (offset != 0) {\n while (index < splice.index) {\n this. reportInstanceMoved(index);\n index++;\n }\n } else { \n index = splice.index;\n }\n\n while (index < splice.in dex + splice.addedCount) {\n this.reportInstanceMoved(index);\n index++;\n }\n\n offset += splice.addedCount - splice.removed.le ngth;\n }\n\n if (offset == 0)\n return;\n\n var length = this.instances.length;\n while (index < length) {\n this.reportInsta nceMoved(index);\n index++;\n }\n },\n\n closeInstanceBindings : function(instance) {\n var bindings = instance.bindings_;\n for (var i = 0; i < bindings.length; i++) {\n bindings[i].close();\n }\n },\n\n unobserve: function() {\n if (!this.arrayObserver)\n retur n;\n\n this.arrayObserver.close();\n this.arrayObserver = undefined;\n },\n\n close: function() {\n if (this.closed)\n return;\n this.unobserve();\n for (var i = 0; i < this.instances.length; i++) {\n this.closeInstanceBindings(this.instances[i]);\n }\n\n this.inst ances.length = 0;\n this.closeDeps();\n this.templateElement_.iterator _ = undefined;\n this.closed = true;\n }\n };\n\n // Polyfill-specific API.\n HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;\n})(thi s);\n",
174 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textCont ent = 'template {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChil d);\n\n// flush (with logging)\nvar flushing;\nfunction flush() {\n if (!flushi ng) {\n flushing = true;\n scope.endOfMicrotask(function() {\n flushi ng = false;\n logFlags.data && console.group('Platform.flush()');\n sc ope.performMicrotaskCheckpoint();\n logFlags.data && console.groupEnd();\n });\n }\n};\n\n// polling dirty checker\n// flush periodically if platform d oes not have object observe.\nif (!Observer.hasObjectObserve) {\n var FLUSH_POL L_INTERVAL = 125;\n window.addEventListener('WebComponentsReady', function() {\ n flush();\n scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);\n });\n} else {\n // make flush a no-op when we have Object.observe\n flush = f unction() {};\n}\n\nif (window.CustomElements && !CustomElements.useNative) {\n var originalImportNode = Document.prototype.importNode;\n Document.prototype.i mportNode = function(node, deep) {\n var imported = originalImportNode.call(t his, node, deep);\n CustomElements.upgradeAll(imported);\n return imported ;\n }\n}\n\n// exports\nscope.flush = flush;\n\n})(window.Platform);\n\n" 174 "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. \n * This code may only be used under the BSD style license found at http://poly mer.github.io/LICENSE.txt\n * The complete set of authors may be found at http:/ /polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textCont ent = 'template {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChil d);\n\n// flush (with logging)\nvar flushing;\nfunction flush() {\n if (!flushi ng) {\n flushing = true;\n scope.endOfMicrotask(function() {\n flushi ng = false;\n logFlags.data && console.group('Platform.flush()');\n sc ope.performMicrotaskCheckpoint();\n logFlags.data && console.groupEnd();\n });\n }\n};\n\n// polling dirty checker\n// flush periodically if platform d oes not have object observe.\nif (!Observer.hasObjectObserve) {\n var FLUSH_POL L_INTERVAL = 125;\n window.addEventListener('WebComponentsReady', function() {\ n flush();\n scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);\n });\n} else {\n // make flush a no-op when we have Object.observe\n flush = f unction() {};\n}\n\nif (window.CustomElements && !CustomElements.useNative) {\n var originalImportNode = Document.prototype.importNode;\n Document.prototype.i mportNode = function(node, deep) {\n var imported = originalImportNode.call(t his, node, deep);\n CustomElements.upgradeAll(imported);\n return imported ;\n }\n}\n\n// exports\nscope.flush = flush;\n\n})(window.Platform);\n\n"
175 ] 175 ]
176 } 176 }
OLDNEW
« no previous file with comments | « pkg/web_components/lib/platform.concat.js ('k') | pkg/web_components/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698